Jump to content

Template:Engine calls/Boktai 2: Difference between revisions

Prepare for engine call merge
 
Automated engine call table merge
Line 13: Line 13:
| 0x9053 || 0x08001664 || 4 ||  
| 0x9053 || 0x08001664 || 4 ||  
|-
|-
| 0x4ae5 || 0x080026ac || 19 ||  
| 0x4ae5 || 0x080026ac || 19 || Load [[Master_file_table|background palette]] file  (p=3x palette file ids)
|-
|-
| 0x6978 || 0x08002948 || 11 ||  
| 0x6978 || 0x08002948 || 11 ||  
Line 41: Line 41:
| 0xb426 || 0x0800f974 || 4 ||  
| 0xb426 || 0x0800f974 || 4 ||  
|-
|-
| 0x4d4d || 0x0800fc4c || 5 ||  
| 0x4d4d || 0x0800fc4c || 5 || OBJ palette related(?, p=?)
|-
|-
| 0x329b || 0x08010ccc || 1 ||  
| 0x329b || 0x08010ccc || 1 ||  
Line 289: Line 289:
| 0xb8b9 || 0x0823bbfc || 4 ||  
| 0xb8b9 || 0x0823bbfc || 4 ||  
|-
|-
| 0xc0b0 || 0x0823d518 || 277 ||  
| 0xc0b0 || 0x0823d518 || 277 || Camera_Create()
|-
|-
| 0x430d || 0x0823e0c4 || 685 ||  
| 0x430d || 0x0823e0c4 || 685 || 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.
|-
|-
| 0x794c || 0x0824173c || 3 ||  
| 0x794c || 0x0824173c || 3 ||  
|-
|-
| 0xb639 || 0x08241ee8 || 257 ||  
| 0xb639 || 0x08241ee8 || 257 || Unknown? Must be called for enemy spawning to work
|-
|-
| 0x2d36 || 0x08242a18 || 3 ||  
| 0x2d36 || 0x08242a18 || 3 ||  
Line 306: Line 308:
! ID || Address || # Uses || Description
! ID || Address || # Uses || Description
|-
|-
| 0x7a27 || 0x08000cb0 || 317 ||  
| 0x7a27 || 0x08000cb0 || 317 || 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 || 0x08000df4 || 6 ||  
| 0xe4b1 || 0x08000df4 || 6 ||  
|-
|-
| 0x11d4 || 0x08000eec || 310 || Video_LoadTileSet(t=?, c=tileset page ID? d=tileset file ID, m=tilemap file ID)
| 0x11d4 || 0x08000eec || 310 || 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 || 0x08001004 || 3 ||  
| 0x33aa || 0x08001004 || 3 ||  
Line 340: Line 355:
| 0x0955 || 0x0800720c || 3 ||  
| 0x0955 || 0x0800720c || 3 ||  
|-
|-
| 0xddcf || 0x08007640 || 7 ||  
| 0xddcf || 0x08007640 || 7 || Spawn chest?
|-
|-
| 0x90b4 || 0x080077a8 || 3 ||  
| 0x90b4 || 0x080077a8 || 3 ||  
Line 372: Line 387:
| 0x4383 || 0x08015df0 || 5 ||  
| 0x4383 || 0x08015df0 || 5 ||  
|-
|-
| 0x3535 || 0x08016db0 || 2 ||  
| 0x3535 || 0x08016db0 || 2 || Map_LoadGraphics(t=?, c=?, d=?)
|-
|-
| 0x7e73 || 0x08018860 || 1 ||  
| 0x7e73 || 0x08018860 || 1 ||  
Line 418: Line 433:
| 0xc556 || 0x0804780c || 16 ||  
| 0xc556 || 0x0804780c || 16 ||  
|-
|-
| 0x1c64 || 0x08047930 || 1216 ||  
| 0x1c64 || 0x08047930 || 1216 || Textbox_Open(r=string ref)
|-
|-
| 0xd401 || 0x08047a40 || 20 ||  
| 0xd401 || 0x08047a40 || 20 ||  
|-
|-
| 0xab3c || 0x08047b90 || 55 || TextBox_SetVar(n, value) - Access via <VAR=n> tags
| 0xab3c || 0x08047b90 || 55 || TextBox_SetVar(n, value) - Access via <VAR=n> tags in strings
|-
|-
| 0x2575 || 0x08047bd0 || 2 ||  
| 0x2575 || 0x08047bd0 || 2 ||  
Line 430: Line 445:
| 0x75af || 0x08047c2c || 83 ||  
| 0x75af || 0x08047c2c || 83 ||  
|-
|-
| 0xadd2 || 0x08047cbc || 8 ||  
| 0xadd2 || 0x08047cbc || 8 || TextBox_EnableAutoAdvance(?, delay_frames)
|-
|-
| 0xdd91 || 0x08047d28 || 15 ||  
| 0xdd91 || 0x08047d28 || 15 ||  
Line 466: Line 481:
| 0xcd57 || 0x0807b424 || 9 ||  
| 0xcd57 || 0x0807b424 || 9 ||  
|-
|-
| 0x650b || 0x0807b500 || 4 ||  
| 0x650b || 0x0807b500 || 4 || Create password menu
|-
|-
| 0xb603 || 0x0807b590 || 6 ||  
| 0xb603 || 0x0807b590 || 6 ||  
Line 594: Line 609:
| 0xccd9 || 0x0809c3c0 || 2 ||  
| 0xccd9 || 0x0809c3c0 || 2 ||  
|-
|-
| 0xc6aa || 0x0809c3cc || 352 ||  
| 0xc6aa || 0x0809c3cc || 352 || Textbox_CloseBox(m=?)
Without ‘m’ this is a nop?
|-
|-
| 0x2fa0 || 0x0809c404 || 11 ||  
| 0x2fa0 || 0x0809c404 || 11 ||  
Line 668: Line 684:
| 0x79b7 || 0x080a65f4 || 13 ||  
| 0x79b7 || 0x080a65f4 || 13 ||  
|-
|-
| 0x8089 || 0x080a6c4c || 2 ||  
| 0x8089 || 0x080a6c4c || 2 || Map_SpawnLoadingZoneIndicator(n=loading_zone_id)
|-
|-
| 0x7935 || 0x080a6e6c || 54 ||  
| 0x7935 || 0x080a6e6c || 54 || 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 || 0x080a6e9c || 46 ||  
| 0x7636 || 0x080a6e9c || 46 || 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 || 0x080a6f58 || 154 || rand(p=upper_bound)
| 0x3469 || 0x080a6f58 || 154 || 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 || 0x080a6fbc || 13 ||  
| 0x5f5f || 0x080a6fbc || 13 ||  
Line 948: Line 967:
| 0xbec2 || 0x0823bb4c || 13 ||  
| 0xbec2 || 0x0823bb4c || 13 ||  
|-
|-
| 0x30ad || 0x0823be3c || 3 ||  
| 0x30ad || 0x0823be3c || 3 || Map_LoadMap(p=[[Map file]] ID, ...=?)
|-
|-
| 0x7539 || 0x0823bf24 || 4 ||  
| 0x7539 || 0x0823bf24 || 4 ||  
Line 1,016: Line 1,035:
| 0x5365 || 0x0823ec50 || 3 ||  
| 0x5365 || 0x0823ec50 || 3 ||  
|-
|-
| 0x2f01 || 0x0823eca4 || 24 ||  
| 0x2f01 || 0x0823eca4 || 24 || Time_GetType(result: u8*)
0, 4, 5 = night, else = day
|-
|-
| 0x5933 || 0x0823ed48 || 2 ||  
| 0x5933 || 0x0823ed48 || 2 ||  
Line 1,056: Line 1,076:
| 0x31ff || 0x08242038 || 29 ||  
| 0x31ff || 0x08242038 || 29 ||  
|-
|-
| 0x305a || 0x08242c84 || 61 ||  
| 0x305a || 0x08242c84 || 61 || Inventory_GiveItem(i=item_id, n=amount)
|-
|-
| 0x3a5d || 0x08242d2c || 17 ||  
| 0x3a5d || 0x08242d2c || 17 || Inventory_RemoveItem(i=item, n=amount)
|-
|-
| 0x814c || 0x08242db0 || 49 ||  
| 0x814c || 0x08242db0 || 49 ||