DO/WHMTG/OpCodes

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(opCode table. Params and Explanation follow later)
(some opcode descs)
Line 5: Line 5:
int*  - Pointer to an integer<br />
int*  - Pointer to an integer<br />
char* - Pointer to a string<br />
char* - Pointer to a string<br />
 +
...  - Dynamic amount of parameters<br />
</div>
</div>
Line 12: Line 13:
| 0x41db60
| 0x41db60
| WH_GOTO
| WH_GOTO
-
|
+
| int addr
-
|
+
| Continues execution of the script at addr
|-
|-
| 0x41db80
| 0x41db80
| WH_IF
| WH_IF
-
|
+
| int compare_type, int val
-
|
+
| Does a compare depending on the value of compare_type (1: != val, 2: == val, 3: >= val, 4: <= val
|-
|-
| 0x41dc30
| 0x41dc30
| WH_ENDIF
| WH_ENDIF
-
|
+
| -
-
|
+
| Ends a WH_IF condition
|-
|-
| 0x41dc60
| 0x41dc60
| WH_ELSE
| WH_ELSE
-
|
+
| -
-
|
+
| Optional Else case for a WH_IF condition
|-
|-
| 0x41dc80
| 0x41dc80
| WH_GOSUB
| WH_GOSUB
-
|
+
| int addr
-
|
+
| Same as WH_GOTO but allows returning
|-
|-
| 0x41dcd0
| 0x41dcd0
| WH_RETURN
| WH_RETURN
-
|
+
| -
-
|
+
| Jumps to the function placed after the last WH_GOSUB call
|-
|-
| 0x41de30
| 0x41de30
| WH_DO
| WH_DO
-
|
+
| int unk
-
|
+
| Not used. In theory runs up to a WH_LOOP call and then repeats or breaks.
|-
|-
| 0x41ddf0
| 0x41ddf0
| WH_PUSHLV
| WH_PUSHLV
-
|
+
| -
-
|
+
| Placed at the beginning of a function jumped to by WH_GOSUB
|-
|-
| 0x41de10
| 0x41de10
| WH_POPLV
| WH_POPLV
-
|
+
| -
-
|
+
| Placed before a WH_RETURN call
|-
|-
| 0x41de20
| 0x41de20
| WH_SETLV
| WH_SETLV
-
|
+
| int lv
-
|
+
| Not used. Changes the value of the LV.
|-
|-
| 0x41de60
| 0x41de60
| WH_LOOP
| WH_LOOP
-
|
+
| int unk
-
|
+
| Not used. Maybe jumps back to WH_DO
|-
|-
| 0x41dd00
| 0x41dd00
| WH_REPEAT
| WH_REPEAT
-
|
+
| -
-
|
+
| The used alternative of WH_DO.
|-
|-
| 0x41dd20
| 0x41dd20
| WH_UNTIL
| WH_UNTIL
-
|
+
| int compare_type, int val
-
|
+
| Jumps to WH_REPEAT if the comparison is true (see WH_IF)
|-
|-
| 0x41dec0
| 0x41dec0
| WH_BREAK
| WH_BREAK
-
|
+
| -
-
|
+
| Not used. In theory it breaks a WH_DO and WH_REPEAT
|-
|-
| 0x41ded0
| 0x41ded0
| WH_END
| WH_END
-
|
+
| -
-
|
+
| Stub function (= does nothing). Looks like this marks the end of a Conversation (Removes the heads?)
|-
|-
| 0x41c910
| 0x41c910
| WH_Test
| WH_Test
-
|
+
| int param
-
|
+
| Not used. Reads the param and throws it away.
|-
|-
| 0x41c920
| 0x41c920
| WH_PlayMovie
| WH_PlayMovie
-
|
+
| char* movie
-
|
+
| Plays the video sequence pointed to by movie.
|-
|-
| 0x41da00
| 0x41da00
| WH_Narration
| WH_Narration
-
|
+
| -
-
|
+
| Stub.
|-
|-
| 0x41c970
| 0x41c970
| WH_MeetingPoint
| WH_MeetingPoint
-
|
+
| char* backgroundimage, int speechaddr
-
|
+
| Displays a background Image and plays a conversation script pointed to by speechaddr
|-
|-
| 0x41ca00
| 0x41ca00
| WH_TravelMap
| WH_TravelMap
-
|
+
| char* map, char* townspr, char* dotfile, int ...
-
|
+
| Displays the mapfile map in the background, displays the town names from the townsprite file and uses the dotfile for plotting. Other params unknown.
|-
|-
| 0x41cb10
| 0x41cb10
| WH_Deploy
| WH_Deploy
-
|
+
| -
-
|
+
| Stub. Used before a WH_BATTLE call.
|-
|-
| 0x41cb20
| 0x41cb20
| WH_Battle
| WH_Battle
-
|
+
| char* battlefolder, int unk
-
|
+
| Loads the prj file that has the same name as the battlefolder and passes an unknown param.
|-
|-
| 0x41cdc0
| 0x41cdc0
| WH_GetUnitStatus
| WH_GetUnitStatus
-
|
+
| int unitId
-
|
+
| Used as compare value for WH_IF (and WH_UNTIL). 1 if the unit is alive?
|-
|-
| 0x41ce20
| 0x41ce20

Revision as of 12:07, 6 September 2010


Legend for Parameters:
int - Integer
int* - Pointer to an integer
char* - Pointer to a string
... - Dynamic amount of parameters

Op Mnemonic Parameter Explanation
0x41db60 WH_GOTO int addr Continues execution of the script at addr
0x41db80 WH_IF int compare_type, int val Does a compare depending on the value of compare_type (1: != val, 2: == val, 3: >= val, 4: <= val
0x41dc30 WH_ENDIF - Ends a WH_IF condition
0x41dc60 WH_ELSE - Optional Else case for a WH_IF condition
0x41dc80 WH_GOSUB int addr Same as WH_GOTO but allows returning
0x41dcd0 WH_RETURN - Jumps to the function placed after the last WH_GOSUB call
0x41de30 WH_DO int unk Not used. In theory runs up to a WH_LOOP call and then repeats or breaks.
0x41ddf0 WH_PUSHLV - Placed at the beginning of a function jumped to by WH_GOSUB
0x41de10 WH_POPLV - Placed before a WH_RETURN call
0x41de20 WH_SETLV int lv Not used. Changes the value of the LV.
0x41de60 WH_LOOP int unk Not used. Maybe jumps back to WH_DO
0x41dd00 WH_REPEAT - The used alternative of WH_DO.
0x41dd20 WH_UNTIL int compare_type, int val Jumps to WH_REPEAT if the comparison is true (see WH_IF)
0x41dec0 WH_BREAK - Not used. In theory it breaks a WH_DO and WH_REPEAT
0x41ded0 WH_END - Stub function (= does nothing). Looks like this marks the end of a Conversation (Removes the heads?)
0x41c910 WH_Test int param Not used. Reads the param and throws it away.
0x41c920 WH_PlayMovie char* movie Plays the video sequence pointed to by movie.
0x41da00 WH_Narration - Stub.
0x41c970 WH_MeetingPoint char* backgroundimage, int speechaddr Displays a background Image and plays a conversation script pointed to by speechaddr
0x41ca00 WH_TravelMap char* map, char* townspr, char* dotfile, int ... Displays the mapfile map in the background, displays the town names from the townsprite file and uses the dotfile for plotting. Other params unknown.
0x41cb10 WH_Deploy - Stub. Used before a WH_BATTLE call.
0x41cb20 WH_Battle char* battlefolder, int unk Loads the prj file that has the same name as the battlefolder and passes an unknown param.
0x41cdc0 WH_GetUnitStatus int unitId Used as compare value for WH_IF (and WH_UNTIL). 1 if the unit is alive?
0x41ce20 WH_GetUnitHireStatus
0x41ce80 WH_AddUnit
0x41ced0 WH_RemoveUnit
0x41da10 WH_WriteTextToFile
0x41da20 WH_SetUnitVar
0x41da30 WH_ReadUnitVar
0x41dee0 WH_SetVariable
0x41df00 WH_ReadVariable
0x41d620 WH_AddCash
0x41d970 WH_GameOver
0x41da40 WH_DisableAutosave
0x41df20 WH_ClearVariables
0x41cfb0 WH_ForceUnit
0x41cff0 WH_UnForceUnit
0x41d040 WH_ExcludeUnit
0x41d080 WH_IncludeUnit
0x41d0d0 WH_TemporyUnitSet
0x41d120 WH_TemporyUnitClear
0x41d170 WH_UnitIsGoingSet
0x41d1c0 WH_UnitIsGoingClear
0x41cab0 WH_Book
0x41c9d0 WH_MeetingWait
0x41cb40 WH_InitDebrief
0x41cb70 WH_Debrief
0x41cae0 WH_SaveGame
0x41cba0 WH_Picture
0x41cc00 WH_Delay
0x41cce0 WH_Pause
0x41cd90 WH_HideMouse
0x41cda0 WH_ShowMouse
0x41cbe0 WH_SetDeafultSaveName
0x41d640 WH_AddMagic
0x41d690 WH_RemoveMagic
0x41d870 WHMTG_DisplayBitmap
0x41d8a0 WHMTG_RemoveBitmap
0x41d210 WH_CheckObjective
0x41d250 WH_SetObjective
0x41d550 WHMTG_Voice
0x41d8b0 WHMTG_SpotAnim
0x41d970 WH_GameOver2
0x41d950 WHMTG_ChooseInit
0x41d740 WHMTG_PlaySFX
0x41d720 WHMTG_StopSFX
0x41d980 WHMTG_StopAllSFX
0x41d9a0 WHMTG_PlayMusic
0x41d9b0 WHMTG_StopMusic
0x41d9c0 WHMTG_SetMusic
0x41d9e0 WHMTG_SetBackground
0x41da50 WHMTG_StartAnimAsync
0x41da60 WHMTG_StopAnim
0x41da70 WHMTG_PlayAnim
0x41da80 WHMTG_LoadHeads
0x41da90 WHMTG_ShowHead
0x41d2a0 WHMTG_Speak
0x41d360 WHMTG_SpeakNoWait
0x41d420 WHMTG_Narrate
0x41daa0 WHMTG_AddOption
0x41dab0 WHMTG_ChooseOption
0x41dac0 WHMTG_HideHead
0x41d410 WHMTG_Wait
0x41d9f0 WHMTG_PlaySample
0x41dad0 WHMTG_PlaySampleNoWait
0x41dae0 WHMTG_LoadDots
0x41db10 WHMTG_PlayDots
0x41db20 WHMTG_WaitForDots
0x41db30 WHMTG_FinishDots
0x41db40 WHMTG_ContinuePrompt
0x41daf0 WHMTG_SetResult
0x41d280 WHMTG_AddBitmap
0x41db00 WHMTG_RemoveBitmap2
0x41db50 WHMTG_ResetDotList
Personal tools
communication