mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Reverted the change of obj_under_cursor in 3.8.29 (commit 2d7ff1e)
The game window position is now also saved when dragging the window by the title bar.
This commit is contained in:
@@ -540,7 +540,7 @@ Some utility/math functions are available:
|
||||
- onlyCritter: True - only checks critters and ignores their cover (roof tiles, walls, scenery, etc.)
|
||||
False - checks all objects (can't check critters under objects)
|
||||
- passing False to the includeDude argument will ignore dude_obj
|
||||
- NOTE: the function will always return 0 if the cursor is in movement mode (hexagon cursor)
|
||||
- NOTE: to get an object located on a tile when the cursor is in movement mode (hexagon cursor), use the tile_under_cursor function
|
||||
|
||||
> object sfall_func0("loot_obj")
|
||||
- returns a pointer to the target object (container or critter) of the loot screen
|
||||
|
||||
+6
-3
@@ -1180,7 +1180,9 @@ public:
|
||||
AdjustWindowRect(&r, windowStyle, false);
|
||||
r.right -= r.left;
|
||||
r.bottom -= r.top;
|
||||
SetWindowPos(a, HWND_NOTOPMOST, windowLeft, windowTop, r.right, r.bottom, SWP_DRAWFRAME | SWP_FRAMECHANGED | SWP_SHOWWINDOW);
|
||||
if (!SetWindowPos(a, HWND_NOTOPMOST, windowLeft, windowTop, r.right, r.bottom, SWP_DRAWFRAME | SWP_FRAMECHANGED | SWP_SHOWWINDOW)) {
|
||||
windowLeft = windowTop = 0; // fail to set position
|
||||
}
|
||||
}
|
||||
|
||||
dlogr(" Done", DL_MAIN);
|
||||
@@ -1494,8 +1496,9 @@ void Graphics_Init() {
|
||||
|
||||
void Graphics_Exit() {
|
||||
if (GraphicsMode) {
|
||||
if (GraphicsMode == 5) {
|
||||
int data = windowTop | (windowLeft << 16);
|
||||
RECT rect;
|
||||
if (GraphicsMode == 5 && GetWindowRect(window, &rect)) {
|
||||
int data = rect.top | (rect.left << 16);
|
||||
if (data >= 0 && data != windowData) SetConfigInt("Graphics", "WindowData", data);
|
||||
}
|
||||
CoUninitialize();
|
||||
|
||||
@@ -583,9 +583,9 @@ static void mf_obj_under_cursor() {
|
||||
&inclDudeArg = opHandler.arg(1);
|
||||
|
||||
if (crSwitchArg.isInt() && inclDudeArg.isInt()) {
|
||||
opHandler.setReturn((*ptr_gmouse_3d_current_mode != 0)
|
||||
? fo_object_under_mouse(crSwitchArg.asBool() ? 1 : -1, inclDudeArg.rawValue(), *ptr_map_elevation)
|
||||
: 0);
|
||||
opHandler.setReturn(
|
||||
fo_object_under_mouse(crSwitchArg.asBool() ? 1 : -1, inclDudeArg.rawValue(), *ptr_map_elevation)
|
||||
);
|
||||
} else {
|
||||
OpcodeInvalidArgs("obj_under_cursor");
|
||||
opHandler.setReturn(0);
|
||||
|
||||
Reference in New Issue
Block a user