… | |
… | |
178 | inline SV *to_sv (float v) { return newSVnv (v); } |
178 | inline SV *to_sv (float v) { return newSVnv (v); } |
179 | inline SV *to_sv (double v) { return newSVnv (v); } |
179 | inline SV *to_sv (double v) { return newSVnv (v); } |
180 | inline SV *to_sv (player * v) { return newSVattachable (v, "cf::player::wrap"); } |
180 | inline SV *to_sv (player * v) { return newSVattachable (v, "cf::player::wrap"); } |
181 | inline SV *to_sv (object * v) { return newSVattachable (v, v && v->type == PLAYER ? "cf::object::player::wrap" : "cf::object::wrap"); } |
181 | inline SV *to_sv (object * v) { return newSVattachable (v, v && v->type == PLAYER ? "cf::object::player::wrap" : "cf::object::wrap"); } |
182 | inline SV *to_sv (mapstruct * v) { return newSVattachable (v, "cf::map::wrap"); } |
182 | inline SV *to_sv (mapstruct * v) { return newSVattachable (v, "cf::map::wrap"); } |
183 | inline SV *to_sv (archetype * v) { return newSVptr (v, "cf::archetype::wrap"); } |
183 | inline SV *to_sv (archetype * v) { return newSVptr (v, "cf::arch::wrap"); } |
184 | inline SV *to_sv (partylist * v) { return newSVptr (v, "cf::party::wrap"); } |
184 | inline SV *to_sv (partylist * v) { return newSVptr (v, "cf::party::wrap"); } |
185 | inline SV *to_sv (region * v) { return newSVptr (v, "cf::region::wrap"); } |
185 | inline SV *to_sv (region * v) { return newSVptr (v, "cf::region::wrap"); } |
186 | inline SV *to_sv (living * v) { return newSVptr (v, "cf::living::wrap"); } |
186 | inline SV *to_sv (living * v) { return newSVptr (v, "cf::living::wrap"); } |
187 | |
187 | |
188 | inline SV *to_sv (object & v) { return to_sv (&v); } |
188 | inline SV *to_sv (object & v) { return to_sv (&v); } |
… | |
… | |
201 | inline void sv_to (SV *sv, unsigned short &v) { v = SvIV (sv); } |
201 | inline void sv_to (SV *sv, unsigned short &v) { v = SvIV (sv); } |
202 | inline void sv_to (SV *sv, signed int &v) { v = SvIV (sv); } |
202 | inline void sv_to (SV *sv, signed int &v) { v = SvIV (sv); } |
203 | inline void sv_to (SV *sv, unsigned int &v) { v = SvUV (sv); } |
203 | inline void sv_to (SV *sv, unsigned int &v) { v = SvUV (sv); } |
204 | inline void sv_to (SV *sv, signed long &v) { v = SvIV (sv); } |
204 | inline void sv_to (SV *sv, signed long &v) { v = SvIV (sv); } |
205 | inline void sv_to (SV *sv, unsigned long &v) { v = SvUV (sv); } |
205 | inline void sv_to (SV *sv, unsigned long &v) { v = SvUV (sv); } |
206 | inline void sv_to (SV *sv, signed long long &v) { v = SvVAL64 (sv); } |
206 | inline void sv_to (SV *sv, signed long long &v) { v = ( signed long long)SvVAL64 (sv); } |
207 | inline void sv_to (SV *sv, unsigned long long &v) { v = SvVAL64 (sv); } |
207 | inline void sv_to (SV *sv, unsigned long long &v) { v = (unsigned long long)SvVAL64 (sv); } |
208 | inline void sv_to (SV *sv, float &v) { v = SvNV (sv); } |
208 | inline void sv_to (SV *sv, float &v) { v = SvNV (sv); } |
209 | inline void sv_to (SV *sv, double &v) { v = SvNV (sv); } |
209 | inline void sv_to (SV *sv, double &v) { v = SvNV (sv); } |
210 | inline void sv_to (SV *sv, player * &v) { v = (player *)SvPTR_ornull (sv, "cf::player"); } |
210 | inline void sv_to (SV *sv, player * &v) { v = (player *)SvPTR_ornull (sv, "cf::player"); } |
211 | inline void sv_to (SV *sv, object * &v) { v = (object *)SvPTR_ornull (sv, "cf::object"); } |
211 | inline void sv_to (SV *sv, object * &v) { v = (object *)SvPTR_ornull (sv, "cf::object"); } |
212 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)SvPTR_ornull (sv, "cf::archetype"); } |
212 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)SvPTR_ornull (sv, "cf::arch"); } |
213 | inline void sv_to (SV *sv, mapstruct * &v) { v = (mapstruct *)SvPTR_ornull (sv, "cf::map"); } |
213 | inline void sv_to (SV *sv, mapstruct * &v) { v = (mapstruct *)SvPTR_ornull (sv, "cf::map"); } |
214 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
214 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
215 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
215 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
216 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
216 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
217 | |
217 | |
218 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
218 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
219 | inline void sv_to (SV *sv, treasurelist * &v) { v = find_treasurelist (SvPV_nolen (sv)); } // TODO |
219 | inline void sv_to (SV *sv, treasurelist * &v) { v = find_treasurelist (SvPV_nolen (sv)); } // TODO |
|
|
220 | |
|
|
221 | template<class T> |
|
|
222 | inline void sv_to (SV *sv, refptr<T> &v) { T *tmp; sv_to (sv, tmp); v = tmp; } |
220 | |
223 | |
221 | template<int N> |
224 | template<int N> |
222 | inline void sv_to (SV *sv, char (&v)[N]) { snprintf (v, N, "%s", SvPV_nolen (sv)); } |
225 | inline void sv_to (SV *sv, char (&v)[N]) { snprintf (v, N, "%s", SvPV_nolen (sv)); } |
223 | |
226 | |
224 | static SV * |
227 | static SV * |
… | |
… | |
1258 | const_iv (AT_BLIND) |
1261 | const_iv (AT_BLIND) |
1259 | const_iv (AT_INTERNAL) |
1262 | const_iv (AT_INTERNAL) |
1260 | const_iv (AT_LIFE_STEALING) |
1263 | const_iv (AT_LIFE_STEALING) |
1261 | const_iv (AT_DISEASE) |
1264 | const_iv (AT_DISEASE) |
1262 | |
1265 | |
1263 | const_iv (QUEST_IN_PROGRESS) |
|
|
1264 | const_iv (QUEST_DONE_QUEST) |
|
|
1265 | const_iv (QUEST_DONE_TASK) |
|
|
1266 | const_iv (QUEST_START_QUEST) |
|
|
1267 | const_iv (QUEST_END_QUEST) |
|
|
1268 | const_iv (QUEST_START_TASK) |
|
|
1269 | const_iv (QUEST_END_TASK) |
|
|
1270 | const_iv (QUEST_OVERRIDE) |
|
|
1271 | const_iv (QUEST_ON_ACTIVATE) |
|
|
1272 | |
|
|
1273 | const_iv (WEAP_HIT) |
1266 | const_iv (WEAP_HIT) |
1274 | const_iv (WEAP_SLASH) |
1267 | const_iv (WEAP_SLASH) |
1275 | const_iv (WEAP_PIERCE) |
1268 | const_iv (WEAP_PIERCE) |
1276 | const_iv (WEAP_CLEAVE) |
1269 | const_iv (WEAP_CLEAVE) |
1277 | const_iv (WEAP_SLICE) |
1270 | const_iv (WEAP_SLICE) |