diff -Naur GU/Makefile GU-gentoo/Makefile --- GU/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ GU-gentoo/Makefile 2007-10-10 19:30:12.000000000 +0200 @@ -0,0 +1,17 @@ +DC=gdmd +DFLAGS=-g -O -d -release -Iimport -Isrc +DOUT=-of + +DSRC=$(shell find src/ -name "*.d") +SOURCES=$(DSRC) import/SDL_video.d import/SDL_mixer.d import/SDL_mouse.d +OBJS=$(SOURCES:.d=.o) +EXE=gradleunison + +all: $(EXE) + +$(EXE): $(OBJS) + gcc -o $@ $(OBJS) -lbulletml_d -lgphobos -lpthread -lm -lSDL -lGL -lGLU -lSDL_mixer + +$(OBJS): %.o: %.d + $(DC) -c $(DOUT)$@ $(DFLAGS) $< + diff -Naur GU/import/SDL.d GU-gentoo/import/SDL.d --- GU/import/SDL.d 2004-05-08 14:14:14.000000000 +0200 +++ GU-gentoo/import/SDL.d 2007-10-10 19:30:12.000000000 +0200 @@ -20,18 +20,21 @@ slouken@devolution.com */ -import SDL_types; -import SDL_getenv; -import SDL_error; -import SDL_rwops; -import SDL_timer; -import SDL_audio; -import SDL_cdrom; -import SDL_joystick; -import SDL_events; -import SDL_video; -import SDL_byteorder; -import SDL_Version; +public import SDL_types; +public import SDL_getenv; +public import SDL_error; +public import SDL_rwops; +public import SDL_timer; +public import SDL_audio; +public import SDL_cdrom; +public import SDL_keyboard; +public import SDL_keysym; +public import SDL_joystick; +public import SDL_mouse; +public import SDL_events; +public import SDL_video; +public import SDL_byteorder; +public import SDL_version; extern(C): @@ -72,10 +75,10 @@ * dynamically linked library. You should call it upon all exit conditions. */ void SDL_Quit(); - +/+ void SDL_SetModuleHandle(void *hInst); //extern(Windows) void* GetModuleHandle(char*); -extern(Windows) void* GetModuleHandleA(char*); +extern(Windows) void* GetModuleHandle(char*); static this() { @@ -83,10 +86,11 @@ if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) throw new Error("Error loading SDL"); // SDL_SetModuleHandle(GetModuleHandle(null)); - SDL_SetModuleHandle(GetModuleHandleA(null)); + SDL_SetModuleHandle(GetModuleHandle(null)); } static ~this() { SDL_Quit(); } ++/ diff -Naur GU/import/SDL_endian.d GU-gentoo/import/SDL_endian.d --- GU/import/SDL_endian.d 2004-05-08 12:55:52.000000000 +0200 +++ GU-gentoo/import/SDL_endian.d 2007-10-10 19:30:12.000000000 +0200 @@ -47,7 +47,7 @@ */ Uint16 SDL_Swap16(Uint16 D) { - return((D<<8)|(D>>8)); + return cast(Uint16)((D<<8)|(D>>8)); } Uint32 SDL_Swap32(Uint32 D) { diff -Naur GU/import/SDL_events.d GU-gentoo/import/SDL_events.d --- GU/import/SDL_events.d 2004-12-02 15:48:16.000000000 +0100 +++ GU-gentoo/import/SDL_events.d 2007-10-10 19:30:12.000000000 +0200 @@ -105,7 +105,7 @@ Uint8 type; /* SDL_KEYDOWN or SDL_KEYUP */ Uint8 which; /* The keyboard device index */ Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ - SDL_keysym keysym; + SDL_keysym2 keysym; } /* Mouse motion event structure */ diff -Naur GU/import/SDL_keyboard.d GU-gentoo/import/SDL_keyboard.d --- GU/import/SDL_keyboard.d 2002-01-04 15:28:12.000000000 +0100 +++ GU-gentoo/import/SDL_keyboard.d 2007-10-10 19:30:12.000000000 +0200 @@ -26,7 +26,7 @@ // !!! A hack! struct SDL_keysym is defined in this module, // !!! so we need to resolve the nameclash... // !!! Definitely won't work on *NIX but for now will do. -import SDL_Keysym; +import SDL_keysym; extern(C): @@ -46,7 +46,7 @@ An international character.. } */ -struct SDL_keysym { +struct SDL_keysym2 { Uint8 scancode; /* hardware specific scancode */ SDLKey sym; /* SDL virtual keysym */ SDLMod mod; /* current key modifiers */ diff -Naur GU/import/SDL_syswm.d GU-gentoo/import/SDL_syswm.d --- GU/import/SDL_syswm.d 2004-01-03 16:10:50.000000000 +0100 +++ GU-gentoo/import/SDL_syswm.d 2007-10-10 19:30:12.000000000 +0200 @@ -22,7 +22,7 @@ /* Include file for SDL custom system window manager hooks */ -import SDL_Version; +import SDL_version; extern(C): diff -Naur GU/import/opengl.d GU-gentoo/import/opengl.d --- GU/import/opengl.d 2004-01-09 10:52:04.000000000 +0100 +++ GU-gentoo/import/opengl.d 2007-10-10 19:30:12.000000000 +0200 @@ -1,10 +1,6 @@ -version (Win32) { - private import std.c.windows.windows; - extern(Windows): -} -version (linux) { + extern(C): -} + alias uint GLenum; alias ubyte GLboolean; @@ -1116,7 +1112,7 @@ /*************************************************************/ void /*APIENTRY*/glAccum (GLenum op, GLfloat value); -void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref); +void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf); GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences); void /*APIENTRY*/glArrayElement (GLint i); void /*APIENTRY*/glBegin (GLenum mode); @@ -1369,7 +1365,7 @@ void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height); void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer); void /*APIENTRY*/glShadeModel (GLenum mode); -void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask); +void /*APIENTRY*/glStencilFunc (GLenum func, GLint, GLuint mask); void /*APIENTRY*/glStencilMask (GLuint mask); void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); void /*APIENTRY*/glTexCoord1d (GLdouble s); diff -Naur GU/import/openglu.d GU-gentoo/import/openglu.d --- GU/import/openglu.d 2003-12-04 04:15:26.000000000 +0100 +++ GU-gentoo/import/openglu.d 2007-10-10 19:30:12.000000000 +0200 @@ -1,11 +1,8 @@ import opengl; -version (Win32) { - extern(Windows): -} -version (linux) { + extern(C): -} + GLubyte* gluErrorString ( GLenum errCode); diff -Naur GU/src/bulletcommand.d GU-gentoo/src/bulletcommand.d --- GU/src/bulletcommand.d 2006-08-16 18:07:38.000000000 +0200 +++ GU-gentoo/src/bulletcommand.d 2007-10-10 19:31:33.000000000 +0200 @@ -37,7 +37,7 @@ buf.length = 256; buf = fname ~ "\0"; - parser[bank] = BulletMLParserTinyXML_new(buf); + parser[bank] = BulletMLParserTinyXML_new(buf.ptr); if(parser[bank]) BulletMLParserTinyXML_parse(parser[bank]); buf.length = 0; } @@ -171,7 +171,8 @@ if(eid != -1){ TskBuf[eid].parent = BulletCommand.now.id; d = (d <= 180.0f ? d : -(360.0f - d)); - d = d / ROTVAL; + d = d / ROTVAL; + TskBuf[eid].roll = 0; TskBuf[eid].bullet_speed = s; TskBuf[eid].bullet_direction = d; TskBuf[eid].bullet_velx = (sin(d) * (-s * VEL_SDM_SS_RATIO)); diff -Naur GU/src/luminous.d GU-gentoo/src/luminous.d --- GU/src/luminous.d 2006-07-08 04:49:12.000000000 +0200 +++ GU-gentoo/src/luminous.d 2007-10-10 19:32:36.000000000 +0200 @@ -7,7 +7,7 @@ */ private import std.math; -private import std.string; +private import std.c.string; private import opengl; private import util_sdl; private import task; @@ -68,11 +68,11 @@ static void makeLuminousTexture() { - uint *data = td; + uint *data = td.ptr; int i; td[0..length] = 0; - //memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.sizeof); + memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.sizeof); glGenTextures(1, &luminousTexture); glBindTexture(GL_TEXTURE_2D, luminousTexture); glTexImage2D(GL_TEXTURE_2D, 0, 4, luminousTextureWidth, luminousTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); diff -Naur GU/src/main.d GU-gentoo/src/main.d --- GU/src/main.d 2006-09-01 21:02:40.000000000 +0200 +++ GU-gentoo/src/main.d 2007-10-10 19:30:12.000000000 +0200 @@ -6,14 +6,14 @@ 2006/07/07 jumpei isshiki */ -private import std.c.windows.windows; +//private import std.c.windows.windows; private import std.stdio; private import std.string; private import std.random; private import std.math; private import SDL; private import opengl; -private import reflection; +//private import reflection; private import util_sdl; private import util_glbf; private import util_pad; @@ -66,9 +66,11 @@ for(int i = 0; i < argc; i++){ str_buf[i] = lpCmdLine[i]; } - split_buf = split(str_buf); + split_buf = split(str_buf); +/* if(split_buf[0].length > 1) Reflection.init(split_buf[0]); - else Reflection.init("main.exe"); + else Reflection.init("main.exe"); +*/ } try{ @@ -86,7 +88,7 @@ }else{ int main(char[][] argv) { - Reflection.init(argv[argv.length-1]); + // Reflection.init(argv[argv.length-1]); return boot(); } } diff -Naur GU/src/task.d GU-gentoo/src/task.d --- GU/src/task.d 2006-08-24 17:35:26.000000000 +0200 +++ GU-gentoo/src/task.d 2007-10-10 19:33:42.000000000 +0200 @@ -182,7 +182,9 @@ TskBuf[i].fp_draw = null; TskBuf[i].fp_exit = null; TskBuf[i].bullet_command = null; - TskBuf[i].bullet_state = null; + TskBuf[i].bullet_state = null; + TskBuf[i].bullet_accx = 0; + TskBuf[i].bullet_accy = 0; } TskBuf[i].tskid = TSKID_NONE; TskBuf[i].entry = -1; diff -Naur GU/src/util_glbf.d GU-gentoo/src/util_glbf.d --- GU/src/util_glbf.d 2006-07-07 17:37:52.000000000 +0200 +++ GU-gentoo/src/util_glbf.d 2007-10-10 19:30:12.000000000 +0200 @@ -156,7 +156,7 @@ { glBindTexture(GL_TEXTURE_2D, font.texture); // Select Our Font Texture glListBase(font.base-32); // Choose The Font Set (0 or 1) - glCallLists(str.length, GL_BYTE, str); // Write The Text To The Screen + glCallLists(str.length, GL_BYTE, str.ptr); // Write The Text To The Screen } int glbfInit(GLBitmapFont* font, char* filename, GLfloat xsize, GLfloat xdots, GLfloat ydots) diff -Naur GU/src/util_rand.d GU-gentoo/src/util_rand.d --- GU/src/util_rand.d 2006-07-26 16:50:10.000000000 +0200 +++ GU-gentoo/src/util_rand.d 2007-10-10 19:30:12.000000000 +0200 @@ -112,14 +112,14 @@ void next_state() { - uint *p=state; + uint *p=state.ptr; /* if init_genrand() has not been called, */ /* a default initial seed is used */ if (initf==0) init_genrand(5489); left = N; - next = state; + next = state.ptr; for (int j=N-M+1; --j; p++) *p = p[M] ^ TWIST(p[0], p[1]); diff -Naur GU/src/util_snd.d GU-gentoo/src/util_snd.d --- GU/src/util_snd.d 2006-07-23 17:34:42.000000000 +0200 +++ GU-gentoo/src/util_snd.d 2007-10-10 19:30:12.000000000 +0200 @@ -99,7 +99,7 @@ char[] fileName = name ~ "\0"; - music[ch] = Mix_LoadMUS(fileName); + music[ch] = Mix_LoadMUS(fileName.ptr); if(!music[ch]){ writefln("snd load error %s", name); sound_use = false; @@ -119,7 +119,7 @@ char[] fileName = name ~ "\0"; - chunk[bank] = Mix_LoadWAV(fileName); + chunk[bank] = Mix_LoadWAV(fileName.ptr); if(!chunk[bank]){ sound_use = false; }