Some work on a port for the gp2x. Runs up to the splashscreen, but as there is no mouse i have to make the program usable with a joystick.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@462 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
c130a327d1
commit
132eabcde5
15
Makefile
15
Makefile
@ -139,6 +139,7 @@ else
|
|||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
RMDIR = rmdir
|
RMDIR = rmdir
|
||||||
CP = cp
|
CP = cp
|
||||||
|
|
||||||
ifdef WIN32CROSS
|
ifdef WIN32CROSS
|
||||||
#cross compile a Win32 executable
|
#cross compile a Win32 executable
|
||||||
CC = i586-mingw32msvc-gcc
|
CC = i586-mingw32msvc-gcc
|
||||||
@ -148,6 +149,19 @@ else
|
|||||||
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs` -lSDL_image $(TTFLOPT)
|
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs` -lSDL_image $(TTFLOPT)
|
||||||
OBJDIR = obj/win32
|
OBJDIR = obj/win32
|
||||||
else
|
else
|
||||||
|
|
||||||
|
ifdef GP2XCROSS
|
||||||
|
#cross compile an exec for the gp2x
|
||||||
|
CC = /opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin/arm-open2x-linux-gcc
|
||||||
|
BIN = grafx2.gpe
|
||||||
|
CFGBIN = gfxcfg.gpe
|
||||||
|
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -static -c -g -O3 `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --cflags` $(TTFCOPT) -D__GP2X__
|
||||||
|
LOPT = -static -lSDL_image `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --static-libs` -ljpeg -lpng -lz -lm $(TTFLOPT)
|
||||||
|
OBJDIR = obj/gp2x
|
||||||
|
NOTTF = 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Compiles a regular linux exectutable for the native platform
|
||||||
BIN = grafx2
|
BIN = grafx2
|
||||||
CFGBIN = gfxcfg
|
CFGBIN = gfxcfg
|
||||||
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
|
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
|
||||||
@ -157,6 +171,7 @@ else
|
|||||||
X11LOPT = -lX11
|
X11LOPT = -lX11
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
4
SFont.c
4
SFont.c
@ -24,8 +24,8 @@
|
|||||||
GERMANY
|
GERMANY
|
||||||
karlb@gmx.net
|
karlb@gmx.net
|
||||||
*/
|
*/
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL/SDL_video.h>
|
#include <SDL_video.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
2
SFont.h
2
SFont.h
@ -36,7 +36,7 @@
|
|||||||
#ifndef _SFONT_H_
|
#ifndef _SFONT_H_
|
||||||
#define _SFONT_H_
|
#define _SFONT_H_
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
|
|||||||
3
divers.c
3
divers.c
@ -20,8 +20,9 @@
|
|||||||
write to the Free Software Foundation, Inc.,
|
write to the Free Software Foundation, Inc.,
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
|
|||||||
1
files.c
1
files.c
@ -285,7 +285,6 @@ void bstrtostr( BSTR in, STRPTR out, TEXT max )
|
|||||||
// -- Lecture d'une liste de lecteurs / volumes -----------------------------
|
// -- Lecture d'une liste de lecteurs / volumes -----------------------------
|
||||||
void Lire_liste_des_lecteurs(void)
|
void Lire_liste_des_lecteurs(void)
|
||||||
{
|
{
|
||||||
// Fixes a warning on os4
|
|
||||||
#ifndef __amigaos4__
|
#ifndef __amigaos4__
|
||||||
int Indice;
|
int Indice;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
6
gfxcfg.c
6
gfxcfg.c
@ -29,9 +29,9 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
//SDL
|
//SDL
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL/SDL_image.h>
|
#include <SDL_image.h>
|
||||||
#include <SDL/SDL_events.h>
|
#include <SDL_events.h>
|
||||||
//#include <SDL_gfxPrimitives.h>
|
//#include <SDL_gfxPrimitives.h>
|
||||||
|
|
||||||
//mine
|
//mine
|
||||||
|
|||||||
2
global.h
2
global.h
@ -39,7 +39,7 @@
|
|||||||
#ifndef _GLOBAL_H_
|
#ifndef _GLOBAL_H_
|
||||||
#define _GLOBAL_H_
|
#define _GLOBAL_H_
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
|
|
||||||
GFX2_GLOBAL struct S_Config
|
GFX2_GLOBAL struct S_Config
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
/*** Types definitions and structs ***/
|
/*** Types definitions and structs ***/
|
||||||
|
|
||||||
|
|||||||
2
init.c
2
init.c
@ -31,7 +31,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <SDL/SDL_byteorder.h>
|
#include <SDL_byteorder.h>
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
2
io.c
2
io.c
@ -23,7 +23,7 @@
|
|||||||
// Fonctions de lecture/ecriture fichier, gèrent les systèmes big-endian et
|
// Fonctions de lecture/ecriture fichier, gèrent les systèmes big-endian et
|
||||||
// little-endian.
|
// little-endian.
|
||||||
|
|
||||||
#include <SDL/SDL_endian.h>
|
#include <SDL_endian.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|||||||
6
main.c
6
main.c
@ -35,8 +35,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL/SDL_image.h>
|
#include <SDL_image.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "pages.h"
|
#include "pages.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__)
|
||||||
#import <corefoundation/corefoundation.h>
|
#import <corefoundation/corefoundation.h>
|
||||||
#import <sys/param.h>
|
#import <sys/param.h>
|
||||||
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__)
|
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__)
|
||||||
#include "realpath.h"
|
#include "realpath.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include "brush.h"
|
#include "brush.h"
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
#ifdef __WATCOMC__
|
#if defined(__WATCOMC__) || defined(__GP2X__)
|
||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "divers.h"
|
#include "divers.h"
|
||||||
|
|||||||
2
pxtall.c
2
pxtall.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "divers.h"
|
#include "divers.h"
|
||||||
|
|||||||
2
pxwide.c
2
pxwide.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "divers.h"
|
#include "divers.h"
|
||||||
|
|||||||
@ -9,6 +9,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#if defined(__GP2X__)
|
||||||
|
// This is a random default value ...
|
||||||
|
#define PATH_MAX 32768
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *sep(char *path)
|
static char *sep(char *path)
|
||||||
{
|
{
|
||||||
char *tmp, c;
|
char *tmp, c;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "erreurs.h"
|
#include "erreurs.h"
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
#ifndef SDLSCREEN_H_INCLUDED
|
#ifndef SDLSCREEN_H_INCLUDED
|
||||||
#define SDLSCREEN_H_INCLUDED
|
#define SDLSCREEN_H_INCLUDED
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL.h>
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
|
|
||||||
void Set_Mode_SDL(int *,int *,int);
|
void Set_Mode_SDL(int *,int *,int);
|
||||||
|
|||||||
7
texte.c
7
texte.c
@ -33,7 +33,7 @@
|
|||||||
#ifdef __macosx__
|
#ifdef __macosx__
|
||||||
#include <SDL_ttf/SDL_ttf.h>
|
#include <SDL_ttf/SDL_ttf.h>
|
||||||
#else
|
#else
|
||||||
#include <SDL/SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
@ -46,7 +46,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <SDL/SDL_image.h>
|
|
||||||
|
#include <SDL_image.h>
|
||||||
// SFont
|
// SFont
|
||||||
#include "SFont.h"
|
#include "SFont.h"
|
||||||
|
|
||||||
@ -319,6 +320,7 @@ void Initialisation_Texte(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
#ifndef NOTTF
|
||||||
#define USE_XLIB
|
#define USE_XLIB
|
||||||
|
|
||||||
#ifdef USE_XLIB
|
#ifdef USE_XLIB
|
||||||
@ -333,6 +335,7 @@ void Initialisation_Texte(void)
|
|||||||
XFreeFontPath(font_path_list);
|
XFreeFontPath(font_path_list);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#elif defined(__amigaos4__)
|
#elif defined(__amigaos4__)
|
||||||
#ifndef NOTTF
|
#ifndef NOTTF
|
||||||
for_each_file( "FONTS:_TrueType", Ajout_fonte );
|
for_each_file( "FONTS:_TrueType", Ajout_fonte );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user