vars: initialize all variables

This commit is contained in:
rr- 2021-11-04 17:43:37 +01:00 committed by Marcin Kurczewski
parent 7542e95a31
commit f4ffa7522d
16 changed files with 241 additions and 242 deletions

View file

@ -10,15 +10,14 @@
#include <math.h>
static PHD_VECTOR LsVectorView;
#define TRIGMULT2(A, B) (((A) * (B)) >> W2V_SHIFT)
#define TRIGMULT3(A, B, C) (TRIGMULT2((TRIGMULT2(A, B)), C))
#define EXTRACT_ROT_Y(rots) (((rots >> 10) & 0x3FF) << 6)
#define EXTRACT_ROT_X(rots) (((rots >> 20) & 0x3FF) << 6)
#define EXTRACT_ROT_Z(rots) ((rots & 0x3FF) << 6)
static PHD_MATRIX MatrixStack[MAX_MATRICES];
static PHD_VECTOR LsVectorView = { 0 };
static PHD_MATRIX MatrixStack[MAX_MATRICES] = { 0 };
void phd_GenerateW2V(PHD_3DPOS *viewpos)
{

View file

@ -13,7 +13,7 @@
#include "specific/input.h"
#include "specific/sndpc.h"
static bool SoundIsActiveOld;
static bool SoundIsActiveOld = false;
static const int32_t CinematicAnimationRate = 0x8000;
int32_t StartCinematic(int32_t level_num)

View file

@ -14,11 +14,11 @@
#include <stdlib.h>
static int16_t InterpolatedBounds[6];
static PHD_MATRIX *IMMatrixPtr;
static PHD_MATRIX IMMatrixStack[MAX_NESTED_MATRICES];
static int32_t IMRate;
static int32_t IMFrac;
static int16_t InterpolatedBounds[6] = { 0 };
static PHD_MATRIX *IMMatrixPtr = NULL;
static PHD_MATRIX IMMatrixStack[MAX_NESTED_MATRICES] = { 0 };
static int32_t IMRate = 0;
static int32_t IMFrac = 0;
int32_t DrawPhaseCinematic()
{

View file

@ -14,13 +14,13 @@
#define HAIR_OFFSET_Y (20) // up-down
#define HAIR_OFFSET_Z (-45) // front-back
static int FirstHair;
static PHD_3DPOS Hair[HAIR_SEGMENTS + 1];
static PHD_VECTOR HVel[HAIR_SEGMENTS + 1];
static bool FirstHair = false;
static PHD_3DPOS Hair[HAIR_SEGMENTS + 1] = { 0 };
static PHD_VECTOR HVel[HAIR_SEGMENTS + 1] = { 0 };
void InitialiseHair()
{
FirstHair = 1;
FirstHair = true;
int32_t *bone = &AnimBones[Objects[O_HAIR].bone_index];
@ -167,7 +167,7 @@ void HairControl(int in_cutscene)
bone = &AnimBones[Objects[O_HAIR].bone_index];
if (FirstHair) {
FirstHair = 0;
FirstHair = false;
Hair[0].x = pos.x;
Hair[0].y = pos.y;

View file

@ -14,7 +14,7 @@
#define MAX_PICKUP_COLUMNS 4
#define MAX_PICKUPS 16
static DISPLAYPU Pickups[MAX_PICKUPS];
static DISPLAYPU Pickups[MAX_PICKUPS] = { 0 };
void DrawGameInfo()
{

View file

@ -15,7 +15,7 @@
TEXTSTRING *InvItemText[2] = { NULL, NULL };
TEXTSTRING *InvRingText = NULL;
static int16_t InvColours[IC_NUMBER_OF];
static int16_t InvColours[IC_NUMBER_OF] = { 0 };
static TEXTSTRING *InvDownArrow1 = NULL;
static TEXTSTRING *InvDownArrow2 = NULL;
static TEXTSTRING *InvUpArrow1 = NULL;

View file

@ -36,10 +36,10 @@ typedef enum SAMPLE_FLAG {
VOLUME_WIBBLE = 1 << 14,
} SAMPLE_FLAG;
static MN_SFX_PLAY_INFO SFXPlaying[MAX_PLAYING_FX];
static MN_SFX_PLAY_INFO SFXPlaying[MAX_PLAYING_FX] = { 0 };
static int32_t MnSoundMasterVolumeDefault = 32;
static int16_t MnAmbientLookup[MAX_AMBIENT_FX];
static int32_t MnAmbientLookupIdx;
static int16_t MnAmbientLookup[MAX_AMBIENT_FX] = { -1 };
static int32_t MnAmbientLookupIdx = 0;
void mn_reset_sound_effects()
{

View file

@ -82,6 +82,103 @@ static TEXTSTRING *CtrlText[2] = { 0 };
static TEXTSTRING *CtrlTextA[KEY_NUMBER_OF] = { 0 };
static TEXTSTRING *CtrlTextB[KEY_NUMBER_OF] = { 0 };
static const TEXT_COLUMN_PLACEMENT CtrlTextPlacementNormal[] = {
// left column
{ KEY_UP, 0 },
{ KEY_DOWN, 0 },
{ KEY_LEFT, 0 },
{ KEY_RIGHT, 0 },
{ KEY_STEP_L, 0 },
{ KEY_STEP_R, 0 },
{ KEY_CAMERA_UP, 0 },
{ KEY_CAMERA_DOWN, 0 },
{ KEY_CAMERA_LEFT, 0 },
{ KEY_CAMERA_RIGHT, 0 },
{ KEY_CAMERA_RESET, 0 },
// right column
{ KEY_SLOW, 1 },
{ KEY_JUMP, 1 },
{ KEY_ACTION, 1 },
{ KEY_DRAW, 1 },
{ KEY_LOOK, 1 },
{ KEY_ROLL, 1 },
{ -1, 1 },
{ KEY_OPTION, 1 },
{ KEY_PAUSE, 1 },
{ -1, 1 },
{ -1, 1 },
// end
{ -1, -1 },
};
static const TEXT_COLUMN_PLACEMENT CtrlTextPlacementCheats[] = {
// left column
{ KEY_UP, 0 },
{ KEY_DOWN, 0 },
{ KEY_LEFT, 0 },
{ KEY_RIGHT, 0 },
{ KEY_STEP_L, 0 },
{ KEY_STEP_R, 0 },
{ KEY_CAMERA_UP, 0 },
{ KEY_CAMERA_DOWN, 0 },
{ KEY_CAMERA_LEFT, 0 },
{ KEY_CAMERA_RIGHT, 0 },
{ KEY_CAMERA_RESET, 0 },
// right column
{ KEY_SLOW, 1 },
{ KEY_JUMP, 1 },
{ KEY_ACTION, 1 },
{ KEY_DRAW, 1 },
{ KEY_LOOK, 1 },
{ KEY_ROLL, 1 },
{ KEY_OPTION, 1 },
{ KEY_PAUSE, 1 },
{ KEY_FLY_CHEAT, 1 },
{ KEY_ITEM_CHEAT, 1 },
{ KEY_LEVEL_SKIP_CHEAT, 1 },
// end
{ -1, -1 },
};
static int32_t PassportMode = 0;
static int32_t KeyMode = 0;
static char NewGameStrings[MAX_GAME_MODES][MAX_GAME_MODE_LENGTH] = { 0 };
REQUEST_INFO NewGameRequester = {
MAX_GAME_MODES, // items
0, // requested
MAX_GAME_MODES, // vis_lines
0, // line_offset
0, // line_old_offset
162, // pix_width
TEXT_HEIGHT + 7, // line_height
0, // x
0, // y
0, // z
0, // flags
NULL, // heading_text
&NewGameStrings[0][0], // item_texts
MAX_GAME_MODE_LENGTH, // item_text_len
};
static char LoadSaveGameStrings[MAX_SAVE_SLOTS][MAX_LEVEL_NAME_LENGTH] = { 0 };
REQUEST_INFO LoadSaveGameRequester = {
1, // items
0, // requested
-1, // vis_lines
0, // line_offset
0, // line_old_offset
272, // pix_width
TEXT_HEIGHT + 7, // line_height
0, // x
-32, // y
0, // z
0, // flags
NULL, // heading_text
&LoadSaveGameStrings[0][0], // item_texts
MAX_LEVEL_NAME_LENGTH, // item_text_len
};
static const char *GetScanCodeName(int16_t key)
{
// clang-format off
@ -197,103 +294,6 @@ static const char *GetScanCodeName(int16_t key)
return "????";
};
static const TEXT_COLUMN_PLACEMENT CtrlTextPlacementNormal[] = {
// left column
{ KEY_UP, 0 },
{ KEY_DOWN, 0 },
{ KEY_LEFT, 0 },
{ KEY_RIGHT, 0 },
{ KEY_STEP_L, 0 },
{ KEY_STEP_R, 0 },
{ KEY_CAMERA_UP, 0 },
{ KEY_CAMERA_DOWN, 0 },
{ KEY_CAMERA_LEFT, 0 },
{ KEY_CAMERA_RIGHT, 0 },
{ KEY_CAMERA_RESET, 0 },
// right column
{ KEY_SLOW, 1 },
{ KEY_JUMP, 1 },
{ KEY_ACTION, 1 },
{ KEY_DRAW, 1 },
{ KEY_LOOK, 1 },
{ KEY_ROLL, 1 },
{ -1, 1 },
{ KEY_OPTION, 1 },
{ KEY_PAUSE, 1 },
{ -1, 1 },
{ -1, 1 },
// end
{ -1, -1 },
};
static const TEXT_COLUMN_PLACEMENT CtrlTextPlacementCheats[] = {
// left column
{ KEY_UP, 0 },
{ KEY_DOWN, 0 },
{ KEY_LEFT, 0 },
{ KEY_RIGHT, 0 },
{ KEY_STEP_L, 0 },
{ KEY_STEP_R, 0 },
{ KEY_CAMERA_UP, 0 },
{ KEY_CAMERA_DOWN, 0 },
{ KEY_CAMERA_LEFT, 0 },
{ KEY_CAMERA_RIGHT, 0 },
{ KEY_CAMERA_RESET, 0 },
// right column
{ KEY_SLOW, 1 },
{ KEY_JUMP, 1 },
{ KEY_ACTION, 1 },
{ KEY_DRAW, 1 },
{ KEY_LOOK, 1 },
{ KEY_ROLL, 1 },
{ KEY_OPTION, 1 },
{ KEY_PAUSE, 1 },
{ KEY_FLY_CHEAT, 1 },
{ KEY_ITEM_CHEAT, 1 },
{ KEY_LEVEL_SKIP_CHEAT, 1 },
// end
{ -1, -1 },
};
static int32_t PassportMode = 0;
static int32_t KeyMode = 0;
static char NewGameStrings[MAX_GAME_MODES][MAX_GAME_MODE_LENGTH];
REQUEST_INFO NewGameRequester = {
MAX_GAME_MODES, // items
0, // requested
MAX_GAME_MODES, // vis_lines
0, // line_offset
0, // line_old_offset
162, // pix_width
TEXT_HEIGHT + 7, // line_height
0, // x
0, // y
0, // z
0, // flags
NULL, // heading_text
&NewGameStrings[0][0], // item_texts
MAX_GAME_MODE_LENGTH, // item_text_len
};
static char LoadSaveGameStrings[MAX_SAVE_SLOTS][MAX_LEVEL_NAME_LENGTH];
REQUEST_INFO LoadSaveGameRequester = {
1, // items
0, // requested
-1, // vis_lines
0, // line_offset
0, // line_old_offset
272, // pix_width
TEXT_HEIGHT + 7, // line_height
0, // x
-32, // y
0, // z
0, // flags
NULL, // heading_text
&LoadSaveGameStrings[0][0], // item_texts
MAX_LEVEL_NAME_LENGTH, // item_text_len
};
static void InitLoadSaveGameRequester()
{
REQUEST_INFO *req = &LoadSaveGameRequester;

View file

@ -18,8 +18,8 @@
#define SAVE_CREATURE (1 << 7)
static int SGCount;
static char *SGPoint;
static int SGCount = 0;
static char *SGPoint = NULL;
void InitialiseStartInfo()
{

View file

@ -13,8 +13,8 @@
#define TEXT_BOX_OFFSET 2
static int16_t TextStringCount = 0;
static TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS];
static char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE];
static TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS] = { 0 };
static char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE] = { 0 };
static int8_t TextSpacing[110] = {
14 /*A*/, 11 /*B*/, 11 /*C*/, 11 /*D*/, 11 /*E*/, 11 /*F*/, 11 /*G*/,

View file

@ -21,10 +21,10 @@ const char *T1MGlobalSettingsPath = "cfg/Tomb1Main.json5";
const char *T1MGameflowPath = "cfg/Tomb1Main_gameflow.json5";
const char *T1MGameflowGoldPath = "cfg/Tomb1Main_gameflow_ub.json5";
char *GameMemoryPointer;
char *GameMemoryPointer = NULL;
int8_t IsGameWindowActive = 1;
double UITextScale;
double UIBarScale;
double UITextScale = 1.0;
double UIBarScale = 1.0;
TEXTSTRING *AmmoText = NULL;
TEXTSTRING *FPSText = NULL;
int32_t FPSCounter = 0;
@ -37,131 +37,131 @@ void (*EffectRoutines[])(ITEM_INFO *item) = {
};
bool SoundIsActive = true;
int16_t SampleLUT[MAX_SAMPLES];
SAMPLE_INFO *SampleInfos;
SAMPLE_DATA **SampleData;
int32_t NumSampleData;
int16_t SampleLUT[MAX_SAMPLES] = { 0 };
SAMPLE_INFO *SampleInfos = NULL;
SAMPLE_DATA **SampleData = NULL;
int32_t NumSampleData = 0;
int16_t MusicTrack = 0;
int16_t MusicTrackLooped = 0;
bool MusicLoop = false;
uint16_t MusicTrackFlags[MAX_CD_TRACKS];
int32_t MnSoundMasterVolume;
uint16_t MusicTrackFlags[MAX_CD_TRACKS] = { 0 };
int32_t MnSoundMasterVolume = 32;
int32_t NoInputCount = 0;
int32_t IDelay;
int32_t IDCount;
INPUT_STATE Input;
INPUT_STATE InputDB;
int32_t KeyChange;
int32_t OptionSelected;
int32_t IDelay = 0;
int32_t IDCount = 0;
INPUT_STATE Input = { 0 };
INPUT_STATE InputDB = { 0 };
int32_t KeyChange = 0;
int32_t OptionSelected = 0;
int32_t PhdWinMaxX;
int32_t PhdWinMaxY;
int32_t PhdWinCenterX;
int32_t PhdWinCenterY;
int32_t PhdViewDist;
int32_t PhdPersp;
int32_t PhdFarZ;
int32_t PhdNearZ;
int32_t PhdLeft;
int32_t PhdBottom;
int32_t PhdRight;
int32_t PhdTop;
int32_t PhdWinWidth;
int32_t PhdWinHeight;
PHD_VBUF PhdVBuf[1500];
PHD_SPRITE PhdSpriteInfo[MAX_SPRITES];
PHD_TEXTURE PhdTextureInfo[MAX_TEXTURES];
PHD_MATRIX *PhdMatrixPtr;
PHD_MATRIX W2VMatrix;
int32_t PhdWinMaxX = 0;
int32_t PhdWinMaxY = 0;
int32_t PhdWinCenterX = 0;
int32_t PhdWinCenterY = 0;
int32_t PhdViewDist = 0;
int32_t PhdPersp = 0;
int32_t PhdFarZ = 0;
int32_t PhdNearZ = 0;
int32_t PhdLeft = 0;
int32_t PhdBottom = 0;
int32_t PhdRight = 0;
int32_t PhdTop = 0;
int32_t PhdWinWidth = 0;
int32_t PhdWinHeight = 0;
PHD_VBUF PhdVBuf[1500] = { 0 };
PHD_SPRITE PhdSpriteInfo[MAX_SPRITES] = { 0 };
PHD_TEXTURE PhdTextureInfo[MAX_TEXTURES] = { 0 };
PHD_MATRIX *PhdMatrixPtr = NULL;
PHD_MATRIX W2VMatrix = { 0 };
int32_t WibbleOffset;
int32_t WibbleTable[WIBBLE_SIZE];
int32_t ShadeTable[WIBBLE_SIZE];
int32_t RandTable[WIBBLE_SIZE];
int32_t WibbleOffset = 0;
int32_t WibbleTable[WIBBLE_SIZE] = { 0 };
int32_t ShadeTable[WIBBLE_SIZE] = { 0 };
int32_t RandTable[WIBBLE_SIZE] = { 0 };
RGB888 GamePalette[256];
RGB888 WaterPalette[256];
RGB888 GamePalette[256] = { 0 };
RGB888 WaterPalette[256] = { 0 };
bool ModeLock = false;
GAMEFLOW GF;
LARA_INFO Lara;
ITEM_INFO *LaraItem;
CAMERA_INFO Camera;
bool CameraUnderwater;
SAVEGAME_INFO SaveGame;
int32_t SavedGamesCount;
int32_t SaveCounter;
int32_t CurrentLevel;
int32_t DemoLevel;
uint32_t *DemoPtr;
int32_t DemoCount;
int32_t LevelComplete;
int32_t ResetFlag;
int32_t OverlayFlag;
GAMEFLOW GF = { 0 };
LARA_INFO Lara = { 0 };
ITEM_INFO *LaraItem = NULL;
CAMERA_INFO Camera = { 0 };
bool CameraUnderwater = false;
SAVEGAME_INFO SaveGame = { 0 };
int32_t SavedGamesCount = 0;
int32_t SaveCounter = 0;
int32_t CurrentLevel = -1;
int32_t DemoLevel = -1;
uint32_t *DemoPtr = NULL;
int32_t DemoCount = 0;
int32_t LevelComplete = 0;
int32_t ResetFlag = 0;
int32_t OverlayFlag = 0;
int32_t ChunkyFlag = 0;
int32_t HeightType = 0;
int32_t HealthBarTimer;
int32_t HealthBarTimer = 0;
int16_t StoredLaraHealth = 0;
ROOM_INFO *RoomInfo;
int16_t *FloorData;
int16_t *MeshBase;
int16_t **Meshes;
OBJECT_INFO Objects[O_NUMBER_OF];
STATIC_INFO StaticObjects[STATIC_NUMBER_OF];
int8_t *TexturePagePtrs[MAX_TEXTPAGES];
int16_t RoomCount;
int32_t LevelItemCount;
ITEM_INFO *Items;
int16_t NextItemFree;
int16_t NextItemActive;
FX_INFO *Effects;
int16_t NextFxFree;
int16_t NextFxActive;
int32_t NumberBoxes;
BOX_INFO *Boxes;
uint16_t *Overlap;
int16_t *GroundZone[2];
int16_t *GroundZone2[2];
int16_t *FlyZone[2];
int32_t SlotsUsed;
CREATURE_INFO *BaddieSlots;
ANIM_STRUCT *Anims;
ANIM_CHANGE_STRUCT *AnimChanges;
ANIM_RANGE_STRUCT *AnimRanges;
int16_t *AnimTextureRanges;
int16_t *AnimCommands;
int32_t *AnimBones;
int16_t *AnimFrames;
int16_t *Cine;
int16_t NumCineFrames;
int16_t CineFrame;
PHD_3DPOS CinePosition;
int32_t NumberCameras;
int32_t NumberSoundEffects;
OBJECT_VECTOR *SoundEffectsTable;
int16_t RoomsToDraw[MAX_ROOMS_TO_DRAW];
int16_t RoomsToDrawCount;
bool IsWibbleEffect;
bool IsWaterEffect;
bool IsShadeEffect;
ROOM_INFO *RoomInfo = NULL;
int16_t *FloorData = NULL;
int16_t *MeshBase = NULL;
int16_t **Meshes = NULL;
OBJECT_INFO Objects[O_NUMBER_OF] = { 0 };
STATIC_INFO StaticObjects[STATIC_NUMBER_OF] = { 0 };
int8_t *TexturePagePtrs[MAX_TEXTPAGES] = { NULL };
int16_t RoomCount = 0;
int32_t LevelItemCount = 0;
ITEM_INFO *Items = NULL;
int16_t NextItemFree = -1;
int16_t NextItemActive = -1;
FX_INFO *Effects = NULL;
int16_t NextFxFree = -1;
int16_t NextFxActive = -1;
int32_t NumberBoxes = 0;
BOX_INFO *Boxes = NULL;
uint16_t *Overlap = NULL;
int16_t *GroundZone[2] = { NULL };
int16_t *GroundZone2[2] = { NULL };
int16_t *FlyZone[2] = { NULL };
int32_t SlotsUsed = 0;
CREATURE_INFO *BaddieSlots = NULL;
ANIM_STRUCT *Anims = NULL;
ANIM_CHANGE_STRUCT *AnimChanges = NULL;
ANIM_RANGE_STRUCT *AnimRanges = NULL;
int16_t *AnimTextureRanges = NULL;
int16_t *AnimCommands = NULL;
int32_t *AnimBones = NULL;
int16_t *AnimFrames = NULL;
int16_t *Cine = NULL;
int16_t NumCineFrames = 0;
int16_t CineFrame = -1;
PHD_3DPOS CinePosition = { 0 };
int32_t NumberCameras = 0;
int32_t NumberSoundEffects = 0;
OBJECT_VECTOR *SoundEffectsTable = NULL;
int16_t RoomsToDraw[MAX_ROOMS_TO_DRAW] = { -1 };
int16_t RoomsToDrawCount = 0;
bool IsWibbleEffect = false;
bool IsWaterEffect = false;
bool IsShadeEffect = false;
int16_t *TriggerIndex;
int16_t *TriggerIndex = NULL;
int32_t FlipTimer = 0;
int32_t FlipEffect = -1;
int32_t FlipStatus;
int32_t FlipStatus = 0;
int32_t FlipMapTable[MAX_FLIP_MAPS] = { 0 };
int16_t InvMode = INV_TITLE_MODE;
int32_t InvExtraData[8];
int32_t InvExtraData[8] = { 0 };
int16_t InvChosen = -1;
int32_t LsAdder;
int32_t LsDivider;
SHADOW_INFO ShadowInfo;
int16_t BarOffsetY[6];
int32_t LsAdder = 0;
int32_t LsDivider = 0;
SHADOW_INFO ShadowInfo = { 0 };
int16_t BarOffsetY[6] = { 0 };
HWR_Resolution AvailableResolutions[RESOLUTIONS_SIZE] = {
{ 320, 200 }, { 512, 384 }, { 640, 480 }, { 800, 600 },

View file

@ -26,13 +26,13 @@ typedef struct HWR_LIGHTNING {
HWR_LIGHTNING HWR_LightningTable[100];
int32_t HWR_LightningCount = 0;
static bool HWR_IsPaletteActive;
static bool HWR_IsRendering;
static bool HWR_IsRenderingOld;
static bool HWR_IsTextureMode;
static bool HWR_IsPaletteActive = false;
static bool HWR_IsRendering = false;
static bool HWR_IsRenderingOld = false;
static bool HWR_IsTextureMode = false;
static int32_t HWR_SelectedTexture = -1;
static bool HWR_TextureLoaded[MAX_TEXTPAGES];
static RGBF HWR_WaterColor;
static bool HWR_TextureLoaded[MAX_TEXTPAGES] = { false };
static RGBF HWR_WaterColor = { 0 };
static void HWR_EnableTextureMode(void);
static void HWR_DisableTextureMode(void);

View file

@ -58,10 +58,10 @@ static const char *BufferNames[] = {
"Rolling Ball Stuff", // GBUF_ROLLINGBALL_STUFF
};
static char *GameMemoryPointer;
static char *GameAllocMemPointer;
static uint32_t GameAllocMemUsed;
static uint32_t GameAllocMemFree;
static char *GameMemoryPointer = NULL;
static char *GameAllocMemPointer = NULL;
static uint32_t GameAllocMemUsed = 0;
static uint32_t GameAllocMemFree = 0;
void S_InitialiseSystem()
{

View file

@ -71,11 +71,11 @@ int16_t Layout[2][KEY_NUMBER_OF] = {
bool ConflictLayout[KEY_NUMBER_OF] = { false };
static LPDIRECTINPUT8 DInput;
static LPDIRECTINPUTDEVICE8 IDID_SysKeyboard;
static uint8_t DIKeys[256];
static LPDIRECTINPUT8 DInput = NULL;
static LPDIRECTINPUTDEVICE8 IDID_SysKeyboard = NULL;
static uint8_t DIKeys[256] = { 0 };
static LPDIRECTINPUTDEVICE8 IDID_Joystick;
static LPDIRECTINPUTDEVICE8 IDID_Joystick = NULL;
static int32_t MedipackCoolDown = 0;

View file

@ -19,7 +19,7 @@
static const char *ClassName = "TRClass";
static const char *WindowName = "Tomb Raider";
static UINT CloseMsg;
static UINT CloseMsg = 0;
static void WinGameFinish();
static LRESULT CALLBACK

View file

@ -46,8 +46,8 @@ typedef struct WAVE_FILE_HEADER {
#pragma pack(pop)
static DUPE_SOUND_BUFFER *DupeSoundBufferList = NULL;
static int32_t DecibelLUT[DECIBEL_LUT_SIZE];
static int32_t MusicNumTracks;
static int32_t DecibelLUT[DECIBEL_LUT_SIZE] = { 0 };
static int32_t MusicNumTracks = 0;
int32_t ConvertVolumeToDecibel(int32_t volume)
{