|
@@ -16,26 +16,24 @@
|
|
|
#include "sdl_v.h"
|
|
|
#include <SDL.h>
|
|
|
|
|
|
static SDL_Surface *_sdl_screen;
|
|
|
static bool _all_modes;
|
|
|
|
|
|
#define MAX_DIRTY_RECTS 100
|
|
|
static SDL_Rect _dirty_rects[MAX_DIRTY_RECTS];
|
|
|
static int _num_dirty_rects;
|
|
|
|
|
|
static void SdlVideoMakeDirty(int left, int top, int width, int height)
|
|
|
{
|
|
|
// printf("(%d,%d)-(%d,%d)\n", left, top, width, height);
|
|
|
// _pixels_redrawn += width*height;
|
|
|
if (_num_dirty_rects < MAX_DIRTY_RECTS) {
|
|
|
_dirty_rects[_num_dirty_rects].x = left;
|
|
|
_dirty_rects[_num_dirty_rects].y = top;
|
|
|
_dirty_rects[_num_dirty_rects].w = width;
|
|
|
_dirty_rects[_num_dirty_rects].h = height;
|
|
|
}
|
|
|
_num_dirty_rects++;
|
|
|
}
|
|
|
|
|
|
static SDL_Color pal[256];
|
|
|
|
|
|
static void UpdatePalette(uint start, uint end)
|