[Moeng-cvs] BBRpg/src/editor agup.cpp,1.1,1.2 aphoton.cpp,1.3,1.4 aphoton.h,1.1,1.2 editor.cpp,1.10,
Status: Alpha
Brought to you by:
b_lindeijer
Update of /cvsroot/moeng/BBRpg/src/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3801/editor Modified Files: agup.cpp aphoton.cpp aphoton.h editor.cpp editor.h gui_procs.cpp gui_procs.h main.cpp script.cpp script.h Log Message: Merged in some engine changes from DGE/hecate to BBRpg on SourceForge Index: main.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 25 Apr 2004 16:39:52 -0000 1.9 --- main.cpp 23 Oct 2004 11:54:18 -0000 1.10 *************** *** 15,22 **** #include "aphoton.h" #include "editor.h" - #include "../shared/tiled_map.h" #include "script.h" #include "../common.h" ! #include "../shared/engine.h" #include "../shared/module.h" --- 15,21 ---- #include "aphoton.h" #include "editor.h" #include "script.h" #include "../common.h" ! #include "../shared/tiled_map.h" #include "../shared/module.h" *************** *** 221,230 **** // Edit objects area ! w = 123; h = 120; x = margin; y = main_dlg[6].y - margin - h; set_dialog_size(&edit_objects_layer[0], x, y, w, h); ! set_dialog_size(&edit_objects_layer[1], 136, main_dlg[6].y - margin - 14, 97, 14); --- 220,229 ---- // Edit objects area ! w = 160; h = 120; x = margin; y = main_dlg[6].y - margin - h; set_dialog_size(&edit_objects_layer[0], x, y, w, h); ! set_dialog_size(&edit_objects_layer[1], w + margin * 2, main_dlg[6].y - margin - 14, 97, 14); *************** *** 257,261 **** currentMap = new SquareMap(TILES_W, TILES_H); ! ustrcpy(map_filename, "untitled.map"); // Load map specified in rpgedit.cfg --- 256,260 ---- currentMap = new SquareMap(TILES_W, TILES_H); ! ustrcpy(map_filename, "untitled.tmx"); // Load map specified in rpgedit.cfg Index: aphoton.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/aphoton.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aphoton.h 8 Dec 2003 01:38:54 -0000 1.1 --- aphoton.h 23 Oct 2004 11:54:18 -0000 1.2 *************** *** 13,17 **** void aphoton_shutdown(void); ! void photon_scrollbar(BITMAP *bmp, int x, int y, int w, int h, int vert, int pos, int len); void photon_container(BITMAP *bmp, int x, int y, int w, int h); --- 13,18 ---- void aphoton_shutdown(void); ! void photon_scrollbar(BITMAP *bmp, int x, int y, int w, int h, ! int vert, int pos, int len); void photon_container(BITMAP *bmp, int x, int y, int w, int h); Index: editor.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/editor.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** editor.h 13 Apr 2004 12:26:08 -0000 1.9 --- editor.h 23 Oct 2004 11:54:18 -0000 1.10 *************** *** 25,29 **** // Global variables - extern Module *module; extern int debug_mode; extern FONT* engine_font; --- 25,28 ---- Index: agup.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/agup.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** agup.cpp 8 Dec 2003 01:38:54 -0000 1.1 --- agup.cpp 23 Oct 2004 11:54:18 -0000 1.2 *************** *** 23,29 **** { if ((theme = thm)) { ! theme->init(); ! agup_fg_color = *(theme->fg_color); ! agup_bg_color = *(theme->bg_color); } } --- 23,29 ---- { if ((theme = thm)) { ! theme->init(); ! agup_fg_color = *(theme->fg_color); ! agup_bg_color = *(theme->bg_color); } } *************** *** 33,46 **** { if (theme) { ! theme->shutdown(); ! theme = NULL; } } ! #define MAKE_WRAPPER(wrapper, proc) \ ! int wrapper(int msg, DIALOG *d, int c) \ ! { \ ! return ((theme) && (theme->proc)) ? theme->proc(msg, d, c) : D_O_K; \ } --- 33,46 ---- { if (theme) { ! theme->shutdown(); ! theme = NULL; } } ! #define MAKE_WRAPPER(wrapper, proc) \ ! int wrapper(int msg, DIALOG *d, int c) \ ! { \ ! return ((theme) && (theme->proc)) ? theme->proc(msg, d, c) : D_O_K; \ } Index: gui_procs.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/gui_procs.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gui_procs.cpp 13 Apr 2004 12:26:08 -0000 1.10 --- gui_procs.cpp 23 Oct 2004 11:54:18 -0000 1.11 *************** *** 15,21 **** #include "gui_procs.h" #include "editor.h" - #include "../shared/tiled_map.h" #include "script.h" ! #include "../shared/engine.h" #include "../shared/object.h" #include "../common.h" --- 15,20 ---- #include "gui_procs.h" #include "editor.h" [...2568 lines suppressed...] ! itop = inew_map_h - currentMap->getHeight() - ibottom; ! resizemap_dlg[7].flags |= D_DIRTY; ! } ! if (d == &resizemap_dlg[11]) { ! iright = inew_map_w - currentMap->getWidth() - ileft; ! resizemap_dlg[12].flags |= D_DIRTY; ! } ! if (d == &resizemap_dlg[12]) { ! ileft = inew_map_w - currentMap->getWidth() - iright; ! resizemap_dlg[11].flags |= D_DIRTY; ! } ! uszprintf((char*)resizemap_dlg[3].dp, 8, "%d", inew_map_w); ! uszprintf((char*)resizemap_dlg[4].dp, 8, "%d", inew_map_h); ! uszprintf((char*)resizemap_dlg[7].dp, 8, "%d", itop); ! uszprintf((char*)resizemap_dlg[8].dp, 8, "%d", ibottom); ! uszprintf((char*)resizemap_dlg[11].dp, 8, "%d", ileft); ! uszprintf((char*)resizemap_dlg[12].dp, 8, "%d", iright); } Index: gui_procs.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/gui_procs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gui_procs.h 8 Dec 2003 01:38:54 -0000 1.1 --- gui_procs.h 23 Oct 2004 11:54:18 -0000 1.2 *************** *** 31,35 **** char *list_tilesets(int index, int *list_size); ! char *list_objects(int index, int *list_size); --- 31,35 ---- char *list_tilesets(int index, int *list_size); ! const char *list_objects(int index, int *list_size); Index: script.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/script.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** script.h 13 Apr 2004 12:26:08 -0000 1.3 --- script.h 23 Oct 2004 11:54:19 -0000 1.4 *************** *** 26,30 **** extern lua_State* L; ! extern vector<char*> objectTypes; --- 26,30 ---- extern lua_State* L; ! extern vector<std::string> objectTypes; *************** *** 36,40 **** void handleLuaError(int err, const char *string); ! int callMemberFunction(int tableRef, const char *function, const char *argfmt = NULL, ...); int callFunction(const char *function, const char *argfmt = NULL, ...); --- 36,41 ---- void handleLuaError(int err, const char *string); ! int callMemberFunction(int tableRef, const char *function, ! const char *argfmt = NULL, ...); int callFunction(const char *function, const char *argfmt = NULL, ...); Index: editor.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/editor.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** editor.cpp 25 Apr 2004 16:39:52 -0000 1.10 --- editor.cpp 23 Oct 2004 11:54:18 -0000 1.11 *************** *** 20,24 **** #include "gui_procs.h" #include "../shared/tiled_map.h" - #include "../shared/engine.h" #include "../shared/object.h" #include "../shared/module.h" --- 20,23 ---- *************** *** 165,170 **** { /*(proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3)*/ ! { d_bjorn_objects_list, 6, 454, 123, 120, 0, 0, 0, 0, 0, 0, (void*)list_objects, NULL, NULL }, ! { d_bjorn_check_snap, 136, 560, 97, 14, 0, 0, 0, 0, 1, 0, (void*)"Snap to grid", NULL, NULL }, { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; --- 164,169 ---- { /*(proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3)*/ ! { d_bjorn_objects_list, 6, 454, 153, 120, 0, 0, 0, 0, 0, 0, (void*)list_objects, NULL, NULL }, ! { d_bjorn_check_snap, 166, 560, 97, 14, 0, 0, 0, 0, 1, 0, (void*)"Snap to grid", NULL, NULL }, { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; *************** *** 274,278 **** { "&Save map", menu_item_save_map, NULL, 0, NULL }, { "Save map &as...", menu_item_save_map_as_xml, NULL, 0, NULL }, - { "Save &old map as...", menu_item_save_map_as, NULL, 0, NULL }, { "Save map image", menu_item_save_map_image, NULL, 0, NULL }, { "", NULL, NULL, 0, NULL }, --- 273,276 ---- *************** *** 345,349 **** currentMap->resizeTo(0, 0); currentMap->resizeTo(imap_w, imap_h); ! ustrzcpy(map_filename, sizeof map_filename, "untitled.map"); object_message(&D_MAP, MSG_NEW_MAP, 0); set_map_changed(false); --- 343,347 ---- currentMap->resizeTo(0, 0); currentMap->resizeTo(imap_w, imap_h); ! ustrzcpy(map_filename, sizeof map_filename, "untitled.tmx"); object_message(&D_MAP, MSG_NEW_MAP, 0); set_map_changed(false); *************** *** 368,372 **** if (file_select_ex( ! "Load XML map... (*.map)", path_buf, "map", sizeof path_buf, MAX(OLD_FILESEL_WIDTH, SCREEN_W / 2), MAX(OLD_FILESEL_HEIGHT, SCREEN_H / 2) --- 366,370 ---- if (file_select_ex( ! "Load XML map... (*.tmx)", path_buf, "tmx", sizeof path_buf, MAX(OLD_FILESEL_WIDTH, SCREEN_W / 2), MAX(OLD_FILESEL_HEIGHT, SCREEN_H / 2) *************** *** 420,425 **** if (!currentMap) return D_O_K; ! if (ustrcmp(map_filename, "untitled.map") == 0) { ! menu_item_save_map_as(); return D_O_K; } --- 418,423 ---- if (!currentMap) return D_O_K; ! if (ustrcmp(map_filename, "untitled.tmx") == 0) { ! menu_item_save_map_as_xml(); return D_O_K; } *************** *** 442,474 **** } - int menu_item_save_map_as() - { - if (!currentMap) return D_O_K; - - char path_buf[1024]; - - ustrcpy(path_buf, map_filename); - - if (file_select_ex( - "Save old map... (*.map)", path_buf, "map", sizeof path_buf, - MAX(OLD_FILESEL_WIDTH, SCREEN_W / 2), - MAX(OLD_FILESEL_HEIGHT, SCREEN_H / 2) - )) - { - PACKFILE *file = pack_fopen(path_buf, F_WRITE_PACKED); - if (file) { - currentMap->saveTo(file); - pack_fclose(file); - ustrcpy(map_filename, path_buf); - set_map_changed(false); - update_window_title(); - } else { - alert(NULL, "Error while trying to save map!", - NULL, "OK", NULL, 13, 0); - } - } - return D_O_K; - } - int menu_item_import_tileset() { --- 440,443 ---- *************** *** 747,751 **** if (file_select_ex( ! "Save map... (*.map)", path_buf, "map", sizeof path_buf, MAX(OLD_FILESEL_WIDTH, SCREEN_W / 2), MAX(OLD_FILESEL_HEIGHT, SCREEN_H / 2) --- 716,720 ---- if (file_select_ex( ! "Save map... (*.tmx)", path_buf, "tmx", sizeof path_buf, MAX(OLD_FILESEL_WIDTH, SCREEN_W / 2), MAX(OLD_FILESEL_HEIGHT, SCREEN_H / 2) Index: aphoton.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/aphoton.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** aphoton.cpp 13 Apr 2004 12:26:08 -0000 1.3 --- aphoton.cpp 23 Oct 2004 11:54:18 -0000 1.4 *************** *** 1,9 **** /* aphoton.c ! * ! * This file is part of the Allegro GUI Un-uglification Project. ! * It emulates the look of the QNX Photon MicroGUI widget set. ! * ! * Eric Botcazou <ebo...@mu...> ! */ --- 1,9 ---- [...1634 lines suppressed...] ! window_blue_range.from.g = int(149 * b); ! window_blue_range.from.b = int(233 * b); ! window_blue_range.to.r = int(71 * b); ! window_blue_range.to.g = int(118 * b); ! window_blue_range.to.b = int(202 * b); ! black = makecol(0, 0, 0); ! white = makecol(int(255 * b), int(255 * b), int(255 * b)); ! normal = makecol(int(216 * b), int(216 * b), int(216 * b)); ! highlight = makecol(int(144 * b), int(152 * b), int(248 * b)); ! shadow = makecol(int(127 * b), int(127 * b), int(127 * b)); ! aphoton_fg_color = black; aphoton_bg_color = normal; ! radio_bmp = generate_bitmap(radio, 14, 14); radio_sel_bmp = generate_bitmap(radio_sel, 14, 14); ! menu_arrow_bmp = generate_bitmap(menu_arrow, 6, 8); gui_menu_draw_menu = photon_draw_menu; Index: script.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/script.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** script.cpp 13 Apr 2004 12:26:08 -0000 1.6 --- script.cpp 23 Oct 2004 11:54:18 -0000 1.7 *************** *** 12,20 **** #include <allegro.h> #include <stdarg.h> - #include "../shared/engine.h" - #include "../shared/object.h" #include "editor.h" - #include "../shared/console.h" #include "script.h" #include <vector> --- 12,20 ---- #include <allegro.h> #include <stdarg.h> #include "editor.h" #include "script.h" + #include "../common.h" + #include "../shared/object.h" + #include "../shared/console.h" #include <vector> *************** *** 23,27 **** lua_State* L = NULL; ! vector<char*> objectTypes; --- 23,27 ---- lua_State* L = NULL; ! vector<std::string> objectTypes; *************** *** 85,89 **** lua_register(L, "m_get_bitmap", l_get_bitmap); - lua_register(L, "m_load_map", l_load_map); lua_register(L, "m_create_sub_bitmap", l_create_sub_bitmap); lua_register(L, "m_bitmap_size", l_bitmap_size); --- 85,88 ---- *************** *** 103,106 **** --- 102,108 ---- console.log(CON_LOG, CON_ALWAYS, "Loading scripts..."); module->loadScripts(); + #ifndef WIN32 + std::sort(objectTypes.begin(), objectTypes.end()); + #endif } *************** *** 484,511 **** - int l_load_map(lua_State *L) - { - const char *map_name; - getLuaArguments(L, "s", &map_name); - - if (exists(map_name)) { - console.log(CON_LOG, CON_ALWAYS, "Loading map \"%s\"...", map_name); - TiledMap* map = new SquareMap(TILES_W, TILES_H); - map->loadMap(map_name); - maps.push_front(map); - return putLuaArguments(L, "m", map); - } - else { - if (debug_mode) { - luaL_error(L, "Error: Attempt to load a non-existing map (%s)!", map_name); - } - else { - console.log(CON_LOG | CON_CONSOLE, CON_ALWAYS, "Warning: Attempt to load a non-existing map (%s)!", map_name); - } - } - - return 0; - } - --- 486,489 ---- *************** *** 531,551 **** } ! if (strcmp(index, "speed" ) == 0) {return putLuaArguments(L, "d", obj->speed );} ! if (strcmp(index, "walking" ) == 0) {return putLuaArguments(L, "d", obj->walking );} ! if (strcmp(index, "x" ) == 0) {return putLuaArguments(L, "d", obj->x );} ! if (strcmp(index, "y" ) == 0) {return putLuaArguments(L, "d", obj->y );} ! if (strcmp(index, "w" ) == 0) {return putLuaArguments(L, "i", obj->w );} ! if (strcmp(index, "h" ) == 0) {return putLuaArguments(L, "i", obj->h );} ! if (strcmp(index, "offset_x" ) == 0) {return putLuaArguments(L, "i", obj->offset_x );} ! if (strcmp(index, "offset_y" ) == 0) {return putLuaArguments(L, "i", obj->offset_y );} ! if (strcmp(index, "offset_z" ) == 0) {return putLuaArguments(L, "i", obj->offset_z );} ! if (strcmp(index, "draw_mode") == 0) {return putLuaArguments(L, "i", obj->drawMode );} ! if (strcmp(index, "alpha" ) == 0) {return putLuaArguments(L, "i", obj->alpha );} ! if (strcmp(index, "dir" ) == 0) {return putLuaArguments(L, "i", obj->dir );} ! if (strcmp(index, "tick_time") == 0) {return putLuaArguments(L, "i", obj->tick );} ! if (strcmp(index, "obstacle" ) == 0) {return putLuaArguments(L, "i", obj->obstacle );} ! if (strcmp(index, "bitmap" ) == 0) {return putLuaArguments(L, "b", obj->bitmap );} ! if (strcmp(index, "map" ) == 0) {return putLuaArguments(L, "m", obj->getMap() );} ! if (strcmp(index, "id" ) == 0) {return putLuaArguments(L, "i", obj->id );} // None of the above, so deal with the value normally --- 509,546 ---- } ! if (strcmp(index, "speed" ) == 0) { ! return putLuaArguments(L, "d", obj->speed );} ! if (strcmp(index, "walking" ) == 0) { ! return putLuaArguments(L, "d", obj->walking );} ! if (strcmp(index, "x" ) == 0) { ! return putLuaArguments(L, "d", obj->x );} ! if (strcmp(index, "y" ) == 0) { ! return putLuaArguments(L, "d", obj->y );} ! if (strcmp(index, "w" ) == 0) { ! return putLuaArguments(L, "d", obj->w );} ! if (strcmp(index, "h" ) == 0) { ! return putLuaArguments(L, "d", obj->h );} ! if (strcmp(index, "offset_x" ) == 0) { ! return putLuaArguments(L, "i", obj->offset_x );} ! if (strcmp(index, "offset_y" ) == 0) { ! return putLuaArguments(L, "i", obj->offset_y );} ! if (strcmp(index, "offset_z" ) == 0) { ! return putLuaArguments(L, "i", obj->offset_z );} ! if (strcmp(index, "draw_mode") == 0) { ! return putLuaArguments(L, "i", obj->drawMode );} ! if (strcmp(index, "alpha" ) == 0) { ! return putLuaArguments(L, "i", obj->alpha );} ! if (strcmp(index, "dir" ) == 0) { ! return putLuaArguments(L, "i", obj->dir );} ! if (strcmp(index, "tick_time") == 0) { ! return putLuaArguments(L, "i", obj->tick );} ! if (strcmp(index, "obstacle" ) == 0) { ! return putLuaArguments(L, "i", obj->obstacle );} ! if (strcmp(index, "bitmap" ) == 0) { ! return putLuaArguments(L, "b", obj->bitmap );} ! if (strcmp(index, "map" ) == 0) { ! return putLuaArguments(L, "m", obj->getMap() );} ! if (strcmp(index, "id" ) == 0) { ! return putLuaArguments(L, "i", obj->id );} // None of the above, so deal with the value normally *************** *** 602,620 **** } ! if (strcmp(index, "speed" ) == 0) {obj->speed = lua_tonumber(L, -1);} ! else if (strcmp(index, "walking" ) == 0) {obj->walking = lua_tonumber(L, -1);} ! else if (strcmp(index, "x" ) == 0) {obj->x = lua_tonumber(L, -1);} ! else if (strcmp(index, "y" ) == 0) {obj->y = lua_tonumber(L, -1);} ! else if (strcmp(index, "w" ) == 0) {obj->w = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "h" ) == 0) {obj->h = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_x" ) == 0) {obj->offset_x = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_y" ) == 0) {obj->offset_y = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_z" ) == 0) {obj->offset_z = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "draw_mode") == 0) {obj->drawMode = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "alpha" ) == 0) {obj->alpha = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "dir" ) == 0) {obj->dir = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "tick_time") == 0) {obj->tick = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "obstacle" ) == 0) {obj->obstacle = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "bitmap" ) == 0) {obj->bitmap = (BITMAP*)lua_touserdata(L, -1);} else if (strcmp(index, "map" ) == 0) { TiledMap* newMap = (TiledMap*)lua_touserdata(L, -1); --- 597,630 ---- } ! if (strcmp(index, "speed" ) == 0) { ! obj->speed = lua_tonumber(L, -1);} ! else if (strcmp(index, "walking" ) == 0) { ! obj->walking = lua_tonumber(L, -1);} ! else if (strcmp(index, "x" ) == 0) { ! obj->setX(lua_tonumber(L, -1));} ! else if (strcmp(index, "y" ) == 0) { ! obj->setY(lua_tonumber(L, -1));} ! else if (strcmp(index, "w" ) == 0) { ! obj->w = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "h" ) == 0) { ! obj->h = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_x" ) == 0) { ! obj->offset_x = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_y" ) == 0) { ! obj->offset_y = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "offset_z" ) == 0) { ! obj->offset_z = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "draw_mode") == 0) { ! obj->drawMode = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "alpha" ) == 0) { ! obj->alpha = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "dir" ) == 0) { ! obj->dir = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "tick_time") == 0) { ! obj->tick = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "obstacle" ) == 0) { ! obj->obstacle = (int)lua_tonumber(L, -1);} ! else if (strcmp(index, "bitmap" ) == 0) { ! obj->bitmap = (BITMAP*)lua_touserdata(L, -1);} else if (strcmp(index, "map" ) == 0) { TiledMap* newMap = (TiledMap*)lua_touserdata(L, -1); |