Fix sndseq constants

This commit is contained in:
PikalaxALT 2021-09-13 21:17:22 -04:00
parent 8061203a4f
commit e305e27294
6 changed files with 1420 additions and 1394 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ THUMB_FUNC struct PCStorage *GetStoragePCPointer(struct SaveBlock2 *sav2)
return SavArray_get(sav2, 35);
}
THUMB_FUNC void *FUN_0202251C(struct SaveBlock2 *sav2)
THUMB_FUNC struct UnkStruct_0202AC20 * FUN_0202251C(struct SaveBlock2 *sav2)
{
return SavArray_get(sav2, 31);
}

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,11 @@
#include "save_block_2.h"
#include "pokemon_storage_system.h"
#include "unk_0202AC20.h"
void *FUN_02022504(struct SaveBlock2 *sav2);
struct PCStorage *GetStoragePCPointer(struct SaveBlock2 *sav2);
void *FUN_0202251C(struct SaveBlock2 *sav2);
struct UnkStruct_0202AC20 * FUN_0202251C(struct SaveBlock2 *sav2);
void *FUN_02022528(struct SaveBlock2 *sav2);
u8 *LoadHallOfFame(struct SaveBlock2 *sav2, u32 heap_id, int *ret_p);
s32 SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data);

13
include/unk_0202AC20.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef POKEDIAMOND_UNK_0202AC20_H
#define POKEDIAMOND_UNK_0202AC20_H
struct UnkStruct_0202AC20
{
u8 unk_0000[0x100];
u32 unk_0100[8];
u32 unk_0120[3];
u8 unk_012C[8][0x104];
u8 unk_094C[3][0x358];
};
#endif //POKEDIAMOND_UNK_0202AC20_H

View File

@ -40,10 +40,21 @@ class MapHeader(typing.NamedTuple):
def read_sndseq_h():
i = 0
with open('include/constants/sndseq.h') as fp:
for line in fp:
if line.startswith('#define SEQ_'):
yield line.split()[1]
name = line.split()[1]
if name.startswith('SEQ_SE_'):
while i < 1500:
yield str(i)
i += 1
elif not name.startswith('SEQ_PV'):
while i < 1000:
yield str(i)
i += 1
yield name
i += 1
def read_mapsec_h():
@ -89,8 +100,8 @@ def main():
scrseqnaix[header.scripts_bank],
scrseqnaix[header.level_scripts_bank],
msgnaix[header.msg_bank],
sndseqs[header.day_music_id - 1000],
sndseqs[header.night_music_id - 1000],
sndseqs[header.day_music_id],
sndseqs[header.night_music_id],
'0xFFFF' if header.wild_encounter_bank == 0xFFFF else 'ENCDATA({}, {})'.format(
d_encdatanaix[header.wild_encounter_bank],
p_encdatanaix[header.wild_encounter_bank],