Add CarLockStateConverter
- Added CarLockStateConverter
This commit is contained in:
parent
4e24ec7e8d
commit
15ac97992e
@ -547,6 +547,7 @@ echo Created $(ProjectDir)src\git.h with commit %GIT_HASH% (dirty=%GIT_DIRTY%)
|
||||
<ClInclude Include="src\converters\camera-easy-mode.h" />
|
||||
<ClInclude Include="src\converters\camera-pos-cheat-mode.h" />
|
||||
<ClInclude Include="src\converters\car-damage.h" />
|
||||
<ClInclude Include="src\converters\car-lock-state.h" />
|
||||
<ClInclude Include="src\converters\car-model.h" />
|
||||
<ClInclude Include="src\converters\car-remap.h" />
|
||||
<ClInclude Include="src\converters\categorized-object-category.h" />
|
||||
@ -555,6 +556,7 @@ echo Created $(ProjectDir)src\git.h with commit %GIT_HASH% (dirty=%GIT_DIRTY%)
|
||||
<ClInclude Include="src\converters\cop-value.h" />
|
||||
<ClInclude Include="src\converters\cursor-visibility.h" />
|
||||
<ClInclude Include="src\converters\default.h" />
|
||||
<ClInclude Include="src\converters\car-door-lock.h" />
|
||||
<ClInclude Include="src\converters\elipsis.h" />
|
||||
<ClInclude Include="src\converters\enabled-disabled.h" />
|
||||
<ClInclude Include="src\converters\explosion-size.h" />
|
||||
|
||||
@ -452,6 +452,8 @@
|
||||
<ClInclude Include="src\game\utils\keyboard-utils.h" />
|
||||
<ClInclude Include="src\events\steering-assist.h" />
|
||||
<ClInclude Include="src\modules\modmenu\cheats\disable-steering-assist.h" />
|
||||
<ClInclude Include="src\converters\car-door-lock.h" />
|
||||
<ClInclude Include="src\converters\car-lock-state.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="GTA2.props" />
|
||||
|
||||
29
src/converters/car-lock-state.h
Normal file
29
src/converters/car-lock-state.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "../game/game.h"
|
||||
|
||||
class CarLockStateConverter {
|
||||
public:
|
||||
static std::wstring ConvertToString(Game::CAR_LOCK_STATE value) {
|
||||
|
||||
switch (value) {
|
||||
case Game::CAR_LOCK_STATE_NO_LOCK: return L"No lock";
|
||||
case Game::CAR_LOCK_STATE_LOCKED: return L"Locked";
|
||||
case Game::CAR_LOCK_STATE_LOCKOUT_THIEF: return L"Lockout thief";
|
||||
case Game::CAR_LOCK_STATE_UNLOCKED: return L"Unlocked";
|
||||
case Game::CAR_LOCK_STATE_LOCKED_PERMANENTLY: return L"Locked permanently";
|
||||
case Game::CAR_LOCK_STATE_LOCKOUT_PLAYER: return L"Lockout player";
|
||||
default: return L"???";
|
||||
}
|
||||
}
|
||||
|
||||
static bool AreEqual(Game::CAR_LOCK_STATE a, Game::CAR_LOCK_STATE b) {
|
||||
return a == b;
|
||||
}
|
||||
|
||||
protected:
|
||||
CarLockStateConverter() = delete;
|
||||
~CarLockStateConverter() = delete;
|
||||
CarLockStateConverter(const CarLockStateConverter&) = delete;
|
||||
CarLockStateConverter& operator=(const CarLockStateConverter&) = delete;
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user