Topic: Ban the User Above You Game

Posted under Off Topic

This topic has been locked.

banned cause.... I think it is trying to say everyone need sex..... and my eyes were raped :I

Updated by anonymous

Banned for fapping to gifs...
unless it is Pixel Porn.

Updated by anonymous

banned cause.... you gonna get that too? :3

Updated by anonymous

Banned because your tables are belong to us.

Updated by anonymous

Banned cause
BambooEmuInput.h

/*
 * Copyright (c) 2012 NINTENDO.
 *
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions 
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright 
 *    notice, this list of conditions, and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions, and the following disclaimer in the 
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY NINTENDO AND ITS CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
 * ARE DISCLAIMED.  IN NO EVENT SHALL NINTENDO OR CONTRIBUTORS BE LIABLE FOR ANY 
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#pragma once

#include <string> // std::wstring
#include "float_vec.h" // float2

// Define KPAD_ and VPAD_ button bitfield equivalents
#define KPAD_BUTTON_LEFT       BambooEmuInput::WII_REMOTE_LEFT
#define KPAD_BUTTON_RIGHT      BambooEmuInput::WII_REMOTE_RIGHT
#define KPAD_BUTTON_DOWN       BambooEmuInput::WII_REMOTE_DOWN
#define KPAD_BUTTON_UP         BambooEmuInput::WII_REMOTE_UP
#define KPAD_BUTTON_A          BambooEmuInput::WII_REMOTE_A
#define KPAD_BUTTON_B          BambooEmuInput::WII_REMOTE_B
#define KPAD_BUTTON_1          BambooEmuInput::WII_REMOTE_1
#define KPAD_BUTTON_2          BambooEmuInput::WII_REMOTE_2
#define KPAD_BUTTON_PLUS       BambooEmuInput::WII_REMOTE_PLUS
#define KPAD_BUTTON_MINUS      BambooEmuInput::WII_REMOTE_MINUS
#define KPAD_BUTTON_HOME       BambooEmuInput::WII_REMOTE_HOME
#define KPAD_BUTTON_Z          BambooEmuInput::WII_NUNCHUK_Z
#define KPAD_BUTTON_C          BambooEmuInput::WII_NUNCHUK_C
#define KPAD_CL_BUTTON_UP      BambooEmuInput::CLASSIC_UP
#define KPAD_CL_BUTTON_LEFT    BambooEmuInput::CLASSIC_LEFT
#define KPAD_CL_BUTTON_ZR      BambooEmuInput::CLASSIC_ZR
#define KPAD_CL_BUTTON_X       BambooEmuInput::CLASSIC_X
#define KPAD_CL_BUTTON_A       BambooEmuInput::CLASSIC_A
#define KPAD_CL_BUTTON_Y       BambooEmuInput::CLASSIC_Y
#define KPAD_CL_BUTTON_B       BambooEmuInput::CLASSIC_B
#define KPAD_CL_BUTTON_ZL      BambooEmuInput::CLASSIC_ZL
#define KPAD_CL_RESERVED       BambooEmuInput::CLASSIC_RESERVED
#define KPAD_CL_BUTTON_R       BambooEmuInput::CLASSIC_R
#define KPAD_CL_BUTTON_PLUS    BambooEmuInput::CLASSIC_PLUS
#define KPAD_CL_BUTTON_HOME    BambooEmuInput::CLASSIC_HOME
#define KPAD_CL_BUTTON_MINUS   BambooEmuInput::CLASSIC_MINUS
#define KPAD_CL_BUTTON_L       BambooEmuInput::CLASSIC_L
#define KPAD_CL_BUTTON_DOWN    BambooEmuInput::CLASSIC_DOWN
#define KPAD_CL_BUTTON_RIGHT   BambooEmuInput::CLASSIC_RIGHT
#define VPADBASE_BUTTON_LEFT   BambooEmuInput::GamePad_LEFT
#define VPADBASE_BUTTON_RIGHT  BambooEmuInput::GamePad_RIGHT
#define VPADBASE_BUTTON_UP     BambooEmuInput::GamePad_UP
#define VPADBASE_BUTTON_DOWN   BambooEmuInput::GamePad_DOWN
#define VPADBASE_BUTTON_A      BambooEmuInput::GamePad_A
#define VPADBASE_BUTTON_B      BambooEmuInput::GamePad_B
#define VPADBASE_BUTTON_X      BambooEmuInput::GamePad_X
#define VPADBASE_BUTTON_Y      BambooEmuInput::GamePad_Y
#define VPADBASE_BUTTON_HOME   BambooEmuInput::GamePad_HOME
#define VPADBASE_TRIGGER_ZR    BambooEmuInput::GamePad_ZR
#define VPADBASE_TRIGGER_ZL    BambooEmuInput::GamePad_ZL
#define VPADBASE_TRIGGER_R     BambooEmuInput::GamePad_R
#define VPADBASE_TRIGGER_L     BambooEmuInput::GamePad_L
#define VPADBASE_BUTTON_PLUS   BambooEmuInput::GamePad_PLUS
#define VPADBASE_BUTTON_MINUS  BambooEmuInput::GamePad_MINUS
#define VPADBASE_BUTTON_SYNC   BambooEmuInput::GamePad_SYNC
#define VPADBASE_BUTTON_POWER  BambooEmuInput::GamePad_POWER
#define VPADBASE_BUTTON_STICK_R BambooEmuInput::GamePad_RSTICK
#define VPADBASE_BUTTON_STICK_L BambooEmuInput::GamePad_LSTICK
#define VPAD_BUTTON_STICK_L    BambooEmuInput::GamePad_LSTICK
#define VPAD_BUTTON_STICK_R    BambooEmuInput::GamePad_RSTICK
#define VPAD_BUTTON_LEFT       BambooEmuInput::GamePad_LEFT
#define VPAD_BUTTON_RIGHT      BambooEmuInput::GamePad_RIGHT
#define VPAD_BUTTON_UP         BambooEmuInput::GamePad_UP
#define VPAD_BUTTON_DOWN       BambooEmuInput::GamePad_DOWN
#define VPAD_BUTTON_A          BambooEmuInput::GamePad_A
#define VPAD_BUTTON_B          BambooEmuInput::GamePad_B
#define VPAD_BUTTON_X          BambooEmuInput::GamePad_X
#define VPAD_BUTTON_Y          BambooEmuInput::GamePad_Y
#define VPAD_BUTTON_R          BambooEmuInput::GamePad_R
#define VPAD_BUTTON_L          BambooEmuInput::GamePad_L
#define VPAD_BUTTON_ZR         BambooEmuInput::GamePad_ZR
#define VPAD_BUTTON_ZL         BambooEmuInput::GamePad_ZL
#define VPAD_BUTTON_PLUS       BambooEmuInput::GamePad_PLUS
#define VPAD_BUTTON_MINUS      BambooEmuInput::GamePad_MINUS
#define VPAD_BUTTON_HOME       BambooEmuInput::GamePad_HOME
#define VPAD_BUTTON_SYNC       BambooEmuInput::GamePad_SYNC
#define VPAD_BUTTON_POWER      BambooEmuInput::GamePad_POWER

#define KPAD_URCC_BUTTON_MASK  0x0003ffff
#define VPAD_BUTTON_MASK       0x0007ffff
#define VPAD_PLUS_BUTTON_MASK  0x7f87ffff

#define KPAD_STATE_CTRL_DPD_START    0
#define KPAD_STATE_CTRL_DPD_FINISHED 1

#define KPAD_STATE_CTRL_MPLS_FAILED_CL  -3
#define KPAD_STATE_CTRL_MPLS_FAILED_FS  -2
#define KPAD_STATE_CTRL_MPLS_FAILED_EXP -2
#define KPAD_STATE_CTRL_MPLS_FAILED_STD -1
#define KPAD_STATE_CTRL_MPLS_START       0
#define KPAD_STATE_CTRL_MPLS_FINISHED    1

#define WPAD_DEV_CORE                 0
#define WPAD_DEV_FREESTYLE            1
#define WPAD_DEV_CLASSIC              2
#define WPAD_DEV_MPLS                 5
#define WPAD_DEV_MPLS_FREESTYLE       6
#define WPAD_DEV_MPLS_CLASSIC         7
#define WPAD_DEV_URCC                31
#define WPAD_DEV_MPLS_FUTURE        250
#define WPAD_DEV_FUTURE             251
#define WPAD_DEV_NOT_SUPPORTED      252
#define WPAD_DEV_NOT_FOUND          253
#define WPAD_DEV_UNKNOWN            255

#define WPAD_MPLS_OFF  0
#define WPAD_MPLS_FS   5
#define WPAD_MPLS_CL   7

#define WPAD_ERR_NONE                 0
#define WPAD_ERR_NO_CONTROLLER       -1
#define WPAD_ERR_BUSY                -2
#define WPAD_ERR_TRANSFER            -3
#define WPAD_ERR_INVALID             -4
#define WPAD_ERR_NOPERM              -5
#define WPAD_ERR_BROKEN              -6
#define WPAD_ERR_CORRUPTED           -7

#define VPAD_MAX_CONTROLLERS   (1) // FIXME: currently used for counting webviews, but not for anything else! -TS-NSA 2012-05-15

// Define KBD type equivalents
#define KBD_KM_DOWN            BambooEmuInput::KEYMODE_DOWN
#define KBD_KM_REPEAT          BambooEmuInput::KEYMODE_REPEAT
#define KBD_KM_NULL            BambooEmuInput::KEYMODE_NULL
#define KBD_MS_CTRL            BambooEmuInput::MODSTATE_CTRL
#define KBD_MS_SHIFT           BambooEmuInput::MODSTATE_SHIFT
#define KBD_MS_ALT             BambooEmuInput::MODSTATE_ALT
#define KBD_MS_GUI             BambooEmuInput::MODSTATE_GUI
#define KBD_MS_EXTRA           BambooEmuInput::MODSTATE_EXTRA
#define KBD_MS_ALTGR           BambooEmuInput::MODSTATE_ALTGR
#define KBD_MS_LANG1           BambooEmuInput::MODSTATE_LANG1
#define KBD_MS_LANG2           BambooEmuInput::MODSTATE_LANG2
#define KBD_MS_NUM_LOCK        BambooEmuInput::MODSTATE_NUM_LOCK
#define KBD_MS_CAPS_LOCK       BambooEmuInput::MODSTATE_CAPS_LOCK
#define KBD_MS_SCROLL_LOCK     BambooEmuInput::MODSTATE_SCROLL_LOCK
#define KBD_MS_SHIFTED_KEY     BambooEmuInput::MODSTATE_SHIFTED_KEY
#define KBD_MS_SET_ALL         BambooEmuInput::MODSTATE_SET_ALL
#define KBD_MS_NULL            BambooEmuInput::MODSTATE_NULL
// and KBK keycode equivalents
#define KBK_Backspace          BambooEmuInput::KEYCODE_BACKSPACE
#define KBK_Delete             BambooEmuInput::KEYCODE_DELETE
#define KBK_Enter              BambooEmuInput::KEYCODE_ENTER
#define KBK_Escape             BambooEmuInput::KEYCODE_ESCAPE
#define KBK_Tab                BambooEmuInput::KEYCODE_TAB
#define KBK_Page_Up            BambooEmuInput::KEYCODE_PAGEUP
#define KBK_Page_Down          BambooEmuInput::KEYCODE_PAGEDOWN
#define KBK_Up_Arrow           BambooEmuInput::KEYCODE_UP
#define KBK_Down_Arrow         BambooEmuInput::KEYCODE_DOWN
#define KBK_Left_Arrow         BambooEmuInput::KEYCODE_LEFT
#define KBK_Right_Arrow        BambooEmuInput::KEYCODE_RIGHT
#define KBK_Keypad_Home        BambooEmuInput::KEYCODE_NUMPAD_HOME
#define KBK_Keypad_End         BambooEmuInput::KEYCODE_NUMPAD_END
#define KBK_Keypad_Up_Arrow    BambooEmuInput::KEYCODE_NUMPAD_UP
#define KBK_Keypad_Down_Arrow  BambooEmuInput::KEYCODE_NUMPAD_DOWN
#define KBK_Keypad_Left_Arrow  BambooEmuInput::KEYCODE_NUMPAD_LEFT
#define KBK_Keypad_Right_Arrow BambooEmuInput::KEYCODE_NUMPAD_RIGHT

// Define CAM type equivalents
#define GamePad_CAMERA_FPS         BambooEmuInput::CameraFPS
#define GamePad_CAMERA_FPS_15      BambooEmuInput::CAMERA_FPS_15
#define GamePad_CAMERA_FPS_30      BambooEmuInput::CAMERA_FPS_30
#define CAMERA_DECODE_DONE     BambooEmuInput::CAMERA_DECODE_COMPLETE
#define Camera_Event_Handler_Input BambooEmuInput::CameraEvent

// Platform-specific mutex implementation
#if defined(WIN32)
#	include <windows.h>
#	define InputMutex              CRITICAL_SECTION
#	define InitializeInputMutex(m) InitializeCriticalSection(&m)
#	define FinalizeInputMutex(m)   DeleteCriticalSection(&m)
#	define LockInputMutex(m)       EnterCriticalSection(&m)
#	define UnlockInputMutex(m)     LeaveCriticalSection(&m)
#else
#	include <pthread.h>
#	define InputMutex              pthread_mutex_t
#	define InitializeInputMutex(m) pthread_mutex_init(&m, NULL)
#	define FinalizeInputMutex(m)   pthread_mutex_destroy(&m)
#	define LockInputMutex(m)       pthread_mutex_lock(&m)
#	define UnlockInputMutex(m)     pthread_mutex_unlock(&m)
#endif

#include <stdint.h>
#include <string.h>

class BambooEmuInput {
public:
	enum InputType {
		TYPE_NONE = 0,
		TYPE_WII_REMOTE,
		TYPE_CLASSIC,
		TYPE_GamePad,
		TYPE_KEYBOARD
	};

	// N.B. These numeric values MUST mirror the client-side definitions
	//  (as set in some Javascript definition file) in order for Bamboo
	//  projects to be functionally cross-platform!
	// -TS-NSA 2012-03-19
	static const uint32_t WII_REMOTE_LEFT  = 0x00000001;
	static const uint32_t WII_REMOTE_RIGHT = 0x00000002;
	static const uint32_t WII_REMOTE_DOWN  = 0x00000004;
	static const uint32_t WII_REMOTE_UP    = 0x00000008;
	static const uint32_t WII_REMOTE_A     = 0x00000800;
	static const uint32_t WII_REMOTE_B     = 0x00000400;
	static const uint32_t WII_REMOTE_1     = 0x00000200;
	static const uint32_t WII_REMOTE_2     = 0x00000100;
	static const uint32_t WII_REMOTE_PLUS  = 0x00000010;
	static const uint32_t WII_REMOTE_MINUS = 0x00001000;
	static const uint32_t WII_REMOTE_HOME  = 0x00008000;
	static const uint32_t WII_NUNCHUK_Z    = 0x00002000;
	static const uint32_t WII_NUNCHUK_C    = 0x00004000;

	static const uint32_t CLASSIC_UP       = 0x00000001;
	static const uint32_t CLASSIC_LEFT     = 0x00000002;
	static const uint32_t CLASSIC_ZR       = 0x00000004;
	static const uint32_t CLASSIC_X        = 0x00000008;
	static const uint32_t CLASSIC_A        = 0x00000010;
	static const uint32_t CLASSIC_Y        = 0x00000020;
	static const uint32_t CLASSIC_B        = 0x00000040;
	static const uint32_t CLASSIC_ZL       = 0x00000080;
	static const uint32_t CLASSIC_RESERVED = 0x00000100;
	static const uint32_t CLASSIC_R        = 0x00000200;
	static const uint32_t CLASSIC_PLUS     = 0x00000400;
	static const uint32_t CLASSIC_HOME     = 0x00000800;
	static const uint32_t CLASSIC_MINUS    = 0x00001000;
	static const uint32_t CLASSIC_L        = 0x00002000;
	static const uint32_t CLASSIC_DOWN     = 0x00004000;
	static const uint32_t CLASSIC_RIGHT    = 0x00008000;

	static const uint32_t GamePad_LSTICK  = 0x00040000;
	static const uint32_t GamePad_RSTICK  = 0x00020000;
	static const uint32_t GamePad_LEFT    = 0x00000800;
	static const uint32_t GamePad_RIGHT   = 0x00000400;
	static const uint32_t GamePad_UP      = 0x00000200;
	static const uint32_t GamePad_DOWN    = 0x00000100;
	static const uint32_t GamePad_A       = 0x00008000;
	static const uint32_t GamePad_B       = 0x00004000;
	static const uint32_t GamePad_X       = 0x00002000;
	static const uint32_t GamePad_Y       = 0x00001000;
	static const uint32_t GamePad_R       = 0x00000010;
	static const uint32_t GamePad_L       = 0x00000020;
	static const uint32_t GamePad_ZR      = 0x00000040;
	static const uint32_t GamePad_ZL      = 0x00000080;
	static const uint32_t GamePad_PLUS    = 0x00000008;
	static const uint32_t GamePad_MINUS   = 0x00000004;
	static const uint32_t GamePad_HOME    = 0x00000002;
	static const uint32_t GamePad_SYNC    = 0x00000001;
	static const uint32_t GamePad_POWER   = 0x00000002;

	// Input events for callbacks
	enum {
		KEYMODE_NULL   = 0x00,
		KEYMODE_DOWN   = 0x01,
		KEYMODE_REPEAT = 0x02,
	};
	enum {
		MODSTATE_NULL       = 0x0000,
		MODSTATE_CTRL       = 0x0001,
		MODSTATE_SHIFT      = 0x0002,
		MODSTATE_ALT        = 0x0004,
		MODSTATE_GUI        = 0x0008,
		MODSTATE_EXTRA      = 0x0010,
		MODSTATE_ALTGR      = 0x0020,
		MODSTATE_LANG1      = 0x0040,
		MODSTATE_LANG2      = 0x0080,
		MODSTATE_NUMLOCK    = 0x0100,
		MODSTATE_CAPSLOCK   = 0x0200,
		MODSTATE_SCROLLLOCK = 0x0400,
		MODSTATE_SHIFTEDKEY = 0x0800,
		MODSTATE_SETALL     = 0x1000,
	};

	// Keyboard codes
	// FIXME?: for full functionality these should be mapped to (platform-
	//  dependent) input codes, but for now the actual values don't matter.
	// -TS-NSA 2012-06-21
	enum {
		KEYCODE_BASE_DONOTUSE = 0xf000, // completely arbitrary -TS-NSA 2012-06-21
		KEYCODE_BACKSPACE,
		KEYCODE_DELETE,
		KEYCODE_ENTER,
		KEYCODE_ESCAPE,
		KEYCODE_TAB,
		KEYCODE_PAGEUP,
		KEYCODE_PAGEDOWN,
		KEYCODE_UP,
		KEYCODE_DOWN,
		KEYCODE_LEFT,
		KEYCODE_RIGHT,
		KEYCODE_NUMPAD_HOME,
		KEYCODE_NUMPAD_END,
		KEYCODE_NUMPAD_UP,
		KEYCODE_NUMPAD_DOWN,
		KEYCODE_NUMPAD_LEFT,
		KEYCODE_NUMPAD_RIGHT,
	};

	// Camera settings and events
	typedef enum CameraFPS_e {
		CAMERA_FPS_15,
		CAMERA_FPS_30,
	} CameraFPS;
	typedef enum CameraEventType_e {
		CAMERA_DECODE_COMPLETE,
	} CameraEventType;
	typedef struct CameraEvent_st {
		CameraEventType type;
		uint32_t data0, data1;
	} CameraEvent;

	// 'Software' keyboard events
	typedef enum KeyboardEventType_e {
		KEYBOARD_DIRTY,
		KEYBOARD_CURSORMOVE
	} KeyboardEventType;
	typedef struct KeyboardDirtyInfo_st { // from <swkbd/swkbdTypes.h>
		int32_t mDirtyFrom, mDirtyTo;
		KeyboardDirtyInfo_st(void) : mDirtyFrom(0), mDirtyTo(0) {}
	} KeyboardDirtyInfo;
	typedef enum KeyboardCursorMove_e { // from <swkbd/swkbdTypes.h>
		cCursorMove_Left,
		cCursorMove_Right,
		cCursorMove_Up,
		cCursorMove_Down,
		cCursorMove_Max
	} KeyboardCursorMove;

	// Initialize/Finalize/etc
	static void Initialize(int numchannels);
	static bool IsAvailable(void);
	static void Finalize(void);

	// Functions to be used by the input source
	// - Run event callbacks
	static void DoKeyboardAttachCallback(void *event);
	static void DoKeyboardDetachCallback(void *event);
	static void DoKeyboardEventCallback(void *event);
	static void DoKeyboardTriggerCallback(void *event);
	static void DoKeyboardPressCallback(void *event);
	static void DoKeyboardReleaseCallback(void *event);
	static void DoWiiRemoteConnectCallback(int channel, int reason);
	static void DoWiiRemotePointCallback(int channel, int reason);
	static void DoWiiRemoteMotionPlusCallback(int channel, int reason);
	static void DoWiiRemoteSampleCallback(int channel);
	// - Update the working input state
	static void SetHasWiiRemote(int channel, bool set);
	static void SetHasNunchuk(int channel, bool set);
	static void PressWiiRemoteButtons(int channel, uint32_t buttons);
	static void ReleaseWiiRemoteButtons(int channel, uint32_t buttons);
	static void SetWiiRemotePointIsValid(int channel, bool set);
	static void SetWiiRemotePoint(int channel, float x, float y);
	static void SetNunchukStick(int channel, float x, float y);
	static void SetNunchukStickX(int channel, float x);
	static void SetNunchukStickY(int channel, float y);
	static void SetHasClassic(int channel, bool set);
	static void PressClassicButtons(int channel, uint32_t buttons);
	static void ReleaseClassicButtons(int channel, uint32_t buttons);
	static void SetClassicLStick(int channel, float x, float y);
	static void SetClassicLStickX(int channel, float x);
	static void SetClassicLStickY(int channel, float y);
	static void SetClassicRStick(int channel, float x, float y);
	static void SetClassicRStickX(int channel, float x);
	static void SetClassicRStickY(int channel, float y);
	static void SetHasGamePad(int channel, bool set);
	static void PressGamePadButtons(int channel, uint32_t buttons);
	static void ReleaseGamePadButtons(int channel, uint32_t buttons);
	static void SetGamePadLStick(int channel, float x, float y);
	static void SetGamePadLStickX(int channel, float x);
	static void SetGamePadLStickY(int channel, float y);
	static void SetGamePadRStick(int channel, float x, float y);
	static void SetGamePadRStickX(int channel, float x);
	static void SetGamePadRStickY(int channel, float y);
	static void TouchGamePad(int channel);
	static void ReleaseGamePad(int channel);
	static void SetGamePadTouch(int channel, float x, float y);
	// - Camera control
	static void SetDummyCameraImage(uint8_t *rawdata, size_t rawlen);
	// - Keyboard input request handling
	static void SetStartKeyboardInputCallback(void (*callback)(const wchar_t *, int, bool, bool));
	static void SetSetKeyboardInputCallback(void (*callback)(const wchar_t *, int));
	static void SetStopKeyboardInputCallback(void (*callback)(void));
	static void UpdateKeyboardInput(KeyboardEventType type, void *event, const wchar_t *text);
	static void SetKeyboardInputCancel(void);
	static void SetKeyboardInputAccept(void);
	static void SetKeyboardInputWideString(const wchar_t *set);
	static void SetKeyboardHidden(bool set);

	// Functions to be used by the input destination
	// - Set event callbacks
	static void SetKeyboardCallbacks(void (*attach)(void *), void (*detach)(void *), void (*activity)(void *));
	static void SetWiiRemoteConnectCallback(int channel, void (*callback)(int, int));
	static void SetWiiRemotePointCallback(int channel, void (*callback)(int, int));
	static void SetWiiRemoteMotionPlusCallback(int channel, void (*callback)(int, int));
	static void SetWiiRemoteSampleCallback(int channel, void (*callback)(int));
	// - Update the current input snapshot
	static void RefreshWiiRemoteEtc(int channel);
	static void RefreshGamePad(int channel);
	// - Check the current input snapshot
	static bool GetHasWiiRemote(int channel);
	static bool GetHasNunchuk(int channel);
	static uint32_t GetWiiRemoteTriggered(int channel);
	static uint32_t GetWiiRemotePressed(int channel);
	static uint32_t GetWiiRemoteReleased(int channel);
	static bool GetWiiRemotePointIsValid(int channel);
	static float2 GetWiiRemotePoint(int channel);
	static float2 GetWiiRemotePointDelta(int channel);
	static float2 GetNunchukStick(int channel);
	static bool GetHasClassic(int channel);
	static uint32_t GetClassicTriggered(int channel);
	static uint32_t GetClassicPressed(int channel);
	static uint32_t GetClassicReleased(int channel);
	static float2 GetClassicLStick(int channel);
	static float2 GetClassicRStick(int channel);
	static bool GetHasGamePad(int channel);
	static uint32_t GetGamePadTriggered(int channel);
	static uint32_t GetGamePadPressed(int channel);
	static uint32_t GetGamePadReleased(int channel);
	static float2 GetGamePadLStick(int channel);
	static float2 GetGamePadRStick(int channel);
	static bool GetGamePadTouchTriggered(int channel);
	static bool GetGamePadTouchPressed(int channel);
	static bool GetGamePadTouchReleased(int channel);
	static float2 GetGamePadTouch(int channel);
	// - Camera simulation
	static void *GetCameraImage(bool);
	static void *GetDummyCameraImage(void);
	static int GetDummyCameraImageLen(void);
	// - Keyboard input requests, state management
	static void StartKeyboardInput(const wchar_t *initialText, int maxChars, bool fullScreen, bool onMainScreen);
	static void SetKeyboardInput(const wchar_t *text, int cursorPos);
	static void StopKeyboardInput(void);
	static void SetUpdateKeyboardInputCallback(void (*callback)(KeyboardEventType, void *, const wchar_t *));
	static bool IsKeyboardInputRequested(void);
	static bool ShouldKeyboardInputCancel(void);
	static bool ShouldKeyboardInputAccept(void);
	static std::wstring GetKeyboardInputWideString(void);
	static bool IsKeyboardHidden(void);

private:
	static BambooEmuInput *instance;
	BambooEmuInput(int numchannels);
	~BambooEmuInput(void);

	typedef struct Position2D_st {
		float X, Y;
	} Position2D;
	typedef struct ButtonState_st {
		uint32_t Triggered, Pressed, Released;
	} ButtonState;

	typedef struct KeyboardEventCallbacks_st {
		void (*KeyboardAttachCallback)(void *event);
		void (*KeyboardDetachCallback)(void *event);
		void (*KeyboardEventCallback)(void *event);
		void (*KeyboardTriggerCallback)(void *event);
		void (*KeyboardPressCallback)(void *event);
		void (*KeyboardReleaseCallback)(void *event);
	} KeyboardEventCallbacks;
	typedef struct WiiRemoteEventCallbacks_st {
		void (*WiiRemoteConnectCallback)(int channel, int reason);
		void (*WiiRemotePointCallback)(int channel, int reason);
		void (*WiiRemoteMotionPlusCallback)(int channel, int reason);
		void (*WiiRemoteSampleCallback)(int channel);
	} WiiRemoteEventCallbacks;
	typedef struct InputState_st {
		Position2D WiiRemotePoint, WiiRemotePointDelta, NunchukStick, ClassicLStick, ClassicRStick, GamePadLStick, GamePadRStick, GamePadTouch;
		ButtonState WiiRemoteButtons, ClassicButtons, GamePadButtons;
		bool WiiRemotePointValid;
		bool GamePadTouchTriggered, GamePadTouchPressed, GamePadTouchReleased;
		bool HasWiiRemote, HasNunchuk, HasClassic, HasGamePad;
	} InputState;

	int NumChannels;
	KeyboardEventCallbacks KeyboardCallbacks; // same for all channels
	WiiRemoteEventCallbacks *WiiRemoteCallbacks; // for each channel
	InputState *Working, *Snapshot; // for each channel
	InputMutex CallbackMutex, WorkingMutex, SnapshotMutex;

	uint8_t *DummyCameraImageData;
	int DummyCameraImageBytes;

	bool KeyboardInputRequested, KeyboardInputCancel, KeyboardInputAccept, KeyboardHidden;
	void (*StartKeyboardInputCallback)(const wchar_t *, int, bool, bool);
	void (*SetKeyboardInputCallback)(const wchar_t *, int);
	void (*StopKeyboardInputCallback)(void);
	void (*UpdateKeyboardInputCallback)(KeyboardEventType, void *, const wchar_t *);
	wchar_t *KeyboardInputWideString;
	InputMutex KeyboardInputMutex;
};

Updated by anonymous

Happy bday to you!! Here, have this ban, and have a day off!

Updated by anonymous

Banned cause epic fail... *rages at scorpions and tarantulas...*

Updated by anonymous

Banned cause they are hard to catch. If you don't catch them they bite/stab you and you blackout and wake up at your house.

Updated by anonymous