diff --git a/.hgignore b/.hgignore index 1de44aa..8d3a64e 100644 --- a/.hgignore +++ b/.hgignore @@ -12,5 +12,6 @@ data/* *.opensdf *.user *.dll +*.opk .DS_Store -trick.ini \ No newline at end of file +trick.ini diff --git a/default.gcw0.desktop b/default.gcw0.desktop new file mode 100644 index 0000000..6888015 --- /dev/null +++ b/default.gcw0.desktop @@ -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 + diff --git a/gcwmake b/gcwmake new file mode 100755 index 0000000..e4201ca --- /dev/null +++ b/gcwmake @@ -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 + diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..544e102 Binary files /dev/null and b/icon.png differ diff --git a/jdraw8.cpp b/jdraw8.cpp index fc3b8fb..a0195f7 100755 --- a/jdraw8.cpp +++ b/jdraw8.cpp @@ -3,6 +3,14 @@ #include #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++ ) {