Afegit soport per a GCW Zero
This commit is contained in:
12
jdraw8.cpp
12
jdraw8.cpp
@@ -3,6 +3,14 @@
|
||||
#include <fstream>
|
||||
#include "gif.c"
|
||||
|
||||
#ifdef GCWZERO
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#else
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
#endif
|
||||
|
||||
JD8_Surface screen = NULL;
|
||||
JD8_Palette main_palette = NULL;
|
||||
Uint32* pixel_data = NULL;
|
||||
@@ -23,7 +31,7 @@ void JD8_Init(const char *title) {
|
||||
main_palette = (JD8_Palette)calloc( 1, 768 );
|
||||
pixel_data = (Uint32*)calloc(1, 320 * 200 * 4); // 1048576 );
|
||||
|
||||
sdlWindow = SDL_CreateWindow( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN );
|
||||
sdlWindow = SDL_CreateWindow( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN );
|
||||
sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, 0);
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
|
||||
|
||||
@@ -162,7 +170,7 @@ void JD8_BlitCKToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Rect rect{0, 0, 640, 480};
|
||||
SDL_Rect rect{0, 0, SCREEN_WIDTH, SCREEN_HEIGHT};
|
||||
|
||||
void JD8_Flip() {
|
||||
for( int x = 0; x < 320; x++ ) {
|
||||
|
||||
Reference in New Issue
Block a user