Template:Engine calls/Boktai 2: Difference between revisions
Appearance
Prepare for engine call merge |
Automated engine call table merge |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
'''DO NOT''' edit this page! Edit [[Template:Engine calls]] instead! Any changes you make manually here ''will be overwritten'' by the bot! | '''DO NOT''' edit this page! Edit [[Template:Engine calls]] instead! Any changes you make manually here ''will be overwritten'' by the bot! | ||
</noinclude> | </noinclude> | ||
= control 0x9906 = | = control 0x9906 = | ||
{| class="wikitable exportable" | {| class="wikitable exportable" | ||
| Line 13: | Line 12: | ||
| 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 40: | ||
| 0xb426 || 0x0800f974 || 4 || | | 0xb426 || 0x0800f974 || 4 || | ||
|- | |- | ||
| 0x4d4d || 0x0800fc4c || 5 || | | 0x4d4d || 0x0800fc4c || 5 || OBJ palette related(?, p=?) | ||
|- | |- | ||
| 0x329b || 0x08010ccc || 1 || | | 0x329b || 0x08010ccc || 1 || | ||
| Line 51: | Line 50: | ||
| 0xe534 || 0x08012b44 || 2 || | | 0xe534 || 0x08012b44 || 2 || | ||
|- | |- | ||
| 0x9519 || 0x0801314c || 1 || | | 0x9519 || 0x0801314c || 1 || PasswordScreen_Create | ||
|- | |- | ||
| 0xec96 || 0x080134f8 || 4 || | | 0xec96 || 0x080134f8 || 4 || | ||
| Line 111: | Line 110: | ||
| 0x6273 || 0x0804a4a8 || 10 || | | 0x6273 || 0x0804a4a8 || 10 || | ||
|- | |- | ||
| 0x3df7 || 0x0804a904 || 8 || | | 0x3df7 || 0x0804a904 || 8 || Credits_Create | ||
|- | |- | ||
| 0xb88c || 0x0804b144 || 1 || | | 0xb88c || 0x0804b144 || 1 || | ||
| Line 119: | Line 118: | ||
| 0xd53d || 0x0804ecb4 || 2 || | | 0xd53d || 0x0804ecb4 || 2 || | ||
|- | |- | ||
| 0x9284 || 0x0804f708 || 1 || | | 0x9284 || 0x0804f708 || 1 || CrossoverLobby_Create | ||
|- | |- | ||
| 0xaf33 || 0x08050bac || 1 || | | 0xaf33 || 0x08050bac || 1 || | ||
| Line 133: | Line 132: | ||
| 0x3d0c || 0x08055a8c || 4 || | | 0x3d0c || 0x08055a8c || 4 || | ||
|- | |- | ||
| 0xf5eb || 0x0807f538 || 36 || | | 0xf5eb || 0x0807f538 || 36 || Django_SpawnScripted | ||
|- | |- | ||
| 0x5941 || 0x0807f6f8 || 1 || | | 0x5941 || 0x0807f6f8 || 1 || | ||
| Line 239: | Line 238: | ||
| 0xc419 || 0x081d1510 || 11 || | | 0xc419 || 0x081d1510 || 11 || | ||
|- | |- | ||
| 0xa16f || 0x081d57bc || 52 || | | 0xa16f || 0x081d57bc || 52 || ElevatorController_Create() - Call this before creating any elevators with engine call 0xa4fc | ||
|- | |- | ||
| 0xc60f || 0x081d886c || 3 || | | 0xc60f || 0x081d886c || 3 || | ||
| Line 267: | Line 266: | ||
| 0x8d2d || 0x08211a38 || 1 || | | 0x8d2d || 0x08211a38 || 1 || | ||
|- | |- | ||
| 0x52bf || 0x0821253c || 1 || | | 0x52bf || 0x0821253c || 1 || AlbumMenu_Create | ||
|- | |- | ||
| 0x4ddf || 0x082128b0 || 1 || | | 0x4ddf || 0x082128b0 || 1 || | ||
| Line 289: | Line 288: | ||
| 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 307: | ||
! 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= | | 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 354: | ||
| 0x0955 || 0x0800720c || 3 || | | 0x0955 || 0x0800720c || 3 || | ||
|- | |- | ||
| 0xddcf || 0x08007640 || 7 || | | 0xddcf || 0x08007640 || 7 || Spawn chest? | ||
|- | |- | ||
| 0x90b4 || 0x080077a8 || 3 || | | 0x90b4 || 0x080077a8 || 3 || | ||
| Line 372: | Line 386: | ||
| 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 432: | ||
| 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 444: | ||
| 0x75af || 0x08047c2c || 83 || | | 0x75af || 0x08047c2c || 83 || | ||
|- | |- | ||
| 0xadd2 || 0x08047cbc || 8 || | | 0xadd2 || 0x08047cbc || 8 || TextBox_EnableAutoAdvance(?, delay_frames) | ||
|- | |- | ||
| 0xdd91 || 0x08047d28 || 15 || | | 0xdd91 || 0x08047d28 || 15 || | ||
| Line 438: | Line 452: | ||
| 0xd935 || 0x0804e1f0 || 1 || | | 0xd935 || 0x0804e1f0 || 1 || | ||
|- | |- | ||
| 0xc015 || 0x0804e660 || 1 || | | 0xc015 || 0x0804e660 || 1 || Crossover_LoadMappingBuf | ||
|- | |- | ||
| 0x877f || 0x08050d4c || 3 || | | 0x877f || 0x08050d4c || 3 || | ||
| Line 466: | Line 480: | ||
| 0xcd57 || 0x0807b424 || 9 || | | 0xcd57 || 0x0807b424 || 9 || | ||
|- | |- | ||
| 0x650b || 0x0807b500 || 4 || | | 0x650b || 0x0807b500 || 4 || Create password menu | ||
|- | |- | ||
| 0xb603 || 0x0807b590 || 6 || | | 0xb603 || 0x0807b590 || 6 || | ||
| Line 500: | Line 514: | ||
| 0x6f85 || 0x0807d348 || 2 || | | 0x6f85 || 0x0807d348 || 2 || | ||
|- | |- | ||
| 0x3613 || 0x0807d370 || 240 || | | 0x3613 || 0x0807d370 || 240 || Django_Lock() - Takes the player's control away, mostly for cutscenes. | ||
|- | |- | ||
| 0x9ffd || 0x0807d3a0 || 15 || | | 0x9ffd || 0x0807d3a0 || 15 || | ||
|- | |- | ||
| 0x933c || 0x0807d440 || 53 || | | 0x933c || 0x0807d440 || 53 || Django_MoveTo(p=(x,y,z), e=callback script ID, d=?) - Causes Django to walk somewhere. Mostly for cutscenes. | ||
|- | |- | ||
| 0xe990 || 0x0807d4c0 || 1 || | | 0xe990 || 0x0807d4c0 || 1 || | ||
| Line 554: | Line 568: | ||
| 0x4cdd || 0x0807dd68 || 17 || | | 0x4cdd || 0x0807dd68 || 17 || | ||
|- | |- | ||
| 0x4c4d || 0x0807ddd4 || 22 || | | 0x4c4d || 0x0807ddd4 || 22 || Django_Unlock() - Undoes the effect of engine call 0x3613. | ||
|- | |- | ||
| 0x30cc || 0x0807ddf4 || 3 || | | 0x30cc || 0x0807ddf4 || 3 || | ||
| Line 594: | Line 608: | ||
| 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 683: | ||
| 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= | | 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 766: | Line 784: | ||
| 0x1e97 || 0x080ef830 || 2 || | | 0x1e97 || 0x080ef830 || 2 || | ||
|- | |- | ||
| 0x05a5 || 0x081030d4 || 2 || | | 0x05a5 || 0x081030d4 || 2 || BokEnemy_Create | ||
|- | |- | ||
| 0xad03 || 0x0811572c || 6 || | | 0xad03 || 0x0811572c || 6 || | ||
| Line 830: | Line 848: | ||
| 0xab8e || 0x081d24dc || 2 || | | 0xab8e || 0x081d24dc || 2 || | ||
|- | |- | ||
| 0xa4fc || 0x081d4ea4 || 11 || | | 0xa4fc || 0x081d4ea4 || 11 || Elevator_Create(...)<br> | ||
Creates an elevator. This only works after calling engine call 0xa16f. There are many possible keywords, this is just a subset:<br> | |||
r: Spawn point. Should be 3 values: (path_id, 0, 0). The zeroes probably mean something. The path_id sets the spawn point of the elevator, that should be a [[Collision_map_file#Paths|path]] with 1 node. Only the X/Y coordinates of the node are relevant.<br> | |||
Y: height range and initial position of the elevator. The order is (probably) min_y, max_y, initial_y.<br> | |||
n: ID of the elevator. Used for controlling them later.<br> | |||
f: Set to 0 or Django does strange things.<br> | |||
m: Seems to affect how the callback (keyword R) gets called? 6 seems to be a safe value.<br> | |||
k: Should be 2, 0 makes weird lava elevators, other values crash the game?<br> | |||
R: Callback script ID, will be called when the elevator reaches its destination (but only if Django is on it?)<br> | |||
s: Speed. The most common value is 16.<br> | |||
T: Graphics. 1 is a basic iron platform, 0/2/3 are other options, there may be even mroe.<br> | |||
|- | |- | ||
| 0x7e33 || 0x081d58d0 || 14 || | | 0x7e33 || 0x081d58d0 || 14 || Elevator_Start(n=elevator ID, m=direction (1=down, 2=up, others?)) | ||
|- | |- | ||
| 0xae3a || 0x081d5958 || 7 || | | 0xae3a || 0x081d5958 || 7 || | ||
| Line 948: | Line 976: | ||
| 0xbec2 || 0x0823bb4c || 13 || | | 0xbec2 || 0x0823bb4c || 13 || | ||
|- | |- | ||
| 0x30ad || 0x0823be3c || 3 || | | 0x30ad || 0x0823be3c || 3 || Map_LoadMap(p=[[Map file]] ID, ...=?) | ||
|- | |- | ||
| 0x7539 || 0x0823bf24 || 4 || | | 0x7539 || 0x0823bf24 || 4 || Camera_SetTilemapOffset | ||
|- | |- | ||
| 0x2141 || 0x0823c658 || 1 || | | 0x2141 || 0x0823c658 || 1 || | ||
| Line 956: | Line 984: | ||
| 0x9769 || 0x0823c670 || 72 || | | 0x9769 || 0x0823c670 || 72 || | ||
|- | |- | ||
| 0x8071 || 0x0823c6d4 || 120 || | | 0x8071 || 0x0823c6d4 || 120 || Camera_PanTo(p=(x,y,z), f=duration_frames, R=callback script ID (optional)) - For cutscenes | ||
|- | |- | ||
| 0xc15e || 0x0823c7d0 || 12 || | | 0xc15e || 0x0823c7d0 || 12 || | ||
|- | |- | ||
| 0xf341 || 0x0823c88c || 41 || | | 0xf341 || 0x0823c88c || 41 || Camera_Reset(f=duration_frames, R=callback script ID (optional)) - Centers the camera on Django (useful to undo engine call 0x3824) | ||
|- | |- | ||
| 0xcaee || 0x0823c8b0 || 2 || | | 0xcaee || 0x0823c8b0 || 2 || | ||
| Line 966: | Line 994: | ||
| 0x184b || 0x0823cb2c || 12 || Camera_ConnectToTilemap(...) - Positions the camera on the tile map (call every frame) | | 0x184b || 0x0823cb2c || 12 || Camera_ConnectToTilemap(...) - Positions the camera on the tile map (call every frame) | ||
|- | |- | ||
| 0x180b || 0x0823cc20 || 1 || | | 0x180b || 0x0823cc20 || 1 || Camera_SetBoundsType2Scripted | ||
|- | |- | ||
| 0x0272 || 0x0823d5a8 || 1 || | | 0x0272 || 0x0823d5a8 || 1 || | ||
| Line 1,016: | Line 1,044: | ||
| 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 || | ||
|- | |- | ||
| 0x53bf || 0x08240ba4 || 25 || | | 0x53bf || 0x08240ba4 || 25 || Sound_PlayMusic(i=sound ID) - Plays music. Exactly the same as engine call 0xe7ca. | ||
|- | |- | ||
| 0xe7ca || 0x08240bbc || 200 || | | 0xe7ca || 0x08240bbc || 200 || Sound_PlaySfx(i=sound ID) - Plays a sound effect. Exactly the same as engine call 0x53bf. | ||
|- | |- | ||
| 0x364d || 0x08240c20 || 9 || | | 0x364d || 0x08240c20 || 9 || | ||
| Line 1,056: | Line 1,085: | ||
| 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 || | ||
| Line 1,207: | Line 1,236: | ||
| 0x7659 || 0x080ed9ac || | | 0x7659 || 0x080ed9ac || | ||
|- | |- | ||
| 0xc1f2 || 0x080eda78 || | | 0xc1f2 || 0x080eda78 || Enemy_Sleep(n=enemy id) - Makes an enemy fall asleep | ||
|- | |- | ||
| 0x286b || 0x080edd04 || | | 0x286b || 0x080edd04 || | ||
| Line 1,223: | Line 1,252: | ||
| 0xdfab || 0x081d2098 || | | 0xdfab || 0x081d2098 || | ||
|- | |- | ||
| 0xb1c4 || 0x081d5814 || | | 0xb1c4 || 0x081d5814 || Elevator_Shake(n=elevator ID) - Shakes an elevator for 1 frame | ||
|- | |- | ||
| 0x7a75 || 0x081d584c || | | 0x7a75 || 0x081d584c || | ||