gdrv: blit no more, present render:vScreen directly.

Improved split bitmap handling.
This commit is contained in:
Muzychenko Andrey committed 2021-09-25 16:52:19 +03:00
1 parent 625a6e7498
commit 22ce8ac538
16 files changed
+290 -467

No files matched your search

+20 -15
View File
@@ -18,7 +18,7 @@ struct render_sprite_type_struct
char UnknownFlag;
VisualTypes VisualType;
int16_t Depth;
rectangle_type BmpRectCopy;
rectangle_type DirtyRectPrev;
int ZMapOffestY;
int ZMapOffestX;
rectangle_type DirtyRect;
@@ -31,20 +31,12 @@ struct render_sprite_type_struct
class render
{
public:
static int blit;
static int many_dirty, many_sprites, many_balls;
static render_sprite_type_struct **dirty_list, **sprite_list, **ball_list;
static zmap_header_type* background_zmap;
static int zmap_offset, zmap_offsetY, offset_x, offset_y;
static float zscaler, zmin, zmax;
static rectangle_type vscreen_rect;
static gdrv_bitmap8 vscreen, *background_bitmap, ball_bitmap[20];
static zmap_header_type zscreen;
static gdrv_bitmap8 vscreen, *background_bitmap;
static SDL_Rect DestinationRect;
static void init(gdrv_bitmap8* bmp, float zMin, float zScaler, int width, int height);
static void uninit();
static void update();
static void paint();
static void sprite_modified(render_sprite_type_struct* sprite);
static render_sprite_type_struct* create_sprite(VisualTypes visualType, gdrv_bitmap8* bmp,
zmap_header_type* zMap,
@@ -55,11 +47,24 @@ public:
int yPos);
static void sprite_set_bitmap(render_sprite_type_struct* sprite, gdrv_bitmap8* bmp);
static void set_background_zmap(struct zmap_header_type* zMap, int offsetX, int offsetY);
static void ball_set(render_sprite_type_struct* sprite, gdrv_bitmap8* bmp, float depth, int xPos, int yPos);
static void ball_set(render_sprite_type_struct* sprite, gdrv_bitmap8* bmp, float depth, int xPos, int yPos);
static void shift(int offsetX, int offsetY);
static void build_occlude_list();
static void SpriteViewer(bool* show);
static void PresentVScreen();
private:
static int many_dirty, many_sprites, many_balls;
static render_sprite_type_struct **dirty_list, **sprite_list, **ball_list;
static zmap_header_type* background_zmap;
static int zmap_offset, zmap_offsetY, offset_x, offset_y;
static float zscaler, zmin, zmax;
static rectangle_type vscreen_rect;
static gdrv_bitmap8 ball_bitmap[20];
static zmap_header_type zscreen;
static SDL_Texture* vScreenTex;
static void repaint(struct render_sprite_type_struct* sprite);
static void paint_balls();
static void unpaint_balls();
static void shift(int offsetX, int offsetY, int xSrc, int ySrc, int DestWidth, int DestHeight);
static void build_occlude_list();
static void SpriteViewer(bool* show);
static void BlitVScreen();
};