/* get function: level of class quest_type */ static int toluaI_get_quest_quest_type_level(lua_State* tolua_S) { quest_type* self = (quest_type*) tolua_getusertype(tolua_S,1,0); if (!self) TOLUA_ERR_SELF; tolua_pushnumber(tolua_S,(long)self->level); return 1; }
/* get function: name of class quest_type */ static int toluaI_get_quest_quest_type_name(lua_State* tolua_S) { quest_type* self = (quest_type*) tolua_getusertype(tolua_S,1,0); if (!self) TOLUA_ERR_SELF; tolua_pushstring(tolua_S,(const char*)self->name); return 1; }
/* 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; }
/* set function: r_info */ static int toluaI_set_monst_r_info(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"monster_race"),0)) TOLUA_ERR_ASSIGN; r_info = ((monster_race*) tolua_getusertype(tolua_S,1,0)); 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; }
/* 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: dynamic_desc of class quest_type */ static int toluaI_set_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; if (!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"bool"),0)) TOLUA_ERR_ASSIGN; self->dynamic_desc = ((bool) tolua_getbool(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; }
/* function: mon_race_name */ static int toluaI_monst_mon_race_name00(lua_State* tolua_S) { if (!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"monster_race"),0) || !tolua_isnoobj(tolua_S,2)) { TOLUA_ERR_FN(mon_race_name); } else { monster_race* r_ptr = ((monster_race*) tolua_getusertype(tolua_S,1,0)); cptr toluaI_ret = (cptr) mon_race_name(r_ptr); tolua_pushstring(tolua_S,(const char*)toluaI_ret); } return 1; }
/* 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; }
/* 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; }
/* 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; }