mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
port InitialiseFXArray
This commit is contained in:
parent
7d4a2696ed
commit
5361d69f33
5 changed files with 36 additions and 3 deletions
|
@ -39,5 +39,8 @@
|
||||||
#define PickupsTaken VAR_U_(0x0045BB16, int)
|
#define PickupsTaken VAR_U_(0x0045BB16, int)
|
||||||
#define SecretsTaken VAR_U_(0x0045BB12, int)
|
#define SecretsTaken VAR_U_(0x0045BB12, int)
|
||||||
#define HiRes VAR_U_(0x00459F64, int)
|
#define HiRes VAR_U_(0x00459F64, int)
|
||||||
|
#define Effects VAR_U_(0x0045EE70, FX_INFO*)
|
||||||
|
#define NextFxFree VAR_U_(0x0045EE74, int16_t)
|
||||||
|
#define NextFxActive VAR_U_(0x0045EE7A, int16_t)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
13
src/func.c
13
src/func.c
|
@ -310,7 +310,7 @@ void __cdecl LevelStats(int levelID) {
|
||||||
TempVideoRemove();
|
TempVideoRemove();
|
||||||
}
|
}
|
||||||
|
|
||||||
int __cdecl LoadLevelByID(int levelID) {
|
int __cdecl S_LoadLevel(int levelID) {
|
||||||
TRACE("%d", levelID);
|
TRACE("%d", levelID);
|
||||||
int ret = LoadLevel(LevelNames[levelID], levelID);
|
int ret = LoadLevel(LevelNames[levelID], levelID);
|
||||||
|
|
||||||
|
@ -485,3 +485,14 @@ void __cdecl InitialiseLara() {
|
||||||
|
|
||||||
InitialiseLaraInventory(CurrentLevel);
|
InitialiseLaraInventory(CurrentLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __cdecl InitialiseFXArray() {
|
||||||
|
TRACE("");
|
||||||
|
NextFxActive = NO_ITEM;
|
||||||
|
NextFxFree = 0;
|
||||||
|
FX_INFO *fx = Effects;
|
||||||
|
for (int i = 1; i < NUM_EFFECTS; i++, fx++) {
|
||||||
|
fx->next_fx = i;
|
||||||
|
}
|
||||||
|
fx->next_fx = NO_ITEM;
|
||||||
|
}
|
||||||
|
|
|
@ -36,9 +36,10 @@ const char* __cdecl GetFullPath(const char *filename);
|
||||||
int __cdecl FindCdDrive();
|
int __cdecl FindCdDrive();
|
||||||
int __cdecl LoadRooms(FILE *fp);
|
int __cdecl LoadRooms(FILE *fp);
|
||||||
void __cdecl LevelStats(int levelID);
|
void __cdecl LevelStats(int levelID);
|
||||||
int __cdecl LoadLevelByID(int levelID);
|
int __cdecl S_LoadLevel(int levelID);
|
||||||
int __cdecl S_DrawHealthBar(int percent);
|
int __cdecl S_DrawHealthBar(int percent);
|
||||||
int __cdecl LoadItems(FILE *handle);
|
int __cdecl LoadItems(FILE *handle);
|
||||||
void __cdecl InitialiseLara();
|
void __cdecl InitialiseLara();
|
||||||
|
void __cdecl InitialiseFXArray();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,8 +19,9 @@ static void tr1m_inject() {
|
||||||
|
|
||||||
INJECT(0x0041BC60, LoadItems);
|
INJECT(0x0041BC60, LoadItems);
|
||||||
INJECT(0x00428020, InitialiseLara);
|
INJECT(0x00428020, InitialiseLara);
|
||||||
INJECT(0x0041AF90, LoadLevelByID);
|
INJECT(0x0041AF90, S_LoadLevel);
|
||||||
INJECT(0x0041D5A0, LevelStats);
|
INJECT(0x0041D5A0, LevelStats);
|
||||||
|
INJECT(0x00422250, InitialiseFXArray);
|
||||||
|
|
||||||
//INJECT(0x00402710, my_ins_line);
|
//INJECT(0x00402710, my_ins_line);
|
||||||
|
|
||||||
|
|
17
src/struct.h
17
src/struct.h
|
@ -9,6 +9,9 @@ typedef void UNKNOWN_STRUCT;
|
||||||
|
|
||||||
#define LARA_HITPOINTS 1000
|
#define LARA_HITPOINTS 1000
|
||||||
#define LARA_AIR 1800
|
#define LARA_AIR 1800
|
||||||
|
#define NO_ITEM -1
|
||||||
|
|
||||||
|
#define NUM_EFFECTS 100
|
||||||
|
|
||||||
#define TREAD_A 108
|
#define TREAD_A 108
|
||||||
#define TREAD_F 1736
|
#define TREAD_F 1736
|
||||||
|
@ -310,6 +313,20 @@ typedef struct {
|
||||||
/* 00E6 end */
|
/* 00E6 end */
|
||||||
} LARA_INFO;
|
} LARA_INFO;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* 0000 */ PHD_3DPOS pos;
|
||||||
|
/* 0012 */ int16_t room_number;
|
||||||
|
/* 0014 */ int16_t object_number;
|
||||||
|
/* 0016 */ int16_t next_fx;
|
||||||
|
/* 0018 */ int16_t next_active;
|
||||||
|
/* 001A */ int16_t speed;
|
||||||
|
/* 001C */ int16_t fallspeed;
|
||||||
|
/* 001E */ int16_t frame_number;
|
||||||
|
/* 0020 */ int16_t counter;
|
||||||
|
/* 0022 */ int16_t shade;
|
||||||
|
/* 0024 end */
|
||||||
|
} FX_INFO;
|
||||||
|
|
||||||
#pragma pop
|
#pragma pop
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue