Attempt to decompile ai01a2

This commit is contained in:
Ryan Dwyer 2019-11-17 22:11:37 +10:00
parent 6115804c4d
commit 4cdeed73da
3 changed files with 36 additions and 4 deletions

View File

@ -14542,6 +14542,34 @@ glabel ai01a2
/* f05dcc0: 00001025 */ or $v0,$zero,$zero
);
//bool ai01a2(void)
//{
// u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
//
// if (cmd[2] == 0) {
// s32 index = g_Vars.chrdata->morale * 6 + (random() % 3);
// audioPlayFromWorldPosition(cmd[3], ciquiptable_bank0[index], 0, g_Vars.chrdata->pos);
// }
//
// if (cmd[2] == 1) {
// s32 index = g_Vars.chrdata->morale * 6 + (random() % 3);
// audioPlayFromWorldPosition(cmd[3], ciquiptable_bank1[index], 0, g_Vars.chrdata->pos);
// }
//
// if (cmd[2] == 2) {
// s32 index = g_Vars.chrdata->morale * 6 + (random() % 3);
// audioPlayFromWorldPosition(cmd[3], ciquiptable_bank2[index], 0, g_Vars.chrdata->pos);
// }
//
// if (cmd[2] == 3) {
// audioPlayFromWorldPosition(cmd[3], ciquiptable_bank3[g_Vars.chrdata->morale], 0, g_Vars.chrdata->pos);
// }
//
// g_Vars.aioffset += 4;
//
// return false;
//}
/**
* @cmd 01a3
*/

View File

@ -414,6 +414,10 @@ extern u16 quiptable_human_bank0[];
extern u16 quiptable_human_bank1[];
extern u16 quiptable_skedar[];
extern u16 quiptable_maian[];
extern s16 ciquiptable_bank0[];
extern s16 ciquiptable_bank1[];
extern s16 ciquiptable_bank2[];
extern s16 ciquiptable_bank3[];
extern u32 var80069730;
extern u32 var80069780;
extern u32 var8006978c;

View File

@ -15041,14 +15041,14 @@ u32 var80069788 = 0x00000000;
u32 var8006978c = 0x1a000003;
// f7b0
u16 ciquiptable_bank1[] = {
s16 ciquiptable_bank1[] = {
0x17a1, 0x17a2, 0x17a3, 0x17a4, 0x17a5, 0x17a6, 0x17a7, 0x17a8,
0x17a9, 0x17aa, 0x17ab, 0x17ac, 0x17ad, 0x17ae, 0x17af, 0x179e,
0x179f, 0x17a0,
};
// f7d4
u16 ciquiptable_bank0[] = {
s16 ciquiptable_bank0[] = {
0x8028, 0x8028, 0x8028, 0x802b, 0x802b, 0x802b, 0x802c, 0x802d,
0x802e, 0x802f, 0x802f, 0x802f, 0x8030, 0x8030, 0x8030, 0x8031,
0x8031, 0x8031, 0x8032, 0x8032, 0x8033, 0x8033, 0x8034, 0x8034,
@ -15056,7 +15056,7 @@ u16 ciquiptable_bank0[] = {
};
// f810
u16 ciquiptable_bank2[] = {
s16 ciquiptable_bank2[] = {
0x177b, 0x177b, 0x177b, 0x177d, 0x177d, 0x177d, 0x1789, 0x178a,
0x178b, 0x178d, 0x178d, 0x178d, 0x1795, 0x1795, 0x1795, 0x1785,
0x1785, 0x1785, 0x1791, 0x1791, 0x1791, 0x1791, 0x1791, 0x1791,
@ -15064,7 +15064,7 @@ u16 ciquiptable_bank2[] = {
};
// f84c
u16 ciquiptable_bank3[] = {
s16 ciquiptable_bank3[] = {
0x0000, 0x1b1c, 0x1b1f, 0x1b20, 0x0000, 0x1b1e, 0x1b21, 0x1b21,
0x1b1d, 0x1b1d,
};