Formatting

This commit is contained in:
Sezz 2024-11-16 22:19:32 +11:00
parent 2624c5bed2
commit ef19187f83
6 changed files with 22 additions and 22 deletions

View file

@ -1268,7 +1268,8 @@ void CalculateCamera(const CollisionInfo& coll)
{
Camera.fixedCamera = false;
if (Camera.speed != 1 && !Lara.Control.Look.IsUsingBinoculars && Camera.oldType != CameraType::Look)
if (Camera.speed != 1 && Camera.oldType != CameraType::Look &&
!Lara.Control.Look.IsUsingBinoculars)
{
if (TargetSnaps <= 8)
{

View file

@ -1,7 +1,6 @@
#include "framework.h"
#include "Renderer/Renderer.h"
#include "version.h"
#include "Game/animation.h"
#include "Game/control/control.h"
#include "Game/control/volume.h"
@ -16,6 +15,7 @@
#include "Specific/level.h"
#include "Specific/trutils.h"
#include "Specific/winmain.h"
#include "Version.h"
using namespace TEN::Gui;
using namespace TEN::Hud;

View file

@ -3,7 +3,7 @@
#pragma code_page(65001)
#include "resource.h"
#include "version.h"
#include "Version.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@ -65,8 +65,8 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "Resources\\ten.ico"
IDR_TITLELEVEL BIN "Resources\\title.bin"
IDI_ICON1 ICON "Resources\\Ten.ico"
IDR_TITLELEVEL BIN "Resources\\Title.bin"
/////////////////////////////////////////////////////////////////////////////

View file

@ -1517,7 +1517,6 @@ void LoadBoxes()
}
}
bool LoadLevelFile(int levelIndex)
{
const auto& level = *g_GameFlow->GetLevel(levelIndex);

View file

@ -7,10 +7,10 @@
#include <codecvt>
#include <filesystem>
#include "resource.h"
#include "Game/control/control.h"
#include "Game/savegame.h"
#include "Renderer/Renderer.h"
#include "resource.h"
#include "Sound/sound.h"
#include "Specific/level.h"
#include "Specific/configuration.h"
@ -131,7 +131,7 @@ void DisableDpiAwareness()
bool GenerateDummyLevel(const std::string& levelPath)
{
// Try to load the embedded resource "data.bin"
// Try loading embedded resource "data.bin"
HRSRC hResource = FindResource(NULL, MAKEINTRESOURCE(IDR_TITLELEVEL), "BIN");
if (hResource == NULL)
{
@ -139,7 +139,7 @@ bool GenerateDummyLevel(const std::string& levelPath)
return false;
}
// Load the resource into memory
// Load resource into memory.
HGLOBAL hGlobal = LoadResource(NULL, hResource);
if (hGlobal == NULL)
{
@ -147,18 +147,18 @@ bool GenerateDummyLevel(const std::string& levelPath)
return false;
}
// Lock the resource to get a pointer to the data
// Lock resource to get data pointer.
void* pData = LockResource(hGlobal);
DWORD dwSize = SizeofResource(NULL, hResource);
// Write the resource data to the file
// Write resource data to file.
try
{
std::filesystem::path dir = std::filesystem::path(levelPath).parent_path();
auto dir = std::filesystem::path(levelPath).parent_path();
if (!dir.empty())
std::filesystem::create_directories(dir);
std::ofstream outFile(levelPath, std::ios::binary);
auto outFile = std::ofstream(levelPath, std::ios::binary);
if (!outFile)
throw std::ios_base::failure("Failed to create title level file.");
@ -179,18 +179,18 @@ bool GenerateDummyLevel(const std::string& levelPath)
void WinProcMsg()
{
MSG Msg;
MSG msg;
do
{
GetMessage(&Msg, 0, 0, 0);
if (!TranslateAccelerator(WindowsHandle, hAccTable, &Msg))
GetMessage(&msg, 0, 0, 0);
if (!TranslateAccelerator(WindowsHandle, hAccTable, &msg))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
while (!ThreadEnded && Msg.message != WM_QUIT);
while (!ThreadEnded && msg.message != WM_QUIT);
}
void CALLBACK HandleWmCommand(unsigned short wParam)

View file

@ -957,7 +957,7 @@ if not exist "%ScriptsDir%\Strings.lua" xcopy /Y "$(SolutionDir)Scripts\Strings.
<ClInclude Include="framework.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="version.h" />
<ClInclude Include="Version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="framework.cpp">
@ -1364,7 +1364,7 @@ if not exist "%ScriptsDir%\Strings.lua" xcopy /Y "$(SolutionDir)Scripts\Strings.
<ItemGroup>
<None Include="Objects\Generic\Switches\rail_switch.h" />
<None Include="packages.config" />
<None Include="Resources\title.bin" />
<None Include="Resources\Title.bin" />
<None Include="RuleSet.ruleset" />
<None Include="Shaders\AnimatedTextures.hlsli" />
<None Include="Shaders\CBCamera.hlsli">
@ -1633,7 +1633,7 @@ if not exist "%ScriptsDir%\Strings.lua" xcopy /Y "$(SolutionDir)Scripts\Strings.
</None>
</ItemGroup>
<ItemGroup>
<Image Include="Resources\ten.ico" />
<Image Include="Resources\Ten.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">