From Dark Omen Wiki

Jump to: navigation, search

Legend for Parameters:
int - Integer
int* - Pointer to an integer
string - Pointer to a string

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 against LV depending on the value of compare_type (1: LV == val, 2: LV != val, 3: LV < val, 4: LV > 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 - Pushes LV on the stack. Placed at the beginning of a function jumped to by WH_GOSUB
0x41de10 WH_POPLV - Pops LV from the stack. Placed before a WH_RETURN call
0x41de20 WH_SETLV int lv Not used. Sets the value of 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 string movie Plays the video sequence pointed to by movie.
0x41da00 WH_Narration - Stub.
0x41c970 WH_MeetingPoint string backgroundimage, int speechaddr Displays a background Image and plays a conversation script pointed to by speechaddr
0x41ca00 WH_TravelMap string map, string townspr, string dotfile, int i1..i7 Displays the mapfile map in the background, displays the town names from the townsprite file and uses the dotfile for plotting. i1 and i2 have an unknown use and i3 to i7 seam to be ignored?
0x41cb10 WH_Deploy - Stub. Used before a WH_BATTLE call.
0x41cb20 WH_Battle string 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 Writes 1 to LV if the regiment with the unitId has at least one alive unit.
0x41ce20 WH_GetUnitHireStatus int unitId Writes 1 to LV if the regiment with the unitId has the "Active Status"-Bit (Bit 0) set.
0x41ce80 WH_AddUnit int unidId Sets the Active-Bit of the regiment with the unitId. All these bitoperations modify the Status-Variable of the unit.
0x41ced0 WH_RemoveUnit int unitId Clears the Active-Bit of the regiment with unitId and removes all Magic Items from the regiment and adds them to the global storage.
0x41da10 WH_WriteTextToFile - Stub.
0x41da20 WH_SetUnitVar - Stub.
0x41da30 WH_ReadUnitVar - Stub.
0x41dee0 WH_SetVariable int* variable, int value Sets the pointed variable to value.
0x41df00 WH_ReadVariable int* variable, int value Reads the pointed variable into LV
0x41d620 WH_AddCash int amount Adds money to the Army
0x41d970 WH_GameOver - Ends the Campaign and returns to the Main Menu.
0x41da40 WH_DisableAutosave - Stub.
0x41df20 WH_ClearVariables int startaddr, int n Writes n zero bytes starting at startaddr.
0x41cfb0 WH_ForceUnit int unitId Sets the "Auto Deploy"-Bit (Bit 3) of the regiment with the unitId.
0x41cff0 WH_UnForceUnit int unitId Clears the "Auto Deploy"-Bit of the regiment with the unitId.
0x41d040 WH_ExcludeUnit int unitId Sets the Inactive-Bit (Bit 6) of the regiment with the unitId.
0x41d080 WH_IncludeUnit int unitId Clears the Inactive-Bit of the regiment with the unitId.
0x41d0d0 WH_TemporyUnitSet int unitId Sets the "Temporary Unit"-Bit (Bit 8) of the regiment with the unitId. (Green arrow)
0x41d120 WH_TemporyUnitClear int unitId Clears the "Temporary Unit"-Bit of the regiment with the unitId.
0x41d170 WH_UnitIsGoingSet int unitId Sets the "Temporary about to leave"-Bit of the regiment with the unitId. (Red arrow)
0x41d1c0 WH_UnitIsGoingClear int unitId Clears the "Temporary about to leave"-Bit of the regiment with the unitId.
0x41cab0 WH_Book - No idea. Displays the Unit Book?
0x41c9d0 WH_MeetingWait - Unknown. Only used once.
0x41cb40 WH_InitDebrief int winmessage, int losemessage Index in an array that contains the texts depending on if the mission was won or lost.
0x41cb70 WH_Debrief - Unknown. Only used once.
0x41cae0 WH_SaveGame - Displays the Save Dialog?
0x41cba0 WH_Picture string file Unused. Loads the file and does something...
0x41cc00 WH_Delay int delay sleep-command?
0x41cce0 WH_Pause int i Unknown. Only used once.
0x41cd90 WH_HideMouse - Unused. Hides the mouse cursor?
0x41cda0 WH_ShowMouse - Unused. Shows the mouse cursor?
0x41cbe0 WH_SetDeafultSaveName string savename Sets the savename suggested in the save dialog (The typo is not my fault).
0x41d640 WH_AddMagic int item Adds a magic item to the army.
0x41d690 WH_RemoveMagic int item Removes all occurences of item from the army. I recommend selling it before this function is called ;).
0x41d870 WHMTG_DisplayBitmap string picture, int x, int y Displays a Bitmap loaded from a file at x-y-location.
0x41d8a0 WHMTG_RemoveBitmap - Removes the Bitmap loaded by WHMTG_DisplayBitmap.
0x41d210 WH_CheckObjective int index Checks something in an objective-array at index against 1 and sets LV to 1 on success.
0x41d250 WH_SetObjective int index, int value Not used. Sets the value in the objective-array at index
0x41d550 WHMTG_Voice string file Plays a file. Used for the Necromancervoice that reads the note in the briefing at Bogenhafen.
0x41d8b0 WHMTG_SpotAnim int a, int b, int x, int y No idea. Guess this is used to place interactive objects in the background of the scene at x and y.
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 - Stub.
0x41da60 WHMTG_StopAnim - Stub.
0x41da70 WHMTG_PlayAnim - Stub.
0x41da80 WHMTG_LoadHeads - Stub.
0x41da90 WHMTG_ShowHead - Stub.
0x41d2a0 WHMTG_Speak
0x41d360 WHMTG_SpeakNoWait
0x41d420 WHMTG_Narrate
0x41daa0 WHMTG_AddOption - Stub.
0x41dab0 WHMTG_ChooseOption - Stub.
0x41dac0 WHMTG_HideHead - Stub.
0x41d410 WHMTG_Wait
0x41d9f0 WHMTG_PlaySample - Stub.
0x41dad0 WHMTG_PlaySampleNoWait - Stub.
0x41dae0 WHMTG_LoadDots - Stub.
0x41db10 WHMTG_PlayDots - Stub.
0x41db20 WHMTG_WaitForDots - Stub.
0x41db30 WHMTG_FinishDots - Stub.
0x41db40 WHMTG_ContinuePrompt - Stub.
0x41daf0 WHMTG_SetResult - Stub.
0x41d280 WHMTG_AddBitmap
0x41db00 WHMTG_RemoveBitmap - Please use the other WHMTG_RemoveBitmap. This is a stub.
0x41db50 WHMTG_ResetDotList - Stub.
Personal tools