src/gfx.cpp
changeset 6248 e4a2ed7e5613
parent 6247 7d81e3a5d803
child 6357 f0f5e7d1713c
equal deleted inserted replaced
6247:7d81e3a5d803 6248:e4a2ed7e5613
    42 int _pal_last_dirty;
    42 int _pal_last_dirty;
    43 
    43 
    44 Colour _cur_palette[256];
    44 Colour _cur_palette[256];
    45 byte _stringwidth_table[FS_END][224];
    45 byte _stringwidth_table[FS_END][224];
    46 
    46 
    47 typedef enum BlitterModes {
    47 enum BlitterMode {
    48 	BM_NORMAL,
    48 	BM_NORMAL,
    49 	BM_COLOUR_REMAP,
    49 	BM_COLOUR_REMAP,
    50 	BM_TRANSPARENT,
    50 	BM_TRANSPARENT,
    51 } BlitterMode;
    51 };
    52 
    52 
    53 static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode);
    53 static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode);
    54 
    54 
    55 FontSize _cur_fontsize;
    55 FontSize _cur_fontsize;
    56 static FontSize _last_fontsize;
    56 static FontSize _last_fontsize;
   716 	} else {
   716 	} else {
   717 		GfxMainBlitter(GetSprite(GB(img, 0, SPRITE_WIDTH)), x, y, BM_NORMAL);
   717 		GfxMainBlitter(GetSprite(GB(img, 0, SPRITE_WIDTH)), x, y, BM_NORMAL);
   718 	}
   718 	}
   719 }
   719 }
   720 
   720 
   721 typedef struct BlitterParams {
   721 struct BlitterParams {
   722 	int start_x, start_y;
   722 	int start_x, start_y;
   723 	const byte *sprite;
   723 	const byte *sprite;
   724 	Pixel *dst;
   724 	Pixel *dst;
   725 	BlitterMode mode;
   725 	BlitterMode mode;
   726 	int width, height;
   726 	int width, height;
   727 	int width_org;
   727 	int width_org;
   728 	int pitch;
   728 	int pitch;
   729 } BlitterParams;
   729 };
   730 
   730 
   731 static void GfxBlitTileZoomIn(BlitterParams *bp)
   731 static void GfxBlitTileZoomIn(BlitterParams *bp)
   732 {
   732 {
   733 	const byte *src_o = bp->sprite;
   733 	const byte *src_o = bp->sprite;
   734 	const byte *src;
   734 	const byte *src;