Define gUnknown_086BB910 (#107)

* define gUnknown_086BB910

* remove unintended name for Substate 9

* Document buttonConfigs 2d array
This commit is contained in:
Retnuhytnuob 2025-06-13 16:31:19 -05:00 committed by GitHub
parent 4f7ab6d621
commit 43302a9134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 47 additions and 4 deletions

View File

@ -3,6 +3,7 @@
#include "constants/fields.h"
#include "constants/species.h"
#include "constants/bg_music.h"
#include "gba/io_reg.h"
gUnknown_08055A68:: @ 0x08055A68
.2byte AREA_FOREST_RUBY
@ -3449,8 +3450,18 @@ gMonPortraitGroupGfx:: @ 0x086BB738
.incbin "baserom.gba", 0x6BB770, 0x1A0 @ 0x6BB910 - 0x6BB770
gUnknown_086BB910:: @ 0x086BB910
.incbin "baserom.gba", 0x6BB910, 0x58
.2byte A_BUTTON, 0x4, 0x0, 0x8
.2byte B_BUTTON, 0x5, 0x0, 0x8
.2byte SELECT_BUTTON, 0xE, 0x101, 0x20
.2byte START_BUTTON, 0xA, 0x101, 0x20
.2byte DPAD_RIGHT, 0x13, 0x0, 0x8
.2byte DPAD_LEFT, 0x15, 0x0, 0x8
.2byte DPAD_UP, 0x12, 0x0, 0x8
.2byte DPAD_DOWN, 0x14, 0x0, 0x8
.2byte R_BUTTON, 0x8, 0x1, 0x10
.2byte L_BUTTON, 0x6, 0x1, 0x10
.2byte 0x0, 0x2A, 0x0, 0x08
gUnknown_086BB968:: @ 0x086BB968
.incbin "baserom.gba", 0x6BB968, 0x40

View File

@ -77,7 +77,16 @@ struct Main
/*0x54*/ u8 filler54[0x4];
/*0x58*/ u32 unk58;
/*0x5C*/ u32 unk5C;
/*0x60*/ u16 buttonConfigs[5][2];
/***
* First index = 'Action'
* 0:left flipper, 1:right flipper, 2:tilt left, 3:tilt right, 4=tilt up
*
* Second index
* An action can be triggered by pressing 2 buttons simultaneously
* Each data element holds a mask for the button it looks for.
***/
/*0x60*/ u16 buttonConfigs[5][2];
// This field must be accessed using the following macro to produce matching code.
#define gMain_saveData (*(struct SaveData *)(&gMain.saveData))

View File

@ -24,7 +24,30 @@ extern struct ToneData gUnknown_08533360[];
extern struct ToneData gUnknown_08533960[];
extern struct ToneData gUnknown_08533F60[];
extern u16 gOptionsBGMList[];
extern u16 gUnknown_086BB910[][4];
/***
* button information: input mask, tile, ?, width
*
* First index associations:
* 0 : A button
* 1 : B button
* 2 : Select button
* 3 : Start button
* 4 : Right arrow
* 5 : Left arrow
* 6 : Up arrow
* 7 : Down arrow
* 8 : R button
* 9 : L button
* 10 : Combiner sprite
*
* Second index:
* 0 : button input mask
* 1 : tile number
* 2 : unknown
* 3 : px wide
***/
extern u16 gUnknown_086BB910[11][4];
extern struct {u8 unk0; s16 unk2;} gUnknown_086BB9B4[];
extern u16 gOptionsSEList[];
extern u8 gUnknown_02031AF0[][10];