Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- - in rom.ld:
- TrainerBTrTypeGet = 0x0207280C | 1;
- - in hooks:
- arm9 GrabTrSlideGfxData_hook 08070D40 5
- - in an asm/*.s file:
- GrabTrSlideGfxData_hook:
- ldr r5, =GrabTrSlideGfxData_return_address
- mov r6, lr
- str r6, [r5]
- pop {r5-r6}
- bl GrabTrSlideGfxData
- ldr r1, =GrabTrSlideGfxData_return_address
- ldr r1, [r1]
- mov pc, r1
- .pool
- GrabTrSlideGfxData_return_address:
- .word 0
- - in bytereplacement:
- # trainer tone skin slide func setup, GrabTrSlideGfxData
- arm9 08070D3C 60 B4 C0 46
- - in a c file:
- */
- struct tr_gfx_data
- {
- u32 arcID;
- u32 ncgrID;
- u32 nclrID;
- u32 ncerID;
- u32 nanrID;
- u32 ncbrID;
- };
- void GrabTrSlideGfxData(int trtype, int dir, int unsure, struct tr_gfx_data *tcg)
- {
- if (dir == 2) // front sprites
- {
- tcg->arcID = 58;
- tcg->ncgrID = 0 + trtype*5;
- tcg->nclrID = 1 + trtype*5;
- tcg->ncerID = 2 + trtype*5;
- tcg->nanrID = 3 + trtype*5;
- tcg->ncbrID = 4 + trtype*5;
- }
- else // back sprites
- {
- tcg->arcID = 6;
- trtype = TrainerBTrTypeGet(trtype, unsure);
- tcg->ncgrID = 0 + trtype*5;
- tcg->nclrID = 1 + trtype*5;
- tcg->ncerID = 2 + trtype*5;
- tcg->nanrID = 3 + trtype*5;
- tcg->ncbrID = 4 + trtype*5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement