[Moeng-cvs] BBRpg/src/editor aphoton.cpp, 1.4, 1.5 editor.h, 1.10, 1.11 gui_procs.h, 1.2, 1.3 scrip
Status: Alpha
Brought to you by:
b_lindeijer
From: Bjørn L. <b_l...@us...> - 2007-02-07 17:50:50
|
Update of /cvsroot/moeng/BBRpg/src/editor In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9875/src/editor Modified Files: aphoton.cpp editor.h gui_procs.h script.cpp Log Message: Converted files to use UNIX newlines and added Code::Blocks project file. Index: editor.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/editor.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** editor.h 23 Oct 2004 11:54:18 -0000 1.10 --- editor.h 7 Feb 2007 17:50:31 -0000 1.11 *************** *** 1,164 **** ! /* ! The Moonlight Engine - An extendable, portable, RPG-focused game engine. ! Project Home: http://moeng.sourceforge.net/ ! Copyright (C) 2003 Bjørn Lindeijer ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! */ ! ! #ifndef INCLUDED_EDITOR ! ! #include <allegro.h> ! #include <vector> ! #include "../shared/tiled_map.h" ! #include "../shared/console.h" ! #include "../shared/object.h" ! #include "../shared/module.h" ! ! ! #define PROGRAM_VERSION_STRING "RPG Edit III 0.9.2" ! ! ! // Global variables ! ! extern int debug_mode; ! extern FONT* engine_font; ! extern Console console; ! extern list<Object*> selectedObjects; ! extern int selectedObjectType; ! extern bool selecting; ! extern int selection_start_x, selection_end_x; ! extern int selection_start_y, selection_end_y; ! ! extern TiledMap* currentMap; ! extern TileType* selectedTile; ! extern int selectedTileset; ! extern int selectedObstacle; ! extern int selectedLayer; ! ! extern vector<char*> tileSets; ! extern vector<TileType*> activeTileset; ! ! extern int map_edit_mode; ! ! extern bool mapChanged; ! extern bool showTileGrid; ! extern bool snapToGrid; ! ! extern int selectedColor[6]; ! ! extern char map_filename[1024]; ! extern char status_message[1024]; ! extern char status_mapinfo[1024]; ! ! extern DIALOG main_dlg[]; ! extern DIALOG about_dlg[]; ! extern DIALOG import_tileset_dlg[]; ! extern DIALOG export_tileset_dlg[]; ! extern DIALOG resizemap_dlg[]; ! extern DIALOG newmap_dlg[]; ! extern DIALOG edit_tile_layer[]; ! extern DIALOG edit_obstacle_layer[]; ! extern DIALOG edit_objects_layer[]; ! ! extern MENU menu_file[]; ! extern MENU menu_main[]; ! extern MENU menu_edit[]; ! extern MENU menu_help[]; ! ! ! // Slider types (R, G, B, and H, S, V) ! ! #define S_R 0 ! #define S_G 1 ! #define S_B 2 ! #define S_H 3 ! #define S_S 4 ! #define S_V 5 ! ! #define S_C 6 ! ! ! // Map edit modes ! ! #define EM_TILE 0 ! #define EM_OBSTACLE 1 ! #define EM_OBJECTS 2 ! ! ! // Dialogs ! ! #define MAIN_START_OF_NULL 12 ! #define NEWMAP_OK 9 ! #define IMPORT_TILESET_OK 7 ! #define EXPORT_TILESET_OK 5 ! #define RESIZEMAP_OK 13 ! ! #define D_MAP main_dlg[3] ! #define D_SCROLL_VER main_dlg[4] ! #define D_SCROLL_HOR main_dlg[5] ! #define D_AUTOTEXT_STATUS main_dlg[8] ! #define D_AUTOTEXT_MAPINFO main_dlg[9] ! #define D_TILE main_dlg[ 1 + MAIN_START_OF_NULL] ! #define D_CHECK_GRID main_dlg[ 2 + MAIN_START_OF_NULL] ! #define D_CHECK_SNAP main_dlg[ 2 + MAIN_START_OF_NULL] ! #define D_TILESET_LIST main_dlg[16 + MAIN_START_OF_NULL] ! #define D_TILESET main_dlg[18 + MAIN_START_OF_NULL] ! #define D_TILESET_SCROLL main_dlg[19 + MAIN_START_OF_NULL] ! ! ! // Messages ! ! #define MSG_NEW_MAP MSG_USER ! #define MSG_NEW_TILESET MSG_USER ! ! ! // Flags ! ! #define SCROLL_VER D_USER ! ! ! // Menu item functions ! ! int menu_item_new_map(); ! int menu_item_load_map(); ! int menu_item_save_map(); ! int menu_item_save_map_as(); ! int menu_item_import_tileset(); ! int menu_item_export_tileset(); ! int menu_item_exit(); ! int menu_item_resize_map(); ! int menu_item_edit_tiles_1(); ! int menu_item_edit_tiles_2(); ! int menu_item_edit_obs(); ! int menu_item_edit_objects(); ! int menu_item_about(); ! int menu_item_toggle_debug(); ! int menu_item_save_map_image(); ! int menu_item_save_map_as_xml(); ! ! ! void update_screen(int x, int y, int w, int h); ! ! void deselect_objects(); ! void select_object(Object* obj); ! void select_objects(list<Object*> objs); ! void delete_objects(list<Object*> objs); ! ! void import_tile_bitmap( ! const char* filename, ! int tile_w, int tile_h, int spacing); ! ! void set_map_changed(bool value); ! bool close_current_map(); ! void update_window_title(); ! ! void set_dialog_size(DIALOG *d, int x, int y, int w, int h); ! ! void activate_mode(DIALOG* dialog); ! ! ! #endif --- 1,164 ---- ! /* ! The Moonlight Engine - An extendable, portable, RPG-focused game engine. ! Project Home: http://moeng.sourceforge.net/ ! Copyright (C) 2003 Bjørn Lindeijer ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! */ ! ! #ifndef INCLUDED_EDITOR ! ! #include <allegro.h> ! #include <vector> ! #include "../shared/tiled_map.h" ! #include "../shared/console.h" ! #include "../shared/object.h" ! #include "../shared/module.h" ! ! ! #define PROGRAM_VERSION_STRING "RPG Edit III 0.9.2" ! ! ! // Global variables ! ! extern int debug_mode; ! extern FONT* engine_font; ! extern Console console; ! extern list<Object*> selectedObjects; ! extern int selectedObjectType; ! extern bool selecting; ! extern int selection_start_x, selection_end_x; ! extern int selection_start_y, selection_end_y; ! ! extern TiledMap* currentMap; ! extern TileType* selectedTile; ! extern int selectedTileset; ! extern int selectedObstacle; ! extern int selectedLayer; ! ! extern vector<char*> tileSets; ! extern vector<TileType*> activeTileset; ! ! extern int map_edit_mode; ! ! extern bool mapChanged; ! extern bool showTileGrid; ! extern bool snapToGrid; ! ! extern int selectedColor[6]; ! ! extern char map_filename[1024]; ! extern char status_message[1024]; ! extern char status_mapinfo[1024]; ! ! extern DIALOG main_dlg[]; ! extern DIALOG about_dlg[]; ! extern DIALOG import_tileset_dlg[]; ! extern DIALOG export_tileset_dlg[]; ! extern DIALOG resizemap_dlg[]; ! extern DIALOG newmap_dlg[]; ! extern DIALOG edit_tile_layer[]; ! extern DIALOG edit_obstacle_layer[]; ! extern DIALOG edit_objects_layer[]; ! ! extern MENU menu_file[]; ! extern MENU menu_main[]; ! extern MENU menu_edit[]; ! extern MENU menu_help[]; ! ! ! // Slider types (R, G, B, and H, S, V) ! ! #define S_R 0 ! #define S_G 1 ! #define S_B 2 ! #define S_H 3 ! #define S_S 4 ! #define S_V 5 ! ! #define S_C 6 ! ! ! // Map edit modes ! ! #define EM_TILE 0 ! #define EM_OBSTACLE 1 ! #define EM_OBJECTS 2 ! ! ! // Dialogs ! ! #define MAIN_START_OF_NULL 12 ! #define NEWMAP_OK 9 ! #define IMPORT_TILESET_OK 7 ! #define EXPORT_TILESET_OK 5 ! #define RESIZEMAP_OK 13 ! ! #define D_MAP main_dlg[3] ! #define D_SCROLL_VER main_dlg[4] ! #define D_SCROLL_HOR main_dlg[5] ! #define D_AUTOTEXT_STATUS main_dlg[8] ! #define D_AUTOTEXT_MAPINFO main_dlg[9] ! #define D_TILE main_dlg[ 1 + MAIN_START_OF_NULL] ! #define D_CHECK_GRID main_dlg[ 2 + MAIN_START_OF_NULL] ! #define D_CHECK_SNAP main_dlg[ 2 + MAIN_START_OF_NULL] ! #define D_TILESET_LIST main_dlg[16 + MAIN_START_OF_NULL] ! #define D_TILESET main_dlg[18 + MAIN_START_OF_NULL] ! #define D_TILESET_SCROLL main_dlg[19 + MAIN_START_OF_NULL] ! ! ! // Messages ! ! #define MSG_NEW_MAP MSG_USER ! #define MSG_NEW_TILESET MSG_USER ! ! ! // Flags ! ! #define SCROLL_VER D_USER ! ! ! // Menu item functions ! ! int menu_item_new_map(); ! int menu_item_load_map(); ! int menu_item_save_map(); ! int menu_item_save_map_as(); ! int menu_item_import_tileset(); ! int menu_item_export_tileset(); ! int menu_item_exit(); ! int menu_item_resize_map(); ! int menu_item_edit_tiles_1(); ! int menu_item_edit_tiles_2(); ! int menu_item_edit_obs(); ! int menu_item_edit_objects(); ! int menu_item_about(); ! int menu_item_toggle_debug(); ! int menu_item_save_map_image(); ! int menu_item_save_map_as_xml(); ! ! ! void update_screen(int x, int y, int w, int h); ! ! void deselect_objects(); ! void select_object(Object* obj); ! void select_objects(list<Object*> objs); ! void delete_objects(list<Object*> objs); ! ! void import_tile_bitmap( ! const char* filename, ! int tile_w, int tile_h, int spacing); ! ! void set_map_changed(bool value); ! bool close_current_map(); ! void update_window_title(); ! ! void set_dialog_size(DIALOG *d, int x, int y, int w, int h); ! ! void activate_mode(DIALOG* dialog); ! ! ! #endif Index: gui_procs.h =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/gui_procs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gui_procs.h 23 Oct 2004 11:54:18 -0000 1.2 --- gui_procs.h 7 Feb 2007 17:50:31 -0000 1.3 *************** *** 1,36 **** ! /* ! * The Moonlight RPG engine (see readme.txt about version info) ! * By Bjørn Lindeijer ! * ! ************************************************************************************/ ! ! #ifndef GUIPROCS_INCLUDED ! #define GUIPROCS_INCLUDED ! ! // GUI procs ! ! int d_bjorn_scroll_proc(int msg, DIALOG *d, int c); ! int d_bjorn_camera_knop(int msg, DIALOG *d, int c); ! int d_bjorn_map_proc(int msg, DIALOG *d, int c); ! int d_bjorn_tile_proc(int msg, DIALOG *d, int c); ! int d_bjorn_check_grid(int msg, DIALOG *d, int c); ! int d_bjorn_color_proc(int msg, DIALOG *d, int c); ! int d_bjorn_close_proc(int msg, DIALOG *d, int c); ! int d_bjorn_edit_proc(int msg, DIALOG *d, int c); ! int d_bjorn_objects_list(int msg, DIALOG *d, int c); ! int d_bjorn_tileset_list(int msg, DIALOG *d, int c); ! int d_bjorn_tileset(int msg, DIALOG *d, int c); ! int d_bjorn_autotext_proc(int msg, DIALOG *d, int c); ! int d_bjorn_slider_proc(int msg, DIALOG *d, int c); ! int d_bjorn_obs_preset_proc(int msg, DIALOG *d, int c); ! int d_bjorn_obs_proc(int msg, DIALOG *d, int c); ! int d_bjorn_check_snap(int msg, DIALOG *d, int c); ! ! int update_color(void *dp3, int d2); ! void resizemap_change(DIALOG *d); ! ! char *list_tilesets(int index, int *list_size); ! const char *list_objects(int index, int *list_size); ! ! ! #endif --- 1,36 ---- ! /* ! * The Moonlight RPG engine (see readme.txt about version info) ! * By Bjørn Lindeijer ! * ! ************************************************************************************/ ! ! #ifndef GUIPROCS_INCLUDED ! #define GUIPROCS_INCLUDED ! ! // GUI procs ! ! int d_bjorn_scroll_proc(int msg, DIALOG *d, int c); ! int d_bjorn_camera_knop(int msg, DIALOG *d, int c); ! int d_bjorn_map_proc(int msg, DIALOG *d, int c); ! int d_bjorn_tile_proc(int msg, DIALOG *d, int c); ! int d_bjorn_check_grid(int msg, DIALOG *d, int c); ! int d_bjorn_color_proc(int msg, DIALOG *d, int c); ! int d_bjorn_close_proc(int msg, DIALOG *d, int c); ! int d_bjorn_edit_proc(int msg, DIALOG *d, int c); ! int d_bjorn_objects_list(int msg, DIALOG *d, int c); ! int d_bjorn_tileset_list(int msg, DIALOG *d, int c); ! int d_bjorn_tileset(int msg, DIALOG *d, int c); ! int d_bjorn_autotext_proc(int msg, DIALOG *d, int c); ! int d_bjorn_slider_proc(int msg, DIALOG *d, int c); ! int d_bjorn_obs_preset_proc(int msg, DIALOG *d, int c); ! int d_bjorn_obs_proc(int msg, DIALOG *d, int c); ! int d_bjorn_check_snap(int msg, DIALOG *d, int c); ! ! int update_color(void *dp3, int d2); ! void resizemap_change(DIALOG *d); ! ! char *list_tilesets(int index, int *list_size); ! const char *list_objects(int index, int *list_size); ! ! ! #endif Index: aphoton.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/aphoton.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** aphoton.cpp 23 Oct 2004 11:54:18 -0000 1.4 --- aphoton.cpp 7 Feb 2007 17:50:31 -0000 1.5 *************** *** 794,798 **** rectfill(screen, x+2, y+1, x+w-3, y+h-3, highlight); } else { ! rectfill(screen, x+2, y+1, x+w-3, y+h-3, menu_gray_to); // was menu_gray_from } } --- 794,798 ---- rectfill(screen, x+2, y+1, x+w-3, y+h-3, highlight); } else { ! rectfill(screen, x+2, y+1, x+w-3, y+h-3, menu_gray_to); // was menu_gray_from } } Index: script.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/editor/script.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** script.cpp 27 Jan 2007 02:14:47 -0000 1.8 --- script.cpp 7 Feb 2007 17:50:31 -0000 1.9 *************** *** 1,641 **** ! /* ! The Moonlight Engine - An extendable, portable, RPG-focused game engine. ! Project Home: http://moeng.sourceforge.net/ ! Copyright (C) 2003 Bjørn Lindeijer ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! */ [...1253 lines suppressed...] ! 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); ! if (newMap != obj->getMap()) obj->setMap(newMap); ! } ! else { ! // Deal with the assigned value normally ! lua_rawset(L, -3); ! } ! } ! ! lua_settop(L, 0); ! return 0; ! } |