void InitImageTextures(void)
{
+ static int texture_graphics[] =
+ {
+ IMG_GFX_REQUEST_BUTTON_TOUCH_YES,
+ IMG_GFX_REQUEST_BUTTON_TOUCH_NO,
+ IMG_GFX_REQUEST_BUTTON_TOUCH_CONFIRM,
+ IMG_GFX_GAME_BUTTON_TOUCH_STOP,
+ IMG_GFX_GAME_BUTTON_TOUCH_PAUSE,
+ IMG_MENU_BUTTON_TOUCH_BACK,
+ IMG_MENU_BUTTON_TOUCH_NEXT,
+ IMG_MENU_BUTTON_TOUCH_BACK2,
+ IMG_MENU_BUTTON_TOUCH_NEXT2,
+ -1
+ };
int i, j, k;
FreeAllImageTextures();
}
}
}
-}
-
-#if 1
-// !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!!
-void SetBitmaps_EM(Bitmap **em_bitmap)
-{
- em_bitmap[0] = graphic_info[IMG_EMC_OBJECT].bitmap;
- em_bitmap[1] = graphic_info[IMG_EMC_SPRITE].bitmap;
-}
-#endif
-#if 0
-// !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!!
-void SetBitmaps_SP(Bitmap **sp_bitmap)
-{
- *sp_bitmap = graphic_info[IMG_SP_OBJECTS].bitmap;
+ for (i = 0; texture_graphics[i] > -1; i++)
+ CreateImageTextures(texture_graphics[i]);
}
-#endif
static int getFontBitmapID(int font_nr)
{
else
g->anim_frames = 1;
- if (g->anim_frames == 0) // frames must be at least 1
+ if (g->anim_frames < 1) // frames must be at least 1
g->anim_frames = 1;
g->anim_frames_per_line =
parameter[GFX_ARG_FRAMES_PER_LINE] : anim_frames_per_line);
g->anim_delay = parameter[GFX_ARG_DELAY];
- if (g->anim_delay == 0) // delay must be at least 1
+ if (g->anim_delay < 1) // delay must be at least 1
g->anim_delay = 1;
g->anim_mode = parameter[GFX_ARG_ANIM_MODE];
g->x = parameter[GFX_ARG_X]; // (may be uninitialized,
g->y = parameter[GFX_ARG_Y]; // unlike src_x and src_y)
+ if (g->step_delay < 1) // delay must be at least 1
+ g->step_delay = 1;
+
// this is only used for drawing font characters
g->draw_xoffset = parameter[GFX_ARG_DRAW_XOFFSET];
g->draw_yoffset = parameter[GFX_ARG_DRAW_YOFFSET];