1 |
/* |
/* |
2 |
** Lua binding: px |
** Lua binding: px |
3 |
** Generated automatically by tolua 4.0a on Tue Jul 15 21:34:02 2003. |
** Generated automatically by tolua 4.0a on Fri Sep 12 22:07:20 2003. |
4 |
*/ |
*/ |
5 |
|
|
6 |
#include "tolua.h" |
#include "tolua.h" |
16 |
/* function to register type */ |
/* function to register type */ |
17 |
static void toluaI_reg_types (lua_State* tolua_S) |
static void toluaI_reg_types (lua_State* tolua_S) |
18 |
{ |
{ |
19 |
|
tolua_usertype(tolua_S,"GS"); |
20 |
|
tolua_usertype(tolua_S,"Font"); |
21 |
tolua_usertype(tolua_S,"V2"); |
tolua_usertype(tolua_S,"V2"); |
22 |
tolua_usertype(tolua_S,"Surface"); |
tolua_usertype(tolua_S,"Surface"); |
23 |
tolua_usertype(tolua_S,"Font"); |
tolua_usertype(tolua_S,"Drawable"); |
24 |
tolua_usertype(tolua_S,"Screen"); |
tolua_usertype(tolua_S,"Screen"); |
25 |
tolua_usertype(tolua_S,"Rect"); |
tolua_usertype(tolua_S,"Rect"); |
26 |
} |
} |
245 |
return 0; |
return 0; |
246 |
} |
} |
247 |
|
|
248 |
/* method: delete of class Surface */ |
/* method: new of class GS */ |
249 |
static int toluaI_px_px_Surface_delete00(lua_State* tolua_S) |
static int toluaI_px_px_GS_new00(lua_State* tolua_S) |
250 |
{ |
{ |
251 |
if ( |
if ( |
252 |
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Surface"),0) || |
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const Rect"),0) || |
253 |
|
!tolua_isnoobj(tolua_S,3) |
254 |
|
) |
255 |
|
goto tolua_lerror; |
256 |
|
else |
257 |
|
{ |
258 |
|
const Rect* clipr = ((const Rect*) tolua_getusertype(tolua_S,2,0)); |
259 |
|
{ |
260 |
|
GS* toluaI_ret = (GS*) new GS(*clipr); |
261 |
|
tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"GS")); |
262 |
|
} |
263 |
|
} |
264 |
|
return 1; |
265 |
|
tolua_lerror: |
266 |
|
tolua_error(tolua_S,"#ferror in function 'new'."); |
267 |
|
return 0; |
268 |
|
} |
269 |
|
|
270 |
|
/* method: delete of class GS */ |
271 |
|
static int toluaI_px_px_GS_delete00(lua_State* tolua_S) |
272 |
|
{ |
273 |
|
if ( |
274 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"GS"),0) || |
275 |
!tolua_isnoobj(tolua_S,2) |
!tolua_isnoobj(tolua_S,2) |
276 |
) |
) |
277 |
goto tolua_lerror; |
goto tolua_lerror; |
278 |
else |
else |
279 |
{ |
{ |
280 |
Surface* self = (Surface*) tolua_getusertype(tolua_S,1,0); |
GS* self = (GS*) tolua_getusertype(tolua_S,1,0); |
281 |
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); |
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); |
282 |
delete self; |
delete self; |
283 |
} |
} |
287 |
return 0; |
return 0; |
288 |
} |
} |
289 |
|
|
290 |
/* method: size of class Surface */ |
/* get function: cliprect of class GS */ |
291 |
static int toluaI_px_px_Surface_size00(lua_State* tolua_S) |
static int toluaI_get_px_px_GS_cliprect(lua_State* tolua_S) |
292 |
|
{ |
293 |
|
GS* self = (GS*) tolua_getusertype(tolua_S,1,0); |
294 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); |
295 |
|
tolua_pushusertype(tolua_S,(void*)&self->cliprect,tolua_tag(tolua_S,"Rect")); |
296 |
|
return 1; |
297 |
|
} |
298 |
|
|
299 |
|
/* set function: cliprect of class GS */ |
300 |
|
static int toluaI_set_px_px_GS_cliprect(lua_State* tolua_S) |
301 |
|
{ |
302 |
|
GS* self = (GS*) tolua_getusertype(tolua_S,1,0); |
303 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); |
304 |
|
if (!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Rect"),0)) |
305 |
|
tolua_error(tolua_S,"#vinvalid type in variable assignment."); |
306 |
|
self->cliprect = *((Rect*) tolua_getusertype(tolua_S,2,0)); |
307 |
|
return 0; |
308 |
|
} |
309 |
|
|
310 |
|
/* get function: pcolor of class GS */ |
311 |
|
static int toluaI_get_px_px_GS_pcolor(lua_State* tolua_S) |
312 |
|
{ |
313 |
|
GS* self = (GS*) tolua_getusertype(tolua_S,1,0); |
314 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); |
315 |
|
tolua_pushnumber(tolua_S,(double)self->pcolor); |
316 |
|
return 1; |
317 |
|
} |
318 |
|
|
319 |
|
/* set function: pcolor of class GS */ |
320 |
|
static int toluaI_set_px_px_GS_pcolor(lua_State* tolua_S) |
321 |
|
{ |
322 |
|
GS* self = (GS*) tolua_getusertype(tolua_S,1,0); |
323 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); |
324 |
|
if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) |
325 |
|
tolua_error(tolua_S,"#vinvalid type in variable assignment."); |
326 |
|
self->pcolor = ((PackedColor) tolua_getnumber(tolua_S,2,0)); |
327 |
|
return 0; |
328 |
|
} |
329 |
|
|
330 |
|
/* method: delete of class Drawable */ |
331 |
|
static int toluaI_px_px_Drawable_delete00(lua_State* tolua_S) |
332 |
{ |
{ |
333 |
if ( |
if ( |
334 |
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Surface"),0) || |
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
335 |
!tolua_isnoobj(tolua_S,2) |
!tolua_isnoobj(tolua_S,2) |
336 |
) |
) |
337 |
goto tolua_lerror; |
goto tolua_lerror; |
338 |
else |
else |
339 |
{ |
{ |
340 |
Surface* self = (Surface*) tolua_getusertype(tolua_S,1,0); |
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
341 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); |
342 |
|
delete self; |
343 |
|
} |
344 |
|
return 0; |
345 |
|
tolua_lerror: |
346 |
|
tolua_error(tolua_S,"#ferror in function 'delete'."); |
347 |
|
return 0; |
348 |
|
} |
349 |
|
|
350 |
|
/* method: map_color of class Drawable */ |
351 |
|
static int toluaI_px_px_Drawable_map_color00(lua_State* tolua_S) |
352 |
|
{ |
353 |
|
if ( |
354 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
355 |
|
!tolua_istype(tolua_S,2,LUA_TNUMBER,0) || |
356 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
357 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
358 |
|
!tolua_isnoobj(tolua_S,5) |
359 |
|
) |
360 |
|
goto tolua_lerror; |
361 |
|
else |
362 |
|
{ |
363 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
364 |
|
int r = ((int) tolua_getnumber(tolua_S,2,0)); |
365 |
|
int g = ((int) tolua_getnumber(tolua_S,3,0)); |
366 |
|
int b = ((int) tolua_getnumber(tolua_S,4,0)); |
367 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'map_color'"); |
368 |
|
{ |
369 |
|
PackedColor toluaI_ret = (PackedColor) self->map_color(r,g,b); |
370 |
|
tolua_pushnumber(tolua_S,(double)toluaI_ret); |
371 |
|
} |
372 |
|
} |
373 |
|
return 1; |
374 |
|
tolua_lerror: |
375 |
|
tolua_error(tolua_S,"#ferror in function 'map_color'."); |
376 |
|
return 0; |
377 |
|
} |
378 |
|
|
379 |
|
/* method: map_color of class Drawable */ |
380 |
|
static int toluaI_px_px_Drawable_map_color01(lua_State* tolua_S) |
381 |
|
{ |
382 |
|
if ( |
383 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
384 |
|
!tolua_istype(tolua_S,2,LUA_TNUMBER,0) || |
385 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
386 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
387 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
388 |
|
!tolua_isnoobj(tolua_S,6) |
389 |
|
) |
390 |
|
goto tolua_lerror; |
391 |
|
else |
392 |
|
{ |
393 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
394 |
|
int r = ((int) tolua_getnumber(tolua_S,2,0)); |
395 |
|
int g = ((int) tolua_getnumber(tolua_S,3,0)); |
396 |
|
int b = ((int) tolua_getnumber(tolua_S,4,0)); |
397 |
|
int a = ((int) tolua_getnumber(tolua_S,5,0)); |
398 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'map_color'"); |
399 |
|
{ |
400 |
|
PackedColor toluaI_ret = (PackedColor) self->map_color(r,g,b,a); |
401 |
|
tolua_pushnumber(tolua_S,(double)toluaI_ret); |
402 |
|
} |
403 |
|
} |
404 |
|
return 1; |
405 |
|
tolua_lerror: |
406 |
|
return toluaI_px_px_Drawable_map_color00(tolua_S); |
407 |
|
} |
408 |
|
|
409 |
|
/* method: blit of class Drawable */ |
410 |
|
static int toluaI_px_px_Drawable_blit00(lua_State* tolua_S) |
411 |
|
{ |
412 |
|
if ( |
413 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
414 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
415 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
416 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
417 |
|
!tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || |
418 |
|
!tolua_isnoobj(tolua_S,6) |
419 |
|
) |
420 |
|
goto tolua_lerror; |
421 |
|
else |
422 |
|
{ |
423 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
424 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
425 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
426 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
427 |
|
Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); |
428 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'blit'"); |
429 |
|
{ |
430 |
|
self->blit(*gs,x,y,s); |
431 |
|
} |
432 |
|
} |
433 |
|
return 0; |
434 |
|
tolua_lerror: |
435 |
|
tolua_error(tolua_S,"#ferror in function 'blit'."); |
436 |
|
return 0; |
437 |
|
} |
438 |
|
|
439 |
|
/* method: blit of class Drawable */ |
440 |
|
static int toluaI_px_px_Drawable_blit01(lua_State* tolua_S) |
441 |
|
{ |
442 |
|
if ( |
443 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
444 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
445 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
446 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
447 |
|
!tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || |
448 |
|
!tolua_istype(tolua_S,6,tolua_tag(tolua_S,"const Rect"),0) || |
449 |
|
!tolua_isnoobj(tolua_S,7) |
450 |
|
) |
451 |
|
goto tolua_lerror; |
452 |
|
else |
453 |
|
{ |
454 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
455 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
456 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
457 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
458 |
|
Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); |
459 |
|
const Rect* r = ((const Rect*) tolua_getusertype(tolua_S,6,0)); |
460 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'blit'"); |
461 |
|
{ |
462 |
|
self->blit(*gs,x,y,s,*r); |
463 |
|
} |
464 |
|
} |
465 |
|
return 0; |
466 |
|
tolua_lerror: |
467 |
|
return toluaI_px_px_Drawable_blit00(tolua_S); |
468 |
|
} |
469 |
|
|
470 |
|
/* method: get_pixel of class Drawable */ |
471 |
|
static int toluaI_px_px_Drawable_get_pixel00(lua_State* tolua_S) |
472 |
|
{ |
473 |
|
if ( |
474 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
475 |
|
!tolua_istype(tolua_S,2,LUA_TNUMBER,0) || |
476 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
477 |
|
!tolua_isnoobj(tolua_S,4) |
478 |
|
) |
479 |
|
goto tolua_lerror; |
480 |
|
else |
481 |
|
{ |
482 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
483 |
|
int x = ((int) tolua_getnumber(tolua_S,2,0)); |
484 |
|
int y = ((int) tolua_getnumber(tolua_S,3,0)); |
485 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'get_pixel'"); |
486 |
|
{ |
487 |
|
Uint32 toluaI_ret = (Uint32) self->get_pixel(x,y); |
488 |
|
tolua_pushnumber(tolua_S,(double)toluaI_ret); |
489 |
|
} |
490 |
|
} |
491 |
|
return 1; |
492 |
|
tolua_lerror: |
493 |
|
tolua_error(tolua_S,"#ferror in function 'get_pixel'."); |
494 |
|
return 0; |
495 |
|
} |
496 |
|
|
497 |
|
/* method: set_pixel of class Drawable */ |
498 |
|
static int toluaI_px_px_Drawable_set_pixel00(lua_State* tolua_S) |
499 |
|
{ |
500 |
|
if ( |
501 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
502 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
503 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
504 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
505 |
|
!tolua_isnoobj(tolua_S,5) |
506 |
|
) |
507 |
|
goto tolua_lerror; |
508 |
|
else |
509 |
|
{ |
510 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
511 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
512 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
513 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
514 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_pixel'"); |
515 |
|
{ |
516 |
|
self->set_pixel(*gs,x,y); |
517 |
|
} |
518 |
|
} |
519 |
|
return 0; |
520 |
|
tolua_lerror: |
521 |
|
tolua_error(tolua_S,"#ferror in function 'set_pixel'."); |
522 |
|
return 0; |
523 |
|
} |
524 |
|
|
525 |
|
/* method: set_pixels of class Drawable */ |
526 |
|
static int toluaI_px_px_Drawable_set_pixels00(lua_State* tolua_S) |
527 |
|
{ |
528 |
|
if ( |
529 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
530 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
531 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
532 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
533 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
534 |
|
!tolua_isnoobj(tolua_S,6) |
535 |
|
) |
536 |
|
goto tolua_lerror; |
537 |
|
else |
538 |
|
{ |
539 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
540 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
541 |
|
int n = ((int) tolua_getnumber(tolua_S,3,0)); |
542 |
|
const int x = ((const int) tolua_getnumber(tolua_S,4,0)); |
543 |
|
const int y = ((const int) tolua_getnumber(tolua_S,5,0)); |
544 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_pixels'"); |
545 |
|
{ |
546 |
|
self->set_pixels(*gs,n,&x,&y); |
547 |
|
tolua_pushnumber(tolua_S,(double)x); |
548 |
|
tolua_pushnumber(tolua_S,(double)y); |
549 |
|
} |
550 |
|
} |
551 |
|
return 2; |
552 |
|
tolua_lerror: |
553 |
|
tolua_error(tolua_S,"#ferror in function 'set_pixels'."); |
554 |
|
return 0; |
555 |
|
} |
556 |
|
|
557 |
|
/* method: hline of class Drawable */ |
558 |
|
static int toluaI_px_px_Drawable_hline00(lua_State* tolua_S) |
559 |
|
{ |
560 |
|
if ( |
561 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
562 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
563 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
564 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
565 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
566 |
|
!tolua_isnoobj(tolua_S,6) |
567 |
|
) |
568 |
|
goto tolua_lerror; |
569 |
|
else |
570 |
|
{ |
571 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
572 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
573 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
574 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
575 |
|
int w = ((int) tolua_getnumber(tolua_S,5,0)); |
576 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'hline'"); |
577 |
|
{ |
578 |
|
self->hline(*gs,x,y,w); |
579 |
|
} |
580 |
|
} |
581 |
|
return 0; |
582 |
|
tolua_lerror: |
583 |
|
tolua_error(tolua_S,"#ferror in function 'hline'."); |
584 |
|
return 0; |
585 |
|
} |
586 |
|
|
587 |
|
/* method: vline of class Drawable */ |
588 |
|
static int toluaI_px_px_Drawable_vline00(lua_State* tolua_S) |
589 |
|
{ |
590 |
|
if ( |
591 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
592 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
593 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
594 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
595 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
596 |
|
!tolua_isnoobj(tolua_S,6) |
597 |
|
) |
598 |
|
goto tolua_lerror; |
599 |
|
else |
600 |
|
{ |
601 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
602 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
603 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
604 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
605 |
|
int h = ((int) tolua_getnumber(tolua_S,5,0)); |
606 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'vline'"); |
607 |
|
{ |
608 |
|
self->vline(*gs,x,y,h); |
609 |
|
} |
610 |
|
} |
611 |
|
return 0; |
612 |
|
tolua_lerror: |
613 |
|
tolua_error(tolua_S,"#ferror in function 'vline'."); |
614 |
|
return 0; |
615 |
|
} |
616 |
|
|
617 |
|
/* method: line of class Drawable */ |
618 |
|
static int toluaI_px_px_Drawable_line00(lua_State* tolua_S) |
619 |
|
{ |
620 |
|
if ( |
621 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
622 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
623 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
624 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
625 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
626 |
|
!tolua_istype(tolua_S,6,LUA_TNUMBER,0) || |
627 |
|
!tolua_isnoobj(tolua_S,7) |
628 |
|
) |
629 |
|
goto tolua_lerror; |
630 |
|
else |
631 |
|
{ |
632 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
633 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
634 |
|
int x1 = ((int) tolua_getnumber(tolua_S,3,0)); |
635 |
|
int y1 = ((int) tolua_getnumber(tolua_S,4,0)); |
636 |
|
int x2 = ((int) tolua_getnumber(tolua_S,5,0)); |
637 |
|
int y2 = ((int) tolua_getnumber(tolua_S,6,0)); |
638 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'line'"); |
639 |
|
{ |
640 |
|
self->line(*gs,x1,y1,x2,y2); |
641 |
|
} |
642 |
|
} |
643 |
|
return 0; |
644 |
|
tolua_lerror: |
645 |
|
tolua_error(tolua_S,"#ferror in function 'line'."); |
646 |
|
return 0; |
647 |
|
} |
648 |
|
|
649 |
|
/* method: box of class Drawable */ |
650 |
|
static int toluaI_px_px_Drawable_box00(lua_State* tolua_S) |
651 |
|
{ |
652 |
|
if ( |
653 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || |
654 |
|
!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || |
655 |
|
!tolua_istype(tolua_S,3,LUA_TNUMBER,0) || |
656 |
|
!tolua_istype(tolua_S,4,LUA_TNUMBER,0) || |
657 |
|
!tolua_istype(tolua_S,5,LUA_TNUMBER,0) || |
658 |
|
!tolua_istype(tolua_S,6,LUA_TNUMBER,0) || |
659 |
|
!tolua_isnoobj(tolua_S,7) |
660 |
|
) |
661 |
|
goto tolua_lerror; |
662 |
|
else |
663 |
|
{ |
664 |
|
Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); |
665 |
|
const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); |
666 |
|
int x = ((int) tolua_getnumber(tolua_S,3,0)); |
667 |
|
int y = ((int) tolua_getnumber(tolua_S,4,0)); |
668 |
|
int w = ((int) tolua_getnumber(tolua_S,5,0)); |
669 |
|
int h = ((int) tolua_getnumber(tolua_S,6,0)); |
670 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'box'"); |
671 |
|
{ |
672 |
|
self->box(*gs,x,y,w,h); |
673 |
|
} |
674 |
|
} |
675 |
|
return 0; |
676 |
|
tolua_lerror: |
677 |
|
tolua_error(tolua_S,"#ferror in function 'box'."); |
678 |
|
return 0; |
679 |
|
} |
680 |
|
|
681 |
|
/* method: size of class Drawable */ |
682 |
|
static int toluaI_px_px_Drawable_size00(lua_State* tolua_S) |
683 |
|
{ |
684 |
|
if ( |
685 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"const Drawable"),0) || |
686 |
|
!tolua_isnoobj(tolua_S,2) |
687 |
|
) |
688 |
|
goto tolua_lerror; |
689 |
|
else |
690 |
|
{ |
691 |
|
const Drawable* self = (const Drawable*) tolua_getusertype(tolua_S,1,0); |
692 |
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'"); |
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'"); |
693 |
{ |
{ |
694 |
Rect toluaI_ret = (Rect) self->size(); |
Rect toluaI_ret = (Rect) self->size(); |
708 |
return 0; |
return 0; |
709 |
} |
} |
710 |
|
|
711 |
|
/* method: delete of class Surface */ |
712 |
|
static int toluaI_px_px_Surface_delete00(lua_State* tolua_S) |
713 |
|
{ |
714 |
|
if ( |
715 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Surface"),0) || |
716 |
|
!tolua_isnoobj(tolua_S,2) |
717 |
|
) |
718 |
|
goto tolua_lerror; |
719 |
|
else |
720 |
|
{ |
721 |
|
Surface* self = (Surface*) tolua_getusertype(tolua_S,1,0); |
722 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); |
723 |
|
delete self; |
724 |
|
} |
725 |
|
return 0; |
726 |
|
tolua_lerror: |
727 |
|
tolua_error(tolua_S,"#ferror in function 'delete'."); |
728 |
|
return 0; |
729 |
|
} |
730 |
|
|
731 |
/* method: width of class Surface */ |
/* method: width of class Surface */ |
732 |
static int toluaI_px_px_Surface_width00(lua_State* tolua_S) |
static int toluaI_px_px_Surface_width00(lua_State* tolua_S) |
733 |
{ |
{ |
774 |
return 0; |
return 0; |
775 |
} |
} |
776 |
|
|
777 |
|
/* method: get_surface of class Screen */ |
778 |
|
static int toluaI_px_px_Screen_get_surface00(lua_State* tolua_S) |
779 |
|
{ |
780 |
|
if ( |
781 |
|
!tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Screen"),0) || |
782 |
|
!tolua_isnoobj(tolua_S,2) |
783 |
|
) |
784 |
|
goto tolua_lerror; |
785 |
|
else |
786 |
|
{ |
787 |
|
Screen* self = (Screen*) tolua_getusertype(tolua_S,1,0); |
788 |
|
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'get_surface'"); |
789 |
|
{ |
790 |
|
Surface* toluaI_ret = (Surface*) self->get_surface(); |
791 |
|
tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"Surface")); |
792 |
|
} |
793 |
|
} |
794 |
|
return 1; |
795 |
|
tolua_lerror: |
796 |
|
tolua_error(tolua_S,"#ferror in function 'get_surface'."); |
797 |
|
return 0; |
798 |
|
} |
799 |
|
|
800 |
/* method: update_all of class Screen */ |
/* method: update_all of class Screen */ |
801 |
static int toluaI_px_px_Screen_update_all00(lua_State* tolua_S) |
static int toluaI_px_px_Screen_update_all00(lua_State* tolua_S) |
802 |
{ |
{ |
1052 |
tolua_function(tolua_S,"V2","new",toluaI_px_px_V2_new01); |
tolua_function(tolua_S,"V2","new",toluaI_px_px_V2_new01); |
1053 |
tolua_function(tolua_S,"V2","operator_set",toluaI_px_px_V2_operator_set00); |
tolua_function(tolua_S,"V2","operator_set",toluaI_px_px_V2_operator_set00); |
1054 |
tolua_function(tolua_S,"V2","operator_get",toluaI_px_px_V2_operator_get00); |
tolua_function(tolua_S,"V2","operator_get",toluaI_px_px_V2_operator_get00); |
1055 |
tolua_cclass(tolua_S,"Surface",""); |
tolua_cclass(tolua_S,"GS",""); |
1056 |
|
tolua_function(tolua_S,"GS","new",toluaI_px_px_GS_new00); |
1057 |
|
tolua_function(tolua_S,"GS","delete",toluaI_px_px_GS_delete00); |
1058 |
|
tolua_tablevar(tolua_S,"GS","cliprect",toluaI_get_px_px_GS_cliprect,toluaI_set_px_px_GS_cliprect); |
1059 |
|
tolua_tablevar(tolua_S,"GS","pcolor",toluaI_get_px_px_GS_pcolor,toluaI_set_px_px_GS_pcolor); |
1060 |
|
tolua_cclass(tolua_S,"Drawable",""); |
1061 |
|
tolua_function(tolua_S,"Drawable","delete",toluaI_px_px_Drawable_delete00); |
1062 |
|
tolua_function(tolua_S,"Drawable","map_color",toluaI_px_px_Drawable_map_color00); |
1063 |
|
tolua_function(tolua_S,"Drawable","map_color",toluaI_px_px_Drawable_map_color01); |
1064 |
|
tolua_function(tolua_S,"Drawable","blit",toluaI_px_px_Drawable_blit00); |
1065 |
|
tolua_function(tolua_S,"Drawable","blit",toluaI_px_px_Drawable_blit01); |
1066 |
|
tolua_function(tolua_S,"Drawable","get_pixel",toluaI_px_px_Drawable_get_pixel00); |
1067 |
|
tolua_function(tolua_S,"Drawable","set_pixel",toluaI_px_px_Drawable_set_pixel00); |
1068 |
|
tolua_function(tolua_S,"Drawable","set_pixels",toluaI_px_px_Drawable_set_pixels00); |
1069 |
|
tolua_function(tolua_S,"Drawable","hline",toluaI_px_px_Drawable_hline00); |
1070 |
|
tolua_function(tolua_S,"Drawable","vline",toluaI_px_px_Drawable_vline00); |
1071 |
|
tolua_function(tolua_S,"Drawable","line",toluaI_px_px_Drawable_line00); |
1072 |
|
tolua_function(tolua_S,"Drawable","box",toluaI_px_px_Drawable_box00); |
1073 |
|
tolua_function(tolua_S,"Drawable","size",toluaI_px_px_Drawable_size00); |
1074 |
|
tolua_cclass(tolua_S,"Surface","Drawable"); |
1075 |
tolua_function(tolua_S,"Surface","delete",toluaI_px_px_Surface_delete00); |
tolua_function(tolua_S,"Surface","delete",toluaI_px_px_Surface_delete00); |
|
tolua_function(tolua_S,"Surface","size",toluaI_px_px_Surface_size00); |
|
1076 |
tolua_function(tolua_S,"Surface","width",toluaI_px_px_Surface_width00); |
tolua_function(tolua_S,"Surface","width",toluaI_px_px_Surface_width00); |
1077 |
tolua_function(tolua_S,"Surface","height",toluaI_px_px_Surface_height00); |
tolua_function(tolua_S,"Surface","height",toluaI_px_px_Surface_height00); |
1078 |
tolua_cclass(tolua_S,"Screen","Surface"); |
tolua_cclass(tolua_S,"Screen",""); |
1079 |
|
tolua_function(tolua_S,"Screen","get_surface",toluaI_px_px_Screen_get_surface00); |
1080 |
tolua_function(tolua_S,"Screen","update_all",toluaI_px_px_Screen_update_all00); |
tolua_function(tolua_S,"Screen","update_all",toluaI_px_px_Screen_update_all00); |
1081 |
tolua_function(tolua_S,"Screen","update_rect",toluaI_px_px_Screen_update_rect00); |
tolua_function(tolua_S,"Screen","update_rect",toluaI_px_px_Screen_update_rect00); |
1082 |
tolua_function(tolua_S,"Screen","flush_updates",toluaI_px_px_Screen_flush_updates00); |
tolua_function(tolua_S,"Screen","flush_updates",toluaI_px_px_Screen_flush_updates00); |