diff --git a/src/fixed/item.h b/src/fixed/item.h
index fda2346..db5cfce 100644
--- a/src/fixed/item.h
+++ b/src/fixed/item.h
@@ -1491,9 +1491,9 @@ ItemObj* ItemObj::init(Room* room)
// INIT_ITEM( INV_PASSPORT , ??? );
// INIT_ITEM( INV_COMPASS , ??? );
// INIT_ITEM( INV_HOME , ??? );
- // INIT_ITEM( GEARS_1 , ??? );
- // INIT_ITEM( GEARS_2 , ??? );
- // INIT_ITEM( GEARS_3 , ??? );
+ INIT_ITEM( GEARS_1 , Gears );
+ INIT_ITEM( GEARS_2 , Gears );
+ INIT_ITEM( GEARS_3 , Gears );
INIT_ITEM( CUT_1 , CinematicObject );
INIT_ITEM( CUT_2 , CinematicObject );
INIT_ITEM( CUT_3 , CinematicObject );
diff --git a/src/fixed/object.h b/src/fixed/object.h
index c757c6f..b377313 100644
--- a/src/fixed/object.h
+++ b/src/fixed/object.h
@@ -335,6 +335,23 @@ struct TrapDoor : Object
};
+struct Gears : Object
+{
+ enum {
+ STATE_STATIC,
+ STATE_ROTATE,
+ };
+
+ Gears(Room* room) : Object(room) {}
+
+ virtual void update()
+ {
+ goalState = isActive() ? STATE_ROTATE : STATE_STATIC;
+ animProcess();
+ }
+};
+
+
struct CinematicObject : Object
{
CinematicObject(Room* room) : Object(room)
diff --git a/src/platform/gba/OpenLara.vcxproj b/src/platform/gba/OpenLara.vcxproj
index b7e2282..625f9b7 100644
--- a/src/platform/gba/OpenLara.vcxproj
+++ b/src/platform/gba/OpenLara.vcxproj
@@ -22,7 +22,6 @@
-
@@ -120,6 +119,7 @@
true
__GBA_WIN__;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ 26495
Console
@@ -136,6 +136,7 @@
true
__GBA_WIN__;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ 26495
Console
@@ -154,6 +155,7 @@
__GBA_WIN__;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
MultiThreaded
+ 26495
Console
@@ -175,6 +177,7 @@
__GBA_WIN__;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
MultiThreaded
+ 26495
Console
diff --git a/src/platform/gba/main.cpp b/src/platform/gba/main.cpp
index 8b224d8..d1fdae7 100644
--- a/src/platform/gba/main.cpp
+++ b/src/platform/gba/main.cpp
@@ -291,6 +291,9 @@ int main(void)
TranslateMessage(&msg);
DispatchMessage(&msg);
} else {
+ #ifdef _DEBUG
+ Sleep(4);
+ #endif
int32 frame = (GetTickCount() - startTime) / 33;
if (GetAsyncKeyState('R')) frame /= 10;
diff --git a/src/platform/win/main.cpp b/src/platform/win/main.cpp
index 1d98c6f..faac780 100644
--- a/src/platform/win/main.cpp
+++ b/src/platform/win/main.cpp
@@ -1010,7 +1010,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
int sw = GetSystemMetrics(SM_CXSCREEN);
int sh = GetSystemMetrics(SM_CYSCREEN);
- if (sw <= r.right || sh <= r.bottom) {
+ if (sw <= r.right + 128 || sh <= r.bottom + 128) {
r.right /= 2;
r.bottom /= 2;
}
diff --git a/src/platform/win_fixed/OpenLara.vcxproj b/src/platform/win_fixed/OpenLara.vcxproj
index 29ded2d..588fba4 100644
--- a/src/platform/win_fixed/OpenLara.vcxproj
+++ b/src/platform/win_fixed/OpenLara.vcxproj
@@ -20,15 +20,15 @@
Application
true
- v142
NotSet
+ v142
Application
false
- v142
true
NotSet
+ v142
@@ -52,10 +52,7 @@
false
..\..\..\bin\
false
- ..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);
- ..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);
- $(VC_IncludePath);$(WindowsSDK_IncludePath);$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);$(SystemRoot)
- $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);
+ ..\..\fixed;$(VC_IncludePath);$(WindowsSDK_IncludePath);
@@ -68,11 +65,11 @@
MultiThreadedDebug
+ 26495
- Console
true
- glu32.lib;wsock32.lib;d3d9.lib;d3d11.lib;opengl32.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ glu32.lib;opengl32.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
@@ -83,7 +80,7 @@
Full
true
true
- MINIMAL;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)
+ __WIN32__;MINIMAL;NOMINMAX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)
false
false
MultiThreaded
@@ -92,17 +89,16 @@
Size
/d2noftol3 %(AdditionalOptions)
true
+ 26495
- Windows
true
true
true
- wcrt.lib;wsock32.lib;d3d9.lib;d3d11.lib;opengl32.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
- true
false
false
true
+ glu32.lib;opengl32.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
diff --git a/src/platform/win_fixed/OpenLara.vcxproj.filters b/src/platform/win_fixed/OpenLara.vcxproj.filters
index 795ae15..861476b 100644
--- a/src/platform/win_fixed/OpenLara.vcxproj.filters
+++ b/src/platform/win_fixed/OpenLara.vcxproj.filters
@@ -3,8 +3,10 @@
-
+
+ render
+
@@ -42,5 +44,8 @@
{f297223e-368f-46b9-9f41-3e8075cbc5c2}
+
+ {fe1fca63-da0d-4e31-b8c4-1d61eb02d01b}
+
\ No newline at end of file
diff --git a/src/platform/win_fixed/main.cpp b/src/platform/win_fixed/main.cpp
index 1d9168f..ead8b3d 100644
--- a/src/platform/win_fixed/main.cpp
+++ b/src/platform/win_fixed/main.cpp
@@ -225,13 +225,10 @@ void* osLoadLevel(const char* name)
return (void*)levelData;
}
-#ifdef _DEBUG
-int main(void) {
-#else
-int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
- int argc = (lpCmdLine && strlen(lpCmdLine)) ? 2 : 1;
- const char* argv[] = { "", lpCmdLine };
-#endif
+int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+// int argc = (lpCmdLine && strlen(lpCmdLine)) ? 2 : 1;
+// const char* argv[] = { "", lpCmdLine };
RECT r = { 0, 0, FRAME_WIDTH, FRAME_HEIGHT };