mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Updated build number
--Editor fixes from Kriplo Implementation for mouse wheel support Implementation for mouse middle button support Fix for adding on roof tiles Fix assertion when leave editor mode On saving map check of entry points are add Fix for to many ToolTip messages in place walls Fix assertion on loading map without entry points Fix assertion in Sector Summary if DevInfo directory not exist Fix for problem of losing map edgepoints Fix problem with losing stuff from LBE Fix crash in meanwhile --Fixes from Headrock Fixed a typo in the Health experience calcuation for strategic movement Added "Draw" cost to weapons help data git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2375 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#define _WIN32_WINNT WINVER//dnl this should be defined globaly on project
|
||||
#ifdef JA2_PRECOMPILED_HEADERS
|
||||
#include "JA2 SGP ALL.H"
|
||||
#elif defined( WIZ8_PRECOMPILED_HEADERS )
|
||||
@@ -5,6 +6,7 @@
|
||||
#else
|
||||
#include "types.h"
|
||||
#include <windows.h>
|
||||
#include <winuser.h>//dnl
|
||||
#include <stdio.h>
|
||||
#include <memory.h>
|
||||
#include "debug.h"
|
||||
@@ -67,6 +69,8 @@ UINT32 guiRightButtonRepeatTimer;
|
||||
BOOLEAN gfTrackMousePos; // TRUE = queue mouse movement events, FALSE = don't
|
||||
BOOLEAN gfLeftButtonState; // TRUE = Pressed, FALSE = Not Pressed
|
||||
BOOLEAN gfRightButtonState; // TRUE = Pressed, FALSE = Not Pressed
|
||||
BOOLEAN gfMiddleButtonState;//dnl TRUE = Pressed, FALSE = Not Pressed
|
||||
INT16 gsMouseWheelDeltaValue;//dnl positive value indicates that the wheel was rotated forward, negative value indicates that the wheel was rotated backward, and user handler procedure for mouse wheel should restore after usege this value to zero!
|
||||
INT16 gusMouseXPos; // X position of the mouse on screen
|
||||
INT16 gusMouseYPos; // y position of the mouse on screen
|
||||
|
||||
@@ -208,6 +212,60 @@ LRESULT CALLBACK MouseHandler(int Code, WPARAM wParam, LPARAM lParam)
|
||||
// Trigger an input event
|
||||
QueueEvent(RIGHT_BUTTON_UP, 0, uiParam);
|
||||
break;
|
||||
|
||||
//dnl begin part for additional mouse events
|
||||
case WM_MBUTTONDOWN:
|
||||
// Update the current mouse position
|
||||
mpos = ((MOUSEHOOKSTRUCT *)lParam)->pt;
|
||||
ScreenToClient(ghWindow, &mpos);
|
||||
gusMouseXPos = (INT16)mpos.x;
|
||||
gusMouseYPos = (INT16)mpos.y;
|
||||
uiParam = gusMouseYPos;
|
||||
uiParam = uiParam << 16;
|
||||
uiParam = uiParam | gusMouseXPos;
|
||||
// Update the button state
|
||||
gfMiddleButtonState = TRUE;
|
||||
//Set that we have input
|
||||
gfSGPInputReceived = TRUE;
|
||||
// Trigger an input event
|
||||
QueueEvent(MIDDLE_BUTTON_DOWN, 0, uiParam);
|
||||
break;
|
||||
case WM_MBUTTONUP:
|
||||
// Update the current mouse position
|
||||
mpos = ((MOUSEHOOKSTRUCT *)lParam)->pt;
|
||||
ScreenToClient(ghWindow, &mpos);
|
||||
gusMouseXPos = (INT16)mpos.x;
|
||||
gusMouseYPos = (INT16)mpos.y;
|
||||
uiParam = gusMouseYPos;
|
||||
uiParam = uiParam << 16;
|
||||
uiParam = uiParam | gusMouseXPos;
|
||||
// Update the button state
|
||||
gfMiddleButtonState = FALSE;
|
||||
//Set that we have input
|
||||
gfSGPInputReceived = TRUE;
|
||||
// Trigger an input event
|
||||
QueueEvent(MIDDLE_BUTTON_UP, 0, uiParam);
|
||||
break;
|
||||
//case WM_MBUTTONDBLCLK:
|
||||
// break;
|
||||
case WM_MOUSEWHEEL:
|
||||
// Update the current mouse position
|
||||
mpos = ((MOUSEHOOKSTRUCT *)lParam)->pt;
|
||||
ScreenToClient(ghWindow, &mpos);
|
||||
gusMouseXPos = (INT16)mpos.x;
|
||||
gusMouseYPos = (INT16)mpos.y;
|
||||
uiParam = gusMouseYPos;
|
||||
uiParam = uiParam << 16;
|
||||
uiParam = uiParam | gusMouseXPos;
|
||||
// Update mouse wheel delta value
|
||||
gsMouseWheelDeltaValue = GetMouseWheelDeltaValue(((MOUSEHOOKSTRUCTEX *)lParam)->mouseData);
|
||||
//Set that we have input
|
||||
gfSGPInputReceived = TRUE;
|
||||
// Trigger an input event
|
||||
QueueEvent(MOUSE_WHEEL, 0, uiParam);
|
||||
break;
|
||||
//dnl end part for additional mouse events
|
||||
|
||||
case WM_MOUSEMOVE
|
||||
: // Update the current mouse position
|
||||
mpos = ((MOUSEHOOKSTRUCT *)lParam)->pt;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#define RIGHT_BUTTON_REPEAT 0x0200
|
||||
#define MOUSE_POS 0x0400
|
||||
#define MOUSE_WHEEL 0x0800
|
||||
#define MIDDLE_BUTTON_UP 0x1000//dnl
|
||||
#define MIDDLE_BUTTON_DOWN 0x2000//dnl
|
||||
|
||||
#define SHIFT_DOWN 0x01
|
||||
#define CTRL_DOWN 0x02
|
||||
@@ -109,8 +111,10 @@ extern BOOLEAN gfKeyState[256]; // TRUE = Pressed, FALSE = Not Pressed
|
||||
|
||||
extern INT16 gusMouseXPos; // X position of the mouse on screen
|
||||
extern INT16 gusMouseYPos; // y position of the mouse on screen
|
||||
extern INT16 gsMouseWheelDeltaValue;//dnl
|
||||
extern BOOLEAN gfLeftButtonState; // TRUE = Pressed, FALSE = Not Pressed
|
||||
extern BOOLEAN gfRightButtonState; // TRUE = Pressed, FALSE = Not Pressed
|
||||
extern BOOLEAN gfMiddleButtonState;//dnl TRUE = Pressed, FALSE = Not Pressed
|
||||
|
||||
extern BOOLEAN gfSGPInputReceived;
|
||||
|
||||
@@ -118,6 +122,8 @@ extern BOOLEAN gfSGPInputReceived;
|
||||
#define _KeyDown(a) gfKeyState[(a)]
|
||||
#define _LeftButtonDown gfLeftButtonState
|
||||
#define _RightButtonDown gfRightButtonState
|
||||
#define _MiddleButtonDown gfMiddleButtonState//dnl
|
||||
#define _WheelValue gsMouseWheelDeltaValue//dnl
|
||||
#define _MouseXPos gusMouseXPos
|
||||
#define _MouseYPos gusMouseYPos
|
||||
|
||||
|
||||
@@ -150,13 +150,13 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
/*dnl kick this out, because in input.sgp MouseHandler() hook has priority so it will process same event twice, someone force MouseHandler() hook to always return unhandled events status so what ever mouse event you process in WindowProcedure() be aware that this event is already occur in MouseHandler() (mouse clicks, move etc.) Probably this is done because when you lost focus even if you click back on window region this will not restore them, so need condition in MouseHandler to restore window focus
|
||||
case WM_MOUSEWHEEL:
|
||||
{
|
||||
QueueEvent(MOUSE_WHEEL, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
|
||||
*/
|
||||
#ifdef JA2
|
||||
case WM_MOVE:
|
||||
// if( 1==iScreenMode )
|
||||
|
||||
Reference in New Issue
Block a user