Jump to content

Template:Engine calls/Boktai 3: Difference between revisions

Prepare for engine call merge
 
Automated engine call table merge
Line 11: Line 11:
| 0xb4b4 || 0x08001d08 || 6 ||  
| 0xb4b4 || 0x08001d08 || 6 ||  
|-
|-
| 0x4ae5 || 0x080033fc || 16 ||  
| 0x4ae5 || 0x080033fc || 16 || Load [[Master_file_table|background palette]] file  (p=3x palette file ids)
|-
|-
| 0x472e || 0x08003a68 || 10 ||  
| 0x472e || 0x08003a68 || 10 ||  
Line 29: Line 29:
| 0xb426 || 0x0800e08c || 1 ||  
| 0xb426 || 0x0800e08c || 1 ||  
|-
|-
| 0x4d4d || 0x0800e390 || 27 ||  
| 0x4d4d || 0x0800e390 || 27 || OBJ palette related(?, p=?)
|-
|-
| 0x329b || 0x0800f474 || 1 ||  
| 0x329b || 0x0800f474 || 1 ||  
Line 63: Line 63:
| 0x730a || 0x080213ac || 4 ||  
| 0x730a || 0x080213ac || 4 ||  
|-
|-
| 0xd972 || 0x08029798 || 6 ||  
| 0xd972 || 0x08029798 || 6 || Spawn the Count
|-
|-
| 0x917f || 0x0802c620 || 4 ||  
| 0x917f || 0x0802c620 || 4 ||  
Line 313: Line 313:
| 0xb8b9 || 0x08225a50 || 5 ||  
| 0xb8b9 || 0x08225a50 || 5 ||  
|-
|-
| 0xc0b0 || 0x082275d8 || 7 ||  
| 0xc0b0 || 0x082275d8 || 7 || Camera_Create()
|-
|-
| 0x430d || 0x082284b4 || 416 ||  
| 0x430d || 0x082284b4 || 416 || setTimeout(?, t=frame count, a=args (to p/e), p=callback function id, e=callback block)
 
Set either p or e, not both. Return a value > 0 to re-arm the timeout.
|-
|-
| 0x8b1e || 0x082284c0 || 2 ||  
| 0x8b1e || 0x082284c0 || 2 ||  
Line 321: Line 323:
| 0x794c || 0x0822b924 || 3 ||  
| 0x794c || 0x0822b924 || 3 ||  
|-
|-
| 0xb639 || 0x0822c0cc || 476 ||  
| 0xb639 || 0x0822c0cc || 476 || Unknown? Must be called for enemy spawning to work
|-
|-
| 0x2d36 || 0x0822cc80 || 5 ||  
| 0x2d36 || 0x0822cc80 || 5 ||  
Line 332: Line 334:
! ID || Address || # Uses || Description
! ID || Address || # Uses || Description
|-
|-
| 0x7a27 || 0x08001ee0 || 18 ||  
| 0x7a27 || 0x08001ee0 || 18 || Video_LoadTileMap(d=file id, t=type, n=layer count, i=layer indices, c=layer IDs)
d: [[Tile map file]] ID<br>
t: Type, how layers are assigned to GBA background layers: 0=BG0, 1=BG2+BG3, 2=BG3, 3=BG1, 4=BG1+BG3, 5=BG2+BG1, 6=BG2+BG3=BG1, else=BG2 but invisible in REG_DISPCNT)<br>
n: Layer count, how many layers to load. Defaults to 1. For example, t=4 and n=1 would load only BG1, t=4 and n=2 would load BG1 and BG3.<br>
i: Layer indicies: Specifies which layers to load from the tile map file, via indices into its layerDefinition array.<br>
c: Layer IDs: Specifies which layers to load from the tile map file, by referencing the TileMapLayer.id field<br>
Precedence for layer selection: keyword i, else keyword c, else defaults to [0, 1, 2].<br>
If the tile map file contains a tile set, it will also be loaded into VRAM as well.
|-
|-
| 0xe4b1 || 0x08002024 || 3 ||  
| 0xe4b1 || 0x08002024 || 3 ||  
|-
|-
| 0x11d4 || 0x0800211c || 2 || Video_LoadTileSet(t=?, c=tileset page ID? d=tileset file ID, m=tilemap file ID)
| 0x11d4 || 0x0800211c || 2 || Video_LoadTileSet(t=type, c=part ids, d=tile set file id, m=tile map file id, s=load offset)
t: Type; only two relevant cases: If 0 (=BG0), then load offset will be ''forced'' to 0x400 tiles, irrespective of the m and s keywords. Otherwise, the m and s keywords are used.<br>
c: [[Tile set file]] part IDs to load (1-n)<br>
d: Tile set file ID<br>
m: [[Tile map file]] ID, only used to determine the load offset.<br>
s: Load offset in tiles<br>
''Load offset explanation'': Tiles are copied into VRAM starting at that offset. By specifying different load offsets for different tile sets, multiple tile sets can coexist in VRAM simultaneously. If both m and s are specified, m takes precedence.
|-
|-
| 0x33aa || 0x08002234 || 2 ||  
| 0x33aa || 0x08002234 || 2 ||  
Line 368: Line 383:
| 0x0955 || 0x080083f0 || 3 ||  
| 0x0955 || 0x080083f0 || 3 ||  
|-
|-
| 0xddcf || 0x08008820 || 2 ||  
| 0xddcf || 0x08008820 || 2 || Spawn chest?
|-
|-
| 0x2e1c || 0x080091c8 || 2 ||  
| 0x2e1c || 0x080091c8 || 2 ||  
Line 390: Line 405:
| 0x4383 || 0x08015de0 || 4 ||  
| 0x4383 || 0x08015de0 || 4 ||  
|-
|-
| 0x3535 || 0x08016764 || 2 ||  
| 0x3535 || 0x08016764 || 2 || Map_LoadGraphics(t=?, c=?, d=?)
|-
|-
| 0x7e73 || 0x08018374 || 1 ||  
| 0x7e73 || 0x08018374 || 1 ||  
Line 432: Line 447:
| 0xc556 || 0x08030c78 || 2 ||  
| 0xc556 || 0x08030c78 || 2 ||  
|-
|-
| 0x1c64 || 0x08030d9c || 1550 ||  
| 0x1c64 || 0x08030d9c || 1550 || Textbox_Open(r=string ref)
|-
|-
| 0xd401 || 0x08030eac || 10 ||  
| 0xd401 || 0x08030eac || 10 ||  
|-
|-
| 0xab3c || 0x08030ffc || 20 || TextBox_SetVar(n, value) - Access via <VAR=n> tags
| 0xab3c || 0x08030ffc || 20 || TextBox_SetVar(n, value) - Access via <VAR=n> tags in strings
|-
|-
| 0x2575 || 0x0803103c || 7 ||  
| 0x2575 || 0x0803103c || 7 ||  
Line 442: Line 457:
| 0x352d || 0x0803107c || 67 || TextBox_SetExtend(n, text) - Access via <EXTEND=n> tags
| 0x352d || 0x0803107c || 67 || TextBox_SetExtend(n, text) - Access via <EXTEND=n> tags
|-
|-
| 0xadd2 || 0x08031184 || 18 ||  
| 0xadd2 || 0x08031184 || 18 || TextBox_EnableAutoAdvance(?, delay_frames)
|-
|-
| 0xdd91 || 0x080311f0 || 94 ||  
| 0xdd91 || 0x080311f0 || 94 ||  
Line 526: Line 541:
| 0xa61c || 0x0805606c || 9 ||  
| 0xa61c || 0x0805606c || 9 ||  
|-
|-
| 0x8089 || 0x08056840 || 1 ||  
| 0x8089 || 0x08056840 || 1 || Map_SpawnLoadingZoneIndicator(n=loading_zone_id)
|-
|-
| 0x7935 || 0x08056a60 || 74 ||  
| 0x7935 || 0x08056a60 || 74 || InitArray(indexed-ptr, values...)
Copies values into the indexed-ptr. Partial writes are supported (you can specify less values than the size of the indexed-ptr).
|-
|-
| 0x7636 || 0x08056a90 || 40 ||  
| 0x7636 || 0x08056a90 || 40 || Loop(a=argument count of callback, r=number of executions, d=data to loop over, e=callback block)
This is complicated, need some examples... keywords "a" and "r" are always required, keyword "d" is optional: if provided, the loop behaves like a "for each" loop over the provided data, if not provided it behaves like a "for" loop between 0 and r.
|-
|-
| 0x3469 || 0x08056b64 || 78 || rand(p=upper_bound)
| 0x3469 || 0x08056b64 || 78 || int rand(p=divisor)
If divisor is 0, returns the RNG value directly. Otherwise returns RNG % divsior (TODO: there's some additional shifting going on if p is set)
|-
|-
| 0x5f5f || 0x08056bc8 || 6 ||  
| 0x5f5f || 0x08056bc8 || 6 ||  
Line 800: Line 818:
| 0x582b || 0x08178008 || 1 ||  
| 0x582b || 0x08178008 || 1 ||  
|-
|-
| 0xc6aa || 0x0817809c || 129 ||  
| 0xc6aa || 0x0817809c || 129 || Textbox_CloseBox(m=?)
Without ‘m’ this is a nop?
|-
|-
| 0x2fa0 || 0x081780d4 || 11 ||  
| 0x2fa0 || 0x081780d4 || 11 ||  
Line 820: Line 839:
| 0x6299 || 0x081ba57c || 1 ||  
| 0x6299 || 0x081ba57c || 1 ||  
|-
|-
| 0x61a0 || 0x081bb294 || 2 ||  
| 0x61a0 || 0x081bb294 || 2 || Solar Bank interest rate calcuation
|-
|-
| 0x9e8b || 0x081bb38c || 7 ||  
| 0x9e8b || 0x081bb38c || 7 ||  
Line 950: Line 969:
| 0xbec2 || 0x082259a0 || 3 ||  
| 0xbec2 || 0x082259a0 || 3 ||  
|-
|-
| 0x30ad || 0x08225cb8 || 6 ||  
| 0x30ad || 0x08225cb8 || 6 || Map_LoadMap(p=[[Map file]] ID, ...=?)
|-
|-
| 0x7539 || 0x08225da0 || 6 ||  
| 0x7539 || 0x08225da0 || 6 ||  
Line 966: Line 985:
| 0xcaee || 0x082268c0 || 33 ||  
| 0xcaee || 0x082268c0 || 33 ||  
|-
|-
| 0x184b || 0x08226b50 || 1 ||  
| 0x184b || 0x08226b50 || 1 || Camera_ConnectToTilemap(...) - Positions the camera on the tile map (call every frame)
|-
|-
| 0x180b || 0x08226c44 || 2 ||  
| 0x180b || 0x08226c44 || 2 ||  
Line 1,006: Line 1,025:
| 0x5365 || 0x08228ff0 || 1 ||  
| 0x5365 || 0x08228ff0 || 1 ||  
|-
|-
| 0x2f01 || 0x08229044 || 6 ||  
| 0x2f01 || 0x08229044 || 6 || Time_GetType(result: u8*)
0, 4, 5 = night, else = day
|-
|-
| 0x1833 || 0x0822906c || 1 ||  
| 0x1833 || 0x0822906c || 1 ||  
Line 1,042: Line 1,062:
| 0x31ff || 0x0822c220 || 9 ||  
| 0x31ff || 0x0822c220 || 9 ||  
|-
|-
| 0x305a || 0x0822cf0c || 28 ||  
| 0x305a || 0x0822cf0c || 28 || Inventory_GiveItem(i=item_id, n=amount)
|-
|-
| 0x3a5d || 0x0822cfb4 || 16 ||  
| 0x3a5d || 0x0822cfb4 || 16 || Inventory_RemoveItem(i=item, n=amount)
|-
|-
| 0xb75d || 0x0822cfd0 || 1 ||  
| 0xb75d || 0x0822cfd0 || 1 ||  
Line 1,064: Line 1,084:
| 0x01ab || 0x0822e340 || 3 ||  
| 0x01ab || 0x0822e340 || 3 ||  
|-
|-
| 0xe083 || 0x0822e504 || 5 ||  
| 0xe083 || 0x0822e504 || 5 || GiveMagic(m=magic)
|-
|-
| 0x1887 || 0x0822e564 || 3 ||  
| 0x1887 || 0x0822e564 || 3 ||