FONT_TAPE_RECORDER, -1,
IMG_FONT_TAPE_RECORDER
},
+ {
+ FONT_GAME_INFO, -1,
+ IMG_FONT_GAME_INFO
+ },
{
-1, -1,
-1
{ "font.tape_recorder.width", "11" },
{ "font.tape_recorder.height", "14" },
+ { "font.game_info", "RocksFontEM.pcx" },
+ { "font.game_info.xpos", "0" },
+ { "font.game_info.ypos", "0" },
+ { "font.game_info.delay", "10" },
+
{ "global.border", "RocksScreen.pcx" },
{ "global.door", "RocksDoor.pcx" },
{ "background.SETUP", UNDEFINED_FILENAME },
{ "background.DOOR", UNDEFINED_FILENAME },
- { "info.font_em_1", "RocksFontEM.pcx" },
- { "info.font_em_1.xpos", "0" },
- { "info.font_em_1.ypos", "0" },
- { "info.font_em_1.frames", "16" },
- { "info.font_em_1.delay", "10" },
- { "info.font_em_2", "RocksFontEM.pcx" },
- { "info.font_em_2.xpos", "0" },
- { "info.font_em_2.ypos", "1" },
- { "info.font_em_2.frames", "16" },
- { "info.font_em_2.delay", "10" },
- { "info.font_em_3", "RocksFontEM.pcx" },
- { "info.font_em_3.xpos", "0" },
- { "info.font_em_3.ypos", "2" },
- { "info.font_em_3.frames", "16" },
- { "info.font_em_3.delay", "10" },
- { "info.font_em_4", "RocksFontEM.pcx" },
- { "info.font_em_4.xpos", "0" },
- { "info.font_em_4.ypos", "3" },
- { "info.font_em_4.frames", "16" },
- { "info.font_em_4.delay", "10" },
- { "info.font_em_5", "RocksFontEM.pcx" },
- { "info.font_em_5.xpos", "0" },
- { "info.font_em_5.ypos", "4" },
- { "info.font_em_5.frames", "4" },
- { "info.font_em_5.delay", "10" },
-
/* the following directives are not associated with an image,
but make sense to be defined in "graphicsinfo.conf", too */
#define IMG_FONT_VALUE_OLD 849
#define IMG_FONT_LEVEL_NUMBER 850
#define IMG_FONT_TAPE_RECORDER 851
-#define IMG_GLOBAL_BORDER 852
-#define IMG_GLOBAL_DOOR 853
-#define IMG_EDITOR_ELEMENT_BORDER 854
-#define IMG_BACKGROUND 855
-#define IMG_BACKGROUND_MAIN 856
-#define IMG_BACKGROUND_LEVELS 857
-#define IMG_BACKGROUND_SCORES 858
-#define IMG_BACKGROUND_EDITOR 859
-#define IMG_BACKGROUND_INFO 860
-#define IMG_BACKGROUND_SETUP 861
-#define IMG_BACKGROUND_DOOR 862
-#define IMG_INFO_FONT_EM_1 863
-#define IMG_INFO_FONT_EM_2 864
-#define IMG_INFO_FONT_EM_3 865
-#define IMG_INFO_FONT_EM_4 866
-#define IMG_INFO_FONT_EM_5 867
+#define IMG_FONT_GAME_INFO 852
+#define IMG_GLOBAL_BORDER 853
+#define IMG_GLOBAL_DOOR 854
+#define IMG_EDITOR_ELEMENT_BORDER 855
+#define IMG_BACKGROUND 856
+#define IMG_BACKGROUND_MAIN 857
+#define IMG_BACKGROUND_LEVELS 858
+#define IMG_BACKGROUND_SCORES 859
+#define IMG_BACKGROUND_EDITOR 860
+#define IMG_BACKGROUND_INFO 861
+#define IMG_BACKGROUND_SETUP 862
+#define IMG_BACKGROUND_DOOR 863
-#define NUM_IMAGE_FILES 868
+#define NUM_IMAGE_FILES 864
#endif /* CONF_GFX_H */
-#define COMPILE_DATE_STRING "[2003-04-06 22:55]"
+#define COMPILE_DATE_STRING "[2003-04-07 00:31]"
int font_bitmap_id = font_info[i].special_bitmap_id[j];
int graphic = font_info[i].special_graphic[j];
- /* set 'graphic_info' for font entries, if uninitialized */
+ /* set 'graphic_info' for font entries, if uninitialized (guessed) */
if (graphic_info[graphic].anim_frames < MIN_NUM_CHARS_PER_FONT)
{
graphic_info[graphic].anim_frames = DEFAULT_NUM_CHARS_PER_FONT;
#define EL_CHAR(c) (EL_CHAR_ASCII0 + MAP_FONT_ASCII(c))
-#if 0
-#define EL_CHAR(x) ((x) == 'Ä' ? EL_CHAR_AE : \
- (x) == 'Ö' ? EL_CHAR_OE : \
- (x) == 'Ü' ? EL_CHAR_UE : \
- (x) == 'ä' ? EL_CHAR_AE : \
- (x) == 'ö' ? EL_CHAR_OE : \
- (x) == 'ü' ? EL_CHAR_UE : \
- (x) == '©' ? EL_CHAR_COPYRIGHT : \
- (x) == '_' ? EL_CHAR_UNDERSCORE : \
- (x) == '°' ? EL_CHAR_DEGREE : \
- (x) == '´' ? EL_CHAR_TM : \
- (x) == '|' ? EL_CHAR_CURSOR : \
- EL_CHAR_A + (x) - 'A')
-#endif
-
#define EL_EXPANDABLE_WALL_HORIZONTAL 200
#define EL_EXPANDABLE_WALL_VERTICAL 201
#define EL_EXPANDABLE_WALL_ANY 202
#define FONT_VALUE_1 16
#define FONT_VALUE_2 17
#define FONT_VALUE_OLD 18
-#define FONT_TAPE_RECORDER 19
-#define FONT_LEVEL_NUMBER 20
+#define FONT_LEVEL_NUMBER 19
+#define FONT_TAPE_RECORDER 20
+#define FONT_GAME_INFO 21
-#define NUM_FONTS 21
+#define NUM_FONTS 22
#define NUM_INITIAL_FONTS 4
/* values for game_status */
IMG_WALL_CRUMBLED, -1, HA_NEXT,
- IMG_INFO_FONT_EM_1, 160,
- IMG_INFO_FONT_EM_2, 160,
- IMG_INFO_FONT_EM_3, 160,
- IMG_INFO_FONT_EM_4, 160,
- IMG_INFO_FONT_EM_5, 40, HA_NEXT,
+ IMG_FONT_GAME_INFO, -1, HA_NEXT,
IMG_EMERALD, -1, HA_NEXT,
void getGraphicSource(int graphic, int frame, Bitmap **bitmap, int *x, int *y)
{
- Bitmap *src_bitmap = graphic_info[graphic].bitmap;
- int offset_x = graphic_info[graphic].offset_x;
- int offset_y = graphic_info[graphic].offset_y;
- int src_x = graphic_info[graphic].src_x + frame * offset_x;
- int src_y = graphic_info[graphic].src_y + frame * offset_y;
+ struct GraphicInfo *g = &graphic_info[graphic];
- *bitmap = src_bitmap;
- *x = src_x;
- *y = src_y;
+ *bitmap = g->bitmap;
+
+ if (g->offset_y == 0) /* frames are ordered horizontally */
+ {
+ *x = g->src_x + (frame % g->anim_frames_per_line) * g->offset_x;
+ *y = g->src_y + (frame / g->anim_frames_per_line) * g->height;
+ }
+ else if (g->offset_x == 0) /* frames are ordered vertically */
+ {
+ *x = g->src_x + (frame / g->anim_frames_per_line) * g->width;
+ *y = g->src_y + (frame % g->anim_frames_per_line) * g->offset_y;
+ }
+ else /* frames are ordered diagonally */
+ {
+ *x = g->src_x + frame * g->offset_x;
+ *y = g->src_y + frame * g->offset_y;
+ }
}
void DrawGraphic(int x, int y, int graphic, int frame)
void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
- Bitmap *src_bitmap = graphic_info[graphic].bitmap;
+ struct GraphicInfo *g = &graphic_info[graphic];
int mini_startx = 0;
- int mini_starty = src_bitmap->height * 2 / 3;
- int src_x = mini_startx + graphic_info[graphic].src_x / 2;
- int src_y = mini_starty + graphic_info[graphic].src_y / 2;
-
-#if 0
- /* !!! not needed anymore, because of automatically created mini graphics */
- if (src_x + MINI_TILEX > src_bitmap->width ||
- src_y + MINI_TILEY > src_bitmap->height)
- {
- /* graphic of desired size seems not to be contained in this image;
- dirty workaround: get it from the middle of the normal sized image */
-
- printf("::: using dirty workaround for %d (%d, %d)\n",
- graphic, src_bitmap->width, src_bitmap->height);
+ int mini_starty = g->bitmap->height * 2 / 3;
- getGraphicSource(graphic, 0, &src_bitmap, &src_x, &src_y);
- src_x += (TILEX / 2 - MINI_TILEX / 2);
- src_y += (TILEY / 2 - MINI_TILEY / 2);
- }
-#endif
-
- *bitmap = src_bitmap;
- *x = src_x;
- *y = src_y;
+ *bitmap = g->bitmap;
+ *x = mini_startx + g->src_x / 2;
+ *y = mini_starty + g->src_y / 2;
}
void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic)