enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src enigma-lua.pkg, 1.21, 1.22 enigma-lua.hh, 1.25,


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src enigma-lua.pkg, 1.21, 1.22 enigma-lua.hh, 1.25, 1.26 enigma-lua.cc, 1.26, 1.27
Date: Sun, 16 Nov 2003 19:21:15 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv10016/src

Modified Files:
        enigma-lua.pkg enigma-lua.hh enigma-lua.cc 
Log Message:
Do not export anything from options:: namespace.


Index: enigma-lua.pkg
===================================================================
RCS file: /cvsroot/enigma/enigma/src/enigma-lua.pkg,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** enigma-lua.pkg      9 Nov 2003 11:49:22 -0000       1.21
--- enigma-lua.pkg      16 Nov 2003 19:21:12 -0000      1.22
***************
*** 20,26 ****
  
  
! //----------------------------------------
! // enigma.cc
! //----------------------------------------
  $#include "enigma.hh"
  $using namespace enigma;
--- 20,25 ----
  
  
! /* -------------------- enigma.cc -------------------- */
! 
  $#include "enigma.hh"
  $using namespace enigma;
***************
*** 34,37 ****
--- 33,37 ----
      Surface *GetImage(const char *name);
      Surface *LoadImage(const char *name);
+     Surface *RegisterImage(const char *name, Surface *s);
      Font    *GetFont(const char *name);
  
***************
*** 39,45 ****
  }
  
! //----------------------------------------
! // game.cc
! //----------------------------------------
  $#include "game.hh"
  module enigma
--- 39,44 ----
  }
  
! /* -------------------- game.cc -------------------- */
! 
  $#include "game.hh"
  module enigma
***************
*** 64,70 ****
  }
  
! //----------------------------------------
! // world.cc, objects.cc
! //----------------------------------------
  $#include "world.hh"
  $#include "objects.hh"
--- 63,68 ----
  }
  
! /* -------------------- world.cc, objects.cc -------------------- */
! 
  $#include "world.hh"
  $#include "objects.hh"
***************
*** 91,98 ****
  }
  
  
- //----------------------------------------
- // video.cc
- //----------------------------------------
  $#include "video.hh"
  $using namespace video;
--- 89,94 ----
  }
  
+ /* -------------------- video.cc -------------------- */
  
  $#include "video.hh"
  $using namespace video;
***************
*** 104,137 ****
      void HideMouse();
      void ShowMouse();
- }
- 
- //----------------------------------------
- // options.cc
- //----------------------------------------
- $#include "options.hh"
- $using namespace options;
- 
- module options
- {
-     extern double MouseSpeed;
-     extern int    WizardMode;
-     extern int    FullScreen;
-     extern int    UseAlpha;
-     extern double SoundVolume;
-     extern double MusicVolume;
-     extern double StereoSeparation;
-     extern int    SoundSet;
-     extern int    SkipSolvedLevels;
-     extern int    TimeHunting;
-     extern int    Difficulty;
-     extern int    VideoMode;
-     extern int    LevelMenuPosition;
- 
-     struct LevelStatus {
-         LevelStatus(int easy=-1, int hard=-1, int fin=0, unsigned long solv = 
0);
-         ~LevelStatus();
-     };
-     void SetLevelStatus(const char *levelpack,
-                         const char *levelname,
-                         const LevelStatus &stat);
  }
--- 100,102 ----

Index: enigma-lua.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/enigma-lua.cc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** enigma-lua.cc       9 Nov 2003 11:49:22 -0000       1.26
--- enigma-lua.cc       16 Nov 2003 19:21:12 -0000      1.27
***************
*** 1,5 ****
  /*
  ** Lua binding: enigma
! ** Generated automatically by tolua 4.0a on Fri Nov  7 12:07:29 2003.
  */
  
--- 1,5 ----
  /*
  ** Lua binding: enigma
! ** Generated automatically by tolua 4.0a on Sat Nov 15 22:21:25 2003.
  */
  
***************
*** 21,38 ****
  using namespace video;
  using px::Screen;
- #include "options.hh"
- using namespace options;
  
  /* function to register type */
  static void toluaI_reg_types (lua_State* tolua_S)
  {
-  tolua_usertype(tolua_S,"Font");
   tolua_usertype(tolua_S,"Item");
   tolua_usertype(tolua_S,"Object");
-  tolua_usertype(tolua_S,"LevelStatus");
   tolua_usertype(tolua_S,"Screen");
-  tolua_usertype(tolua_S,"Stone");
-  tolua_usertype(tolua_S,"Floor");
   tolua_usertype(tolua_S,"Surface");
  }
  
--- 21,35 ----
  using namespace video;
  using px::Screen;
  
  /* function to register type */
  static void toluaI_reg_types (lua_State* tolua_S)
  {
   tolua_usertype(tolua_S,"Item");
   tolua_usertype(tolua_S,"Object");
   tolua_usertype(tolua_S,"Screen");
   tolua_usertype(tolua_S,"Surface");
+  tolua_usertype(tolua_S,"Font");
+  tolua_usertype(tolua_S,"Floor");
+  tolua_usertype(tolua_S,"Stone");
  }
  
***************
*** 81,84 ****
--- 78,105 ----
  }
  
+ /* function: RegisterImage */
+ static int toluaI_enigma_enigma_RegisterImage00(lua_State* tolua_S)
+ {
+  if (
+  !tolua_istype(tolua_S,1,LUA_TSTRING,0) ||
+  !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Surface"),0) ||
+  !tolua_isnoobj(tolua_S,3)
+  )
+  goto tolua_lerror;
+  else
+  {
+   const char* name = ((const char*)  tolua_getstring(tolua_S,1,0));
+   Surface* s = ((Surface*)  tolua_getusertype(tolua_S,2,0));
+  {
+   Surface* toluaI_ret = (Surface*)  RegisterImage(name,s);
+  tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"Surface"));
+  }
+  }
+  return 1;
+ tolua_lerror:
+  tolua_error(tolua_S,"#ferror in function 'RegisterImage'.");
+  return 0;
+ }
+ 
  /* function: GetFont */
  static int toluaI_enigma_enigma_GetFont00(lua_State* tolua_S)
***************
*** 659,943 ****
  }
  
- /* get function: MouseSpeed */
- static int toluaI_get_enigma_options_MouseSpeed(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)MouseSpeed);
-  return 1;
- }
- 
- /* set function: MouseSpeed */
- static int toluaI_set_enigma_options_MouseSpeed(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   MouseSpeed = ((double)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: WizardMode */
- static int toluaI_get_enigma_options_WizardMode(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)WizardMode);
-  return 1;
- }
- 
- /* set function: WizardMode */
- static int toluaI_set_enigma_options_WizardMode(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   WizardMode = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: FullScreen */
- static int toluaI_get_enigma_options_FullScreen(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)FullScreen);
-  return 1;
- }
- 
- /* set function: FullScreen */
- static int toluaI_set_enigma_options_FullScreen(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   FullScreen = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: UseAlpha */
- static int toluaI_get_enigma_options_UseAlpha(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)UseAlpha);
-  return 1;
- }
- 
- /* set function: UseAlpha */
- static int toluaI_set_enigma_options_UseAlpha(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   UseAlpha = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: SoundVolume */
- static int toluaI_get_enigma_options_SoundVolume(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)SoundVolume);
-  return 1;
- }
- 
- /* set function: SoundVolume */
- static int toluaI_set_enigma_options_SoundVolume(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   SoundVolume = ((double)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: MusicVolume */
- static int toluaI_get_enigma_options_MusicVolume(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)MusicVolume);
-  return 1;
- }
- 
- /* set function: MusicVolume */
- static int toluaI_set_enigma_options_MusicVolume(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   MusicVolume = ((double)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: StereoSeparation */
- static int toluaI_get_enigma_options_StereoSeparation(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)StereoSeparation);
-  return 1;
- }
- 
- /* set function: StereoSeparation */
- static int toluaI_set_enigma_options_StereoSeparation(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   StereoSeparation = ((double)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: SoundSet */
- static int toluaI_get_enigma_options_SoundSet(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)SoundSet);
-  return 1;
- }
- 
- /* set function: SoundSet */
- static int toluaI_set_enigma_options_SoundSet(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   SoundSet = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: SkipSolvedLevels */
- static int toluaI_get_enigma_options_SkipSolvedLevels(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)SkipSolvedLevels);
-  return 1;
- }
- 
- /* set function: SkipSolvedLevels */
- static int toluaI_set_enigma_options_SkipSolvedLevels(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   SkipSolvedLevels = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: TimeHunting */
- static int toluaI_get_enigma_options_TimeHunting(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)TimeHunting);
-  return 1;
- }
- 
- /* set function: TimeHunting */
- static int toluaI_set_enigma_options_TimeHunting(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   TimeHunting = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: Difficulty */
- static int toluaI_get_enigma_options_Difficulty(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)Difficulty);
-  return 1;
- }
- 
- /* set function: Difficulty */
- static int toluaI_set_enigma_options_Difficulty(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   Difficulty = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: VideoMode */
- static int toluaI_get_enigma_options_VideoMode(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)VideoMode);
-  return 1;
- }
- 
- /* set function: VideoMode */
- static int toluaI_set_enigma_options_VideoMode(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   VideoMode = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* get function: LevelMenuPosition */
- static int toluaI_get_enigma_options_LevelMenuPosition(lua_State* tolua_S)
- {
-  tolua_pushnumber(tolua_S,(double)LevelMenuPosition);
-  return 1;
- }
- 
- /* set function: LevelMenuPosition */
- static int toluaI_set_enigma_options_LevelMenuPosition(lua_State* tolua_S)
- {
-  if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0))
-  tolua_error(tolua_S,"#vinvalid type in variable assignment.");
-   LevelMenuPosition = ((int)  tolua_getnumber(tolua_S,1,0));
-  return 0;
- }
- 
- /* method: new of class  LevelStatus */
- static int toluaI_enigma_options_LevelStatus_new00(lua_State* tolua_S)
- {
-  if (
-  !tolua_istype(tolua_S,2,LUA_TNUMBER,1) ||
-  !tolua_istype(tolua_S,3,LUA_TNUMBER,1) ||
-  !tolua_istype(tolua_S,4,LUA_TNUMBER,1) ||
-  !tolua_istype(tolua_S,5,LUA_TNUMBER,1) ||
-  !tolua_isnoobj(tolua_S,6)
-  )
-  goto tolua_lerror;
-  else
-  {
-   int easy = ((int)  tolua_getnumber(tolua_S,2,-1));
-   int hard = ((int)  tolua_getnumber(tolua_S,3,-1));
-   int fin = ((int)  tolua_getnumber(tolua_S,4,0));
-   unsigned long solv = ((unsigned long)  tolua_getnumber(tolua_S,5,0));
-  {
-   LevelStatus* toluaI_ret = (LevelStatus*)  new 
LevelStatus(easy,hard,fin,solv);
-  
tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"LevelStatus"));
-  }
-  }
-  return 1;
- tolua_lerror:
-  tolua_error(tolua_S,"#ferror in function 'new'.");
-  return 0;
- }
- 
- /* method: delete of class  LevelStatus */
- static int toluaI_enigma_options_LevelStatus_delete00(lua_State* tolua_S)
- {
-  if (
-  !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"LevelStatus"),0) ||
-  !tolua_isnoobj(tolua_S,2)
-  )
-  goto tolua_lerror;
-  else
-  {
-   LevelStatus* self = (LevelStatus*)  tolua_getusertype(tolua_S,1,0);
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'");
-  delete self;
-  }
-  return 0;
- tolua_lerror:
-  tolua_error(tolua_S,"#ferror in function 'delete'.");
-  return 0;
- }
- 
- /* function: SetLevelStatus */
- static int toluaI_enigma_options_SetLevelStatus00(lua_State* tolua_S)
- {
-  if (
-  !tolua_istype(tolua_S,1,LUA_TSTRING,0) ||
-  !tolua_istype(tolua_S,2,LUA_TSTRING,0) ||
-  !tolua_istype(tolua_S,3,tolua_tag(tolua_S,"const LevelStatus"),0) ||
-  !tolua_isnoobj(tolua_S,4)
-  )
-  goto tolua_lerror;
-  else
-  {
-   const char* levelpack = ((const char*)  tolua_getstring(tolua_S,1,0));
-   const char* levelname = ((const char*)  tolua_getstring(tolua_S,2,0));
-   const LevelStatus* stat = ((const LevelStatus*)  
tolua_getusertype(tolua_S,3,0));
-  {
-   SetLevelStatus(levelpack,levelname,*stat);
-  }
-  }
-  return 0;
- tolua_lerror:
-  tolua_error(tolua_S,"#ferror in function 'SetLevelStatus'.");
-  return 0;
- }
- 
  /* Open function */
  int tolua_enigma_open (lua_State* tolua_S)
--- 680,683 ----
***************
*** 953,956 ****
--- 693,697 ----
   tolua_function(tolua_S,"enigma","GetImage",toluaI_enigma_enigma_GetImage00);
   
tolua_function(tolua_S,"enigma","LoadImage",toluaI_enigma_enigma_LoadImage00);
+  
tolua_function(tolua_S,"enigma","RegisterImage",toluaI_enigma_enigma_RegisterImage00);
   tolua_function(tolua_S,"enigma","GetFont",toluaI_enigma_enigma_GetFont00);
   tolua_function(tolua_S,"enigma","date",toluaI_enigma_enigma_date00);
***************
*** 988,1009 ****
   tolua_function(tolua_S,"video","HideMouse",toluaI_enigma_video_HideMouse00);
   tolua_function(tolua_S,"video","ShowMouse",toluaI_enigma_video_ShowMouse00);
-  tolua_module(tolua_S,"options");
-  
tolua_tablevar(tolua_S,"options","MouseSpeed",toluaI_get_enigma_options_MouseSpeed,toluaI_set_enigma_options_MouseSpeed);
-  
tolua_tablevar(tolua_S,"options","WizardMode",toluaI_get_enigma_options_WizardMode,toluaI_set_enigma_options_WizardMode);
-  
tolua_tablevar(tolua_S,"options","FullScreen",toluaI_get_enigma_options_FullScreen,toluaI_set_enigma_options_FullScreen);
-  
tolua_tablevar(tolua_S,"options","UseAlpha",toluaI_get_enigma_options_UseAlpha,toluaI_set_enigma_options_UseAlpha);
-  
tolua_tablevar(tolua_S,"options","SoundVolume",toluaI_get_enigma_options_SoundVolume,toluaI_set_enigma_options_SoundVolume);
-  
tolua_tablevar(tolua_S,"options","MusicVolume",toluaI_get_enigma_options_MusicVolume,toluaI_set_enigma_options_MusicVolume);
-  
tolua_tablevar(tolua_S,"options","StereoSeparation",toluaI_get_enigma_options_StereoSeparation,toluaI_set_enigma_options_StereoSeparation);
-  
tolua_tablevar(tolua_S,"options","SoundSet",toluaI_get_enigma_options_SoundSet,toluaI_set_enigma_options_SoundSet);
-  
tolua_tablevar(tolua_S,"options","SkipSolvedLevels",toluaI_get_enigma_options_SkipSolvedLevels,toluaI_set_enigma_options_SkipSolvedLevels);
-  
tolua_tablevar(tolua_S,"options","TimeHunting",toluaI_get_enigma_options_TimeHunting,toluaI_set_enigma_options_TimeHunting);
-  
tolua_tablevar(tolua_S,"options","Difficulty",toluaI_get_enigma_options_Difficulty,toluaI_set_enigma_options_Difficulty);
-  
tolua_tablevar(tolua_S,"options","VideoMode",toluaI_get_enigma_options_VideoMode,toluaI_set_enigma_options_VideoMode);
-  
tolua_tablevar(tolua_S,"options","LevelMenuPosition",toluaI_get_enigma_options_LevelMenuPosition,toluaI_set_enigma_options_LevelMenuPosition);
-  tolua_cclass(tolua_S,"LevelStatus","");
-  
tolua_function(tolua_S,"LevelStatus","new",toluaI_enigma_options_LevelStatus_new00);
-  
tolua_function(tolua_S,"LevelStatus","delete",toluaI_enigma_options_LevelStatus_delete00);
-  
tolua_function(tolua_S,"options","SetLevelStatus",toluaI_enigma_options_SetLevelStatus00);
   return 1;
  }
--- 729,732 ----
***************
*** 1015,1018 ****
   lua_pushnil(tolua_S); lua_setglobal(tolua_S,"world");
   lua_pushnil(tolua_S); lua_setglobal(tolua_S,"video");
-  lua_pushnil(tolua_S); lua_setglobal(tolua_S,"options");
  }
--- 738,740 ----

Index: enigma-lua.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/enigma-lua.hh,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** enigma-lua.hh       9 Nov 2003 11:49:22 -0000       1.25
--- enigma-lua.hh       16 Nov 2003 19:21:12 -0000      1.26
***************
*** 1,5 ****
  /*
  ** Lua binding: enigma
! ** Generated automatically by tolua 4.0a on Fri Nov  7 12:07:29 2003.
  */
  
--- 1,5 ----
  /*
  ** Lua binding: enigma
! ** Generated automatically by tolua 4.0a on Sat Nov 15 22:21:25 2003.
  */
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]