FONT_TEXT_1, GFX_SPECIAL_ARG_PREVIEW,
IMG_FONT_TEXT_1_PREVIEW
},
+ {
+ FONT_TEXT_1, GFX_SPECIAL_ARG_PLAYING,
+ IMG_FONT_TEXT_1_PLAYING
+ },
{
FONT_TEXT_1, GFX_SPECIAL_ARG_SCORES,
IMG_FONT_TEXT_1_SCORES
{ "font.text_1.PREVIEW.y", "160" },
{ "font.text_1.PREVIEW.width", "16" },
{ "font.text_1.PREVIEW.height", "16" },
+ { "font.text_1.PLAYING", "RocksFontEM.pcx" },
+ { "font.text_1.PLAYING.x", "0" },
+ { "font.text_1.PLAYING.y", "160" },
+ { "font.text_1.PLAYING.width", "16" },
+ { "font.text_1.PLAYING.height", "16" },
{ "font.text_1.SCORES", "RocksFontMedium.pcx" },
{ "font.text_1.SCORES.x", "0" },
{ "font.text_1.SCORES.y", "480" },
#define IMG_FONT_TEXT_1 1227
#define IMG_FONT_TEXT_1_LEVELS 1228
#define IMG_FONT_TEXT_1_PREVIEW 1229
-#define IMG_FONT_TEXT_1_SCORES 1230
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1231
-#define IMG_FONT_TEXT_2 1232
-#define IMG_FONT_TEXT_2_LEVELS 1233
-#define IMG_FONT_TEXT_2_PREVIEW 1234
-#define IMG_FONT_TEXT_2_SCORES 1235
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1236
-#define IMG_FONT_TEXT_3 1237
-#define IMG_FONT_TEXT_3_LEVELS 1238
-#define IMG_FONT_TEXT_3_PREVIEW 1239
-#define IMG_FONT_TEXT_3_SCORES 1240
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1241
-#define IMG_FONT_TEXT_4 1242
-#define IMG_FONT_TEXT_4_LEVELS 1243
-#define IMG_FONT_TEXT_4_SCORES 1244
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1245
-#define IMG_FONT_INPUT_1 1246
-#define IMG_FONT_INPUT_1_MAIN 1247
-#define IMG_FONT_INPUT_1_ACTIVE 1248
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1249
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1250
-#define IMG_FONT_INPUT_2 1251
-#define IMG_FONT_INPUT_2_ACTIVE 1252
-#define IMG_FONT_OPTION_OFF 1253
-#define IMG_FONT_OPTION_ON 1254
-#define IMG_FONT_VALUE_1 1255
-#define IMG_FONT_VALUE_2 1256
-#define IMG_FONT_VALUE_OLD 1257
-#define IMG_FONT_LEVEL_NUMBER 1258
-#define IMG_FONT_TAPE_RECORDER 1259
-#define IMG_FONT_GAME_INFO 1260
-#define IMG_GLOBAL_BORDER 1261
-#define IMG_GLOBAL_DOOR 1262
-#define IMG_EDITOR_ELEMENT_BORDER 1263
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1264
-#define IMG_BACKGROUND 1265
-#define IMG_BACKGROUND_MAIN 1266
-#define IMG_BACKGROUND_LEVELS 1267
-#define IMG_BACKGROUND_SCORES 1268
-#define IMG_BACKGROUND_EDITOR 1269
-#define IMG_BACKGROUND_INFO 1270
-#define IMG_BACKGROUND_SETUP 1271
-#define IMG_BACKGROUND_DOOR 1272
+#define IMG_FONT_TEXT_1_PLAYING 1230
+#define IMG_FONT_TEXT_1_SCORES 1231
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1232
+#define IMG_FONT_TEXT_2 1233
+#define IMG_FONT_TEXT_2_LEVELS 1234
+#define IMG_FONT_TEXT_2_PREVIEW 1235
+#define IMG_FONT_TEXT_2_SCORES 1236
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1237
+#define IMG_FONT_TEXT_3 1238
+#define IMG_FONT_TEXT_3_LEVELS 1239
+#define IMG_FONT_TEXT_3_PREVIEW 1240
+#define IMG_FONT_TEXT_3_SCORES 1241
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1242
+#define IMG_FONT_TEXT_4 1243
+#define IMG_FONT_TEXT_4_LEVELS 1244
+#define IMG_FONT_TEXT_4_SCORES 1245
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1246
+#define IMG_FONT_INPUT_1 1247
+#define IMG_FONT_INPUT_1_MAIN 1248
+#define IMG_FONT_INPUT_1_ACTIVE 1249
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1250
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1251
+#define IMG_FONT_INPUT_2 1252
+#define IMG_FONT_INPUT_2_ACTIVE 1253
+#define IMG_FONT_OPTION_OFF 1254
+#define IMG_FONT_OPTION_ON 1255
+#define IMG_FONT_VALUE_1 1256
+#define IMG_FONT_VALUE_2 1257
+#define IMG_FONT_VALUE_OLD 1258
+#define IMG_FONT_LEVEL_NUMBER 1259
+#define IMG_FONT_TAPE_RECORDER 1260
+#define IMG_FONT_GAME_INFO 1261
+#define IMG_GLOBAL_BORDER 1262
+#define IMG_GLOBAL_DOOR 1263
+#define IMG_EDITOR_ELEMENT_BORDER 1264
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1265
+#define IMG_BACKGROUND 1266
+#define IMG_BACKGROUND_MAIN 1267
+#define IMG_BACKGROUND_LEVELS 1268
+#define IMG_BACKGROUND_SCORES 1269
+#define IMG_BACKGROUND_EDITOR 1270
+#define IMG_BACKGROUND_INFO 1271
+#define IMG_BACKGROUND_SETUP 1272
+#define IMG_BACKGROUND_DOOR 1273
-#define NUM_IMAGE_FILES 1273
+#define NUM_IMAGE_FILES 1274
#endif /* CONF_GFX_H */
-#define COMPILE_DATE_STRING "[2003-08-30 03:37]"
+#define COMPILE_DATE_STRING "[2003-08-30 14:20]"
Bang(x, y);
}
+void ShowEnvelope()
+{
+ int i, x, y;
+
+ /* open envelope window horizontally */
+ for (i=2; i <= level.envelope_xsize + 2; i += 2)
+ {
+ int startx = (SXSIZE / MINI_TILEX - i) / 2;
+ int starty = (SYSIZE / MINI_TILEY) / 2 - 1;
+
+ SetDrawtoField(DRAW_BUFFERED);
+
+ BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
+
+ SetDrawtoField(DRAW_BACKBUFFER);
+
+ for (y=0; y < 2; y++) for (x=0; x < i; x++)
+ {
+ int ex = (x == 0 ? -1 : x == i - 1 ? +1 : 0);
+ int ey = (y == 0 ? -1 : y == 1 ? +1 : 0);
+
+ DrawEnvelopeBorder(startx + x, starty + y, ex, ey);
+ }
+
+ redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER;
+ BackToFront();
+
+ Delay(GAME_FRAME_DELAY);
+ }
+
+ /* open envelope window vertically */
+ for (i=2; i <= level.envelope_ysize + 2; i += 2)
+ {
+ int xsize = level.envelope_xsize + 2;
+ int startx = (SXSIZE / MINI_TILEX - (xsize - 1)) / 2;
+ int starty = (SYSIZE / MINI_TILEY - i) / 2;
+
+ SetDrawtoField(DRAW_BUFFERED);
+
+ BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
+
+ SetDrawtoField(DRAW_BACKBUFFER);
+
+ for (y=0; y < i; y++) for (x=0; x < xsize; x++)
+ {
+ int ex = (x == 0 ? -1 : x == xsize - 1 ? +1 : 0);
+ int ey = (y == 0 ? -1 : y == i - 1 ? +1 : 0);
+
+ DrawEnvelopeBorder(startx + x, starty + y, ex, ey);
+ }
+
+ DrawTextToTextArea(SX + (startx + 1) * MINI_TILEX,
+ SY + (starty + 1) * MINI_TILEY, level.envelope,
+ FONT_TEXT_1, level.envelope_xsize, i - 2);
+
+ redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER;
+ BackToFront();
+
+ Delay(GAME_FRAME_DELAY);
+ }
+
+ Delay(3000);
+
+ SetDrawtoField(DRAW_BUFFERED);
+
+ redraw_mask |= REDRAW_FIELD;
+ BackToFront();
+}
+
void RelocatePlayer(int x, int y, int element)
{
struct PlayerInfo *player = &stored_player[element - EL_PLAYER_1];
el2edimg(EL_KEY_1 + key_nr));
redraw_mask |= REDRAW_DOOR_1;
}
+ else if (element == EL_ENVELOPE)
+ {
+ ShowEnvelope();
+ }
else if (IS_DROPPABLE(element)) /* can be collected and dropped */
{
int i;
{ ".EDITOR", GAME_MODE_EDITOR, },
{ ".INFO", GAME_MODE_INFO, },
{ ".SETUP", GAME_MODE_SETUP, },
+ { ".PLAYING", GAME_MODE_PLAYING, },
{ ".DOOR", GAME_MODE_PSEUDO_DOOR, },
{ ".PREVIEW", GAME_MODE_PSEUDO_PREVIEW, },
{ ".CRUMBLED", GAME_MODE_PSEUDO_CRUMBLED, },
#define GFX_SPECIAL_ARG_EDITOR 3
#define GFX_SPECIAL_ARG_INFO 4
#define GFX_SPECIAL_ARG_SETUP 5
-#define GFX_SPECIAL_ARG_DOOR 6
-#define GFX_SPECIAL_ARG_PREVIEW 7
-#define GFX_SPECIAL_ARG_CRUMBLED 8
+#define GFX_SPECIAL_ARG_PLAYING 6
+#define GFX_SPECIAL_ARG_DOOR 7
+#define GFX_SPECIAL_ARG_PREVIEW 8
+#define GFX_SPECIAL_ARG_CRUMBLED 9
-#define NUM_SPECIAL_GFX_ARGS 9
+#define NUM_SPECIAL_GFX_ARGS 10
/* values for image configuration suffixes */
#define GAME_MODE_EDITOR 3
#define GAME_MODE_INFO 4
#define GAME_MODE_SETUP 5
-#define GAME_MODE_PSEUDO_DOOR 6
-#define GAME_MODE_PSEUDO_PREVIEW 7
-#define GAME_MODE_PSEUDO_CRUMBLED 8
+#define GAME_MODE_PLAYING 6
+#define GAME_MODE_PSEUDO_DOOR 7
+#define GAME_MODE_PSEUDO_PREVIEW 8
+#define GAME_MODE_PSEUDO_CRUMBLED 9
/* there are no special config file suffixes for these modes */
-#define GAME_MODE_PLAYING 9
#define GAME_MODE_PSEUDO_TYPENAME 10
#define GAME_MODE_QUIT 11
{ EL_STEELWALL, EL_INVISIBLE_STEELWALL }
};
int steel_type = (BorderElement == EL_STEELWALL ? 0 : 1);
- int steel_position = (x == -1 && y == -1 ? 0 :
- x == lev_fieldx && y == -1 ? 1 :
- x == -1 && y == lev_fieldy ? 2 :
- x == lev_fieldx && y == lev_fieldy ? 3 :
- x == -1 || x == lev_fieldx ? 4 :
- y == -1 || y == lev_fieldy ? 5 : 6);
+ int steel_position = (x == -1 && y == -1 ? 0 :
+ x == lev_fieldx && y == -1 ? 1 :
+ x == -1 && y == lev_fieldy ? 2 :
+ x == lev_fieldx && y == lev_fieldy ? 3 :
+ x == -1 || x == lev_fieldx ? 4 :
+ y == -1 || y == lev_fieldy ? 5 : 6);
return border[steel_position][steel_type];
}
DrawMiniGraphic(sx, sy, el2edimg(getBorderElement(x, y)));
}
+void DrawEnvelopeBorder(int sx, int sy, int ex, int ey)
+{
+ int border[8][2] =
+ {
+ { EL_STEELWALL_TOPLEFT, EL_INVISIBLE_STEELWALL_TOPLEFT },
+ { EL_STEELWALL_TOPRIGHT, EL_INVISIBLE_STEELWALL_TOPRIGHT },
+ { EL_STEELWALL_BOTTOMLEFT, EL_INVISIBLE_STEELWALL_BOTTOMLEFT },
+ { EL_STEELWALL_BOTTOMRIGHT, EL_INVISIBLE_STEELWALL_BOTTOMRIGHT },
+ { EL_STEELWALL_VERTICAL, EL_INVISIBLE_STEELWALL_VERTICAL },
+ { EL_STEELWALL_HORIZONTAL, EL_INVISIBLE_STEELWALL_HORIZONTAL },
+ { EL_STEELWALL, EL_INVISIBLE_STEELWALL },
+ { EL_EMPTY, EL_EMPTY }
+ };
+ int steel_type = (BorderElement == EL_STEELWALL ? 0 : 1);
+ int steel_position = (ex == -1 && ey == -1 ? 0 :
+ ex == +1 && ey == -1 ? 1 :
+ ex == -1 && ey == +1 ? 2 :
+ ex == +1 && ey == +1 ? 3 :
+ ex == -1 || ex == +1 ? 4 :
+ ey == -1 || ey == +1 ? 5 : 7);
+ int element = border[steel_position][steel_type];
+
+ DrawMiniGraphic(sx, sy, el2edimg(element));
+}
+
void getMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
Bitmap *src_bitmap = graphic_info[graphic].bitmap;
void DrawMiniElement(int, int, int);
void DrawMiniElementOrWall(int, int, int, int);
+void DrawEnvelopeBorder(int, int, int, int);
void getMicroGraphicSource(int, Bitmap **, int *, int *);
void DrawMicroElement(int, int, int);