mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-01 02:40:43 +02:00
#368 LEVEL3A Gears item
This commit is contained in:
@@ -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 );
|
||||
|
@@ -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)
|
||||
|
@@ -22,7 +22,6 @@
|
||||
<ClCompile Include="..\..\fixed\common.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="render.iwram.cpp" />
|
||||
<ClCompile Include="render_span.cpp" />
|
||||
<ClCompile Include="sound.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -120,6 +119,7 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>__GBA_WIN__;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -136,6 +136,7 @@
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>__GBA_WIN__;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -154,6 +155,7 @@
|
||||
<PreprocessorDefinitions>__GBA_WIN__;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@@ -175,6 +177,7 @@
|
||||
<PreprocessorDefinitions>__GBA_WIN__;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -20,15 +20,15 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -52,10 +52,7 @@
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\bin\</OutDir>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<LibraryPath>..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||
<IncludePath>..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(FxCopDir);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);$(SystemRoot)</ExcludePath>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);</ExecutablePath>
|
||||
<IncludePath>..\..\fixed;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -68,11 +65,11 @@
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>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)</AdditionalDependencies>
|
||||
<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)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -83,7 +80,7 @@
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>MINIMAL;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__WIN32__;MINIMAL;NOMINMAX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -92,17 +89,16 @@
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalOptions>/d2noftol3 %(AdditionalOptions)</AdditionalOptions>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<DisableSpecificWarnings>26495</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>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)</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<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)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -3,8 +3,10 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="..\..\fixed\common.cpp" />
|
||||
<ClCompile Include="..\..\fixed\render\gl1.cpp" />
|
||||
<ClCompile Include="sound.cpp" />
|
||||
<ClCompile Include="..\..\fixed\render\gl1.cpp">
|
||||
<Filter>render</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="OpenLara.rc" />
|
||||
@@ -42,5 +44,8 @@
|
||||
<Filter Include="fmt">
|
||||
<UniqueIdentifier>{f297223e-368f-46b9-9f41-3e8075cbc5c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="render">
|
||||
<UniqueIdentifier>{fe1fca63-da0d-4e31-b8c4-1d61eb02d01b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -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 };
|
||||
|
||||
|
Reference in New Issue
Block a user