Discover and decompile aiMiscellaneous

This commit is contained in:
Ryan Dwyer
2019-12-10 19:01:19 +10:00
parent 1330bae0ee
commit a081bbf8d8
28 changed files with 1338 additions and 1424 deletions
+31 -2
View File
@@ -1924,11 +1924,40 @@
mkshort(0x01d5), \
bool,
#define set_lighting(room, operation, unknown) \
/**
* Run a miscellaneous command.
*
* Operations 0 through 4 aren't known yet. They copy the given value to some
* global variables. Value is expected to be 0 or 1.
*
* Operation 5 is unknown but operates on the given room ID.
*
* Operation 6 marks a room as internal or external. External rooms don't light
* up when shots are fired. This operation expects the room ID to be supplied
* and for value to be 0 (for internal) or 1 (for external).
*
* Operations 7 and 8 are unknown.
*
* Operation 9 is the same as operation 5, but applies to all rooms.
*
* Operation 0xa plays the AF1 nosedive noise. In this operation value is the
* duration of the noise in seconds.
*
* Operation 0xb is unknown.
*
* Operation 0xc is related to the Rescue lights being overloaded, but specifics
* are not known.
*
* Operation 0xd is believed to stop the AF1 nosedive noise.
*
* Operation 0xe and 0xf are related to the UFO exit on Escape. They probably
* start and stop the UFO noise but this hasn't been tested.
*/
#define misc_command(room, operation, value) \
mkshort(0x01d6), \
mkshort(room), \
operation, \
unknown,
value,
#define play_sound_from_object2(channel, object, sound, u1, u2) \
mkshort(0x01d9), \
+1 -1
View File
@@ -433,7 +433,7 @@
/*0x01d3*/ bool ai01d3(void);
/*0x01d4*/ bool ai01d4(void);
/*0x01d5*/ bool aiShowCutsceneChrs(void);
/*0x01d6*/ bool ai01d6(void);
/*0x01d6*/ bool aiMiscellaneous(void);
/*0x01d7*/ bool aiIfDistanceToTarget2LessThan(void);
/*0x01d8*/ bool aiIfDistanceToTarget2GreaterThan(void);
/*0x01d9*/ bool ai01d9(void);
+1 -1
View File
@@ -22,7 +22,7 @@ u32 func0f001138(void);
u32 func0f001300(void);
u32 func0f0013c8(void);
u32 func0f001734(void);
u32 func0f001a64(void);
void func0f001a64(s32, s32 value);
u32 func0f001b78(void);
u32 func0f001bdc(void);
u32 func0f001c0c(void);
+1 -1
View File
@@ -59,7 +59,7 @@ struct g_vars {
/*0002b0*/ s32 killcount;
/*0002b4*/ u32 unk0002b4;
/*0002b8*/ u32 unk0002b8;
/*0002bc*/ u32 unk0002bc;
/*0002bc*/ s32 roomcount;
/*0002c0*/ u32 unk0002c0;
/*0002c4*/ u32 unk0002c4;
/*0002c8*/ u32 unk0002c8;
+5
View File
@@ -535,6 +535,11 @@ extern u32 var8006ad90;
extern u32 var8006adf8;
extern u32 var8006ae10;
extern u32 var8006ae14;
extern s8 var8006ae18;
extern s8 var8006ae1c;
extern s8 var8006ae20;
extern s8 var8006ae24;
extern s8 var8006ae28;
extern u32 var8006ae3c;
extern u32 var8006ae5c;
extern u32 var8006ae70;
+9 -2
View File
@@ -2643,8 +2643,13 @@ struct gvars800a3fc8 {
u32 unk20;
};
struct roombitfield {
u8 a : 4;
u8 b : 4;
};
struct room {
/*0x00*/ u16 unk00;
/*0x00*/ u16 flags;
/*0x04*/ u32 unk04;
/*0x08*/ u32 unk08;
/*0x0c*/ u32 unk0c;
@@ -2663,7 +2668,9 @@ struct room {
/*0x40*/ u32 unk40;
/*0x44*/ u32 unk44;
/*0x48*/ u32 unk48;
/*0x4c*/ u32 unk4c;
/*0x4c*/ u8 unk4c;
/*0x4d*/ u8 unk4d;
/*0x4e*/ struct roombitfield bitfield;
/*0x50*/ u32 unk50;
/*0x54*/ u32 unk54;
/*0x58*/ u32 unk58;