/* Global Headers */ #if defined(PLATFORM_X) #include #include #include #elif defined(PLATFORM_OSX) #define decimal CocoaDecimal #include #include #undef decimal #elif defined(PLATFORM_WINDOWS) #define _WIN32_WINNT 0x0501 #include #endif using namespace nall; /* Video */ #define DeclareVideo(Name) \ class Video##Name : public Video { \ public: \ bool cap(const string& name) { return p.cap(name); } \ any get(const string& name) { return p.get(name); } \ bool set(const string& name, const any& value) { return p.set(name, value); } \ \ bool lock(uint32_t*& data, unsigned& pitch, unsigned width, unsigned height) { return p.lock(data, pitch, width, height); } \ void unlock() { p.unlock(); } \ \ void clear() { p.clear(); } \ void refresh() { p.refresh(); } \ bool init() { return p.init(); } \ void term() { p.term(); } \ \ Video##Name() : p(*new pVideo##Name) {} \ ~Video##Name() { delete &p; } \ \ private: \ pVideo##Name& p; \ }; #ifdef VIDEO_CGL #include #endif #ifdef VIDEO_DIRECT3D #include #endif #ifdef VIDEO_DIRECTDRAW #include #endif #ifdef VIDEO_GDI #include #endif #ifdef VIDEO_GLX #include #endif #ifdef VIDEO_SDL #include #endif #ifdef VIDEO_WGL #include #endif #ifdef VIDEO_XSHM #include #endif #ifdef VIDEO_XV #include #endif /* Audio */ #define DeclareAudio(Name) \ class Audio##Name : public Audio { \ public: \ bool cap(const string& name) { return p.cap(name); } \ any get(const string& name) { return p.get(name); } \ bool set(const string& name, const any& value) { return p.set(name, value); } \ \ void sample(uint16_t left, uint16_t right) { p.sample(left, right); } \ void clear() { p.clear(); } \ bool init() { return p.init(); } \ void term() { p.term(); } \ \ Audio##Name() : p(*new pAudio##Name) {} \ ~Audio##Name() { delete &p; } \ \ private: \ pAudio##Name& p; \ }; #ifdef AUDIO_ALSA #include #endif #ifdef AUDIO_AO #include #endif #ifdef AUDIO_DIRECTSOUND #include #endif #ifdef AUDIO_OPENAL #include #endif #ifdef AUDIO_OSS #include #endif #ifdef AUDIO_PULSEAUDIO #include #endif #ifdef AUDIO_PULSEAUDIOSIMPLE #include #endif #ifdef AUDIO_XAUDIO2 #include #endif /* Input */ #define DeclareInput(Name) \ class Input##Name : public Input { \ public: \ bool cap(const string& name) { return p.cap(name); } \ any get(const string& name) { return p.get(name); } \ bool set(const string& name, const any& value) { return p.set(name, value); } \ \ bool acquire() { return p.acquire(); } \ bool unacquire() { return p.unacquire(); } \ bool acquired() { return p.acquired(); } \ \ bool poll(int16_t* table) { return p.poll(table); } \ bool init() { return p.init(); } \ void term() { p.term(); } \ \ Input##Name() : p(*new pInput##Name) {} \ ~Input##Name() { delete &p; } \ \ private: \ pInput##Name& p; \ }; #ifdef INPUT_DIRECTINPUT #include #endif #ifdef INPUT_RAWINPUT #include #endif #ifdef INPUT_CARBON #include #endif #ifdef INPUT_SDL #include #endif #ifdef INPUT_X #include #endif