This commit is contained in:
CreateSource 2024-01-01 23:35:47 -05:00
commit b4c1754a60
8 changed files with 479 additions and 430 deletions

View file

@ -316,7 +316,7 @@ game/sreset.c:
.sbss start:0x801D3EB8 end:0x801D3ED0
game/board/main.c:
.text start:0x8005B150 end:0x80061F44
.text start:0x8005B150 end:0x80061FC4
.rodata start:0x8011DD60 end:0x8011DD90
.data start:0x80139798 end:0x80139898
.bss start:0x8019D7E0 end:0x8019D968
@ -325,7 +325,7 @@ game/board/main.c:
.sdata2 start:0x801D5148 end:0x801D51F8
game/board/player.c:
.text start:0x80061F44 end:0x8006D308
.text start:0x80061FC4 end:0x8006D308
.rodata start:0x8011DD90 end:0x8011DE60
.data start:0x80139898 end:0x80139AA0
.bss start:0x8019D968 end:0x8019D998

View file

@ -1152,7 +1152,7 @@ BoardPlayerCoinsAdd = .text:0x80063EEC; // type:function size:0x9C
BoardPlayerStarsAdd = .text:0x80063F88; // type:function size:0x48
BoardPlayerSizeSet = .text:0x80063FD0; // type:function size:0x16C
BoardPlayerSizeGet = .text:0x8006413C; // type:function size:0x40
BoardPlayerTeamCount = .text:0x8006417C; // type:function size:0x7C
BoardPlayerSameTeamFind = .text:0x8006417C; // type:function size:0x7C
BoardPlayerTeamFind = .text:0x800641F8; // type:function size:0x7C
BoardPlayerRankCalc = .text:0x80064274; // type:function size:0xC4
BoardPlayerPreTurnHookSet = .text:0x80064338; // type:function size:0x18
@ -1486,15 +1486,15 @@ fn_8007F85C = .text:0x8007F85C; // type:function size:0x38
fn_8007F894 = .text:0x8007F894; // type:function size:0x2BC
BoardEventLandBlue = .text:0x8007FB50; // type:function size:0x184
BoardEventLandRed = .text:0x8007FCD4; // type:function size:0x19C
fn_8007FE70 = .text:0x8007FE70; // type:function size:0x1E8
fn_80080058 = .text:0x80080058; // type:function size:0x6C
fn_800800C4 = .text:0x800800C4; // type:function size:0x60
fn_80080124 = .text:0x80080124; // type:function size:0x23C
fn_80080360 = .text:0x80080360; // type:function size:0x198
fn_800804F8 = .text:0x800804F8; // type:function size:0x1B8
fn_800806B0 = .text:0x800806B0; // type:function size:0x29C
fn_8008094C = .text:0x8008094C; // type:function size:0x1A8
fn_80080AF4 = .text:0x80080AF4; // type:function size:0x260
BoardCoinChgCreate = .text:0x8007FE70; // type:function size:0x1E8
BoardCoinChgExist = .text:0x80080058; // type:function size:0x6C
BoardCoinChgHide = .text:0x800800C4; // type:function size:0x60
CreateCoinChg = .text:0x80080124; // type:function size:0x23C scope:local
UpdateCoinChg = .text:0x80080360; // type:function size:0x198 scope:local
CoinChgAppear = .text:0x800804F8; // type:function size:0x1B8 scope:local
CoinChgSeparate = .text:0x800806B0; // type:function size:0x29C scope:local
CoinChgShow = .text:0x8008094C; // type:function size:0x1A8 scope:local
CoinChgDisappear = .text:0x80080AF4; // type:function size:0x260 scope:local
fn_80080D54 = .text:0x80080D54; // type:function size:0xA4
fn_80080DF8 = .text:0x80080DF8; // type:function size:0x250
fn_80081048 = .text:0x80081048; // type:function size:0x5C
@ -1587,72 +1587,72 @@ fn_80087F3C = .text:0x80087F3C; // type:function size:0x248
fn_80088184 = .text:0x80088184; // type:function size:0x110
fn_80088294 = .text:0x80088294; // type:function size:0x88
fn_8008831C = .text:0x8008831C; // type:function size:0x4C
fn_80088368 = .text:0x80088368; // type:function size:0x90
fn_800883F8 = .text:0x800883F8; // type:function size:0x98
fn_80088490 = .text:0x80088490; // type:function size:0x48
fn_800884D8 = .text:0x800884D8; // type:function size:0x1C
fn_800884F4 = .text:0x800884F4; // type:function size:0x48
fn_8008853C = .text:0x8008853C; // type:function size:0xFC
fn_80088638 = .text:0x80088638; // type:function size:0x24
fn_8008865C = .text:0x8008865C; // type:function size:0x134
fn_80088790 = .text:0x80088790; // type:function size:0x138
fn_800888C8 = .text:0x800888C8; // type:function size:0x50
fn_80088918 = .text:0x80088918; // type:function size:0x44
fn_8008895C = .text:0x8008895C; // type:function size:0x34
fn_80088990 = .text:0x80088990; // type:function size:0x6C
fn_800889FC = .text:0x800889FC; // type:function size:0x158
fn_80088B54 = .text:0x80088B54; // type:function size:0x94
fn_80088BE8 = .text:0x80088BE8; // type:function size:0x6C
fn_80088C54 = .text:0x80088C54; // type:function size:0x90
fn_80088CE4 = .text:0x80088CE4; // type:function size:0x20C
fn_80088EF0 = .text:0x80088EF0; // type:function size:0x98
fn_80088F88 = .text:0x80088F88; // type:function size:0x36C
fn_800892F4 = .text:0x800892F4; // type:function size:0x8C
fn_80089380 = .text:0x80089380; // type:function size:0x210
fn_80089590 = .text:0x80089590; // type:function size:0x40
fn_800895D0 = .text:0x800895D0; // type:function size:0x180
fn_80089750 = .text:0x80089750; // type:function size:0x140
fn_80089890 = .text:0x80089890; // type:function size:0xB8
fn_80089948 = .text:0x80089948; // type:function size:0x29C
fn_80089BE4 = .text:0x80089BE4; // type:function size:0x74
fn_80089C58 = .text:0x80089C58; // type:function size:0x1C
fn_80089C74 = .text:0x80089C74; // type:function size:0x48
fn_80089CBC = .text:0x80089CBC; // type:function size:0xC
fn_80089CC8 = .text:0x80089CC8; // type:function size:0xFC
fn_80089DC4 = .text:0x80089DC4; // type:function size:0x15C
fn_80089F20 = .text:0x80089F20; // type:function size:0x110
fn_8008A030 = .text:0x8008A030; // type:function size:0x30
fn_8008A060 = .text:0x8008A060; // type:function size:0x19C
fn_8008A1FC = .text:0x8008A1FC; // type:function size:0x1E4
fn_8008A3E0 = .text:0x8008A3E0; // type:function size:0xD4
fn_8008A4B4 = .text:0x8008A4B4; // type:function size:0xD8
fn_8008A58C = .text:0x8008A58C; // type:function size:0xEC
fn_8008A678 = .text:0x8008A678; // type:function size:0xC8
fn_8008A740 = .text:0x8008A740; // type:function size:0x80
fn_8008A7C0 = .text:0x8008A7C0; // type:function size:0x4A8
fn_8008AC68 = .text:0x8008AC68; // type:function size:0x370
fn_8008AFD8 = .text:0x8008AFD8; // type:function size:0x174
fn_8008B14C = .text:0x8008B14C; // type:function size:0x78
fn_8008B1C4 = .text:0x8008B1C4; // type:function size:0x74
fn_8008B238 = .text:0x8008B238; // type:function size:0xE8
fn_8008B320 = .text:0x8008B320; // type:function size:0x650
fn_8008B970 = .text:0x8008B970; // type:function size:0x3AC
fn_8008BD1C = .text:0x8008BD1C; // type:function size:0x420
fn_8008C13C = .text:0x8008C13C; // type:function size:0x248
fn_8008C384 = .text:0x8008C384; // type:function size:0xA8
fn_8008C42C = .text:0x8008C42C; // type:function size:0x104
fn_8008C530 = .text:0x8008C530; // type:function size:0x400
fn_8008C930 = .text:0x8008C930; // type:function size:0x388
fn_8008CCB8 = .text:0x8008CCB8; // type:function size:0x674
fn_8008D32C = .text:0x8008D32C; // type:function size:0x50
fn_8008D37C = .text:0x8008D37C; // type:function size:0x38
fn_8008D3B4 = .text:0x8008D3B4; // type:function size:0x5A4
fn_8008D958 = .text:0x8008D958; // type:function size:0x58
fn_8008D9B0 = .text:0x8008D9B0; // type:function size:0x38
fn_8008D9E8 = .text:0x8008D9E8; // type:function size:0xA4
fn_8008DA8C = .text:0x8008DA8C; // type:function size:0x350
fn_8008DDDC = .text:0x8008DDDC; // type:function size:0x148
fn_8008DF24 = .text:0x8008DF24; // type:function size:0x44
BoardItemModelGet = .text:0x80088368; // type:function size:0x90
BoardItemNameGet = .text:0x800883F8; // type:function size:0x98
BoardStatusStopCheck = .text:0x80088490; // type:function size:0x48
BoardStatusVisibleGet = .text:0x800884D8; // type:function size:0x1C
BoardStatusShowSetAll = .text:0x800884F4; // type:function size:0x48
BoardStatusItemSet = .text:0x8008853C; // type:function size:0xFC
BoardStatusShowSetForce = .text:0x80088638; // type:function size:0x24
BoardStatusGraySet = .text:0x8008865C; // type:function size:0x134
BoardStatusShowSet = .text:0x80088790; // type:function size:0x138
BoardStatusItemHideSet = .text:0x800888C8; // type:function size:0x50
BoardStatusTargetPosSet = .text:0x80088918; // type:function size:0x44
BoardStatusPosGet = .text:0x8008895C; // type:function size:0x34
BoardStatusPosSet = .text:0x80088990; // type:function size:0x6C
BoardStatusHammerCreate = .text:0x800889FC; // type:function size:0x158
BoardStatusHammerShowSet = .text:0x80088B54; // type:function size:0x94
BoardStatusHammerKill = .text:0x80088BE8; // type:function size:0x6C
BoardStatusKill = .text:0x80088C54; // type:function size:0x90
BoardStatusCreate = .text:0x80088CE4; // type:function size:0x20C
KillAllBoardStatus = .text:0x80088EF0; // type:function size:0x98 scope:local
CreateBoardStatusSprite = .text:0x80088F88; // type:function size:0x36C scope:local
BoardSpriteCreate = .text:0x800892F4; // type:function size:0x8C
UpdateBoardStatus = .text:0x80089380; // type:function size:0x210 scope:local
BoardStatusProc = .text:0x80089590; // type:function size:0x40 scope:local
MoveBoardStatus = .text:0x800895D0; // type:function size:0x180 scope:local
BoardSpriteDigitUpdate = .text:0x80089750; // type:function size:0x140
UpdateStatusItem = .text:0x80089890; // type:function size:0xB8 scope:local
BoardPickerCreate = .text:0x80089948; // type:function size:0x29C
BoardPickerBackFlagSet = .text:0x80089BE4; // type:function size:0x74
BoardPickerDoneCheck = .text:0x80089C58; // type:function size:0x1C
BoardPickerPosGet = .text:0x80089C74; // type:function size:0x48
BoardPickerChoiceGet = .text:0x80089CBC; // type:function size:0xC
UpdatePicker = .text:0x80089CC8; // type:function size:0xFC scope:local
UpdatePickerInput = .text:0x80089DC4; // type:function size:0x15C scope:local
MovePicker = .text:0x80089F20; // type:function size:0x110 scope:local
UpdateComPickerButton = .text:0x8008A030; // type:function size:0x30 scope:local
CheckPickerButton = .text:0x8008A060; // type:function size:0x19C scope:local
BoardYourTurnExec = .text:0x8008A1FC; // type:function size:0x1E4
UpdateYourTurn = .text:0x8008A3E0; // type:function size:0xD4 scope:local
GrowYourTurn = .text:0x8008A4B4; // type:function size:0xD8 scope:local
WaitYourTurn = .text:0x8008A58C; // type:function size:0xEC scope:local
ShrinkYourTurn = .text:0x8008A678; // type:function size:0xC8 scope:local
BoardItemUseExec = .text:0x8008A740; // type:function size:0x80
ItemUseTeamProc = .text:0x8008A7C0; // type:function size:0x4A8 scope:local
ItemUseProc = .text:0x8008AC68; // type:function size:0x370 scope:local
FinishItemUse = .text:0x8008AFD8; // type:function size:0x174 scope:local
DestroyItemUse = .text:0x8008B14C; // type:function size:0x78 scope:local
BoardMakeRandomItem = .text:0x8008B1C4; // type:function size:0x74
TeamItemPosSet = .text:0x8008B238; // type:function size:0xE8 scope:local
ExecItemPick = .text:0x8008B320; // type:function size:0x650 scope:local
UpdateItemPick = .text:0x8008B970; // type:function size:0x3AC scope:local
MakeItemPickSpace = .text:0x8008BD1C; // type:function size:0x420 scope:local
SetItemUIStatus = .text:0x8008C13C; // type:function size:0x248 scope:local
BoardItemGetDestPos = .text:0x8008C384; // type:function size:0xA8
ItemGetPos = .text:0x8008C42C; // type:function size:0x104 scope:local
BoardItemStatusKill = .text:0x8008C530; // type:function size:0x400
UpdateItemPickGfx = .text:0x8008C930; // type:function size:0x388 scope:local
UpdateItemPickup = .text:0x8008CCB8; // type:function size:0x674 scope:local
CheckItemWindow = .text:0x8008D32C; // type:function size:0x50 scope:local
HideItemWindow = .text:0x8008D37C; // type:function size:0x38 scope:local
CreateItemWindow = .text:0x8008D3B4; // type:function size:0x5A4 scope:local
CheckItemWindowSlide = .text:0x8008D958; // type:function size:0x58 scope:local
KillItemWindow = .text:0x8008D9B0; // type:function size:0x38 scope:local
SetItemWindowCurr = .text:0x8008D9E8; // type:function size:0xA4 scope:local
UpdateItemWindow = .text:0x8008DA8C; // type:function size:0x350 scope:local
CreatePickerWindow = .text:0x8008DDDC; // type:function size:0x148 scope:local
KillPickerWindow = .text:0x8008DF24; // type:function size:0x44 scope:local
fn_8008DF68 = .text:0x8008DF68; // type:function size:0x84
fn_8008DFEC = .text:0x8008DFEC; // type:function size:0x358
fn_8008E344 = .text:0x8008E344; // type:function size:0x54
@ -5205,9 +5205,9 @@ lbl_8013A194 = .data:0x8013A194; // type:object size:0xC
lbl_8013A1A0 = .data:0x8013A1A0; // type:object size:0xC data:4byte
lbl_8013A1AC = .data:0x8013A1AC; // type:object size:0x20
lbl_8013A1CC = .data:0x8013A1CC; // type:object size:0x24
lbl_8013A1F0 = .data:0x8013A1F0; // type:object size:0x10
lbl_8013A200 = .data:0x8013A200; // type:object size:0x28
jtbl_8013A228 = .data:0x8013A228; // type:object size:0x1C scope:local
coinChgObj = .data:0x8013A1F0; // type:object size:0x10 scope:local
coinDigitMdl = .data:0x8013A200; // type:object size:0x28 scope:local
jumptable_8013A228 = .data:0x8013A228; // type:object size:0x1C scope:local
lbl_8013A248 = .data:0x8013A248; // type:object size:0x58
lbl_8013A2A0 = .data:0x8013A2A0; // type:object size:0x10
lbl_8013A2B0 = .data:0x8013A2B0; // type:object size:0x20
@ -5218,12 +5218,16 @@ lbl_8013A374 = .data:0x8013A374; // type:object size:0xC data:4byte
lbl_8013A380 = .data:0x8013A380; // type:object size:0xC
lbl_8013A38C = .data:0x8013A38C; // type:object size:0x50
lbl_8013A3DC = .data:0x8013A3DC; // type:object size:0x2C
lbl_8013A408 = .data:0x8013A408; // type:object size:0xC4 data:byte
lbl_8013A4CC = .data:0x8013A4CC; // type:object size:0x20 data:float
lbl_8013A4EC = .data:0x8013A4EC; // type:object size:0x10
lbl_8013A4FC = .data:0x8013A4FC; // type:object size:0x88
lbl_8013A584 = .data:0x8013A584; // type:object size:0x30
lbl_8013A5B4 = .data:0x8013A5B4; // type:object size:0x54
uiStatus = .data:0x8013A408; // type:object size:0x70 scope:local data:4byte
statusSprTbl = .data:0x8013A478; // type:object size:0x2C scope:local
statusSprPrioTbl = .data:0x8013A4A4; // type:object size:0x18 scope:local
statusHideOfsTbl = .data:0x8013A4BC; // type:object size:0x10 scope:local data:float
statusPosTbl = .data:0x8013A4CC; // type:object size:0x20 scope:local data:float
statusColTbl = .data:0x8013A4EC; // type:object size:0x10 scope:local
statusSprPosTbl = .data:0x8013A4FC; // type:object size:0x88 scope:local data:float
statusItemPosTbl = .data:0x8013A584; // type:object size:0x30 scope:local data:float
itemMdlTbl = .data:0x8013A5B4; // type:object size:0x38 scope:local
teamItemStatusPosTbl = .data:0x8013A5EC; // type:object size:0x18 scope:local data:float
lbl_8013A608 = .data:0x8013A608; // type:object size:0x18
lbl_8013A620 = .data:0x8013A620; // type:object size:0x38
lbl_8013A658 = .data:0x8013A658; // type:object size:0x38
@ -5541,9 +5545,9 @@ lbl_801A4AA8 = .bss:0x801A4AA8; // type:object size:0x18 data:2byte
lbl_801A4AC0 = .bss:0x801A4AC0; // type:object size:0x10
lbl_801A4AD0 = .bss:0x801A4AD0; // type:object size:0x10 data:4byte
lbl_801A4AE0 = .bss:0x801A4AE0; // type:object size:0x10
lbl_801A4AF0 = .bss:0x801A4AF0; // type:object size:0x18
lbl_801A4B08 = .bss:0x801A4B08; // type:object size:0x30
lbl_801A4B38 = .bss:0x801A4B38; // type:object size:0x48
itemMdlId = .bss:0x801A4AF0; // type:object size:0x18 scope:local
pickerPos = .bss:0x801A4B08; // type:object size:0x30 scope:local
itemPosTemp = .bss:0x801A4B38; // type:object size:0x48 scope:local
lbl_801A4B80 = .bss:0x801A4B80; // type:object size:0x28
lbl_801A4BA8 = .bss:0x801A4BA8; // type:object size:0xC data:4byte
lbl_801A4BB4 = .bss:0x801A4BB4; // type:object size:0x34 data:float
@ -5860,8 +5864,8 @@ lbl_801D3778 = .sdata:0x801D3778; // type:object size:0x6
lbl_801D377E = .sdata:0x801D377E; // type:object size:0x6
lbl_801D3784 = .sdata:0x801D3784; // type:object size:0x2 data:2byte
lbl_801D3786 = .sdata:0x801D3786; // type:object size:0xA
lbl_801D3790 = .sdata:0x801D3790; // type:object size:0x2 data:2byte
lbl_801D3792 = .sdata:0x801D3792; // type:object size:0x6 data:2byte
itemPickupMdlId = .sdata:0x801D3790; // type:object size:0x2 scope:local data:2byte
yourTurnSprGrp = .sdata:0x801D3792; // type:object size:0x2 scope:local data:2byte
lbl_801D3798 = .sdata:0x801D3798; // type:object size:0x2 data:2byte
lbl_801D379A = .sdata:0x801D379A; // type:object size:0x6 data:2byte
lbl_801D37A0 = .sdata:0x801D37A0; // type:object size:0x8
@ -6402,24 +6406,25 @@ lbl_801D409F = .sbss:0x801D409F; // type:object size:0x1 data:byte
lbl_801D40A0 = .sbss:0x801D40A0; // type:object size:0x1 data:byte
lbl_801D40A1 = .sbss:0x801D40A1; // type:object size:0x1 data:byte
lbl_801D40A2 = .sbss:0x801D40A2; // type:object size:0x6 data:byte
lbl_801D40A8 = .sbss:0x801D40A8; // type:object size:0x4 data:4byte
lbl_801D40AC = .sbss:0x801D40AC; // type:object size:0x4 data:4byte
lbl_801D40B0 = .sbss:0x801D40B0; // type:object size:0x4 data:4byte
lbl_801D40B4 = .sbss:0x801D40B4; // type:object size:0x4 data:4byte
lbl_801D40B8 = .sbss:0x801D40B8; // type:object size:0x4 data:4byte
lbl_801D40BC = .sbss:0x801D40BC; // type:object size:0x4 data:4byte
lbl_801D40C0 = .sbss:0x801D40C0; // type:object size:0x4 data:float
lbl_801D40C4 = .sbss:0x801D40C4; // type:object size:0x6
lbl_801D40CA = .sbss:0x801D40CA; // type:object size:0x1 data:byte
lbl_801D40CB = .sbss:0x801D40CB; // type:object size:0x1 data:byte
lbl_801D40CC = .sbss:0x801D40CC; // type:object size:0x1 data:byte
lbl_801D40CE = .sbss:0x801D40CE; // type:object size:0x6 data:2byte
lbl_801D40D4 = .sbss:0x801D40D4; // type:object size:0x4 data:4byte
lbl_801D40D8 = .sbss:0x801D40D8; // type:object size:0x1 data:byte
lbl_801D40D9 = .sbss:0x801D40D9; // type:object size:0x1 data:byte
lbl_801D40DA = .sbss:0x801D40DA; // type:object size:0x1 data:byte
lbl_801D40DB = .sbss:0x801D40DB; // type:object size:0x1 data:byte
lbl_801D40DC = .sbss:0x801D40DC; // type:object size:0x1 data:byte
statusProc = .sbss:0x801D40A8; // type:object size:0x4 scope:local data:4byte
itemWindowObj = .sbss:0x801D40AC; // type:object size:0x4 scope:local data:4byte
pickerObj = .sbss:0x801D40B0; // type:object size:0x4 scope:local data:4byte
yourTurnObj = .sbss:0x801D40B4; // type:object size:0x4 scope:local data:4byte
itemUseProc = .sbss:0x801D40B8; // type:object size:0x4 scope:local data:4byte
itemPickObj = .sbss:0x801D40BC; // type:object size:0x4 scope:local data:4byte
itemPickupPos = .sbss:0x801D40C0; // type:object size:0x4 scope:local data:float
itemRandTbl = .sbss:0x801D40C4; // type:object size:0x6 scope:local
teamItemPlayer = .sbss:0x801D40CA; // type:object size:0x1 scope:local data:byte
itemUsed = .sbss:0x801D40CB; // type:object size:0x1 scope:local data:byte
itemPlayer = .sbss:0x801D40CC; // type:object size:0x1 scope:local data:byte
yourTurnSpr = .sbss:0x801D40CE; // type:object size:0x2 scope:local data:2byte
lbl_801D40D0 = .sbss:0x801D40D0; // type:object size:0x4 data:4byte
pickerBackF = .sbss:0x801D40D4; // type:object size:0x4 scope:local data:4byte
pickerChoiceDefault = .sbss:0x801D40D8; // type:object size:0x1 scope:local data:byte
pickerChoice = .sbss:0x801D40D9; // type:object size:0x1 scope:local data:byte
boardItemUser = .sbss:0x801D40DA; // type:object size:0x1 data:byte
itemTeamF = .sbss:0x801D40DB; // type:object size:0x1 scope:local data:byte
itemTeam = .sbss:0x801D40DC; // type:object size:0x1 scope:local data:byte
lbl_801D40E0 = .sbss:0x801D40E0; // type:object size:0x4 data:4byte
lbl_801D40E4 = .sbss:0x801D40E4; // type:object size:0x4 data:4byte
lbl_801D40E8 = .sbss:0x801D40E8; // type:object size:0x4 data:float
@ -7556,7 +7561,7 @@ lbl_801D56A0 = .sdata2:0x801D56A0; // type:object size:0x4 data:float
lbl_801D56A4 = .sdata2:0x801D56A4; // type:object size:0x4 data:float
lbl_801D56A8 = .sdata2:0x801D56A8; // type:object size:0x4 data:float
lbl_801D56AC = .sdata2:0x801D56AC; // type:object size:0x4 data:float
lbl_801D56B0 = .sdata2:0x801D56B0; // type:object size:0x8
coinSignMdl = .sdata2:0x801D56B0; // type:object size:0x8 scope:local
lbl_801D56B8 = .sdata2:0x801D56B8; // type:object size:0x4 data:float
lbl_801D56BC = .sdata2:0x801D56BC; // type:object size:0x4 data:float
lbl_801D56C0 = .sdata2:0x801D56C0; // type:object size:0x4 data:float

View file

@ -13,6 +13,7 @@ extern "C" {
#define OS_FASTCAST_U8 2
#define OS_FASTCAST_U16 3
#define OS_FASTCAST_S8 4
#define OS_FASTCAST_S16 5
// clang-format off
static inline void OSInitFastCast(void) {
@ -75,11 +76,52 @@ static inline u8 __OSf32tou8(register f32 inF)
static inline void OSf32tou8(f32 *f, u8 *out) { *out = __OSf32tou8(*f); }
static inline u16 __OSf32tou16(register f32 inF)
{
u32 tmp;
register u32 *tmpPtr = &tmp;
register u16 out;
// clang-format off
asm {
psq_st inF, 0(tmpPtr), 0x1, OS_FASTCAST_U16
lbz out, 0(tmpPtr)
}
// clang-format on
return out;
}
static inline void OSf32tou16(f32 *f, u16 *out) { *out = __OSf32tou16(*f); }
static inline float __OSs16tof32(register const s16* arg) {
register float ret;
asm {
psq_l ret, 0(arg), 1, OS_FASTCAST_S16
}
return ret;
}
static inline void OSs16tof32(const s16* in, float* out) { *out = __OSs16tof32(in); }
static inline float __OSu8tof32(register const u8* arg) {
register float ret;
asm {
psq_l ret, 0(arg), 1, OS_FASTCAST_U8
}
return ret;
}
static inline void OSu8tof32(const u8* in, float* out) { *out = __OSu8tof32(in); }
static inline float __OSu16tof32(register const u16* arg) {
register float ret;
asm {
psq_l ret, 0(arg), 1, 3
psq_l ret, 0(arg), 1, OS_FASTCAST_U16
}
return ret;

View file

@ -52,10 +52,10 @@ void BoardSpacePosGet(s32, s32, Vec*);
void fn_8007A360(s32);
void fn_8007F894(void);
s16 fn_80083F84(void);
void fn_800884F4(s32);
void BoardStatusShowSetAll(s32);
void fn_800A4C88(void);
void fn_800A6B10(void);
void fn_8008853C(s32);
void BoardStatusItemSet(s32);
void BoardTutorialItemSet(s32);
void fn_80082AAC(s32);
void BoardTutorialDirInputSet(s32, s32, s32);

View file

@ -9,34 +9,10 @@
extern Process *boardObjMan;
typedef struct bit_copy {
struct {
u8 hide : 1;
u8 field08_bit1 : 1;
u8 field08_bit2 : 1;
u8 field08_bit3 : 3;
};
s8 unk_01;
s8 unk_02;
s8 unk_03;
u16 unk_04;
u16 unk_06;
s16 unk_08;
s16 unk_0A;
s16 unk_0C;
s16 unk_0E;
} bitcopy; // sizeof 0x10
void BoardEventLandBlue(s32, s16);
void BoardEventLandRed(s32, s16);
s8 BoardCoinChgCreate(Vec*, s8);
s32 BoardCoinChgExist(s32);
void BoardCoinChgHide(s32);
void BoardEventLandBlue(s32);
void BoardEventLandRed(s32);
s8 fn_8007FE70(Point3d*, s8);
s32 fn_80080058(s32);
void fn_800800C4(s32);
void fn_80080124(bitcopy*, Vec*);
void fn_80080360(omObjData*);
void fn_800804F8(omObjData*, bitcopy*);
void fn_800806B0(omObjData*, bitcopy*);
void fn_8008094C(omObjData*, bitcopy*);
void fn_80080AF4(omObjData*, bitcopy*);
#endif
#endif

View file

@ -177,7 +177,7 @@ void fn_1_13A4(void) {
GWPlayer[i].color = 1;
}
fn_800A4C88();
fn_800884F4(0);
BoardStatusShowSetAll(0);
fn_1_C10(0);
fn_1_BA0(0x2E002B);
sp8.x = -33.0f;

View file

@ -108,7 +108,7 @@ void fn_1_18BC(void) {
fn_1_BA0(0x2E0028);
fn_1_BA0(0x2E0029);
boardTutorialData = 0;
fn_8008853C(0);
BoardStatusItemSet(0);
}
void fn_1_1908(void) {

View file

@ -1,4 +1,33 @@
#include "game/board/basic_space.h"
#include "game/data.h"
#include "game/flag.h"
#include "math.h"
typedef struct bit_copy {
struct {
u8 hide : 1;
u8 minus : 1;
u8 update : 1;
u8 mode : 3;
};
s8 index;
s8 tens;
s8 ones;
u16 time;
u16 angle;
s16 sign_model;
s16 tens_model;
s16 ones_model;
s16 coin_model;
} coinChg;
static void CreateCoinChg(coinChg*, Vec*);
static void UpdateCoinChg(omObjData*);
static void CoinChgAppear(omObjData*, coinChg*);
static void CoinChgSeparate(omObjData*, coinChg*);
static void CoinChgShow(omObjData*, coinChg*);
static void CoinChgDisappear(omObjData*, coinChg*);
extern void BoardTutorialHookExec(s16, s32);
extern void BoardCameraViewSet(s32);
@ -12,400 +41,397 @@ extern void BoardRotateDiceNumbers(s32);
extern void BoardCameraAnimBlendSet(s32, s16, s16);
extern s32 BoardPlayerAnimBlendCheck(s32);
omObjData *lbl_8013A1F0[4] = {
(omObjData *)NULL,
(omObjData *)NULL,
(omObjData *)NULL,
(omObjData *)NULL
static omObjData *coinChgObj[4] = {
NULL,
NULL,
NULL,
NULL
};
s32 lbl_8013A200[10] = {
0x7000C, 0x7000D,
0x7000E, 0x7000F,
0x70010, 0x70011,
0x70012, 0x70013,
0x70014, 0x70015
static s32 coinDigitMdl[10] = {
MAKE_DATA_NUM(DATADIR_BOARD, 12),
MAKE_DATA_NUM(DATADIR_BOARD, 13),
MAKE_DATA_NUM(DATADIR_BOARD, 14),
MAKE_DATA_NUM(DATADIR_BOARD, 15),
MAKE_DATA_NUM(DATADIR_BOARD, 16),
MAKE_DATA_NUM(DATADIR_BOARD, 17),
MAKE_DATA_NUM(DATADIR_BOARD, 18),
MAKE_DATA_NUM(DATADIR_BOARD, 19),
MAKE_DATA_NUM(DATADIR_BOARD, 20),
MAKE_DATA_NUM(DATADIR_BOARD, 21),
};
void BoardEventLandBlue(s32 arg0) {
Point3d sp8;
f32 temp_f1;
s32 var_r29;
s8 temp_r28;
s32 var_r30;
void BoardEventLandBlue(s32 player, s16 space) {
Vec pos;
s32 i;
s8 coin_chg;
s32 coins;
BoardCameraViewSet(2);
BoardPlayerAnimBlendSet(arg0, 0, 0xF);
while (BoardPlayerAnimBlendCheck(arg0) == 0) {
BoardPlayerAnimBlendSet(player, 0, 15);
while (BoardPlayerAnimBlendCheck(player) == 0) {
HuPrcVSleep();
}
if (_CheckFlag(0x1000BU) != 0) {
if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) {
BoardCameraMotionWait();
BoardTutorialHookExec(0xA, 0);
BoardTutorialHookExec(10, 0);
}
var_r30 = 3;
coins = 3;
if (GWSystem.last5_effect == 1) {
var_r30 *= 2;
coins *= 2;
}
BoardPlayerPosGet(arg0, &sp8);
sp8.y += 250.0f;
temp_r28 = fn_8007FE70(&sp8, var_r30);
HuAudFXPlay(0x347);
BoardPlayerPosGet(player, &pos);
pos.y += 250.0f;
coin_chg = BoardCoinChgCreate(&pos, coins);
HuAudFXPlay(839);
BoardCameraMotionWait();
BoardPlayerMotionShiftSet(arg0, 0xC, 0.0f, 4.0f, 0);
BoardPlayerMotionShiftSet(player, 12, 0.0f, 4.0f, 0);
for (var_r29 = 0; var_r29 < var_r30; var_r29++) {
BoardPlayerCoinsAdd(arg0, 1);
for (i = 0; i < coins; i++) {
BoardPlayerCoinsAdd(player, 1);
HuAudFXPlay(7);
HuPrcSleep(6);
}
HuAudFXPlay(0xF);
while (fn_80080058(temp_r28) == 0) {
HuAudFXPlay(15);
while (BoardCoinChgExist(coin_chg) == 0) {
HuPrcVSleep();
}
GWPlayer[arg0].color = 1;
BoardPlayerMotionEndWait(arg0);
BoardRotateDiceNumbers(arg0);
GWPlayer[player].color = 1;
BoardPlayerMotionEndWait(player);
BoardRotateDiceNumbers(player);
}
void BoardEventLandRed(s32 arg0) {
Point3d sp8;
s32 var_r29;
s8 temp_r28;
s32 var_r30;
void* temp_r3;
void BoardEventLandRed(s32 player, s16 space) {
Vec pos;
s32 i;
s8 coin_chg;
s32 coins;
BoardCameraViewSet(2);
omVibrate(arg0, 0xC, 6, 6);
BoardPlayerAnimBlendSet(arg0, 0, 0xF);
while (BoardPlayerAnimBlendCheck(arg0) == 0) {
omVibrate(player, 12, 6, 6);
BoardPlayerAnimBlendSet(player, 0, 15);
while (BoardPlayerAnimBlendCheck(player) == 0) {
HuPrcVSleep();
}
if (_CheckFlag(0x1000BU) != 0) {
if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) {
BoardCameraMotionWait();
BoardTutorialHookExec(0xB, 0);
BoardTutorialHookExec(11, 0);
}
var_r30 = 3;
coins = 3;
if (GWSystem.last5_effect == 1) {
var_r30 *= 2;
coins *= 2;
}
BoardPlayerPosGet(arg0, &sp8);
sp8.y += 250.0f;
temp_r28 = fn_8007FE70(&sp8, -var_r30);
HuAudFXPlay(0x348);
BoardPlayerPosGet(player, &pos);
pos.y += 250.0f;
coin_chg = BoardCoinChgCreate(&pos, -coins);
HuAudFXPlay(840);
BoardCameraMotionWait();
BoardPlayerMotionShiftSet(arg0, 0xD, 0.0f, 4.0f, 0);
for (var_r29 = 0; var_r29 < var_r30; var_r29++) {
BoardPlayerCoinsAdd(arg0, -1);
BoardPlayerMotionShiftSet(player, 13, 0.0f, 4.0f, 0);
for (i = 0; i < coins; i++) {
BoardPlayerCoinsAdd(player, -1);
HuAudFXPlay(14);
HuPrcSleep(6);
}
HuAudFXPlay(0xF);
HuAudFXPlay(15);
while (fn_80080058(temp_r28) == 0) {
while (BoardCoinChgExist(coin_chg) == 0) {
HuPrcVSleep();
}
GWPlayer[arg0].color = 2;
BoardPlayerMotionEndWait(arg0);
BoardRotateDiceNumbers(arg0);
GWPlayer[player].color = 2;
BoardPlayerMotionEndWait(player);
BoardRotateDiceNumbers(player);
}
s8 fn_8007FE70(Point3d* arg0, s8 arg1) {
omObjData* var_r30 = NULL;
bitcopy* temp_r31;
s8 var_r27;
s8 var_r29;
s8 BoardCoinChgCreate(Vec *pos, s8 value) {
omObjData *obj = NULL;
coinChg *coin_chg;
s8 i;
for (var_r29 = 0; var_r29 < 4; var_r29++) {
if (lbl_8013A1F0[var_r29] == 0) {
for (i = 0; i < 4; i++) {
if (coinChgObj[i] == 0) {
break;
}
}
if (var_r29 == 4) {
if (i == 4) {
return -1;
}
var_r30 = omAddObjEx(boardObjMan, 0x10A, 0, 0, -1, &fn_80080360);
lbl_8013A1F0[var_r29] = var_r30;
temp_r31 = (bitcopy *) var_r30->work;
temp_r31->hide = 0;
temp_r31->field08_bit2 = 0;
if (arg1 < 0) {
var_r27 = 1;
} else {
var_r27 = 0;
}
temp_r31->field08_bit1 = var_r27;
temp_r31->field08_bit3 = 0;
temp_r31->unk_02 = __abs(arg1) / 10;
temp_r31->unk_03 = __abs(arg1) % 10;
temp_r31->unk_01 = var_r29 + 1;
temp_r31->unk_04 = 0;
temp_r31->unk_06 = 0;
fn_80080124(temp_r31, arg0);
var_r30->trans.x = arg0->x;
var_r30->trans.y = arg0->y;
var_r30->trans.z = arg0->z;
var_r30->rot.x = 0.0f;
var_r30->rot.y = 0.01f;
temp_r31->field08_bit2 = 1;
return temp_r31->unk_01;
obj = omAddObjEx(boardObjMan, 266, 0, 0, -1, &UpdateCoinChg);
coinChgObj[i] = obj;
coin_chg = (coinChg *)obj->work;
coin_chg->hide = 0;
coin_chg->update = 0;
coin_chg->minus = (value < 0) ? 1 : 0;
coin_chg->mode = 0;
coin_chg->tens = abs(value) / 10;
coin_chg->ones = abs(value) % 10;
coin_chg->index = (s8) (i + 1);
coin_chg->time = 0;
coin_chg->angle = 0;
CreateCoinChg(coin_chg, pos);
obj->trans.x = pos->x;
obj->trans.y = pos->y;
obj->trans.z = pos->z;
obj->rot.x = 0.0f;
obj->rot.y = 0.01f;
coin_chg->update = 1;
return coin_chg->index;
}
s32 fn_80080058(s32 arg0) {
int *sp8;
s32 BoardCoinChgExist(s32 index) {
coinChg *coin_chg;
if ((arg0 <= 0) || (arg0 > 4)) {
return arg0;
if ((index <= 0) || (index > 4)) {
return index;
}
if (lbl_8013A1F0[arg0 - 1] != 0) {
sp8 = lbl_8013A1F0[arg0 - 1]->work;
if (coinChgObj[index - 1] != 0) {
coin_chg = (coinChg *)coinChgObj[index - 1]->work;
return 0;
}
return 1;
}
void fn_800800C4(s32 arg0) {
bitcopy* temp_r4;
void BoardCoinChgHide(s32 index) {
if ((arg0 <= 0) || (arg0 > 4)) {
if ((index <= 0) || (index > 4)) {
return;
}
if (lbl_8013A1F0[arg0 - 1] != 0) {
((bitcopy*) lbl_8013A1F0[arg0 - 1]->work)->hide = 1;
if (coinChgObj[index - 1] != 0) {
((coinChg *)coinChgObj[index - 1]->work)->hide = 1;
}
}
const s32 lbl_801D56B0[2] = {0x70016, 0x70017};
static const s32 coinSignMdl[2] = {
MAKE_DATA_NUM(DATADIR_BOARD, 22),
MAKE_DATA_NUM(DATADIR_BOARD, 23)
};
void fn_80080124(bitcopy* arg0, Vec* arg1) {
f32 var_f31;
static void CreateCoinChg(coinChg *coin_chg, Vec *pos) {
f32 time;
if (arg0->field08_bit1 != 0) {
var_f31 = 2.5f;
if (coin_chg->minus != 0) {
time = 2.5f;
} else {
var_f31 = 1.5f;
time = 1.5f;
}
arg0->unk_08 = BoardModelCreate(lbl_801D56B0[arg0->field08_bit1], NULL, 0);
arg0->unk_0A = BoardModelCreate(lbl_8013A200[arg0->unk_02], NULL, 0);
arg0->unk_0C = BoardModelCreate(lbl_8013A200[arg0->unk_03], NULL, 0);
arg0->unk_0E = BoardModelCreate(0x7000A, NULL, 0);
BoardModelPosSetV(arg0->unk_08, arg1);
BoardModelPosSetV(arg0->unk_0A, arg1);
BoardModelPosSetV(arg0->unk_0C, arg1);
BoardModelPosSetV(arg0->unk_0E, arg1);
BoardModelMotionStart(arg0->unk_08, 0, 0);
BoardModelMotionStart(arg0->unk_0A, 0, 0);
BoardModelMotionStart(arg0->unk_0C, 0, 0);
BoardModelMotionTimeSet(arg0->unk_08, var_f31);
BoardModelMotionTimeSet(arg0->unk_0A, var_f31);
BoardModelMotionTimeSet(arg0->unk_0C, var_f31);
BoardModelMotionSpeedSet(arg0->unk_08, 0.0f);
BoardModelMotionSpeedSet(arg0->unk_0A, 0.0f);
BoardModelMotionSpeedSet(arg0->unk_0C, 0.0f);
BoardModelScaleSet(arg0->unk_08, 0.001, 0.001, 0.001);
BoardModelScaleSet(arg0->unk_0A, 0.001, 0.001, 0.001);
BoardModelScaleSet(arg0->unk_0C, 0.001, 0.001, 0.001);
BoardModelScaleSet(arg0->unk_0E, 0.001, 0.001, 0.001);
BoardModelLayerSet(arg0->unk_08, 1);
BoardModelLayerSet(arg0->unk_0A, 1);
BoardModelLayerSet(arg0->unk_0C, 1);
BoardModelLayerSet(arg0->unk_0E, 1);
if (arg0->unk_02 == 0) {
BoardModelVisibilitySet(arg0->unk_0A, 0);
coin_chg->sign_model = BoardModelCreate(coinSignMdl[coin_chg->minus], NULL, 0);
coin_chg->tens_model = BoardModelCreate(coinDigitMdl[coin_chg->tens], NULL, 0);
coin_chg->ones_model = BoardModelCreate(coinDigitMdl[coin_chg->ones], NULL, 0);
coin_chg->coin_model = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 10), NULL, 0);
BoardModelPosSetV(coin_chg->sign_model, pos);
BoardModelPosSetV(coin_chg->tens_model, pos);
BoardModelPosSetV(coin_chg->ones_model, pos);
BoardModelPosSetV(coin_chg->coin_model, pos);
BoardModelMotionStart(coin_chg->sign_model, 0, 0);
BoardModelMotionStart(coin_chg->tens_model, 0, 0);
BoardModelMotionStart(coin_chg->ones_model, 0, 0);
BoardModelMotionTimeSet(coin_chg->sign_model, time);
BoardModelMotionTimeSet(coin_chg->tens_model, time);
BoardModelMotionTimeSet(coin_chg->ones_model, time);
BoardModelMotionSpeedSet(coin_chg->sign_model, 0.0f);
BoardModelMotionSpeedSet(coin_chg->tens_model, 0.0f);
BoardModelMotionSpeedSet(coin_chg->ones_model, 0.0f);
BoardModelScaleSet(coin_chg->sign_model, 0.001, 0.001, 0.001);
BoardModelScaleSet(coin_chg->tens_model, 0.001, 0.001, 0.001);
BoardModelScaleSet(coin_chg->ones_model, 0.001, 0.001, 0.001);
BoardModelScaleSet(coin_chg->coin_model, 0.001, 0.001, 0.001);
BoardModelLayerSet(coin_chg->sign_model, 1);
BoardModelLayerSet(coin_chg->tens_model, 1);
BoardModelLayerSet(coin_chg->ones_model, 1);
BoardModelLayerSet(coin_chg->coin_model, 1);
if (coin_chg->tens == 0) {
BoardModelVisibilitySet(coin_chg->tens_model, 0);
}
}
void fn_80080360(omObjData* arg0) {
s32 temp_r0;
bitcopy* temp_r31;
static void UpdateCoinChg(omObjData *object) {
coinChg *coin_chg;
temp_r31 = (bitcopy*) arg0->work;
if ((temp_r31->hide != 0) || (BoardIsKill() != 0)) {
if (temp_r31->unk_0E != -1) {
BoardModelKill(temp_r31->unk_0E);
temp_r31->unk_0E = -1;
coin_chg = (coinChg *)object->work;
if ((coin_chg->hide != 0) || (BoardIsKill() != 0)) {
if (coin_chg->coin_model != -1) {
BoardModelKill(coin_chg->coin_model);
coin_chg->coin_model = -1;
}
if (temp_r31->unk_08 != -1) {
BoardModelKill(temp_r31->unk_08);
temp_r31->unk_08 = -1;
if (coin_chg->sign_model != -1) {
BoardModelKill(coin_chg->sign_model);
coin_chg->sign_model = -1;
}
if (temp_r31->unk_0A != -1) {
BoardModelKill(temp_r31->unk_0A);
temp_r31->unk_0A = -1;
if (coin_chg->tens_model != -1) {
BoardModelKill(coin_chg->tens_model);
coin_chg->tens_model = -1;
}
if (temp_r31->unk_0C != -1) {
BoardModelKill(temp_r31->unk_0C);
temp_r31->unk_0C = -1;
if (coin_chg->ones_model != -1) {
BoardModelKill(coin_chg->ones_model);
coin_chg->ones_model = -1;
}
lbl_8013A1F0[temp_r31->unk_01 - 1] = 0;
omDelObjEx(HuPrcCurrentGet(), arg0);
coinChgObj[coin_chg->index - 1] = 0;
omDelObjEx(HuPrcCurrentGet(), object);
return;
}
if (temp_r31->field08_bit2 != 0) {
if (temp_r31->unk_04 != 0) {
temp_r31->unk_04 -= 1;
if (coin_chg->update != 0) {
if (coin_chg->time != 0) {
coin_chg->time -= 1;
return;
}
switch (temp_r31->field08_bit3) {
case 0:
fn_800804F8(arg0, temp_r31);
return;
case 1:
fn_800806B0(arg0, temp_r31);
return;
case 3:
fn_8008094C(arg0, temp_r31);
return;
case 4:
fn_80080AF4(arg0, temp_r31);
break;
switch (coin_chg->mode) {
case 0:
CoinChgAppear(object, coin_chg);
return;
case 1:
CoinChgSeparate(object, coin_chg);
return;
case 3:
CoinChgShow(object, coin_chg);
return;
case 4:
CoinChgDisappear(object, coin_chg);
break;
}
}
}
void fn_800804F8(omObjData* arg0, bitcopy* arg1) {
f32 temp_f31;
f32 temp_f30;
f32 temp_f29;
f32 temp_f28;
static void CoinChgAppear(omObjData *object, coinChg *coin_chg) {
f32 scale;
f32 angle;
OSu16tof32(&arg1->unk_06, &temp_f29);
temp_f29 = sin(M_PI * temp_f29 / 180.0);
temp_f30 = temp_f29;
arg0->rot.x = 405.0f * temp_f29;
BoardModelScaleSet(arg1->unk_0E, temp_f30, temp_f30, temp_f30);
BoardModelPosSet(arg1->unk_0E, arg0->trans.x, arg0->trans.y, arg0->trans.z);
BoardModelRotYSet(arg1->unk_0E, arg0->rot.x);
if (arg1->unk_06 < 0x5A) {
arg1->unk_06 += 6;
OSu16tof32(&coin_chg->angle, &angle);
angle = sin(M_PI * angle / 180.0);
scale = angle;
object->rot.x = 405.0f * angle;
BoardModelScaleSet(coin_chg->coin_model, scale, scale, scale);
BoardModelPosSet(coin_chg->coin_model, object->trans.x, object->trans.y, object->trans.z);
BoardModelRotYSet(coin_chg->coin_model, object->rot.x);
if (coin_chg->angle < 90) {
coin_chg->angle += 6;
return;
}
arg1->field08_bit3 = 1;
arg1->unk_06 = 0;
BoardModelScaleSet(arg1->unk_08, temp_f30, temp_f30, temp_f30);
BoardModelPosSet(arg1->unk_08, arg0->trans.x, arg0->trans.y, arg0->trans.z);
BoardModelRotYSet(arg1->unk_08, arg0->rot.x);
BoardModelScaleSet(arg1->unk_0C, temp_f30, temp_f30, temp_f30);
BoardModelPosSet(arg1->unk_0C, arg0->trans.x, arg0->trans.y, arg0->trans.z);
BoardModelRotYSet(arg1->unk_0C, arg0->rot.x);
BoardModelScaleSet(arg1->unk_0A, temp_f30, temp_f30, temp_f30);
BoardModelPosSet(arg1->unk_0A, arg0->trans.x, arg0->trans.y, arg0->trans.z);
BoardModelRotYSet(arg1->unk_0A, arg0->rot.x);
coin_chg->mode = 1;
coin_chg->angle = 0;
BoardModelScaleSet(coin_chg->sign_model, scale, scale, scale);
BoardModelPosSet(coin_chg->sign_model, object->trans.x, object->trans.y, object->trans.z);
BoardModelRotYSet(coin_chg->sign_model, object->rot.x);
BoardModelScaleSet(coin_chg->ones_model, scale, scale, scale);
BoardModelPosSet(coin_chg->ones_model, object->trans.x, object->trans.y, object->trans.z);
BoardModelRotYSet(coin_chg->ones_model, object->rot.x);
BoardModelScaleSet(coin_chg->tens_model, scale, scale, scale);
BoardModelPosSet(coin_chg->tens_model, object->trans.x, object->trans.y, object->trans.z);
BoardModelRotYSet(coin_chg->tens_model, object->rot.x);
}
void fn_800806B0(omObjData* arg0, bitcopy* arg1) {
f32 temp_f28;
f32 temp_f30;
f32 var_f29;
f32 var_f27;
f32 var_f26;
f32 var_f25;
f32 var_f24;
static void CoinChgSeparate(omObjData *object, coinChg *coin_chg) {
f32 y_offset;
f32 x_scale;
f32 spacing;
f32 coin_x;
f32 ones_x;
f32 tens_x;
f32 sign_x;
OSu16tof32(&arg1->unk_06, &temp_f30);
OSu16tof32(&coin_chg->angle, &x_scale);
if (arg1->unk_02 != 0) {
var_f29 = 140.0f;
if (coin_chg->tens != 0) {
spacing = 140.0f;
} else {
var_f29 = 105.0f;
spacing = 105.0f;
}
temp_f28 = (200.0 * sin((M_PI * (2.0f * temp_f30)) / 180.0));
temp_f30 = sin((M_PI * temp_f30) / 180.0);
arg0->rot.x = 45.0f + (315.0f * temp_f30);
if (arg1->unk_02 != 0) {
var_f27 = arg0->trans.x + (temp_f30 * -var_f29);
var_f24 = arg0->trans.x + ((temp_f30 * -var_f29) / 3.0f);
var_f26 = arg0->trans.x + (temp_f30 * var_f29);
var_f25 = arg0->trans.x + ((temp_f30 * var_f29) / 3.0f);
y_offset = (200.0 * sin((M_PI * (2.0f * x_scale)) / 180.0));
x_scale = sin((M_PI * x_scale) / 180.0);
object->rot.x = 45.0f + (315.0f * x_scale);
if (coin_chg->tens != 0) {
coin_x = object->trans.x + (x_scale * -spacing);
sign_x = object->trans.x + ((x_scale * -spacing) / 3.0f);
ones_x = object->trans.x + (x_scale * spacing);
tens_x = object->trans.x + ((x_scale * spacing) / 3.0f);
} else {
var_f24 = arg0->trans.x;
var_f25 = arg0->trans.x;
var_f26 = arg0->trans.x + (temp_f30 * var_f29);
var_f27 = arg0->trans.x + (temp_f30 * -var_f29);
sign_x = object->trans.x;
tens_x = object->trans.x;
ones_x = object->trans.x + (x_scale * spacing);
coin_x = object->trans.x + (x_scale * -spacing);
}
BoardModelPosSet(arg1->unk_0E, var_f27, arg0->trans.y + temp_f28, arg0->trans.z);
BoardModelPosSet(arg1->unk_08, var_f24, arg0->trans.y + temp_f28, arg0->trans.z);
BoardModelPosSet(arg1->unk_0C, var_f26, arg0->trans.y + temp_f28, arg0->trans.z);
BoardModelPosSet(arg1->unk_0A, var_f25, arg0->trans.y + temp_f28, arg0->trans.z);
BoardModelRotYSet(arg1->unk_0E, arg0->rot.x);
BoardModelRotYSet(arg1->unk_08, arg0->rot.x);
BoardModelRotYSet(arg1->unk_0C, arg0->rot.x);
BoardModelRotYSet(arg1->unk_0A, arg0->rot.x);
if (arg1->unk_06 < 0x5A) {
arg1->unk_06 += 6;
BoardModelPosSet(coin_chg->coin_model, coin_x, object->trans.y + y_offset, object->trans.z);
BoardModelPosSet(coin_chg->sign_model, sign_x, object->trans.y + y_offset, object->trans.z);
BoardModelPosSet(coin_chg->ones_model, ones_x, object->trans.y + y_offset, object->trans.z);
BoardModelPosSet(coin_chg->tens_model, tens_x, object->trans.y + y_offset, object->trans.z);
BoardModelRotYSet(coin_chg->coin_model, object->rot.x);
BoardModelRotYSet(coin_chg->sign_model, object->rot.x);
BoardModelRotYSet(coin_chg->ones_model, object->rot.x);
BoardModelRotYSet(coin_chg->tens_model, object->rot.x);
if (coin_chg->angle < 90) {
coin_chg->angle += 6;
return;
}
arg0->trans.y += temp_f28;
arg1->field08_bit3 = 3;
arg1->unk_06 = 0;
object->trans.y += y_offset;
coin_chg->mode = 3;
coin_chg->angle = 0;
}
void fn_8008094C(omObjData* arg0, bitcopy* arg1) {
static void CoinChgShow(omObjData* object, coinChg* coin_chg) {
Vec sp8;
f32 temp_f29;
f32 var_f30;
f32 angle;
f32 y_pos;
OSu16tof32(&arg1->unk_06, &temp_f29);
temp_f29 = (f32) sin((M_PI * temp_f29) / 180.0);
if (arg1->field08_bit1 != 0) {
var_f30 = (-50.0f * temp_f29) + arg0->trans.y;
OSu16tof32(&coin_chg->angle, &angle);
angle = (f32) sin((M_PI * angle) / 180.0);
if (coin_chg->minus != 0) {
y_pos = (-50.0f * angle) + object->trans.y;
} else {
var_f30 = (50.0f * temp_f29) + arg0->trans.y;
y_pos = (50.0f * angle) + object->trans.y;
}
BoardModelPosGet(arg1->unk_0E, &sp8);
BoardModelPosSet(arg1->unk_0E, sp8.x, var_f30, sp8.z);
BoardModelPosGet(arg1->unk_08, &sp8);
BoardModelPosSet(arg1->unk_08, sp8.x, var_f30, sp8.z);
BoardModelPosGet(arg1->unk_0C, &sp8);
BoardModelPosSet(arg1->unk_0C, sp8.x, var_f30, sp8.z);
BoardModelPosGet(arg1->unk_0A, &sp8);
BoardModelPosSet(arg1->unk_0A, sp8.x, var_f30, sp8.z);
if (arg1->unk_06 < 0x5A) {
arg1->unk_06 += 6;
BoardModelPosGet(coin_chg->coin_model, &sp8);
BoardModelPosSet(coin_chg->coin_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->sign_model, &sp8);
BoardModelPosSet(coin_chg->sign_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->ones_model, &sp8);
BoardModelPosSet(coin_chg->ones_model, sp8.x, y_pos, sp8.z);
BoardModelPosGet(coin_chg->tens_model, &sp8);
BoardModelPosSet(coin_chg->tens_model, sp8.x, y_pos, sp8.z);
if (coin_chg->angle < 90) {
coin_chg->angle += 6;
return;
}
arg1->field08_bit3 = 4;
arg1->unk_06 = 0;
arg1->unk_04 = 0x12;
arg0->scale.x = 1.0f;
arg0->scale.y = 1.0f;
coin_chg->mode = 4;
coin_chg->angle = 0;
coin_chg->time = 18;
object->scale.x = 1.0f;
object->scale.y = 1.0f;
}
void fn_80080AF4(omObjData* arg0, bitcopy* arg1) {
const u16 sp8 = ((arg1->unk_06 * 2) % 180);
f32 temp_f31;
static void CoinChgDisappear(omObjData* object, coinChg* coin_chg) {
const u16 angle = ((coin_chg->angle * 2) % 180);
f32 rot;
OSu16tof32(&sp8, &temp_f31);
if (sp8 <= 90.0f) {
arg0->scale.x = 0.5 * cos((M_PI * temp_f31) / 180.0);
arg0->scale.y = 2.5 * sin((M_PI * temp_f31) / 180.0);
OSu16tof32(&angle, &rot);
if (angle <= 90.0f) {
object->scale.x = 0.5 * cos((M_PI * rot) / 180.0);
object->scale.y = 2.5 * sin((M_PI * rot) / 180.0);
} else {
arg0->scale.x = 2.5 * sin((M_PI * temp_f31) / 180.0);
arg0->scale.y = 0.5 * cos((M_PI * temp_f31) / 180.0);
object->scale.x = 2.5 * sin((M_PI * rot) / 180.0);
object->scale.y = 0.5 * cos((M_PI * rot) / 180.0);
}
if (0.0f == arg0->scale.x) {
arg0->scale.x = 0.0001f;
if (0.0f == object->scale.x) {
object->scale.x = 0.0001f;
}
if (0.0f == arg0->scale.y) {
arg0->scale.y = 0.0001f;
if (0.0f == object->scale.y) {
object->scale.y = 0.0001f;
}
BoardModelScaleSet(arg1->unk_0E, arg0->scale.x, arg0->scale.y, 1.0f);
BoardModelScaleSet(arg1->unk_08, arg0->scale.x, arg0->scale.y, 1.0f);
BoardModelScaleSet(arg1->unk_0C, arg0->scale.x, arg0->scale.y, 1.0f);
BoardModelScaleSet(arg1->unk_0A, arg0->scale.x, arg0->scale.y, 1.0f);
if (arg1->unk_06 < 0x5A) {
arg1->unk_06 += 3;
if (arg1->unk_06 > 0x5A) {
arg1->unk_06 = 0x5A;
BoardModelScaleSet(coin_chg->coin_model, object->scale.x, object->scale.y, 1.0f);
BoardModelScaleSet(coin_chg->sign_model, object->scale.x, object->scale.y, 1.0f);
BoardModelScaleSet(coin_chg->ones_model, object->scale.x, object->scale.y, 1.0f);
BoardModelScaleSet(coin_chg->tens_model, object->scale.x, object->scale.y, 1.0f);
if (coin_chg->angle < 90) {
coin_chg->angle += 3;
if (coin_chg->angle > 90) {
coin_chg->angle = 90;
}
} else {
BoardModelVisibilitySet(arg1->unk_08, 0);
BoardModelVisibilitySet(arg1->unk_0A, 0);
BoardModelVisibilitySet(arg1->unk_0C, 0);
BoardModelVisibilitySet(arg1->unk_0E, 0);
arg1->hide = 1;
BoardModelVisibilitySet(coin_chg->sign_model, 0);
BoardModelVisibilitySet(coin_chg->tens_model, 0);
BoardModelVisibilitySet(coin_chg->ones_model, 0);
BoardModelVisibilitySet(coin_chg->coin_model, 0);
coin_chg->hide = 1;
}
}