diff --git a/src/blupi.h b/src/blupi.h index 3801da8..8d4a090 100644 --- a/src/blupi.h +++ b/src/blupi.h @@ -48,11 +48,11 @@ struct Rect { typedef Uint32 ColorRef; #if defined(_WIN64) -typedef unsigned __int64 WPARAM; -typedef __int64 LPARAM; +typedef unsigned __int64 WParam; +typedef __int64 LParam; #else -typedef Uint32 WPARAM; -typedef Sint32 LPARAM; +typedef Uint32 WParam; +typedef Sint32 LParam; #endif #undef LOWORD diff --git a/src/event.cxx b/src/event.cxx index e008ba7..10572a2 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -4929,10 +4929,10 @@ CEvent::DemoPlayStop () void CEvent::WinToSDLEvent ( - Uint32 msg, WPARAM wParam, LPARAM lParam, SDL_Event & event) + Uint32 msg, WParam wParam, LParam lParam, SDL_Event & event) { -#define GET_X_LPARAM(lp) ((Sint32) (Sint16) LOWORD (lp)) -#define GET_Y_LPARAM(lp) ((Sint32) (Sint16) HIWORD (lp)) +#define GET_X_LParam(lp) ((Sint32) (Sint16) LOWORD (lp)) +#define GET_Y_LParam(lp) ((Sint32) (Sint16) HIWORD (lp)) // clang-format off static const std::unordered_map keycodes = { @@ -4997,8 +4997,8 @@ CEvent::WinToSDLEvent ( msg == EV_LBUTTONDOWN ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP; event.button.button = SDL_BUTTON_LEFT; // TODO: wParam CTRL or SHIFT - event.button.x = GET_X_LPARAM (lParam); - event.button.y = GET_Y_LPARAM (lParam); + event.button.x = GET_X_LParam (lParam); + event.button.y = GET_Y_LParam (lParam); break; case EV_RBUTTONUP: @@ -5007,15 +5007,15 @@ CEvent::WinToSDLEvent ( msg == EV_RBUTTONDOWN ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP; event.button.button = SDL_BUTTON_RIGHT; // TODO: wParam CTRL or SHIFT - event.button.x = GET_X_LPARAM (lParam); - event.button.y = GET_Y_LPARAM (lParam); + event.button.x = GET_X_LParam (lParam); + event.button.y = GET_Y_LParam (lParam); break; case EV_MOUSEMOVE: event.type = SDL_MOUSEMOTION; // TODO: wParam CTRL or SHIFT - event.motion.x = GET_X_LPARAM (lParam); - event.motion.y = GET_Y_LPARAM (lParam); + event.motion.x = GET_X_LParam (lParam); + event.motion.y = GET_Y_LParam (lParam); break; } } @@ -5032,8 +5032,8 @@ CEvent::DemoStep () { Uint32 time = 0; Uint32 message = 0; - WPARAM wParam = 0; - LPARAM lParam = 0; + WParam wParam = 0; + LParam lParam = 0; if (m_phase == EV_PHASE_INIT) { diff --git a/src/event.h b/src/event.h index b325539..d54c433 100644 --- a/src/event.h +++ b/src/event.h @@ -61,8 +61,8 @@ typedef struct { typedef struct { Sint32 time; Uint32 message; - Uint32 wParam; // WPARAM - Uint32 lParam; // LPARAM + Uint32 wParam; // WParam + Uint32 lParam; // LParam } DemoEvent; struct DemoSDLEvent { @@ -182,7 +182,7 @@ protected: bool DemoPlayStart (const std::string * demoFile = nullptr); void DemoPlayStop (); static void - WinToSDLEvent (Uint32 msg, WPARAM wParam, LPARAM lParam, SDL_Event & event); + WinToSDLEvent (Uint32 msg, WParam wParam, LParam lParam, SDL_Event & event); void DemoRecEvent (const SDL_Event & event); protected: diff --git a/src/misc.cxx b/src/misc.cxx index 8af0a8e..65ab8b4 100644 --- a/src/misc.cxx +++ b/src/misc.cxx @@ -48,7 +48,7 @@ OutputDebug (const char * pMessage) // Conversion de la position de la souris. Point -ConvLongToPos (LPARAM lParam) +ConvLongToPos (LParam lParam) { Point pos; diff --git a/src/misc.h b/src/misc.h index 312a824..bfd519c 100644 --- a/src/misc.h +++ b/src/misc.h @@ -28,7 +28,7 @@ extern void OutputDebug (const char * pMessage); -extern Point ConvLongToPos (LPARAM lParam); +extern Point ConvLongToPos (LParam lParam); extern void InitRandom (); extern Sint32 Random (Sint32 min, Sint32 max);