DO/CTL/OpCodes
From Dark Omen Wiki
Op | Mnemonic | Parameter | Explanation |
---|---|---|---|
01 | wait_for_deploy
| - | Pause script until deployment is finished |
02 | reset_call_stack
| - | ? |
04 | saveip
| - | Saves Instruction Pointer |
05 | do
| - | |
06 | always
| - | Jump to last do statement |
07 | while
| - | Jump to do if previous statement is true |
08 | whilenot
| - | Jump to do if previous statement is false |
09 | for
| - | |
0A | next
| - | |
0B | goto
| func_id | Jump to func_id |
0E | call
| func_id | Jump to func_id, save return pos |
11 | gosub
| func_id | Jump to func_id (is return pos saved?) |
12 | return
| - | Continue from last call statement |
15 | sleep
| - | Wait for a while... |
16 | if_true_sleep
| - | Wait for a while if last statement was true |
17 | if_true_skip
| - | ? |
18 | set_wait_time
| time | set wait-time of wait to time |
19 | test_wait_over
| - | true if wait-time is reached |
1A | wait
| - | Same as sleep but time can be set |
1B | set_x_i
| value | ? |
1C | add_x_i
| value | ? |
1D | test_x_eq_0
| true if value == 0 | |
1E | set_r_i
| register, value | Set register to value |
1F | add_r_i
| register, value | reg_value = reg_value + value |
20 | test_r_eq_i
| register, value | true if register == value |
21 | test_r_eq_r
| register1, register2 | true if register1 == register2 |
28 | move_to
| subchunk_id | Unit moves to subchunk with id subchunk_id |
2E | move_to_add_reg0
| subchunk_id | Unit moves to subchunk_id+reg0 |
34 | clear_unit_flag
| flag | Remove Flag of caller |
35 | set_unit_flag
| flag | Set flag of caller |
36 | wait_for_unit_flag
| flag | Wait until flag of caller is set |
38 | test_unit_flag
| flag | true if flag of caller is set |
39 | set_ctrl_flag
| flag | Set flag of CTL-Engine |
3A | clear_ctrl_flag
| flag | Clear flag of CTL-Engine |
3B | test_ctrl_flag
| flag | true if CTL-Engine-Flag flag is set |
52 | move_rand_in_radius
| waypoint_id (<11>) | Move to a random position in the radius of the waypoint Used for Peasants |
72 | switch
| - | Continue execution at an event Id |
73 | endswitch
| - | |
74 | case
| event_id | Could be an event id |
75 | cbrk
| value | leave the switch-statement. Value is unknown |
76 | iftrue
| - | |
77 | iffalse
| - | |
78 | else
| - | |
79 | endif
| - | |
AC | check_damage
| unk, dead_units (%), unk | true if percentage of dead_units is reached |
AE | play
| voice_id | display portrait of caller and say text voice_id |
B3 | waypoint_reached
| subsection_id | true if unit reached subsection_id |
D8 | test_unit_alive
| unit_id | true if unit_id is still alive? |
D9 | test_user_action
| ? | |
DA | ui_effect
| x, y, size | display 4 arrows that are placed around a rectangle If x and y are -1 size is the unit_id |
E0 | test_other_unit_flags
| unit_id, flag | true if flag of unit_id is set |
E2 | test_unit_selected
| unit_id | true if unit with unit_id is selected |
E6 | test_mapmode
| - | true if worldmap (spacebar) is displayed |
EA | test_wait
| - | true if last "play" if finished |
ED | fail_mission
| - | Display "End Mission" message |
likely and tested
Highly likely but not tested
Guess and/or untested
|