X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=6eddb53887c3483bd736fde357bcc36d6b824bf1;hb=f73fd0cea8ac4e9836ea9a4c12c89be0acef03ba;hp=a8d7cf0758f1df8c02063b499dc70dcdb32e9797;hpb=abe44529b439ad39b4d8dbf19cbd67c9b9844279;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index a8d7cf07..6eddb538 100644 --- a/src/main.h +++ b/src/main.h @@ -29,10 +29,6 @@ #include "conf_mus.h" /* include auto-generated data structure definitions */ -#define NEW_GAME_TILESIZE 1 -#define NEW_TILESIZE 1 -#define NEW_SCROLL 1 - #define IMG_UNDEFINED (-1) #define IMG_EMPTY IMG_EMPTY_SPACE #define IMG_SP_EMPTY IMG_EMPTY_SPACE @@ -45,17 +41,8 @@ #define SND_UNDEFINED (-1) #define MUS_UNDEFINED (-1) -#if 0 -#define WIN_XSIZE 672 -#define WIN_YSIZE 560 -#endif - #define DEFAULT_FULLSCREEN_MODE "800x600" -#if 0 -#define SCR_FIELDX 17 -#define SCR_FIELDY 17 -#endif #define MAX_BUF_XSIZE (SCR_FIELDX + 2) #define MAX_BUF_YSIZE (SCR_FIELDY + 2) #define MIN_LEV_FIELDX 3 @@ -768,27 +755,7 @@ #define IS_DC_STEELWALL_2(e) ((e) >= EL_DC_STEELWALL_2_LEFT && \ (e) <= EL_DC_STEELWALL_2_SINGLE) -#if 1 - -#if 1 #define GFX_ELEMENT(e) (element_info[e].gfx_element) -#else -#define GFX_ELEMENT(e) (element_info[e].gfx_element == \ - (element_info[e].use_gfx_element ? \ - element_info[e].gfx_element : e) ? \ - element_info[e].gfx_element : \ - element_info[e].gfx_element + \ - 0 * printf("::: %d: %d <-> %d\n", \ - e, \ - element_info[e].gfx_element, \ - element_info[e].use_gfx_element ? \ - element_info[e].gfx_element : e)) -#endif - -#else -#define GFX_ELEMENT(e) (element_info[e].use_gfx_element ? \ - element_info[e].gfx_element : e) -#endif /* !!! CHECK THIS !!! */ #if 1 @@ -949,18 +916,6 @@ #define MAX_INITIAL_INVENTORY_SIZE 8 /* often used screen positions */ -#if 0 -#define SX 8 -#define SY 8 -#define REAL_SX (SX - 2) -#define REAL_SY (SY - 2) -#define DX 566 -#define DY 60 -#define VX DX -#define VY 400 -#define EX DX -#define EY (VY - 44) -#endif #define TILESIZE 32 #define TILEX TILESIZE #define TILEY TILESIZE @@ -974,53 +929,9 @@ #define MICRO_TILEY MICRO_TILESIZE #define MIDPOSX (SCR_FIELDX / 2) #define MIDPOSY (SCR_FIELDY / 2) -#if NEW_TILESIZE -#if NEW_SCROLL -#if 0 -#define SXSIZE (SCR_FIELDX * TILEX_VAR) -#define SYSIZE (SCR_FIELDY * TILEY_VAR) -#endif #define FXSIZE ((2 + SCR_FIELDX + 2) * TILEX_VAR) #define FYSIZE ((2 + SCR_FIELDY + 2) * TILEY_VAR) -#else -#if 0 -#define SXSIZE (SCR_FIELDX * TILEX_VAR) -#define SYSIZE (SCR_FIELDY * TILEY_VAR) -#endif -#define FXSIZE ((SCR_FIELDX + 2) * TILEX_VAR) -#define FYSIZE ((SCR_FIELDY + 2) * TILEY_VAR) -#endif -#else -#if NEW_SCROLL -#if 0 -#define SXSIZE (SCR_FIELDX * TILEX) -#define SYSIZE (SCR_FIELDY * TILEY) -#endif -#define FXSIZE ((2 + SCR_FIELDX + 2) * TILEX) -#define FYSIZE ((2 + SCR_FIELDY + 2) * TILEY) -#else -#if 0 -#define SXSIZE (SCR_FIELDX * TILEX) -#define SYSIZE (SCR_FIELDY * TILEY) -#endif -#define FXSIZE ((SCR_FIELDX + 2) * TILEX) -#define FYSIZE ((SCR_FIELDY + 2) * TILEY) -#endif -#endif -#if 0 -#define DXSIZE 100 -#define DYSIZE 280 -#define VXSIZE DXSIZE -#define VYSIZE 100 -#define EXSIZE DXSIZE -#define EYSIZE (VYSIZE + 44) -#endif - -#if 0 -#define FULL_SXSIZE (2 + SXSIZE + 2) -#define FULL_SYSIZE (2 + SYSIZE + 2) -#endif #define MICROLEVEL_XSIZE ((STD_LEV_FIELDX + 2) * MICRO_TILEX) #define MICROLEVEL_YSIZE ((STD_LEV_FIELDY + 2) * MICRO_TILEY) #define MICROLEVEL_XPOS (SX + (SXSIZE - MICROLEVEL_XSIZE) / 2) @@ -2025,20 +1936,6 @@ #define NUM_FONTS 38 #define NUM_INITIAL_FONTS 4 -#if 0 -#define FONT_ACTIVE(f) \ - ((f) == FONT_MENU_1 ? FONT_MENU_1_ACTIVE : \ - (f) == FONT_MENU_2 ? FONT_MENU_2_ACTIVE : \ - (f) == FONT_TEXT_1 ? FONT_TEXT_1_ACTIVE : \ - (f) == FONT_TEXT_2 ? FONT_TEXT_2_ACTIVE : \ - (f) == FONT_TEXT_3 ? FONT_TEXT_3_ACTIVE : \ - (f) == FONT_TEXT_4 ? FONT_TEXT_4_ACTIVE : \ - (f) == FONT_INPUT_1 ? FONT_INPUT_1_ACTIVE : \ - (f) == FONT_INPUT_2 ? FONT_INPUT_2_ACTIVE : \ - (f) == FONT_LEVEL_NUMBER ? FONT_LEVEL_NUMBER_ACTIVE : \ - (f)) -#endif - /* values for game_status (must match special image configuration suffixes) */ #define GAME_MODE_DEFAULT 0 #define GAME_MODE_LOADING 1 @@ -2079,7 +1976,7 @@ #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" #define PROGRAM_AUTHOR_STRING "Holger Schemel" -#define PROGRAM_COPYRIGHT_STRING "Copyright ©1995-2014 by Holger Schemel" +#define PROGRAM_COPYRIGHT_STRING "Copyright \xa9""1995-2015 by Holger Schemel" #define PROGRAM_EMAIL_STRING "info@artsoft.org" #define PROGRAM_WEBSITE_STRING "http://www.artsoft.org/" #define PROGRAM_GAME_BY_STRING "A Game by Artsoft Entertainment" @@ -2342,18 +2239,70 @@ struct PreviewInfo int anim_mode; }; +struct EditorButtonInfo +{ + struct XY prev_level; + struct XY next_level; + + struct XY properties; + + struct XY draw_single; + struct XY draw_connected; + struct XY draw_line; + struct XY draw_arc; + struct XY draw_rectangle; + struct XY draw_filled_box; + struct XY rotate_up; + struct XY draw_text; + struct XY flood_fill; + struct XY rotate_left; + struct XY zoom_level; + struct XY rotate_right; + struct XY draw_random; + struct XY grab_brush; + struct XY rotate_down; + struct XY pick_element; + + struct XY ce_copy_from; + struct XY ce_copy_to; + struct XY ce_swap; + struct XY ce_copy; + struct XY ce_paste; + + struct XY undo; + struct XY conf; + struct XY save; + struct XY clear; + struct XY test; + struct XY exit; +}; + +struct EditorInputInfo +{ + struct XY level_number; +}; + +struct EditorPaletteElementInfo +{ + int x, y; + int tile_size; +}; + struct EditorPaletteInfo { int x, y; int cols, rows; + int tile_size; - struct XY element_left; - struct XY element_middle; - struct XY element_right; + struct EditorPaletteElementInfo element_left; + struct EditorPaletteElementInfo element_middle; + struct EditorPaletteElementInfo element_right; }; struct EditorInfo { + struct EditorButtonInfo button; + struct EditorInputInfo input; struct EditorPaletteInfo palette; }; @@ -2556,10 +2505,6 @@ struct GlobalInfo /* global values for fading screens and masking borders */ int border_status; -#if 0 - int fading_status; - int fading_type; -#endif boolean use_envelope_request; }; @@ -2765,7 +2710,9 @@ struct FontInfo struct GraphicInfo { - Bitmap *bitmap; + Bitmap **bitmaps; /* bitmaps in all required sizes */ + Bitmap *bitmap; /* bitmap in default size */ + int src_image_width; /* scaled bitmap size, but w/o small images */ int src_image_height; /* scaled bitmap size, but w/o small images */ @@ -2899,13 +2846,9 @@ extern Bitmap *bitmap_db_store; extern Bitmap *bitmap_db_cross; extern Bitmap *bitmap_db_field; extern Bitmap *bitmap_db_panel; -#if 0 -extern Bitmap *bitmap_db_door; -#endif extern Bitmap *bitmap_db_door_1; extern Bitmap *bitmap_db_door_2; extern Bitmap *bitmap_db_toons; -extern Pixmap tile_clipmask[]; extern DrawBuffer *fieldbuffer; extern DrawBuffer *drawto_field; @@ -2920,15 +2863,7 @@ extern SDL_Thread *server_thread; extern int key_joystick_mapping; -#if 1 -#if NEW_SCROLL extern boolean redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2]; -#else -extern boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2]; -#endif -#else -extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; -#endif extern int redraw_x1, redraw_y1; extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];