diff --git a/project/sdl/fonteditor/Makefile b/project/sdl/fonteditor/Makefile index e9210c54c..b34e76d54 100644 --- a/project/sdl/fonteditor/Makefile +++ b/project/sdl/fonteditor/Makefile @@ -1,3 +1,9 @@ +all: editor editor.exe + editor: *.cpp g++ -g3 -o $@ $? `sdl-config --cflags` `sdl-config --libs` + +editor.exe: *.cpp + i586-mingw32msvc-g++ -o $@ $? -I ../sdl-1.2/include -L. -lSDL + i586-mingw32msvc-strip $@ diff --git a/project/sdl/fonteditor/SDL.dll b/project/sdl/fonteditor/SDL.dll new file mode 100755 index 000000000..628cdfcf0 Binary files /dev/null and b/project/sdl/fonteditor/SDL.dll differ diff --git a/project/sdl/fonteditor/editor.cpp b/project/sdl/fonteditor/editor.cpp index 2096007e1..4e09d2f41 100644 --- a/project/sdl/fonteditor/editor.cpp +++ b/project/sdl/fonteditor/editor.cpp @@ -107,7 +107,7 @@ void DrawLine(SDL_Surface * bmp, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uin Uint16 d = color; - #define proc( bmp, x, y, d ) * (Uint16 *)( bmp->pixels + bmp->pitch * (y) + (x) * 2 ) = d + #define proc( bmp, x, y, d ) * (Uint16 *)( ((Uint8 *)bmp->pixels) + bmp->pitch * (y) + (x) * 2 ) = d /* worker macro */ #define DO_LINE(pri_sign, pri_c, pri_cond, sec_sign, sec_c, sec_cond) \ @@ -329,3 +329,16 @@ main(int argc, char *argv[]) return 0; } +#ifdef WIN32 +#include +int CALLBACK WinMain( + HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow +) +{ + return main(0, NULL); +}; + +#endif diff --git a/project/sdl/fonteditor/editor.exe b/project/sdl/fonteditor/editor.exe new file mode 100755 index 000000000..765989c32 Binary files /dev/null and b/project/sdl/fonteditor/editor.exe differ diff --git a/project/sdl/fonteditor/libSDL.dll.a b/project/sdl/fonteditor/libSDL.dll.a new file mode 100755 index 000000000..64772b032 Binary files /dev/null and b/project/sdl/fonteditor/libSDL.dll.a differ diff --git a/project/sdl/fonteditor/libSDL.la b/project/sdl/fonteditor/libSDL.la new file mode 100755 index 000000000..4f0519f52 --- /dev/null +++ b/project/sdl/fonteditor/libSDL.la @@ -0,0 +1,41 @@ +# libSDL.la - a libtool library file +# Generated by ltmain.sh (GNU libtool) 2.2.6 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='../bin/SDL.dll' + +# Names of this library. +library_names='libSDL.dll.a' + +# The name of the static archive. +old_library='libSDL.a' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libSDL. +current=11 +age=11 +revision=3 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/local/lib'