File tree 5 files changed +43
-0
lines changed
5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 36
36
#define NextFxFree VAR_U_(0x0045EE74, int16_t)
37
37
#define NextFxActive VAR_U_(0x0045EE7A, int16_t)
38
38
#define SaveGame ARRAY_(0x0045B9C0, SAVEGAME_INFO, [2])
39
+ #define BaddieSlots VAR_U_(0x0045ED64, CREATURE_INFO*)
40
+ #define SlotsUsed VAR_U_(0x0045A1F8, int)
41
+ #define NumberBoxes VAR_U_(0x00462DA0, int)
39
42
40
43
#endif
Original file line number Diff line number Diff line change @@ -521,3 +521,18 @@ void __cdecl InitialiseFXArray() {
521
521
}
522
522
fx -> next_fx = NO_ITEM ;
523
523
}
524
+
525
+ void __cdecl InitialiseLOTArray () {
526
+ TRACE ("" );
527
+ BaddieSlots = game_malloc (
528
+ NUM_SLOTS * sizeof (CREATURE_INFO ), GBUF_CreatureData
529
+ );
530
+ CREATURE_INFO * creature = BaddieSlots ;
531
+ for (int i = 0 ; i < NUM_SLOTS ; i ++ , creature ++ ) {
532
+ creature -> item_num = NO_ITEM ;
533
+ creature -> LOT .node = game_malloc (
534
+ sizeof (BOX_NODE ) * NumberBoxes , GBUF_CreatureLot
535
+ );
536
+ }
537
+ SlotsUsed = 0 ;
538
+ }
Original file line number Diff line number Diff line change @@ -42,5 +42,6 @@ int __cdecl S_DrawHealthBar(int percent);
42
42
int __cdecl LoadItems (FILE * handle );
43
43
void __cdecl InitialiseLara ();
44
44
void __cdecl InitialiseFXArray ();
45
+ void __cdecl InitialiseLOTArray ();
45
46
46
47
#endif
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ static void tr1m_inject() {
22
22
INJECT (0x0041AF90 , S_LoadLevel );
23
23
INJECT (0x0041D5A0 , LevelStats );
24
24
INJECT (0x00422250 , InitialiseFXArray );
25
+ INJECT (0x0042A300 , InitialiseLOTArray );
25
26
26
27
//INJECT(0x00402710, my_ins_line);
27
28
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ typedef uint16_t PHD_ANGLE;
8
8
typedef uint32_t SG_COL ;
9
9
typedef void UNKNOWN_STRUCT ;
10
10
11
+ #define NUM_SLOTS 8
11
12
#define MAX_ROOMS 1024
12
13
#define NUMBER_ITEMS 256
13
14
#define MAX_SECRETS 16
@@ -99,6 +100,13 @@ typedef enum {
99
100
AS_WATEROU = 55 ,
100
101
} LARA_STATES ;
101
102
103
+ typedef enum {
104
+ BORED_MOOD ,
105
+ ATTACK_MOOD ,
106
+ ESCAPE_MOOD ,
107
+ STALK_MOOD
108
+ } MOOD_TYPE ;
109
+
102
110
typedef enum {
103
111
GBUF_RoomInfos = 11 ,
104
112
GBUF_RoomMesh = 12 ,
@@ -108,6 +116,8 @@ typedef enum {
108
116
GBUF_RoomStaticMeshInfos = 16 ,
109
117
GBUF_FloorData = 17 ,
110
118
GBUF_Items = 18 ,
119
+ GBUF_CreatureData = 33 ,
120
+ GBUF_CreatureLot = 34 ,
111
121
} GAMEALLOC_BUFFER ;
112
122
113
123
typedef enum {
@@ -468,6 +478,19 @@ typedef struct {
468
478
/* 0038 end */
469
479
} TEXTSTRING ;
470
480
481
+ typedef struct {
482
+ /* 0000 */ int16_t head_rotation ;
483
+ /* 0002 */ int16_t neck_rotation ;
484
+ /* 0004 */ int16_t maximum_turn ;
485
+ /* 0006 */ uint16_t flags ;
486
+ /* 0008 */ int16_t item_num ;
487
+ /* 000A */ int32_t mood ;
488
+ /* 000E */ LOT_INFO LOT ;
489
+ /* 002C */ PHD_VECTOR target ;
490
+ /* 0032 */ uint8_t pad [12 ];
491
+ /* 003E end */
492
+ } CREATURE_INFO ;
493
+
471
494
#pragma pop
472
495
473
496
#endif
You can’t perform that action at this time.
0 commit comments