/* function: summon_specific */ static int toluaI_monst_summon_specific00(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,LUA_TNUMBER,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_istype(tolua_S,5,LUA_TNUMBER,0) || !tolua_istype(tolua_S,6,tolua_tag(tolua_S,"bool"),0) || !tolua_istype(tolua_S,7,tolua_tag(tolua_S,"bool"),0) || !tolua_istype(tolua_S,8,tolua_tag(tolua_S,"bool"),0) || !tolua_isnoobj(tolua_S,9)) { TOLUA_ERR_FN(summon_specific); } else { int who = ((int) tolua_getnumber(tolua_S,1,0)); int x1 = ((int) tolua_getnumber(tolua_S,2,0)); int y1 = ((int) tolua_getnumber(tolua_S,3,0)); int lev = ((int) tolua_getnumber(tolua_S,4,0)); int type = ((int) tolua_getnumber(tolua_S,5,0)); bool group = ((bool) tolua_getbool(tolua_S,6,0)); bool friendly = ((bool) tolua_getbool(tolua_S,7,0)); bool pet = ((bool) tolua_getbool(tolua_S,8,0)); summon_specific(who,x1,y1,lev,type,group,friendly,pet); } return 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; }
/* 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; }
/* set function: max_q_idx */ static int toluaI_set_quest_max_q_idx(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0)) TOLUA_ERR_ASSIGN; max_q_idx = ((s16b) tolua_getnumber(tolua_S,1,0)); return 0; }
/* set function: flags of class monster_race */ static int toluaI_set_monst_monster_race_flags(lua_State* tolua_S) { int toluaI_index; TOLUA_ARRAY_SELF(monster_race); TOLUA_ARRAY_INDEX("monster_race: flags",9); self->flags[toluaI_index] = ((u32b) tolua_getnumber(tolua_S,3,0)); return 0; }
/* set function: level of class monster_race */ static int toluaI_set_monst_monster_race_level(lua_State* tolua_S) { TOLUA_GET_SELF(monster_race); if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) TOLUA_ERR_ASSIGN; self->level = ((byte) tolua_getnumber(tolua_S,2,0)); return 0; }
/* function: summon_cloned_creature */ static int toluaI_monst_summon_cloned_creature00(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_istype(tolua_S,2,LUA_TNUMBER,0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,tolua_tag(tolua_S,"bool"),0) || !tolua_isnoobj(tolua_S,5)) { TOLUA_ERR_FN(summon_cloned_creature); } else { int x1 = ((int) tolua_getnumber(tolua_S,1,0)); int y1 = ((int) tolua_getnumber(tolua_S,2,0)); int r_idx = ((int) tolua_getnumber(tolua_S,3,0)); bool pet = ((bool) tolua_getbool(tolua_S,4,0)); summon_cloned_creature(x1,y1,r_idx,pet); } return 0; }
/* set function: status of class quest_type */ static int toluaI_set_quest_quest_type_status(lua_State* tolua_S) { quest_type* self = (quest_type*) tolua_getusertype(tolua_S,1,0); if (!self) TOLUA_ERR_SELF; if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) TOLUA_ERR_ASSIGN; self->status = ((s16b) tolua_getnumber(tolua_S,2,0)); return 0; }
/* set function: quest */ static int toluaI_set_quest_quest_aux(lua_State* tolua_S) { int toluaI_index; if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) tolua_error(tolua_S,"invalid type in array indexing."); toluaI_index = (int)tolua_getnumber(tolua_S,2,0)-1; if (toluaI_index<0 || toluaI_index>=max_q_idx) tolua_error(tolua_S,"array indexing out of range."); quest[toluaI_index] = *((quest_type*) tolua_getusertype(tolua_S,3,0)); return 0; }
/* get function: quest */ static int toluaI_get_quest_quest_aux(lua_State* tolua_S) { int toluaI_index; if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) tolua_error(tolua_S,"invalid type in array indexing."); toluaI_index = (int)tolua_getnumber(tolua_S,2,0)-1; if (toluaI_index<0 || toluaI_index>=max_q_idx) tolua_error(tolua_S,"array indexing out of range."); tolua_pushusertype(tolua_S,(void*)&quest[toluaI_index],tolua_tag(tolua_S,"quest_type")); return 1; }
/* function: quest_get_desc */ static int toluaI_quest_quest_get_desc00(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) ) goto tolua_lerror; else { s32b q_idx = ((s32b) tolua_getnumber(tolua_S,1,0)); s32b line = ((s32b) tolua_getnumber(tolua_S,2,0)); { cptr toluaI_ret = (cptr) quest_get_desc(q_idx,line); tolua_pushstring(tolua_S,(const char*)toluaI_ret); } } return 1; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'quest_get_desc'."); return 0; }
/* function: monst_race */ static int toluaI_monst_monst_race00(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,2)) { TOLUA_ERR_FN(monst_race); } else { int r_idx = ((int) tolua_getnumber(tolua_S,1,0)); monster_race* toluaI_ret = (monster_race*) monst_race(r_idx); tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"monster_race")); } return 1; }
/* function: quest_set_desc */ static int toluaI_quest_quest_set_desc00(lua_State* tolua_S) { if ( !tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_istype(tolua_S,2,LUA_TNUMBER,0) || !tolua_istype(tolua_S,3,LUA_TSTRING,0) || !tolua_isnoobj(tolua_S,4) ) goto tolua_lerror; else { s32b q_idx = ((s32b) tolua_getnumber(tolua_S,1,0)); s32b d = ((s32b) tolua_getnumber(tolua_S,2,0)); char* desc = ((char*) tolua_getstring(tolua_S,3,0)); { quest_set_desc(q_idx,d,desc); } } return 0; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'quest_set_desc'."); return 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; }
/* 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; }
/* function: Mix_FadeOutMusic */ static int toluaI_sound_sound_fade_out_music00(lua_State* tolua_S) { if ( !tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { s32b fade_out_time = ((s32b) tolua_getnumber(tolua_S,1,0)); { Mix_FadeOutMusic(fade_out_time); } } return 0; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'fade_out_music'."); return 0; }
/* function: lua_get_quest */ static int toluaI_quest_quest00(lua_State* tolua_S) { if ( !tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { s32b q_idx = ((s32b) tolua_getnumber(tolua_S,1,0)); { quest_type* toluaI_ret = (quest_type*) lua_get_quest(q_idx); tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"quest_type")); } } return 1; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'quest'."); return 0; }
/* function: Mix_SetMusicPosition */ static int toluaI_sound_sound_set_position_music00(lua_State* tolua_S) { if ( !tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { s32b pos = ((s32b) tolua_getnumber(tolua_S,1,0)); { s32b toluaI_ret = (s32b) Mix_SetMusicPosition(pos); tolua_pushnumber(tolua_S,(long)toluaI_ret); } } return 1; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'set_position_music'."); return 0; }
/* function: Mix_VolumeMusic */ static int toluaI_sound_sound_volume_music00(lua_State* tolua_S) { if ( !tolua_istype(tolua_S,1,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { s32b volume = ((s32b) tolua_getnumber(tolua_S,1,0)); { s32b toluaI_ret = (s32b) Mix_VolumeMusic(volume); tolua_pushnumber(tolua_S,(long)toluaI_ret); } } return 1; tolua_lerror: tolua_error(tolua_S,"#ferror in function 'volume_music'."); return 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; }