Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Move /fly, /abortion and many type definitions to libtrx #252

Merged
merged 4 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/progress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 26 additions & 26 deletions docs/progress.txt
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ typedef struct __unaligned { // decompiled
uint16_t pad: 10;
} COLL_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t min_x;
int16_t max_x;
int16_t min_y;
Expand Down Expand Up @@ -639,12 +639,12 @@ typedef struct __unaligned {
int16_t sample_num;
} WEAPON_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
XYZ_32 pos;
XYZ_16 rot;
int16_t room_num;
int16_t object_id;
int16_t next_fx;
int16_t next_free;
int16_t next_active;
int16_t speed;
int16_t fall_speed;
Expand All @@ -663,14 +663,14 @@ typedef struct __unaligned {
int16_t enemy_facing;
} AI_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t exit_box;
uint16_t search_num;
int16_t next_expansion;
int16_t box_num;
} BOX_NODE;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
BOX_NODE *node;
int16_t head;
int16_t tail;
Expand Down Expand Up @@ -836,7 +836,7 @@ typedef enum {
GFE_REMOVE_AMMO = 22,
} GF_EVENTS;

typedef enum {
typedef enum { // decompiled
MOOD_BORED = 0,
MOOD_ATTACK = 1,
MOOD_ESCAPE = 2,
Expand All @@ -854,7 +854,7 @@ typedef struct __unaligned {
int32_t mesh_num;
} BITE_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t *frame_ptr;
int16_t interpolation;
int16_t current_anim_state;
Expand All @@ -868,15 +868,15 @@ typedef struct __unaligned {
int16_t change_idx;
int16_t num_commands;
int16_t command_idx;
} ANIM_STRUCT;
} ANIM;

typedef struct {
typedef struct { // decompiled
int16_t goal_anim_state;
int16_t num_ranges;
int16_t range_idx;
} ANIM_CHANGE;

typedef struct {
typedef struct { // decompiled
int16_t start_frame;
int16_t end_frame;
int16_t link_anim_num;
Expand Down Expand Up @@ -960,7 +960,7 @@ typedef struct __unaligned {
uint16_t flags;
} ROOM_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t head_rotation;
int16_t neck_rotation;
int16_t maximum_turn;
Expand Down Expand Up @@ -1174,7 +1174,7 @@ typedef struct __unaligned {
XYZ_32 mic_pos;
} CAMERA_INFO;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t *frame_base;
int16_t frame_num;
int16_t anim_num;
Expand All @@ -1187,19 +1187,19 @@ typedef struct __unaligned {
int16_t flash_gun;
} LARA_ARM;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int32_t ammo;
} AMMO_INFO;

typedef enum {
typedef enum { // decompiled
LWS_ABOVE_WATER = 0,
LWS_UNDERWATER = 1,
LWS_SURFACE = 2,
LWS_CHEAT = 3,
LWS_WADE = 4,
} LARA_WATER_STATE;

typedef struct __unaligned {
typedef struct __unaligned { // decompiled
int16_t item_num;
int16_t gun_status;
int16_t gun_type;
Expand Down Expand Up @@ -1637,7 +1637,7 @@ typedef struct __unaligned {
int16_t roll;
} CINE_FRAME;

typedef enum {
typedef enum { // decompiled
IF_ONE_SHOT = 0x0100,
IF_CODE_BITS = 0x3E00,
IF_REVERSE = 0x4000,
Expand Down Expand Up @@ -1683,7 +1683,7 @@ typedef enum { // decompiled
IN_LOAD = 0x00800000,
} INPUT_STATE;

typedef enum {
typedef enum { // decompiled
LA_RUN = 0,
LA_WALK_FORWARD = 1,
LA_WALK_STOP_RIGHT = 2,
Expand Down Expand Up @@ -1904,7 +1904,7 @@ typedef enum {
LA_ZIPLINE_FALL = 217,
} LARA_ANIMATION;

typedef enum {
typedef enum { // decompiled
LA_EXTRA_BREATH = 0,
LA_EXTRA_PLUNGER = 1,
LA_EXTRA_YETI_KILL = 2,
Expand All @@ -1918,7 +1918,7 @@ typedef enum {
LA_EXTRA_FINAL_ANIM = 10,
} LARA_EXTRA_ANIMATION;

typedef enum {
typedef enum { // decompiled
LS_WALK = 0,
LS_RUN = 1,
LS_STOP = 2,
Expand Down Expand Up @@ -1999,7 +1999,7 @@ typedef enum {
LS_LAST = 77,
} LARA_STATE;

typedef enum {
typedef enum { // decompiled
LGS_ARMLESS = 0,
LGS_HANDS_BUSY = 1,
LGS_DRAW = 2,
Expand All @@ -2008,7 +2008,7 @@ typedef enum {
LGS_SPECIAL = 5,
} LARA_GUN_STATE;

typedef enum {
typedef enum { // decompiled
LGT_UNARMED = 0,
LGT_PISTOLS = 1,
LGT_MAGNUMS = 2,
Expand All @@ -2022,7 +2022,7 @@ typedef enum {
NUM_WEAPONS = 10,
} LARA_GUN_TYPE;

typedef enum {
typedef enum { // decompiled
LM_HIPS = 0,
LM_THIGH_L = 1,
LM_CALF_L = 2,
Expand Down Expand Up @@ -2407,7 +2407,7 @@ typedef enum {
HT_BIG_SLOPE = 2,
} HEIGHT_TYPE;

typedef enum {
typedef enum { // decompiled
DIR_UNKNOWN = -1,
DIR_NORTH = 0,
DIR_EAST = 1,
Expand Down Expand Up @@ -3031,7 +3031,7 @@ typedef enum {
# game/control.c
0x00414390 0x0356 + int32_t __cdecl Game_Control(int32_t nframes, int32_t demo_mode);
0x004146F0 0x0338 + void __cdecl Item_Animate(ITEM_INFO *item);
0x00414A60 0x00AB + int32_t __cdecl Item_GetAnimChange(ITEM_INFO *item, const ANIM_STRUCT *anim);
0x00414A60 0x00AB + int32_t __cdecl Item_GetAnimChange(ITEM_INFO *item, const ANIM *anim);
0x00414B10 0x005F + void __cdecl Item_Translate(ITEM_INFO *item, int32_t x, int32_t y, int32_t z);
0x00414B70 0x0198 + SECTOR_INFO *__cdecl Room_GetSector(int32_t x, int32_t y, int32_t z, int16_t *room_num);
0x00414D10 0x0168 + int32_t __cdecl Room_GetWaterHeight(int32_t x, int32_t y, int32_t z, int16_t room_num);
Expand Down Expand Up @@ -3514,7 +3514,7 @@ typedef enum {
0x00432B10 0x01B0 + bool __cdecl LOT_EnableBaddieAI(int16_t item_num, bool always);
0x00432CC0 0x0106 + void __cdecl LOT_InitialiseSlot(int16_t item_num, int32_t slot);
0x00432ED0 0x00B8 + void __cdecl LOT_CreateZone(ITEM_INFO *item);
0x00432F90 0x0049 + void __cdecl LOT_ClearLOT(LOT_INFO *LOT);
0x00432F90 0x0049 + void __cdecl LOT_ClearLOT(LOT_INFO *lot);

# game/missile.c
0x00432FE0 0x02D0 -R void __cdecl ControlMissile(int16_t fx_num);
Expand Down Expand Up @@ -4435,7 +4435,7 @@ typedef enum {
0x005252B0 - int16_t **g_Meshes;
0x005252C0 - MATRIX g_IMMatrixStack[256];
0x005258F0 - int32_t g_IMFrac;
0x005258F4 - ANIM_STRUCT *g_Anims;
0x005258F4 - ANIM *g_Anims;
0x00525BE8 - int32_t *g_AnimBones;
0x00526180 - int32_t g_RoomCount;
0x00526184 - int32_t g_IMRate;
Expand Down
16 changes: 7 additions & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ c_compiler = meson.get_compiler('c')

build_opts = [
'-Wno-unused',
'-Wno-address-of-packed-member',
'-DMESON_BUILD',
'-fno-omit-frame-pointer',
'-ffile-prefix-map=../../src/=',
Expand Down Expand Up @@ -90,12 +91,10 @@ dll_sources = [
'src/game/camera.c',
'src/game/clock.c',
'src/game/collide.c',
'src/game/console/cmd/die.c',
'src/game/console/cmd/end_level.c',
'src/game/console/cmd/exit_game.c',
'src/game/console/cmd/exit_to_title.c',
'src/game/console/cmd/flipmap.c',
'src/game/console/cmd/fly.c',
'src/game/console/cmd/load_game.c',
'src/game/console/cmd/play_demo.c',
'src/game/console/cmd/play_level.c',
Expand All @@ -122,15 +121,14 @@ dll_sources = [
'src/game/inventory/ring.c',
'src/game/inventory/vars.c',
'src/game/items.c',
'src/game/lara/cheat.c',
'src/game/lara/col.c',
'src/game/lara/common.c',
'src/game/lara/lara_cheat.c',
'src/game/lara/lara_col.c',
'src/game/lara/lara_control.c',
'src/game/lara/lara_draw.c',
'src/game/lara/lara_look.c',
'src/game/lara/lara_misc.c',
'src/game/lara/lara_state.c',
'src/game/lara/control.c',
'src/game/lara/draw.c',
'src/game/lara/look.c',
'src/game/lara/misc.c',
'src/game/lara/state.c',
'src/game/level.c',
'src/game/los.c',
'src/game/lot.c',
Expand Down
4 changes: 2 additions & 2 deletions src/decomp/decomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "game/inventory/backpack.h"
#include "game/inventory/common.h"
#include "game/items.h"
#include "game/lara/lara_control.h"
#include "game/lara/lara_draw.h"
#include "game/lara/control.h"
#include "game/lara/draw.h"
#include "game/lot.h"
#include "game/math.h"
#include "game/music.h"
Expand Down
30 changes: 0 additions & 30 deletions src/game/console/cmd/die.c

This file was deleted.

5 changes: 0 additions & 5 deletions src/game/console/cmd/die.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/game/console/cmd/end_level.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "game/console/cmd/end_level.h"

#include "game/lara/lara_cheat.h"
#include "game/lara/cheat.h"

#include <string.h>

Expand Down
21 changes: 0 additions & 21 deletions src/game/console/cmd/fly.c

This file was deleted.

5 changes: 0 additions & 5 deletions src/game/console/cmd/fly.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/game/console/cmd/teleport.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "game/game_string.h"
#include "game/gameflow/gameflow_new.h"
#include "game/items.h"
#include "game/lara/lara_cheat.h"
#include "game/lara/cheat.h"
#include "game/objects/names.h"
#include "game/objects/vars.h"
#include "game/random.h"
Expand Down
Loading
Loading