mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-03 23:28:00 +03:00
use common macro naming pattern
This commit is contained in:
parent
71d7266082
commit
d37a423fc8
69 changed files with 165 additions and 165 deletions
12
Makefile
12
Makefile
|
@ -1,11 +1,11 @@
|
||||||
CC=i686-w64-mingw32-gcc
|
CC=i686-w64-mingw32-gcc
|
||||||
CFLAGS=-Wall -Isrc \
|
CFLAGS=-Wall -Isrc \
|
||||||
-DTOMB1M_FEAT_CHEATS \
|
-DT1M_FEAT_CHEATS \
|
||||||
-DTOMB1M_FEAT_EXTENDED_MEMORY \
|
-DT1M_FEAT_EXTENDED_MEMORY \
|
||||||
-DTOMB1M_FEAT_UI \
|
-DT1M_FEAT_UI \
|
||||||
-DTOMB1M_FEAT_GAMEPLAY \
|
-DT1M_FEAT_GAMEPLAY \
|
||||||
-DTOMB1M_FEAT_LEVEL_FIXES \
|
-DT1M_FEAT_LEVEL_FIXES \
|
||||||
-DTOMB1M_FEAT_NOCD
|
-DT1M_FEAT_NOCD
|
||||||
|
|
||||||
C_FILES = $(shell find src/ -type f -name '*.c')
|
C_FILES = $(shell find src/ -type f -name '*.c')
|
||||||
O_FILES = $(patsubst src/%.c, build/%.o, $(C_FILES))
|
O_FILES = $(patsubst src/%.c, build/%.o, $(C_FILES))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_3DSYSTEM_3D_GEN_H
|
#ifndef T1M_3DSYSTEM_3D_GEN_H
|
||||||
#define TOMB1MAIN_3DSYSTEM_3D_GEN_H
|
#define T1M_3DSYSTEM_3D_GEN_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define S_InsertRoom ((void __cdecl(*)(int16_t* objptr))0x00401BD0)
|
#define S_InsertRoom ((void __cdecl(*)(int16_t* objptr))0x00401BD0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_3DSYSTEM_3D_INSERT_H
|
#ifndef T1M_3DSYSTEM_3D_INSERT_H
|
||||||
#define TOMB1MAIN_3DSYSTEM_3D_INSERT_H
|
#define T1M_3DSYSTEM_3D_INSERT_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define Insert2DLine ((void __cdecl(*)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t z, uint8_t color))0x00402710)
|
#define Insert2DLine ((void __cdecl(*)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t z, uint8_t color))0x00402710)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_3DSYSTEM_PHD_MATH_H
|
#ifndef T1M_3DSYSTEM_PHD_MATH_H
|
||||||
#define TOMB1MAIN_3DSYSTEM_PHD_MATH_H
|
#define T1M_3DSYSTEM_PHD_MATH_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define phd_atan ((int32_t __cdecl(*)(int32_t x, int32_t y))0x0042A8A0)
|
#define phd_atan ((int32_t __cdecl(*)(int32_t x, int32_t y))0x0042A8A0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_3DSYSTEM_SCALESPR_H
|
#ifndef T1M_3DSYSTEM_SCALESPR_H
|
||||||
#define TOMB1MAIN_3DSYSTEM_SCALESPR_H
|
#define T1M_3DSYSTEM_SCALESPR_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define S_DrawSprite ((void __cdecl(*)(int32_t x, int32_t y, int32_t z, int16_t sprnum, int16_t shade))0x00435910)
|
#define S_DrawSprite ((void __cdecl(*)(int32_t x, int32_t y, int32_t z, int16_t sprnum, int16_t shade))0x00435910)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_CONFIG_H
|
#ifndef T1M_CONFIG_H
|
||||||
#define TOMB1MAIN_CONFIG_H
|
#define T1M_CONFIG_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_BAT_H
|
#ifndef T1M_GAME_BAT_H
|
||||||
#define TOMB1MAIN_GAME_BAT_H
|
#define T1M_GAME_BAT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_BEAR_H
|
#ifndef T1M_GAME_BEAR_H
|
||||||
#define TOMB1MAIN_GAME_BEAR_H
|
#define T1M_GAME_BEAR_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_BOX_H
|
#ifndef T1M_GAME_BOX_H
|
||||||
#define TOMB1MAIN_GAME_BOX_H
|
#define T1M_GAME_BOX_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_CAMERA_H
|
#ifndef T1M_GAME_CAMERA_H
|
||||||
#define TOMB1MAIN_GAME_CAMERA_H
|
#define T1M_GAME_CAMERA_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define CalculateCamera ((void __cdecl(*)())0x00410B40)
|
#define CalculateCamera ((void __cdecl(*)())0x00410B40)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_COLLIDE_H
|
#ifndef T1M_GAME_COLLIDE_H
|
||||||
#define TOMB1MAIN_GAME_COLLIDE_H
|
#define T1M_GAME_COLLIDE_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_CONST_H
|
#ifndef T1M_GAME_CONST_H
|
||||||
#define TOMB1MAIN_GAME_CONST_H
|
#define T1M_GAME_CONST_H
|
||||||
|
|
||||||
#define PHD_ONE 0x10000
|
#define PHD_ONE 0x10000
|
||||||
#define PHD_DEGREE (PHD_ONE / 360) // = 182
|
#define PHD_DEGREE (PHD_ONE / 360) // = 182
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
#define SEARCH_NUMBER 0x7fff
|
#define SEARCH_NUMBER 0x7fff
|
||||||
#define BLOCKED_SEARCH 0x8000
|
#define BLOCKED_SEARCH 0x8000
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_EXTENDED_MEMORY
|
#ifdef T1M_FEAT_EXTENDED_MEMORY
|
||||||
#define MAX_STRING_SIZE 100
|
#define MAX_STRING_SIZE 100
|
||||||
#define MAX_TEXT_STRINGS 64
|
#define MAX_TEXT_STRINGS 64
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -125,7 +125,7 @@ int32_t __cdecl ControlPhase(int32_t nframes, int demo_mode)
|
||||||
++SaveGame[0].timer;
|
++SaveGame[0].timer;
|
||||||
--HealthBarTimer;
|
--HealthBarTimer;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.disable_healing_between_levels) {
|
if (T1MConfig.disable_healing_between_levels) {
|
||||||
int lara_found = 0;
|
int lara_found = 0;
|
||||||
for (int i = 0; i < LevelItemCount; i++) {
|
for (int i = 0; i < LevelItemCount; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_CONTROL_H
|
#ifndef T1M_GAME_CONTROL_H
|
||||||
#define TOMB1MAIN_GAME_CONTROL_H
|
#define T1M_GAME_CONTROL_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_CROC_H
|
#ifndef T1M_GAME_CROC_H
|
||||||
#define TOMB1MAIN_GAME_CROC_H
|
#define T1M_GAME_CROC_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ int32_t __cdecl StartDemo()
|
||||||
SeedRandomDraw(0xD371F947);
|
SeedRandomDraw(0xD371F947);
|
||||||
SeedRandomControl(0xD371F947);
|
SeedRandomControl(0xD371F947);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
txt = T_Print(0, -16, 0, "Demo Mode");
|
txt = T_Print(0, -16, 0, "Demo Mode");
|
||||||
T_FlashText(txt, 1, 20);
|
T_FlashText(txt, 1, 20);
|
||||||
T_BottomAlign(txt, 1);
|
T_BottomAlign(txt, 1);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_DEMO_H
|
#ifndef T1M_GAME_DEMO_H
|
||||||
#define TOMB1MAIN_GAME_DEMO_H
|
#define T1M_GAME_DEMO_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_DINO_H
|
#ifndef T1M_GAME_DINO_H
|
||||||
#define TOMB1MAIN_GAME_DINO_H
|
#define T1M_GAME_DINO_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -720,7 +720,7 @@ void __cdecl DrawLara(ITEM_INFO* item)
|
||||||
phd_RotYXZpack(packed_rotation[LM_HAND_R]);
|
phd_RotYXZpack(packed_rotation[LM_HAND_R]);
|
||||||
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_R], clip);
|
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_R], clip);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (Lara.right_arm.flash_gun) {
|
if (Lara.right_arm.flash_gun) {
|
||||||
saved_matrix = *PhdMatrixPtr;
|
saved_matrix = *PhdMatrixPtr;
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ void __cdecl DrawLara(ITEM_INFO* item)
|
||||||
phd_RotYXZpack(packed_rotation[LM_HAND_L]);
|
phd_RotYXZpack(packed_rotation[LM_HAND_L]);
|
||||||
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_L], clip);
|
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_L], clip);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (Lara.right_arm.flash_gun) {
|
if (Lara.right_arm.flash_gun) {
|
||||||
*PhdMatrixPtr = saved_matrix;
|
*PhdMatrixPtr = saved_matrix;
|
||||||
DrawGunFlash(fire_arms, clip);
|
DrawGunFlash(fire_arms, clip);
|
||||||
|
@ -782,7 +782,7 @@ void __cdecl DrawGunFlash(int32_t weapon_type, int32_t clip)
|
||||||
off = 55;
|
off = 55;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
case LGT_SHOTGUN:
|
case LGT_SHOTGUN:
|
||||||
light = 10 * 256;
|
light = 10 * 256;
|
||||||
len = 285;
|
len = 285;
|
||||||
|
@ -1041,7 +1041,7 @@ void __cdecl DrawLaraInt(
|
||||||
phd_RotYXZpack(packed_rotation1[LM_HAND_R]);
|
phd_RotYXZpack(packed_rotation1[LM_HAND_R]);
|
||||||
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_R], clip);
|
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_R], clip);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (Lara.right_arm.flash_gun) {
|
if (Lara.right_arm.flash_gun) {
|
||||||
saved_matrix = *PhdMatrixPtr;
|
saved_matrix = *PhdMatrixPtr;
|
||||||
}
|
}
|
||||||
|
@ -1065,7 +1065,7 @@ void __cdecl DrawLaraInt(
|
||||||
phd_RotYXZpack(packed_rotation1[LM_HAND_L]);
|
phd_RotYXZpack(packed_rotation1[LM_HAND_L]);
|
||||||
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_L], clip);
|
phd_PutPolygons(Lara.mesh_ptrs[LM_HAND_L], clip);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (Lara.right_arm.flash_gun) {
|
if (Lara.right_arm.flash_gun) {
|
||||||
*PhdMatrixPtr = saved_matrix;
|
*PhdMatrixPtr = saved_matrix;
|
||||||
DrawGunFlash(fire_arms, clip);
|
DrawGunFlash(fire_arms, clip);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_DRAW_H
|
#ifndef T1M_GAME_DRAW_H
|
||||||
#define TOMB1MAIN_GAME_DRAW_H
|
#define T1M_GAME_DRAW_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
void __cdecl FxChainBlock(ITEM_INFO* item)
|
void __cdecl FxChainBlock(ITEM_INFO* item)
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_LEVEL_FIXES
|
#ifdef T1M_FEAT_LEVEL_FIXES
|
||||||
if (T1MConfig.fix_tihocan_secret_sound) {
|
if (T1MConfig.fix_tihocan_secret_sound) {
|
||||||
SoundEffect(33, NULL, 0);
|
SoundEffect(33, NULL, 0);
|
||||||
FlipEffect = -1;
|
FlipEffect = -1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_EFFECTS_H
|
#ifndef T1M_GAME_EFFECTS_H
|
||||||
#define TOMB1MAIN_GAME_EFFECTS_H
|
#define T1M_GAME_EFFECTS_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -119,7 +119,7 @@ void __cdecl LevelStats(int level_id)
|
||||||
T_CentreV(txt, 1);
|
T_CentreV(txt, 1);
|
||||||
|
|
||||||
// wait till action key release
|
// wait till action key release
|
||||||
#ifdef TOMB1M_FEAT_LEVEL_FIXES
|
#ifdef T1M_FEAT_LEVEL_FIXES
|
||||||
if (T1MConfig.fix_end_of_level_freeze) {
|
if (T1MConfig.fix_end_of_level_freeze) {
|
||||||
while (Input & IN_SELECT) {
|
while (Input & IN_SELECT) {
|
||||||
S_UpdateInput();
|
S_UpdateInput();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_GAME_H
|
#ifndef T1M_GAME_GAME_H
|
||||||
#define TOMB1MAIN_GAME_GAME_H
|
#define T1M_GAME_GAME_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ void __cdecl DrawGameInfo()
|
||||||
if (OverlayFlag > 0) {
|
if (OverlayFlag > 0) {
|
||||||
DrawHealthBar();
|
DrawHealthBar();
|
||||||
DrawAirBar();
|
DrawAirBar();
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
DrawEnemyBar();
|
DrawEnemyBar();
|
||||||
#endif
|
#endif
|
||||||
DrawPickups();
|
DrawPickups();
|
||||||
|
@ -61,7 +61,7 @@ void __cdecl DrawAirBar()
|
||||||
S_DrawAirBar(air * 100 / LARA_AIR);
|
S_DrawAirBar(air * 100 / LARA_AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
void __cdecl DrawEnemyBar()
|
void __cdecl DrawEnemyBar()
|
||||||
{
|
{
|
||||||
if (!T1MConfig.enable_enemy_healthbar || !Lara.target) {
|
if (!T1MConfig.enable_enemy_healthbar || !Lara.target) {
|
||||||
|
@ -153,7 +153,7 @@ void __cdecl DrawPickups()
|
||||||
if (pu->duration <= 0) {
|
if (pu->duration <= 0) {
|
||||||
pu->duration = 0;
|
pu->duration = 0;
|
||||||
} else {
|
} else {
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
S_DrawUISprite(x, y, GetRenderScale(12288), pu->sprnum, 4096);
|
S_DrawUISprite(x, y, GetRenderScale(12288), pu->sprnum, 4096);
|
||||||
#else
|
#else
|
||||||
S_DrawUISprite(x, y, 12288, pu->sprnum, 4096);
|
S_DrawUISprite(x, y, 12288, pu->sprnum, 4096);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_HEALTH_H
|
#ifndef T1M_GAME_HEALTH_H
|
||||||
#define TOMB1MAIN_GAME_HEALTH_H
|
#define T1M_GAME_HEALTH_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ void __cdecl AddDisplayPickup(int16_t objnum);
|
||||||
void __cdecl InitialisePickUpDisplay();
|
void __cdecl InitialisePickUpDisplay();
|
||||||
void __cdecl DrawPickups();
|
void __cdecl DrawPickups();
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
void __cdecl DrawEnemyBar();
|
void __cdecl DrawEnemyBar();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_INV_H
|
#ifndef T1M_GAME_INV_H
|
||||||
#define TOMB1MAIN_GAME_INV_H
|
#define T1M_GAME_INV_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_ITEMS_H
|
#ifndef T1M_GAME_ITEMS_H
|
||||||
#define TOMB1MAIN_GAME_ITEMS_H
|
#define T1M_GAME_ITEMS_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
void LookLeftRight()
|
void LookLeftRight()
|
||||||
{
|
{
|
||||||
Camera.type = CAM_LOOK;
|
Camera.type = CAM_LOOK;
|
||||||
|
@ -86,7 +86,7 @@ void __cdecl LaraAboveWater(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
coll->enable_spaz = 1;
|
coll->enable_spaz = 1;
|
||||||
coll->enable_baddie_push = 1;
|
coll->enable_baddie_push = 1;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look && item->hit_points > 0) {
|
if (T1MConfig.enable_enhanced_look && item->hit_points > 0) {
|
||||||
if (Input & IN_LOOK) {
|
if (Input & IN_LOOK) {
|
||||||
LookLeftRight();
|
LookLeftRight();
|
||||||
|
@ -339,7 +339,7 @@ void __cdecl LaraAsFastBack(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
|
|
||||||
void __cdecl LaraAsTurnR(ITEM_INFO* item, COLL_INFO* coll)
|
void __cdecl LaraAsTurnR(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
||||||
item->goal_anim_state = AS_STOP;
|
item->goal_anim_state = AS_STOP;
|
||||||
return;
|
return;
|
||||||
|
@ -375,7 +375,7 @@ void __cdecl LaraAsTurnR(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
|
|
||||||
void __cdecl LaraAsTurnL(ITEM_INFO* item, COLL_INFO* coll)
|
void __cdecl LaraAsTurnL(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
||||||
item->goal_anim_state = AS_STOP;
|
item->goal_anim_state = AS_STOP;
|
||||||
return;
|
return;
|
||||||
|
@ -511,7 +511,7 @@ void __cdecl LaraAsBack(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
|
|
||||||
void __cdecl LaraAsFastTurn(ITEM_INFO* item, COLL_INFO* coll)
|
void __cdecl LaraAsFastTurn(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
if (T1MConfig.enable_enhanced_look && (Input & IN_LOOK)) {
|
||||||
item->goal_anim_state = AS_STOP;
|
item->goal_anim_state = AS_STOP;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_LARA_H
|
#ifndef T1M_GAME_LARA_H
|
||||||
#define TOMB1MAIN_GAME_LARA_H
|
#define T1M_GAME_LARA_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -193,13 +193,13 @@ void __cdecl undraw_pistol_mesh_right(int32_t weapon_type);
|
||||||
void __cdecl PistolHandler(int32_t weapon_type);
|
void __cdecl PistolHandler(int32_t weapon_type);
|
||||||
void __cdecl AnimatePistols(int32_t weapon_type);
|
void __cdecl AnimatePistols(int32_t weapon_type);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
void LookLeftRight();
|
void LookLeftRight();
|
||||||
void LookUpDown();
|
void LookUpDown();
|
||||||
void ResetLook();
|
void ResetLook();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
void LaraCheatGetStuff();
|
void LaraCheatGetStuff();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ void __cdecl FireShotgun()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fired) {
|
if (fired) {
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_shotgun_flash) {
|
if (T1MConfig.enable_shotgun_flash) {
|
||||||
Lara.right_arm.flash_gun = Weapons[LGT_SHOTGUN].flash_time;
|
Lara.right_arm.flash_gun = Weapons[LGT_SHOTGUN].flash_time;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ void __cdecl LaraControl(int16_t item_num)
|
||||||
ROOM_INFO* r = &RoomInfo[item->room_number];
|
ROOM_INFO* r = &RoomInfo[item->room_number];
|
||||||
int32_t room_submerged = r->flags & RF_UNDERWATER;
|
int32_t room_submerged = r->flags & RF_UNDERWATER;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
if (Input & IN_STUFFCHEAT) {
|
if (Input & IN_STUFFCHEAT) {
|
||||||
LaraCheatGetStuff();
|
LaraCheatGetStuff();
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ void __cdecl LaraControl(int16_t item_num)
|
||||||
LaraSurface(item, &coll);
|
LaraSurface(item, &coll);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
case LWS_CHEAT:
|
case LWS_CHEAT:
|
||||||
item->hit_points = LARA_HITPOINTS;
|
item->hit_points = LARA_HITPOINTS;
|
||||||
Lara.death_count = 0;
|
Lara.death_count = 0;
|
||||||
|
@ -392,7 +392,7 @@ void __cdecl InitialiseLara()
|
||||||
LaraItem->collidable = 0;
|
LaraItem->collidable = 0;
|
||||||
LaraItem->data = &Lara;
|
LaraItem->data = &Lara;
|
||||||
LaraItem->hit_points = LARA_HITPOINTS;
|
LaraItem->hit_points = LARA_HITPOINTS;
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.disable_healing_between_levels) {
|
if (T1MConfig.disable_healing_between_levels) {
|
||||||
LaraItem->hit_points = StoredLaraHealth;
|
LaraItem->hit_points = StoredLaraHealth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ void __cdecl LaraUnderWater(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
coll->enable_spaz = 0;
|
coll->enable_spaz = 0;
|
||||||
coll->enable_baddie_push = 0;
|
coll->enable_baddie_push = 0;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look && item->hit_points > 0) {
|
if (T1MConfig.enable_enhanced_look && item->hit_points > 0) {
|
||||||
if (Input & IN_LOOK) {
|
if (Input & IN_LOOK) {
|
||||||
LookLeftRight();
|
LookLeftRight();
|
||||||
|
@ -106,7 +106,7 @@ void __cdecl LaraAsSwim(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
}
|
}
|
||||||
|
|
||||||
item->fall_speed += 8;
|
item->fall_speed += 8;
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
if (Lara.water_status == LWS_CHEAT) {
|
if (Lara.water_status == LWS_CHEAT) {
|
||||||
if (item->fall_speed > UW_MAXSPEED * 2) {
|
if (item->fall_speed > UW_MAXSPEED * 2) {
|
||||||
item->fall_speed = UW_MAXSPEED * 2;
|
item->fall_speed = UW_MAXSPEED * 2;
|
||||||
|
@ -160,7 +160,7 @@ void __cdecl LaraAsGlide(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
|
|
||||||
void __cdecl LaraAsTread(ITEM_INFO* item, COLL_INFO* coll)
|
void __cdecl LaraAsTread(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.enable_enhanced_look) {
|
if (T1MConfig.enable_enhanced_look) {
|
||||||
if (Input & IN_LOOK) {
|
if (Input & IN_LOOK) {
|
||||||
LookUpDown();
|
LookUpDown();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_LION_H
|
#ifndef T1M_GAME_LION_H
|
||||||
#define TOMB1MAIN_GAME_LION_H
|
#define T1M_GAME_LION_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_LOT_H
|
#ifndef T1M_GAME_LOT_H
|
||||||
#define TOMB1MAIN_GAME_LOT_H
|
#define T1M_GAME_LOT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_MISC_H
|
#ifndef T1M_GAME_MISC_H
|
||||||
#define TOMB1MAIN_GAME_MISC_H
|
#define T1M_GAME_MISC_H
|
||||||
|
|
||||||
#define SQUARE(A) ((A) * (A))
|
#define SQUARE(A) ((A) * (A))
|
||||||
#ifndef ABS
|
#ifndef ABS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_NATLA_H
|
#ifndef T1M_GAME_NATLA_H
|
||||||
#define TOMB1MAIN_GAME_NATLA_H
|
#define T1M_GAME_NATLA_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_OBJECTS_H
|
#ifndef T1M_GAME_OBJECTS_H
|
||||||
#define TOMB1MAIN_GAME_OBJECTS_H
|
#define T1M_GAME_OBJECTS_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
void S_ShowControls()
|
void S_ShowControls()
|
||||||
{
|
{
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
int16_t centre = GetRenderWidthDownscaled() / 2;
|
int16_t centre = GetRenderWidthDownscaled() / 2;
|
||||||
#else
|
#else
|
||||||
int16_t centre = PhdWinWidth / 2;
|
int16_t centre = PhdWinWidth / 2;
|
||||||
|
@ -16,7 +16,7 @@ void S_ShowControls()
|
||||||
int16_t vpos;
|
int16_t vpos;
|
||||||
|
|
||||||
switch (HiRes) {
|
switch (HiRes) {
|
||||||
#ifndef TOMB1M_FEAT_UI
|
#ifndef T1M_FEAT_UI
|
||||||
case 0:
|
case 0:
|
||||||
ControlText[1] = T_Print(0, -55, 0, " ");
|
ControlText[1] = T_Print(0, -55, 0, " ");
|
||||||
break;
|
break;
|
||||||
|
@ -35,7 +35,7 @@ void S_ShowControls()
|
||||||
T_CentreV(ControlText[1], 1);
|
T_CentreV(ControlText[1], 1);
|
||||||
|
|
||||||
switch (HiRes) {
|
switch (HiRes) {
|
||||||
#ifndef TOMB1M_FEAT_UI
|
#ifndef T1M_FEAT_UI
|
||||||
case 0:
|
case 0:
|
||||||
for (int i = 0; i < 13; i++) {
|
for (int i = 0; i < 13; i++) {
|
||||||
T_SetScale(CtrlTextA[i], PHD_ONE / 2, PHD_ONE);
|
T_SetScale(CtrlTextA[i], PHD_ONE / 2, PHD_ONE);
|
||||||
|
@ -67,7 +67,7 @@ void S_ShowControls()
|
||||||
int16_t* layout = Layout[IConfig];
|
int16_t* layout = Layout[IConfig];
|
||||||
|
|
||||||
switch (HiRes) {
|
switch (HiRes) {
|
||||||
#ifndef TOMB1M_FEAT_UI
|
#ifndef T1M_FEAT_UI
|
||||||
case 0:
|
case 0:
|
||||||
hpos = centre - 140;
|
hpos = centre - 140;
|
||||||
break;
|
break;
|
||||||
|
@ -108,7 +108,7 @@ void S_ShowControls()
|
||||||
|
|
||||||
if (!CtrlTextA[0]) {
|
if (!CtrlTextA[0]) {
|
||||||
switch (HiRes) {
|
switch (HiRes) {
|
||||||
#ifndef TOMB1M_FEAT_UI
|
#ifndef T1M_FEAT_UI
|
||||||
case 0:
|
case 0:
|
||||||
hpos = centre - 70;
|
hpos = centre - 70;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_OPTION_H
|
#ifndef T1M_GAME_OPTION_H
|
||||||
#define TOMB1MAIN_GAME_OPTION_H
|
#define T1M_GAME_OPTION_H
|
||||||
|
|
||||||
void __cdecl S_ShowControls();
|
void __cdecl S_ShowControls();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_PEOPLE_H
|
#ifndef T1M_GAME_PEOPLE_H
|
||||||
#define TOMB1MAIN_GAME_PEOPLE_H
|
#define T1M_GAME_PEOPLE_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_RAT_H
|
#ifndef T1M_GAME_RAT_H
|
||||||
#define TOMB1MAIN_GAME_RAT_H
|
#define T1M_GAME_RAT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_SAVEGAME_H
|
#ifndef T1M_GAME_SAVEGAME_H
|
||||||
#define TOMB1MAIN_GAME_SAVEGAME_H
|
#define T1M_GAME_SAVEGAME_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define CreateStartInfo ((void __cdecl(*)(int level_id))0x004345E0)
|
#define CreateStartInfo ((void __cdecl(*)(int level_id))0x004345E0)
|
||||||
|
|
|
@ -940,7 +940,7 @@ void __cdecl InitialiseObjects()
|
||||||
TrapObjects();
|
TrapObjects();
|
||||||
ObjectObjects();
|
ObjectObjects();
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.disable_medpacks) {
|
if (T1MConfig.disable_medpacks) {
|
||||||
Objects[O_MEDI_ITEM].initialise = NULL;
|
Objects[O_MEDI_ITEM].initialise = NULL;
|
||||||
Objects[O_MEDI_ITEM].collision = NULL;
|
Objects[O_MEDI_ITEM].collision = NULL;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_SETUP_H
|
#ifndef T1M_GAME_SETUP_H
|
||||||
#define TOMB1MAIN_GAME_SETUP_H
|
#define T1M_GAME_SETUP_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_SPHERE_H
|
#ifndef T1M_GAME_SPHERE_H
|
||||||
#define TOMB1MAIN_GAME_SPHERE_H
|
#define T1M_GAME_SPHERE_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#define TEXT_BOX_OFFSET 2
|
#define TEXT_BOX_OFFSET 2
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_EXTENDED_MEMORY
|
#ifdef T1M_FEAT_EXTENDED_MEMORY
|
||||||
int16_t TextStringCount = 0;
|
int16_t TextStringCount = 0;
|
||||||
TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS];
|
TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS];
|
||||||
char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE];
|
char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE];
|
||||||
|
@ -332,7 +332,7 @@ void __cdecl T_DrawThisText(TEXTSTRING* textstring)
|
||||||
int zpos = textstring->zpos;
|
int zpos = textstring->zpos;
|
||||||
int textwidth = T_GetTextWidth(textstring);
|
int textwidth = T_GetTextWidth(textstring);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_enhanced_ui) {
|
if (T1MConfig.enable_enhanced_ui) {
|
||||||
if (textstring->flags & TF_CENTRE_H) {
|
if (textstring->flags & TF_CENTRE_H) {
|
||||||
xpos += (GetRenderWidthDownscaled() - textwidth) / 2;
|
xpos += (GetRenderWidthDownscaled() - textwidth) / 2;
|
||||||
|
@ -391,7 +391,7 @@ void __cdecl T_DrawThisText(TEXTSTRING* textstring)
|
||||||
sy = ypos;
|
sy = ypos;
|
||||||
sh = textstring->scale_h;
|
sh = textstring->scale_h;
|
||||||
sv = textstring->scale_v;
|
sv = textstring->scale_v;
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_enhanced_ui) {
|
if (T1MConfig.enable_enhanced_ui) {
|
||||||
sx = GetRenderScale(sx);
|
sx = GetRenderScale(sx);
|
||||||
sy = GetRenderScale(sy);
|
sy = GetRenderScale(sy);
|
||||||
|
@ -433,7 +433,7 @@ void __cdecl T_DrawThisText(TEXTSTRING* textstring)
|
||||||
sy = bypos;
|
sy = bypos;
|
||||||
sh = bwidth;
|
sh = bwidth;
|
||||||
sv = bheight;
|
sv = bheight;
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_enhanced_ui) {
|
if (T1MConfig.enable_enhanced_ui) {
|
||||||
sx = GetRenderScale(sx);
|
sx = GetRenderScale(sx);
|
||||||
sy = GetRenderScale(sy);
|
sy = GetRenderScale(sy);
|
||||||
|
@ -482,7 +482,7 @@ void __cdecl T_DrawThisText(TEXTSTRING* textstring)
|
||||||
sy = bypos;
|
sy = bypos;
|
||||||
sh = bwidth;
|
sh = bwidth;
|
||||||
sv = bheight;
|
sv = bheight;
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_enhanced_ui) {
|
if (T1MConfig.enable_enhanced_ui) {
|
||||||
sx = GetRenderScale(sx);
|
sx = GetRenderScale(sx);
|
||||||
sy = GetRenderScale(sy);
|
sy = GetRenderScale(sy);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_TEXT_H
|
#ifndef T1M_GAME_TEXT_H
|
||||||
#define TOMB1MAIN_GAME_TEXT_H
|
#define T1M_GAME_TEXT_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_TRAPS_H
|
#ifndef T1M_GAME_TRAPS_H
|
||||||
#define TOMB1MAIN_GAME_TRAPS_H
|
#define T1M_GAME_TRAPS_H
|
||||||
|
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_TYPES_H
|
#ifndef T1M_GAME_TYPES_H
|
||||||
#define TOMB1MAIN_GAME_TYPES_H
|
#define T1M_GAME_TYPES_H
|
||||||
|
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -543,7 +543,7 @@ typedef enum {
|
||||||
IN_SAVE = (1 << 22),
|
IN_SAVE = (1 << 22),
|
||||||
IN_LOAD = (1 << 23),
|
IN_LOAD = (1 << 23),
|
||||||
IN_ACTION_AUTO = (1 << 24),
|
IN_ACTION_AUTO = (1 << 24),
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
IN_DOZYCHEAT = (1 << 25),
|
IN_DOZYCHEAT = (1 << 25),
|
||||||
IN_STUFFCHEAT = (1 << 26),
|
IN_STUFFCHEAT = (1 << 26),
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "game/vars.h"
|
#include "game/vars.h"
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
int16_t StoredLaraHealth = 0;
|
int16_t StoredLaraHealth = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_VARS_H
|
#ifndef T1M_GAME_VARS_H
|
||||||
#define TOMB1MAIN_GAME_VARS_H
|
#define T1M_GAME_VARS_H
|
||||||
|
|
||||||
#include "game/const.h"
|
#include "game/const.h"
|
||||||
#include "game/types.h"
|
#include "game/types.h"
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
// #define LaraControlRoutines ARRAY_(0x00456490, ControlRoutine, [])
|
// #define LaraControlRoutines ARRAY_(0x00456490, ControlRoutine, [])
|
||||||
// #define LaraCollisionRoutines ARRAY_(0x00456570, CollisionRoutine, [])
|
// #define LaraCollisionRoutines ARRAY_(0x00456570, CollisionRoutine, [])
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_EXTENDED_MEMORY
|
#ifdef T1M_FEAT_EXTENDED_MEMORY
|
||||||
extern int16_t TextStringCount;
|
extern int16_t TextStringCount;
|
||||||
extern TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS];
|
extern TEXTSTRING TextInfoTable[MAX_TEXT_STRINGS];
|
||||||
extern char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE];
|
extern char TextStrings[MAX_TEXT_STRINGS][MAX_STRING_SIZE];
|
||||||
|
@ -157,7 +157,7 @@ extern int32_t StaticCount;
|
||||||
extern int32_t TextureCount;
|
extern int32_t TextureCount;
|
||||||
extern int32_t FloorDataSize;
|
extern int32_t FloorDataSize;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
extern int16_t StoredLaraHealth;
|
extern int16_t StoredLaraHealth;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_WARRIOR_H
|
#ifndef T1M_GAME_WARRIOR_H
|
||||||
#define TOMB1MAIN_GAME_WARRIOR_H
|
#define T1M_GAME_WARRIOR_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_GAME_WOLF_H
|
#ifndef T1M_GAME_WOLF_H
|
||||||
#define TOMB1MAIN_GAME_WOLF_H
|
#define T1M_GAME_WOLF_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_INJECT_H
|
#ifndef T1M_INJECT_H
|
||||||
#define TOMB1MAIN_INEJCT_H
|
#define T1M_INEJCT_H
|
||||||
|
|
||||||
void T1MInject();
|
void T1MInject();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_JSON_UTILS_H
|
#ifndef T1M_JSON_UTILS_H
|
||||||
#define TOMB1MAIN_JSON_UTILS_H
|
#define T1M_JSON_UTILS_H
|
||||||
|
|
||||||
#include "json-parser/json.h"
|
#include "json-parser/json.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_DISPLAY_H
|
#ifndef T1M_SPECIFIC_DISPLAY_H
|
||||||
#define TOMB1MAIN_SPECIFIC_DISPLAY_H
|
#define T1M_SPECIFIC_DISPLAY_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define TempVideoRemove ((void __cdecl(*)())0x004167D0)
|
#define TempVideoRemove ((void __cdecl(*)())0x004167D0)
|
||||||
|
|
|
@ -270,7 +270,7 @@ int32_t __cdecl S_LoadLevel(int level_id)
|
||||||
TRACE("%d (%s)", level_id, LevelNames[level_id]);
|
TRACE("%d (%s)", level_id, LevelNames[level_id]);
|
||||||
int32_t ret = LoadLevel(LevelNames[level_id], level_id);
|
int32_t ret = LoadLevel(LevelNames[level_id], level_id);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_GAMEPLAY
|
#ifdef T1M_FEAT_GAMEPLAY
|
||||||
if (T1MConfig.disable_healing_between_levels) {
|
if (T1MConfig.disable_healing_between_levels) {
|
||||||
// check if we're in main menu by seeing if there is Lara item in the
|
// check if we're in main menu by seeing if there is Lara item in the
|
||||||
// currently loaded level.
|
// currently loaded level.
|
||||||
|
@ -293,7 +293,7 @@ int32_t __cdecl S_LoadLevel(int level_id)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_LEVEL_FIXES
|
#ifdef T1M_FEAT_LEVEL_FIXES
|
||||||
if (T1MConfig.fix_pyramid_secret_trigger) {
|
if (T1MConfig.fix_pyramid_secret_trigger) {
|
||||||
FixPyramidSecretTrigger();
|
FixPyramidSecretTrigger();
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ int32_t __cdecl S_LoadLevel(int level_id)
|
||||||
const char* __cdecl GetFullPath(const char* filename)
|
const char* __cdecl GetFullPath(const char* filename)
|
||||||
{
|
{
|
||||||
TRACE("%s", filename);
|
TRACE("%s", filename);
|
||||||
#ifdef TOMB1M_FEAT_NOCD
|
#ifdef T1M_FEAT_NOCD
|
||||||
sprintf(newpath, ".\\%s", filename);
|
sprintf(newpath, ".\\%s", filename);
|
||||||
#else
|
#else
|
||||||
if (DEMO) {
|
if (DEMO) {
|
||||||
|
@ -323,7 +323,7 @@ const char* __cdecl GetFullPath(const char* filename)
|
||||||
void __cdecl FindCdDrive()
|
void __cdecl FindCdDrive()
|
||||||
{
|
{
|
||||||
TRACE("");
|
TRACE("");
|
||||||
#ifdef TOMB1M_FEAT_NOCD
|
#ifdef T1M_FEAT_NOCD
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
FILE* fp;
|
FILE* fp;
|
||||||
|
@ -354,7 +354,7 @@ void __cdecl FindCdDrive()
|
||||||
ShowFatalError("ERROR: Please insert TombRaider CD");
|
ShowFatalError("ERROR: Please insert TombRaider CD");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_LEVEL_FIXES
|
#ifdef T1M_FEAT_LEVEL_FIXES
|
||||||
int GetSecretCount()
|
int GetSecretCount()
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_FILE_H
|
#ifndef T1M_SPECIFIC_FILE_H
|
||||||
#define TOMB1MAIN_SPECIFIC_FILE_H
|
#define T1M_SPECIFIC_FILE_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ int32_t __cdecl S_LoadLevel(int level_id);
|
||||||
const char* __cdecl GetFullPath(const char* filename);
|
const char* __cdecl GetFullPath(const char* filename);
|
||||||
void __cdecl FindCdDrive();
|
void __cdecl FindCdDrive();
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_LEVEL_FIXES
|
#ifdef T1M_FEAT_LEVEL_FIXES
|
||||||
void FixPyramidSecretTrigger();
|
void FixPyramidSecretTrigger();
|
||||||
int32_t GetSecretCount();
|
int32_t GetSecretCount();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_FRONTEND_H
|
#ifndef T1M_SPECIFIC_FRONTEND_H
|
||||||
#define TOMB1MAIN_SPECIFIC_FRONTEND_H
|
#define T1M_SPECIFIC_FRONTEND_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define S_FadeToBlack ((void __cdecl(*)())0x0041CD10)
|
#define S_FadeToBlack ((void __cdecl(*)())0x0041CD10)
|
||||||
|
|
|
@ -46,7 +46,7 @@ void __cdecl S_InitialiseSystem()
|
||||||
|
|
||||||
CalculateWibbleTable();
|
CalculateWibbleTable();
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_EXTENDED_MEMORY
|
#ifdef T1M_FEAT_EXTENDED_MEMORY
|
||||||
// TODO: for this to work, the value also needs to be updated in
|
// TODO: for this to work, the value also needs to be updated in
|
||||||
// GameMain and S_PlayFMV. Since exceeding this limit causes the game
|
// GameMain and S_PlayFMV. Since exceeding this limit causes the game
|
||||||
// to brutally crash anyway, I'm leaving it unfinished here.
|
// to brutally crash anyway, I'm leaving it unfinished here.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_INIT_H
|
#ifndef T1M_SPECIFIC_INIT_H
|
||||||
#define TOMB1MAIN_SPECIFIC_INIT_H
|
#define T1M_SPECIFIC_INIT_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define game_malloc ((void __cdecl*(*)(uint32_t length, int type))0x0041E2F0)
|
#define game_malloc ((void __cdecl*(*)(uint32_t length, int type))0x0041E2F0)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
static int32_t medipack_cooldown = 0;
|
static int32_t medipack_cooldown = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ void __cdecl S_UpdateInput()
|
||||||
linput |= IN_ROLL;
|
linput |= IN_ROLL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_CHEATS
|
#ifdef T1M_FEAT_CHEATS
|
||||||
if (T1MConfig.enable_cheats) {
|
if (T1MConfig.enable_cheats) {
|
||||||
static int is_stuff_cheat_key_pressed = 0;
|
static int is_stuff_cheat_key_pressed = 0;
|
||||||
if (KeyData->keymap[DIK_I]) {
|
if (KeyData->keymap[DIK_I]) {
|
||||||
|
@ -105,7 +105,7 @@ void __cdecl S_UpdateInput()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
if (T1MConfig.enable_numeric_keys) {
|
if (T1MConfig.enable_numeric_keys) {
|
||||||
if (KeyData->keymap[DIK_1] && Inv_RequestItem(O_GUN_ITEM)) {
|
if (KeyData->keymap[DIK_1] && Inv_RequestItem(O_GUN_ITEM)) {
|
||||||
Lara.request_gun_type = LGT_PISTOLS;
|
Lara.request_gun_type = LGT_PISTOLS;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_INPUT_H
|
#ifndef T1M_SPECIFIC_INPUT_H
|
||||||
#define TOMB1MAIN_SPECIFIC_INPUT_H
|
#define T1M_SPECIFIC_INPUT_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define Key_ ((int __cdecl(*)(int number))0x0041E3E0)
|
#define Key_ ((int __cdecl(*)(int number))0x0041E3E0)
|
||||||
|
|
|
@ -13,11 +13,11 @@ static int color_bar[][COLOR_BAR_SIZE] = {
|
||||||
{ 18, 17, 18, 19, 21 },
|
{ 18, 17, 18, 19, 21 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
static int BarOffsetY = 0;
|
static int BarOffsetY = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
int MulDiv(int x, int y, int z)
|
int MulDiv(int x, int y, int z)
|
||||||
{
|
{
|
||||||
return (x * y) / z;
|
return (x * y) / z;
|
||||||
|
@ -115,7 +115,7 @@ void RenderBar(int value, int value_max, int bar_type)
|
||||||
int32_t width = percent_max * scale;
|
int32_t width = percent_max * scale;
|
||||||
int32_t height = 5 * scale;
|
int32_t height = 5 * scale;
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
if (bar_type == BT_LARA_HEALTH) {
|
if (bar_type == BT_LARA_HEALTH) {
|
||||||
|
@ -156,7 +156,7 @@ void RenderBar(int value, int value_max, int bar_type)
|
||||||
Insert2DLine(right, top, right, bottom, p2, color_border_2);
|
Insert2DLine(right, top, right, bottom, p2, color_border_2);
|
||||||
|
|
||||||
const int blink_interval = 20;
|
const int blink_interval = 20;
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
const int blink_threshold = bar_type == BT_ENEMY_HEALTH ? 0 : 20;
|
const int blink_threshold = bar_type == BT_ENEMY_HEALTH ? 0 : 20;
|
||||||
#else
|
#else
|
||||||
const int blink_threshold = 20;
|
const int blink_threshold = 20;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_OUTPUT_H
|
#ifndef T1M_SPECIFIC_OUTPUT_H
|
||||||
#define TOMB1MAIN_SPECIFIC_OUTPUT_H
|
#define T1M_SPECIFIC_OUTPUT_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define S_AniamteTextures ((void __cdecl(*)(int32_t nframes))0x00430660)
|
#define S_AniamteTextures ((void __cdecl(*)(int32_t nframes))0x00430660)
|
||||||
|
@ -21,7 +21,7 @@ void __cdecl S_DrawAirBar(int percent);
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BT_LARA_HEALTH = 0,
|
BT_LARA_HEALTH = 0,
|
||||||
BT_LARA_AIR = 1,
|
BT_LARA_AIR = 1,
|
||||||
#if defined(TOMB1M_FEAT_UI) || defined(TOMB1M_FEAT_GAMEPLAY)
|
#if defined(T1M_FEAT_UI) || defined(TOMB1M_FEAT_GAMEPLAY)
|
||||||
BT_ENEMY_HEALTH = 2,
|
BT_ENEMY_HEALTH = 2,
|
||||||
#endif
|
#endif
|
||||||
} BAR_TYPE;
|
} BAR_TYPE;
|
||||||
|
@ -29,7 +29,7 @@ typedef enum {
|
||||||
int GetRenderScaleGLRage(int unit);
|
int GetRenderScaleGLRage(int unit);
|
||||||
void RenderBar(int value, int value_max, int bar_type);
|
void RenderBar(int value, int value_max, int bar_type);
|
||||||
|
|
||||||
#ifdef TOMB1M_FEAT_UI
|
#ifdef T1M_FEAT_UI
|
||||||
int GetRenderScale(int base);
|
int GetRenderScale(int base);
|
||||||
int GetRenderHeightDownscaled();
|
int GetRenderHeightDownscaled();
|
||||||
int GetRenderWidthDownscaled();
|
int GetRenderWidthDownscaled();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_SHED_H
|
#ifndef T1M_SPECIFIC_SHED_H
|
||||||
#define TOMB1MAIN_SPECIFIC_SHED_H
|
#define T1M_SPECIFIC_SHED_H
|
||||||
|
|
||||||
// a place for odd functions that have no place to go yet
|
// a place for odd functions that have no place to go yet
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_SPECIFIC_SNDPC_H
|
#ifndef T1M_SPECIFIC_SNDPC_H
|
||||||
#define TOMB1MAIN_SPECIFIC_SNDPC_H
|
#define T1M_SPECIFIC_SNDPC_H
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define S_CDLoop ((void __cdecl(*)())0x004380B0)
|
#define S_CDLoop ((void __cdecl(*)())0x004380B0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TOMB1MAIN_UTIL_H
|
#ifndef T1M_UTIL_H
|
||||||
#define TOMB1MAIN_UTIL_H
|
#define T1M_UTIL_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue