Afegit soport per a GCW Zero
This commit is contained in:
10
default.gcw0.desktop
Normal file
10
default.gcw0.desktop
Normal file
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=AEE
|
||||
Comment=Aventures En Egipte
|
||||
Icon=icon
|
||||
Exec=aee
|
||||
Categories=games;Game;SDL;
|
||||
Terminal=false
|
||||
|
||||
15
gcwmake
Executable file
15
gcwmake
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
mipsel-linux-gcc -D GCWZERO -O2 -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -lSDL2 -lSDL2_mixer -lstdc++ *.cpp -o aee
|
||||
|
||||
mksquashfs ./default.gcw0.desktop ./icon.png ./aee ./data.jrf aee.opk -all-root -noappend -no-exports -no-xattrs
|
||||
|
||||
ftp -n -v 10.1.1.2 << EOT
|
||||
ascii
|
||||
user root ezahfm
|
||||
pass
|
||||
cd apps
|
||||
put ./aee.opk
|
||||
bye
|
||||
EOT
|
||||
|
||||
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