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
29
Makefile
29
Makefile
@ -139,6 +139,7 @@ else
|
||||
MKDIR = mkdir -p
|
||||
RMDIR = rmdir
|
||||
CP = cp
|
||||
|
||||
ifdef WIN32CROSS
|
||||
#cross compile a Win32 executable
|
||||
CC = i586-mingw32msvc-gcc
|
||||
@ -148,13 +149,27 @@ else
|
||||
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs` -lSDL_image $(TTFLOPT)
|
||||
OBJDIR = obj/win32
|
||||
else
|
||||
BIN = grafx2
|
||||
CFGBIN = gfxcfg
|
||||
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
|
||||
LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT)
|
||||
CC = gcc
|
||||
OBJDIR = obj/unix
|
||||
X11LOPT = -lX11
|
||||
|
||||
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
|
||||
CFGBIN = gfxcfg
|
||||
COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT)
|
||||
LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT)
|
||||
CC = gcc
|
||||
OBJDIR = obj/unix
|
||||
X11LOPT = -lX11
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
4
SFont.c
4
SFont.c
@ -24,8 +24,8 @@
|
||||
GERMANY
|
||||
karlb@gmx.net
|
||||
*/
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_video.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_video.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
2
SFont.h
2
SFont.h
@ -36,7 +36,7 @@
|
||||
#ifndef _SFONT_H_
|
||||
#define _SFONT_H_
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#include "const.h"
|
||||
#include "struct.h"
|
||||
|
||||
3
divers.c
3
divers.c
@ -20,8 +20,9 @@
|
||||
write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <stdlib.h>
|
||||
#include "struct.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 -----------------------------
|
||||
void Lire_liste_des_lecteurs(void)
|
||||
{
|
||||
// Fixes a warning on os4
|
||||
#ifndef __amigaos4__
|
||||
int Indice;
|
||||
#endif
|
||||
|
||||
6
gfxcfg.c
6
gfxcfg.c
@ -29,9 +29,9 @@
|
||||
#include <unistd.h>
|
||||
|
||||
//SDL
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <SDL/SDL_events.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <SDL_events.h>
|
||||
//#include <SDL_gfxPrimitives.h>
|
||||
|
||||
//mine
|
||||
|
||||
2
global.h
2
global.h
@ -39,7 +39,7 @@
|
||||
#ifndef _GLOBAL_H_
|
||||
#define _GLOBAL_H_
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "struct.h"
|
||||
|
||||
GFX2_GLOBAL struct S_Config
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
|
||||
/*** Types definitions and structs ***/
|
||||
|
||||
|
||||
2
init.c
2
init.c
@ -31,7 +31,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <SDL/SDL_byteorder.h>
|
||||
#include <SDL_byteorder.h>
|
||||
#if defined(__WIN32__)
|
||||
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
||||
#endif
|
||||
|
||||
2
io.c
2
io.c
@ -23,7 +23,7 @@
|
||||
// Fonctions de lecture/ecriture fichier, gèrent les systèmes big-endian et
|
||||
// little-endian.
|
||||
|
||||
#include <SDL/SDL_endian.h>
|
||||
#include <SDL_endian.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
6
main.c
6
main.c
@ -35,8 +35,8 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
#include <unistd.h>
|
||||
#include "pages.h"
|
||||
#include "files.h"
|
||||
@ -58,7 +58,7 @@
|
||||
#elif defined(__macosx__)
|
||||
#import <corefoundation/corefoundation.h>
|
||||
#import <sys/param.h>
|
||||
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__)
|
||||
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__)
|
||||
#include "realpath.h"
|
||||
#endif
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "brush.h"
|
||||
#include "windows.h"
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#if defined(__WATCOMC__) || defined(__GP2X__)
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "global.h"
|
||||
#include "sdlscreen.h"
|
||||
#include "divers.h"
|
||||
|
||||
2
pxtall.c
2
pxtall.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "global.h"
|
||||
#include "sdlscreen.h"
|
||||
#include "divers.h"
|
||||
|
||||
2
pxwide.c
2
pxwide.c
@ -23,7 +23,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "global.h"
|
||||
#include "sdlscreen.h"
|
||||
#include "divers.h"
|
||||
|
||||
@ -9,6 +9,11 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__GP2X__)
|
||||
// This is a random default value ...
|
||||
#define PATH_MAX 32768
|
||||
#endif
|
||||
|
||||
static char *sep(char *path)
|
||||
{
|
||||
char *tmp, c;
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "global.h"
|
||||
#include "sdlscreen.h"
|
||||
#include "erreurs.h"
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#ifndef SDLSCREEN_H_INCLUDED
|
||||
#define SDLSCREEN_H_INCLUDED
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include "struct.h"
|
||||
|
||||
void Set_Mode_SDL(int *,int *,int);
|
||||
|
||||
7
texte.c
7
texte.c
@ -33,7 +33,7 @@
|
||||
#ifdef __macosx__
|
||||
#include <SDL_ttf/SDL_ttf.h>
|
||||
#else
|
||||
#include <SDL/SDL_ttf.h>
|
||||
#include <SDL_ttf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
@ -46,7 +46,8 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#include <SDL/SDL_image.h>
|
||||
|
||||
#include <SDL_image.h>
|
||||
// SFont
|
||||
#include "SFont.h"
|
||||
|
||||
@ -319,6 +320,7 @@ void Initialisation_Texte(void)
|
||||
#endif
|
||||
|
||||
#elif defined(__linux__)
|
||||
#ifndef NOTTF
|
||||
#define USE_XLIB
|
||||
|
||||
#ifdef USE_XLIB
|
||||
@ -333,6 +335,7 @@ void Initialisation_Texte(void)
|
||||
XFreeFontPath(font_path_list);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__amigaos4__)
|
||||
#ifndef NOTTF
|
||||
for_each_file( "FONTS:_TrueType", Ajout_fonte );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user