Difference between revisions of "Kyra/Opcodes"

Jump to navigation Jump to search
498 bytes added ,  17:23, 16 June 2005
disambiguate arguments
m (more arg numbers)
(disambiguate arguments)
Line 18: Line 18:


===Commands===
===Commands===
'''A note on arguments:''' parameters are pushed onto the stack before executing the command:
<code>
  44 FE push FE
  44 00 push 00
  44 00 push 00 // string ID - the first string in the TEXT segment will be displayed
  4E 01 execute 01 // display string
  4C 03 add sp, 03 // discard the 3 pushed values
</code>
The arguments are listed in reverse order in this document (first in - last out):
<code>
  01 Cmd_Character_Says 3 args (stringID, unk, unk)
</code>


There's still a little confusion about the numbering, so don't take anything below for granted.
There's still a little confusion about the numbering, so don't take anything below for granted.
Line 24: Line 40:


   00? Cmd_Magic_In_Mouse_Item 00
   00? Cmd_Magic_In_Mouse_Item 00
   01 Cmd_Character_Says 3 args (unk, unk, stringID) - also see 34
   01 Cmd_Character_Says 3 args (stringID, unk, unk) - also see 34
   02? Cmd_Pause_Ticks 02
   02? Cmd_Pause_Ticks 02
   03? Cmd_Draw_Scene_Anim_Shape 03
   03? Cmd_Draw_Scene_Anim_Shape 03
Line 34: Line 50:
   09? Cmd_Block_In_Walkable_Region 09
   09? Cmd_Block_In_Walkable_Region 09
   0A? Cmd_Block_Out_Walkable_Region 0A
   0A? Cmd_Block_Out_Walkable_Region 0A
   0B Cmd_Walk_Player_To_Point 4 args (unk, x, x, y) - x may be be greater than 0xFF, y must not, so only 1 byte for that
   0B Cmd_Walk_Player_To_Point 4 args (y, x, x, unk) - x may be be greater than 0xFF, y must not, so only 1 byte for that
   0C? Cmd_Drop_Item_In_Scene 0C
   0C? Cmd_Drop_Item_In_Scene 0C
   0D Cmd_Draw_Anim_Shape_Into_Scene 4 args (remove item from screen?) (removes note from desk)
   0D Cmd_Draw_Anim_Shape_Into_Scene 4 args (remove item from screen?) (removes note from desk)
   0E Cmd_Create_Mouse_Item 1 arg  (itemID) - pick up item; ie mousecursor=item id
   0E Cmd_Create_Mouse_Item 1 arg  (itemID) - pick up item; ie mousecursor=item id
   0F Cmd_Save_Page_To_Disk tries to write sth to disk, filename = string ID of last push
   0F Cmd_Save_Page_To_Disk tries to write sth to disk, filename = stringID of last push
    
    
   10? Cmd_Load_Page_From_Disk 10
   10? Cmd_Load_Page_From_Disk 10
Line 84: Line 100:
   32? Cmd_Restore_All_Object_Backgrounds 32
   32? Cmd_Restore_All_Object_Backgrounds 32
   33? Cmd_Set_Custom_Palette_Range 33
   33? Cmd_Set_Custom_Palette_Range 33
   34 Cmd_Custom_Print_Talk_String 4 args (color, unk, unk, stringid) - see also 01
   34 Cmd_Custom_Print_Talk_String 4 args (stringID, unk, unk, color) - see also 01, color=palette entry
   35 Cmd_Restore_Custom_Print_Background 0 args ; restore text background?
   35 Cmd_Restore_Custom_Print_Background 0 args ; restore text background?
   36 Cmd_Hide_Mouse 0 args
   36 Cmd_Hide_Mouse 0 args
Line 92: Line 108:
   3A Cmd_Change_Characters_Facing 3 args
   3A Cmd_Change_Characters_Facing 3 args
   3B? Cmd_Copy_WSA_Region 3B
   3B? Cmd_Copy_WSA_Region 3B
   3C Cmd_Text_Print 5 args (unk, unk, y,x,stringID)? prints text on brynn's note
   3C Cmd_Text_Print 5 args (stringID, x, y, unk, unk)? prints text on brynn's note
   3D? Cmd_Random 3D
   3D? Cmd_Random 3D
   3E? Cmd_Load_Sound_File 3E
   3E? Cmd_Load_Sound_File 3E
Line 176: Line 192:
   Cmd_Get_Scale_Depth_Table_Value // 0x89
   Cmd_Get_Scale_Depth_Table_Value // 0x89
   Cmd_Set_Scale_Depth_Table_Value // 0x8A
   Cmd_Set_Scale_Depth_Table_Value // 0x8A
   8B Cmd_Message 2 args // 0x8B - set room name/status text (unk, stringID)
   8B Cmd_Message 2 args // 0x8B - set room name/status text (stringID, unk)
   Cmd_Check_Click_On_NPC // 0x8C
   Cmd_Check_Click_On_NPC // 0x8C
   Cmd_Get_Foyer_Item // 0x8D
   Cmd_Get_Foyer_Item // 0x8D
334

edits

Navigation menu