mirror of
https://github.com/n64decomp/perfect_dark.git
synced 2024-11-27 08:00:27 +00:00
Flesh out globals.c and make it match
This commit is contained in:
parent
893a56ac50
commit
902edeca66
2
Makefile
2
Makefile
@ -165,7 +165,7 @@ test: $(B_SETUP_BINZ_FILES) $(B_LANG_BINZ_FILES)
|
||||
--exclude=bgdata \
|
||||
--exclude=ob \
|
||||
$(E_DIR)/files $(B_DIR)/files
|
||||
@cmp -b --ignore-initial=0x1be00 --bytes=0x4ff0 $(E_DIR)/Uglobals $(B_DIR)/Uglobals
|
||||
@diff -q $(E_DIR)/Uglobals $(B_DIR)/Uglobals
|
||||
|
||||
testall:
|
||||
REGION=ntsc RELEASE=final make test
|
||||
|
11
globals.ld
11
globals.ld
@ -3,23 +3,12 @@ OUTPUT_ARCH (mips)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
_LnameXDataStart = ADDR(.data);
|
||||
_LnameXDataRomStart = 0x0000;
|
||||
.data 0x80059fe0 : AT(0x0000) {
|
||||
build/globals.tmp.o (.data);
|
||||
}
|
||||
_LnameXDataEnd = ADDR(.data) + SIZEOF(.data);
|
||||
_LnameXDataRomEnd = 0x0000 + SIZEOF(.data);
|
||||
|
||||
|
||||
|
||||
_LnameXRODataStart = ADDR(.rodata);
|
||||
_LnameXRODataRomStart = _LnameXDataRomEnd;
|
||||
.rodata : AT(_LnameXDataRomEnd) {
|
||||
build/globals.tmp.o (.rodata);
|
||||
}
|
||||
_LnameXRODataEnd = ADDR( .rodata) + SIZEOF( .rodata);
|
||||
_LnameXRODataRomEnd = _LnameXDataRomEnd + SIZEOF( .rodata);
|
||||
|
||||
/DISCARD/ : {
|
||||
* (.MIPS.abiflags);
|
||||
|
42281
src/globals.c
42281
src/globals.c
File diff suppressed because it is too large
Load Diff
@ -62,6 +62,12 @@
|
||||
#define BANK_2 2
|
||||
#define BANK_3 3
|
||||
|
||||
#define CASING_NONE -1
|
||||
#define CASING_STANDARD 0
|
||||
#define CASING_REAPER 1
|
||||
#define CASING_RIFLE 2
|
||||
#define CASING_SHOTGUN 3
|
||||
|
||||
#define CHANNEL_0 0
|
||||
#define CHANNEL_1 1
|
||||
#define CHANNEL_2 2
|
||||
|
48
src/include/gunscript.h
Normal file
48
src/include/gunscript.h
Normal file
@ -0,0 +1,48 @@
|
||||
#define gunscript_end \
|
||||
0, \
|
||||
0,
|
||||
|
||||
#define gunscript_showpart(keyframe, part) \
|
||||
0x01000000 | keyframe, \
|
||||
part,
|
||||
|
||||
#define gunscript_hidepart(keyframe, part) \
|
||||
0x02000000 | keyframe, \
|
||||
part,
|
||||
|
||||
#define gunscript_waitforzreleased(keyframe) \
|
||||
0x03000000 | keyframe, \
|
||||
0,
|
||||
|
||||
#define gunscript_waittime(keyframe, time) \
|
||||
0x04000000 | keyframe, \
|
||||
time,
|
||||
|
||||
#define gunscript_playsound(keyframe, sound) \
|
||||
0x05000000 | keyframe, \
|
||||
sound,
|
||||
|
||||
#define gunscript_include(unk1, address) \
|
||||
0x06000000 | (unk1 << 16), \
|
||||
address,
|
||||
|
||||
#define gunscript_random(probability, address) \
|
||||
0x07000000 | probability, \
|
||||
address,
|
||||
|
||||
#define gunscript_repeatuntilfull(triggerkey, dontloop, gototrigger) \
|
||||
0x08000000 | triggerkey, \
|
||||
(dontloop << 16) | gototrigger,
|
||||
|
||||
#define gunscript_popoutsackofpills(unk1) \
|
||||
0x09000000 | unk1, \
|
||||
0,
|
||||
|
||||
#define gunscript_playanimation(animation, direction, speed) \
|
||||
0x0a000000 | animation, \
|
||||
(direction << 16) | speed,
|
||||
|
||||
#define gunscript_setsoundspeed(keyframe, speed) \
|
||||
0x0b000000 | keyframe, \
|
||||
speed,
|
||||
|
@ -3,14 +3,6 @@
|
||||
#include "commands.h"
|
||||
#include "intro.h"
|
||||
#include "props.h"
|
||||
#include "types.h"
|
||||
#include "gunscript.h"
|
||||
|
||||
struct ailists {
|
||||
u8 *list;
|
||||
u32 id;
|
||||
};
|
||||
|
||||
struct aipaths {
|
||||
s32 *pads;
|
||||
u8 id;
|
||||
u8 type;
|
||||
};
|
||||
|
205
src/include/types.h
Normal file
205
src/include/types.h
Normal file
@ -0,0 +1,205 @@
|
||||
#ifndef _IN_TYPES_H
|
||||
#define _IN_TYPES_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "constants.h"
|
||||
|
||||
struct ailists {
|
||||
u8 *list;
|
||||
u32 id;
|
||||
};
|
||||
|
||||
struct aipaths {
|
||||
s32 *pads;
|
||||
u8 id;
|
||||
u8 type;
|
||||
};
|
||||
|
||||
struct inventory_typec {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0c;
|
||||
u32 unk10;
|
||||
};
|
||||
|
||||
struct inventory_typee {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0c;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1c;
|
||||
};
|
||||
|
||||
struct inventory_typef {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0c;
|
||||
u32 unk10;
|
||||
};
|
||||
|
||||
#define INVENTORYFUNCTYPE_NONE 0
|
||||
#define INVENTORYFUNCTYPE_SHOOT 1
|
||||
#define INVENTORYFUNCTYPE_THROW 2
|
||||
#define INVENTORYFUNCTYPE_CLOSE 3
|
||||
#define INVENTORYFUNCTYPE_SPECIAL 4
|
||||
#define INVENTORYFUNCTYPE_VISUAL 5
|
||||
|
||||
struct inventory_function {
|
||||
u16 unk00;
|
||||
u8 unk02;
|
||||
u8 type;
|
||||
u16 name;
|
||||
u8 unk06;
|
||||
s8 unk07;
|
||||
struct inventory_typec *cptr;
|
||||
u32 *fire_animation;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct inventory_ammo {
|
||||
u16 unk00;
|
||||
u8 unk02;
|
||||
u8 type;
|
||||
u32 casingeject;
|
||||
u16 clipsize;
|
||||
u32 *reload_animation;
|
||||
u32 style;
|
||||
};
|
||||
|
||||
struct inventory_item {
|
||||
u16 lo_model;
|
||||
u16 hi_model;
|
||||
u32 *equip_animation;
|
||||
u32 *unequip_animation;
|
||||
u32 *pritosec_animation;
|
||||
u32 *sectopri_animation;
|
||||
struct inventory_function *pri_function;
|
||||
struct inventory_function *sec_function;
|
||||
struct inventory_ammo *pri_ammo;
|
||||
struct inventory_ammo *sec_ammo;
|
||||
struct inventory_typee *eptr;
|
||||
float sway;
|
||||
float leftright;
|
||||
float updown;
|
||||
float frontback;
|
||||
float unk38;
|
||||
struct inventory_typef *fptr;
|
||||
s8 *gptr;
|
||||
u16 shortname;
|
||||
u16 name;
|
||||
u16 manufacturer;
|
||||
u16 description;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct cutsceneentry {
|
||||
u16 stage_id;
|
||||
u16 mission;
|
||||
u32 scene;
|
||||
u16 namefileid;
|
||||
};
|
||||
|
||||
struct cutscenegroup {
|
||||
u32 first_cutscene_index;
|
||||
u16 namefileid;
|
||||
};
|
||||
|
||||
#define CHEATMETHOD_TIMED 0
|
||||
#define CHEATMETHOD_TRANSFERPAK 2
|
||||
#define CHEATMETHOD_COMPLETE 4
|
||||
#define CHEATMETHOD_FIRINGRANGE 8
|
||||
|
||||
struct cheatspec {
|
||||
u16 nametextid;
|
||||
u16 time;
|
||||
u8 stage_index;
|
||||
u8 difficulty;
|
||||
u8 method;
|
||||
};
|
||||
|
||||
struct bodytableentry {
|
||||
u16 unk00;
|
||||
u16 bodyfileid;
|
||||
float unk04;
|
||||
u32 unk08;
|
||||
u32 unk0c;
|
||||
u16 handfileid;
|
||||
};
|
||||
|
||||
struct stagetableentry {
|
||||
u16 id;
|
||||
u8 unk02; // usually 2, but 8 for Deep Sea
|
||||
s8 unk03; // usually -1, but 96 for Deep Sea
|
||||
u8 unk04; // usually 100, but 80 for Deep Sea
|
||||
u8 unk05; // usually 100, but 200 for Deep Sea
|
||||
u16 unk06;
|
||||
u16 bgfileid;
|
||||
u16 tilefileid;
|
||||
u16 padsfileid;
|
||||
u16 setupfileid;
|
||||
u16 mpsetupfileid;
|
||||
float unk14;
|
||||
float unk18;
|
||||
float unk1c;
|
||||
u16 unk20;
|
||||
u8 unk22;
|
||||
s8 unk23;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
s16 unk2c;
|
||||
u16 unk2e;
|
||||
u16 unk30;
|
||||
float unk34;
|
||||
};
|
||||
|
||||
struct mpweaponset {
|
||||
u16 namefileid;
|
||||
u8 slots[16];
|
||||
};
|
||||
|
||||
struct mpheadentry {
|
||||
u16 slot;
|
||||
u8 head;
|
||||
};
|
||||
|
||||
#define SIMTYPE_GENERAL 0
|
||||
#define SIMTYPE_PEACE 1
|
||||
#define SIMTYPE_SHIELD 2
|
||||
#define SIMTYPE_ROCKET 3
|
||||
#define SIMTYPE_KAZE 4
|
||||
#define SIMTYPE_FIST 5
|
||||
#define SIMTYPE_PREY 6
|
||||
#define SIMTYPE_COWARD 7
|
||||
#define SIMTYPE_JUDGE 8
|
||||
#define SIMTYPE_FEUD 9
|
||||
#define SIMTYPE_SPEED 10
|
||||
#define SIMTYPE_TURTLE 11
|
||||
#define SIMTYPE_VENGE 12
|
||||
|
||||
struct mpsimulant {
|
||||
u8 type;
|
||||
u8 skill;
|
||||
u16 name;
|
||||
u16 body;
|
||||
u8 unk06;
|
||||
};
|
||||
|
||||
struct mpbody {
|
||||
u16 slot;
|
||||
u16 name;
|
||||
u16 unk04;
|
||||
u8 unk06;
|
||||
};
|
||||
|
||||
struct mpmusictrack {
|
||||
u16 audioid;
|
||||
u16 name;
|
||||
s16 unlockcategory;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user