Example #1
0
/* function: music_play_sample */
static int toluaI_sound_sound___play_sample00(lua_State* tolua_S)
{
 if (
 !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Mix_Chunk"),0) ||
 !tolua_istype(tolua_S,2,LUA_TNUMBER,0) ||
 !tolua_istype(tolua_S,3,LUA_TNUMBER,0) ||
 !tolua_istype(tolua_S,4,LUA_TNUMBER,0) ||
 !tolua_isnoobj(tolua_S,5)
 )
 goto tolua_lerror;
 else
 {
  Mix_Chunk* sample = ((Mix_Chunk*)  tolua_getusertype(tolua_S,1,0));
  s32b channel = ((s32b)  tolua_getnumber(tolua_S,2,0));
  s32b loop = ((s32b)  tolua_getnumber(tolua_S,3,0));
  s32b fade_in_time = ((s32b)  tolua_getnumber(tolua_S,4,0));
 {
  bool toluaI_ret = (bool)  music_play_sample(sample,channel,loop,fade_in_time);
 tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 }
 return 1;
tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '__play_sample'.");
 return 0;
}
Example #2
0
/* get function: dynamic_desc of class  quest_type */
static int toluaI_get_quest_quest_type_dynamic_desc(lua_State* tolua_S)
{
  quest_type* self = (quest_type*)  tolua_getusertype(tolua_S,1,0);
 if (!self) TOLUA_ERR_SELF;
 tolua_pushbool(tolua_S,(int)self->dynamic_desc);
 return 1;
}
Example #3
0
/* function: summon_monsters_near_player */
static int toluaI_monst_summon_monsters_near_player00(lua_State* tolua_S)
{
 if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0) ||
     !tolua_istype(tolua_S,2,LUA_TNUMBER,0) ||
     !tolua_isnoobj(tolua_S,3))
 {
  TOLUA_ERR_FN(summon_monsters_near_player);
 } else {
  int num = ((int)  tolua_getnumber(tolua_S,1,0));
  int type = ((int)  tolua_getnumber(tolua_S,2,0));
  bool toluaI_ret = (bool)  summon_monsters_near_player(num,type);
  tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 return 1;
}
Example #4
0
/* function: monster_can_open */
static int toluaI_monst_monster_can_open00(lua_State* tolua_S)
{
 if (!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"monster_race"),0) ||
     !tolua_istype(tolua_S,2,LUA_TNUMBER,0) ||
     !tolua_isnoobj(tolua_S,3))
 {
  TOLUA_ERR_FN(monster_can_open);
 } else {
  monster_race* r_ptr = ((monster_race*)  tolua_getusertype(tolua_S,1,0));
  int power = ((int)  tolua_getnumber(tolua_S,2,0));
  bool toluaI_ret = (bool)  monster_can_open(r_ptr,power);
  tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 return 1;
}
Example #5
0
/* function: Mix_PausedMusic */
static int toluaI_sound_sound_is_paused_music00(lua_State* tolua_S)
{
 if (
 !tolua_isnoobj(tolua_S,1)
 )
 goto tolua_lerror;
 else
 {
 {
  bool toluaI_ret = (bool)  Mix_PausedMusic();
 tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 }
 return 1;
tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'is_paused_music'.");
 return 0;
}
Example #6
0
/* method: init of class  quest_type */
static int toluaI_quest_quest_type_init00(lua_State* tolua_S)
{
 if (
 !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"quest_type"),0) ||
 !tolua_istype(tolua_S,2,LUA_TNUMBER,0) ||
 !tolua_isnoobj(tolua_S,3)
 )
 goto tolua_lerror;
 else
 {
  quest_type* self = (quest_type*)  tolua_getusertype(tolua_S,1,0);
  s32b q = ((s32b)  tolua_getnumber(tolua_S,2,0));
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'init'");
 {
  bool toluaI_ret = (bool)  self->init(q);
 tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 }
 return 1;
tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'init'.");
 return 0;
}
Example #7
0
/* function: music_play_music */
static int toluaI_sound_sound___play_music00(lua_State* tolua_S)
{
 if (
 !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Mix_Music"),0) ||
 !tolua_istype(tolua_S,2,LUA_TNUMBER,0) ||
 !tolua_istype(tolua_S,3,LUA_TNUMBER,0) ||
 !tolua_isnoobj(tolua_S,4)
 )
 goto tolua_lerror;
 else
 {
  Mix_Music* music = ((Mix_Music*)  tolua_getusertype(tolua_S,1,0));
  s32b loop = ((s32b)  tolua_getnumber(tolua_S,2,0));
  s32b fade_in_time = ((s32b)  tolua_getnumber(tolua_S,3,0));
 {
  bool toluaI_ret = (bool)  music_play_music(music,loop,fade_in_time);
 tolua_pushbool(tolua_S,(int)toluaI_ret);
 }
 }
 return 1;
tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '__play_music'.");
 return 0;
}
Example #8
0
void tolua_pushfieldbool (lua_State* L, int lo, int index, int v)
{
 lua_pushnumber(L,index);
 tolua_pushbool(L,v);
 lua_settable(L,lo);
}
Example #9
0
/* get function: sound_not_available */
static int toluaI_get_sound_sound_not_available(lua_State* tolua_S)
{
 tolua_pushbool(tolua_S,(int)sound_not_available);
 return 1;
}