Game Variables


"Game Variables", also referred to as "Registers", store both important game information and user-managed information that should be available to scripts. There are two different types:
Game Registers - Registers built-in to the program, listed in this documentation
User Registers - Registers defined by the user by creating extra Register space
                 with the appropriate option in the Game Def file
There are two different ways in which these Registers are referenced by script:
The "Game Registers" are stored as follows:
   0 - Screen_Mode

   1 - Curr_Screen

   2 - FreezeObjects

   3 - act
   4 - zone

   5 - lastact
   6 - lastzone

   7 - InLevel

   8 - Host_Platform

   9 - Curr_Player

  10 - XMEffectParam

  11 - Tiles_Length_X
  12 - Tiles_Length_Y

  13 - Screen_Active_Width
  14 - Screen_Active_Height

  15 - Screen_Actual_Width
  16 - Screen_Actual_Height

  17 - mainvpx
  18 - mainvpy

  19 - vpxr[0]
  20 - vpxr[1]
  21 - vpyr[0]
  22 - vpyr[1]

  23 - LevelBound_X1[0]
  24 - LevelBound_X1[1]
  25 - LevelBound_Y1[0]
  26 - LevelBound_Y1[1]
  27 - LevelBound_X2[0]
  28 - LevelBound_X2[1]
  29 - LevelBound_Y2[0]
  30 - LevelBound_Y2[1]

  31 - Target_LevelBound_X1[0]
  32 - Target_LevelBound_X1[1]
  33 - Target_LevelBound_Y1[0]
  34 - Target_LevelBound_Y1[1]
  35 - Target_LevelBound_X2[0]
  36 - Target_LevelBound_X2[1]
  37 - Target_LevelBound_Y2[0]
  38 - Target_LevelBound_Y2[1]

  39 - XLoop_Active[0]
  40 - XLoop_Active[1]
  41 - YLoop_Active[0]
  42 - YLoop_Active[1]

  43 - BGOffsetX[0]
  44 - BGOffsetX[1]
  45 - BGOffsetY[0]
  46 - BGOffsetY[1]

  47 - XLoop_Size[0]
  48 - XLoop_Size[1]
  49 - YLoop_Size[0]
  50 - YLoop_Size[1]

  51 - Curr_Palette

  52 - VPX_Bounce
  53 - VPY_Bounce

  54 - Water_Level

  55 - FrameCounter

.... - ....

 245 - Key_InitialDelay

 246 - Key_RepeatDelay

 247 - VSync

 248 - GameFlags

 249 - FrameSkipCount

 250 - FrameSkip

 251 - FrameLock

 252 - piccount

 253 - GamePaused

 254 - Max_Objects_Used

 255 - Reserved

Index:

   0 - Screen_Mode
   1 - Curr_Screen

   2 - FreezeObjects

   3 - act
   4 - zone
   5 - lastact
   6 - lastzone
   7 - InLevel
   8 - Host_Platform

   9 - Curr_Player

  10 - XMEffectParam

  11 - Tiles_Length_X
  12 - Tiles_Length_Y
  13 - Screen_Active_Width
  14 - Screen_Active_Height
  15 - Screen_Actual_Width
  16 - Screen_Actual_Height

  17 - mainvpx
  18 - mainvpy

  19 - vpxr[0]
  20 - vpxr[1]
  21 - vpyr[0]
  22 - vpyr[1]

  23 - LevelBound_X1[0]
  24 - LevelBound_X1[1]
  25 - LevelBound_Y1[0]
  26 - LevelBound_Y1[1]
  27 - LevelBound_X2[0]
  28 - LevelBound_X2[1]
  29 - LevelBound_Y2[0]
  30 - LevelBound_Y2[1]

  31 - Target_LevelBound_X1[0]
  32 - Target_LevelBound_X1[1]
  33 - Target_LevelBound_Y1[0]
  34 - Target_LevelBound_Y1[1]
  35 - Target_LevelBound_X2[0]
  36 - Target_LevelBound_X2[1]
  37 - Target_LevelBound_Y2[0]
  38 - Target_LevelBound_Y2[1]

  39 - XLoop_Active[0]
  40 - XLoop_Active[1]
  41 - YLoop_Active[0]
  42 - YLoop_Active[1]

  43 - BGOffsetX[0]
  44 - BGOffsetX[1]
  45 - BGOffsetY[0]
  46 - BGOffsetY[1]

  47 - XLoop_Size[0]
  48 - XLoop_Size[1]
  49 - YLoop_Size[0]
  50 - YLoop_Size[1]

  51 - Curr_Palette

  52 - VPX_Bounce
  53 - VPY_Bounce

  54 - Water_Level

  55 - FrameCounter

.... - ....

 245 - Key_InitialDelay
 246 - Key_RepeatDelay

 247 - VSync

 248 - GameFlags

 249 - FrameSkipCount
 250 - FrameSkip
 251 - FrameLock

 252 - piccount
 253 - GamePaused
 254 - Max_Objects_Used
 255 - Reserved