- 192
- Posts
- 17
- Years
- Seen Oct 28, 2020
Structures
Code:
00000000 [B]coords[/B] struc @ (sizeof=0x4)
00000000 [COLOR="Red"]x[/COLOR]: .short
00000002 [COLOR="Blue"]y[/COLOR]: .short
00000004 coords ends
[COLOR="Orange"]00000000[/COLOR] [B]oam[/B] struc @ (sizeof=0x8)
[COLOR="orange"]00000000[/COLOR] y: .byte
[COLOR="orange"]00000001[/COLOR] flags1: .byte
[COLOR="orange"]00000002[/COLOR] x: .byte
[COLOR="orange"]00000003[/COLOR] msb_of_x_and_flags2:.byte
[COLOR="orange"]00000004[/COLOR] tile_prio_pal: .short
[COLOR="orange"]00000006[/COLOR] irrelevant: .short
[COLOR="orange"]00000008[/COLOR] oam ends
00000000 [B]animation[/B] struc @ (sizeof=0x4)
00000000 frame: .half @ Internally: 0xFFFD=>animcmd1 0xFFFE=>animcmd2
00000000 @ 0xFFFF=>animcmd3 any other number (=framenr) =>animcmd4
00000002 duration: .half
00000004 animation ends
(read [url]https://www.pokecommunity.com/threads/236456[/url] for details)
[COLOR="Lime"]00000000[/COLOR] [B]object_template[/B] struc @ (sizeof=0x18)
[COLOR="lime"]00000000[/COLOR] tiles_tag: .short
[COLOR="lime"]00000002[/COLOR] pal_tag: .short
[COLOR="lime"]00000004[/COLOR] oam: .long
[COLOR="lime"]00000008[/COLOR] [U]image_table[/U]: .long
[COLOR="lime"]0000000C[/COLOR] gfx_table: .long
[COLOR="lime"]00000010[/COLOR] rotscale_table: .long
[COLOR="lime"]00000014[/COLOR] [U]callback[/U]: .long
[COLOR="lime"]00000018[/COLOR] object_template ends
[COLOR="Sienna"]00000000[/COLOR] [B]object[/B] struc @ (sizeof=0x44)
[COLOR="sienna"]00000000[/COLOR] [COLOR="Orange"]final_oam[/COLOR]: oam
[COLOR="sienna"]00000008[/COLOR] [U]animation_table[/U]: .long
[COLOR="sienna"]0000000C[/COLOR] gfx_table: .long
[COLOR="sienna"]00000010[/COLOR] rotscale_table: .long
[COLOR="sienna"]00000014[/COLOR] [COLOR="Lime"][U]template[/U][/COLOR]: .long
[COLOR="sienna"]00000018[/COLOR] field_18: .long
[COLOR="sienna"]0000001C[/COLOR] [U]callback[/U]: .long
[COLOR="sienna"]00000020[/COLOR] pos_1: [COLOR="red"]coo[/COLOR][COLOR="Blue"]rds[/COLOR]
[COLOR="sienna"]00000024[/COLOR] pos_2: [COLOR="red"]coo[/COLOR][COLOR="blue"]rds[/COLOR]
[COLOR="sienna"]00000028[/COLOR] [COLOR="Red"]pos_3_x[/COLOR]: .byte @ These coordinates are [u]subtracted[/u] from actual position!
[COLOR="sienna"]00000029[/COLOR] [COLOR="blue"]pos_3_y[/COLOR]: .byte @ It is used to center the sprites. So most of the times pos_3_x=width/2 and pos_3_y=height/2
[COLOR="sienna"]0000002A[/COLOR] anim_nr: .byte
[COLOR="sienna"]0000002B[/COLOR] anim_frame: .byte
[COLOR="sienna"]0000002C[/COLOR] anim_delay_countdown: .byte @ six bits acting as countdown. two upper bits can pause image and rotscale-animations
[COLOR="sienna"]0000002D[/COLOR] field_2D: .byte
[COLOR="sienna"]0000002E[/COLOR] ipos: [COLOR="red"]coo[/COLOR][COLOR="Blue"]rds[/COLOR] ?
[COLOR="sienna"]00000032[/COLOR] ivel: [COLOR="red"]coo[/COLOR][COLOR="Blue"]rds[/COLOR] ? @ It seems like this is the private area
[COLOR="sienna"]00000032[/COLOR] @ for functions managing a single oam.
[COLOR="sienna"]00000032[/COLOR] @ Moving objects use ipos and ivel to save
[COLOR="sienna"]00000032[/COLOR] @ the position and velocity. But they have
[COLOR="sienna"]00000032[/COLOR] @ to be transferred to pos_1 manually. And
[COLOR="sienna"]00000032[/COLOR] @ NPCs use the first byte of ivel to store
[COLOR="sienna"]00000032[/COLOR] @ their current state.
...
[COLOR="sienna"]00000042[/COLOR] field_42: .byte
[COLOR="sienna"]00000043[/COLOR] field_43: .byte
[COLOR="sienna"]00000044[/COLOR] object ends
Last edited: