diff -crBN NinjaFlare/Makefile NinjaFlareLinux/Makefile *** NinjaFlare/Makefile Thu Jan 1 01:00:00 1970 --- NinjaFlareLinux/Makefile Wed May 1 14:18:26 2013 *************** *** 0 **** --- 1,24 ---- + BIN=ninjaflare + OBJECTS=Source/assets.o \ + Source/camera.o \ + Source/delta.o \ + Source/entity.o \ + Source/framework.o \ + Source/game.o \ + Source/level.o \ + Source/particles.o \ + Source/player.o \ + Source/sound.o \ + Source/sun.o \ + Source/video.o + FLAGS=-O2 -I/usr/include/ + LIBS=-lSDL + + .cpp.o: + $(CC) -c $< -o $@ $(FLAGS) + + $(BIN): $(OBJECTS) + $(CC) -o $@ $^ $(LIBS) + + clean: + rm -f Source/*.o $(BIN) diff -crBN NinjaFlare/Source/assets.cpp NinjaFlareLinux/Source/assets.cpp *** NinjaFlare/Source/assets.cpp Mon Apr 29 01:34:24 2013 --- NinjaFlareLinux/Source/assets.cpp Wed May 1 14:31:49 2013 *************** *** 1,6 **** #include "assets.h" #include "framework.h" ! #include // sSpriteAsset sprite[] = --- 1,6 ---- #include "assets.h" #include "framework.h" ! //#include // sSpriteAsset sprite[] = *************** *** 14,20 **** { "assets/tree3.bmp" , true , 0 }, { "assets/edges.bmp" , true , 0 }, { "assets/rock.bmp" , true , 0 }, ! { "assets/shrine.bmp" , true , 0 }, { "assets/pigeon.bmp" , true , 0 }, { "assets/enemy.bmp" , true , 0 }, { "assets/font.bmp" , true , 0 } --- 14,20 ---- { "assets/tree3.bmp" , true , 0 }, { "assets/edges.bmp" , true , 0 }, { "assets/rock.bmp" , true , 0 }, ! { "assets/Shrine.bmp" , true , 0 }, { "assets/pigeon.bmp" , true , 0 }, { "assets/enemy.bmp" , true , 0 }, { "assets/font.bmp" , true , 0 } *************** *** 53,59 **** }; // load sounds ! for ( int i=0; i ! #include #include "types.h" // --- 1,8 ---- #pragma once // ! #include ! //#include #include "types.h" // *************** *** 52,58 **** struct sSoundAsset { char *path; ! HSAMPLE data; }; // --- 52,59 ---- struct sSoundAsset { char *path; ! //HSAMPLE data; ! void *data; }; // *************** *** 77,80 **** inline sSoundAsset *getSound( int num ) { return &sound[ num ]; ! } \ No newline at end of file --- 78,81 ---- inline sSoundAsset *getSound( int num ) { return &sound[ num ]; ! } diff -crBN NinjaFlare/Source/delta.cpp NinjaFlareLinux/Source/delta.cpp *** NinjaFlare/Source/delta.cpp Sun Apr 28 22:04:42 2013 --- NinjaFlareLinux/Source/delta.cpp Wed May 1 13:58:07 2013 *************** *** 1,6 **** // #include "delta.h" ! #include // float gDeltaRate = 25.0f; --- 1,6 ---- // #include "delta.h" ! #include // float gDeltaRate = 25.0f; *************** *** 66,69 **** } // gLastTicks = ticks; ! } \ No newline at end of file --- 66,69 ---- } // gLastTicks = ticks; ! } diff -crBN NinjaFlare/Source/framework.cpp NinjaFlareLinux/Source/framework.cpp *** NinjaFlare/Source/framework.cpp Mon Apr 29 01:51:54 2013 --- NinjaFlareLinux/Source/framework.cpp Wed May 1 14:15:06 2013 *************** *** 1,6 **** // ! #include ! #include #include "framework.h" #include "assets.h" #include "delta.h" --- 1,6 ---- // ! #include ! //#include #include "framework.h" #include "assets.h" #include "delta.h" *************** *** 9,18 **** // void startMusic( void ) { ! HSTREAM stream = BASS_StreamCreateFile( FALSE, "assets/music.mp3", 0, 0, 0 ); if ( stream == 0 ) return; ! BASS_ChannelPlay( stream, TRUE ); } // --- 9,18 ---- // void startMusic( void ) { ! /* HSTREAM stream = BASS_StreamCreateFile( FALSE, "assets/music.mp3", 0, 0, 0 ); if ( stream == 0 ) return; ! BASS_ChannelPlay( stream, TRUE );*/ } // *************** *** 118,127 **** if(! SDL_GetWMInfo(&wmi) ) return false; // init bass ! if ( BASS_Init( -1, 22050, BASS_DEVICE_MONO, (HWND)wmi.window, NULL ) == FALSE ) return false; // start bass going already ! return (BASS_Start( ) == TRUE); } // --- 118,128 ---- if(! SDL_GetWMInfo(&wmi) ) return false; // init bass ! /* if ( BASS_Init( -1, 22050, BASS_DEVICE_MONO, (HWND)wmi.window, NULL ) == FALSE ) return false; // start bass going already ! return (BASS_Start( ) == TRUE);*/ ! return true; } // *************** *** 190,197 **** // finish_game( ); // ! BASS_Stop( ); ! BASS_Free( ); // return 0; ! } \ No newline at end of file --- 191,198 ---- // finish_game( ); // ! /*BASS_Stop( ); ! BASS_Free( );*/ // return 0; ! } diff -crBN NinjaFlare/Source/framework.h NinjaFlareLinux/Source/framework.h *** NinjaFlare/Source/framework.h Wed Apr 24 21:23:50 2013 --- NinjaFlareLinux/Source/framework.h Wed May 1 13:58:17 2013 *************** *** 1,9 **** #pragma once ! #include #include "types.h" // the target surface for all video work extern SDL_Surface *target; // the current sdl key state ! extern uint8 *keys; \ No newline at end of file --- 1,9 ---- #pragma once ! #include #include "types.h" // the target surface for all video work extern SDL_Surface *target; // the current sdl key state ! extern uint8 *keys; diff -crBN NinjaFlare/Source/game.cpp NinjaFlareLinux/Source/game.cpp *** NinjaFlare/Source/game.cpp Mon Apr 29 01:44:28 2013 --- NinjaFlareLinux/Source/game.cpp Wed May 1 13:58:19 2013 *************** *** 1,4 **** ! #include #include "framework.h" #include "assets.h" #include "video.h" --- 1,4 ---- ! #include #include "framework.h" #include "assets.h" #include "video.h" *************** *** 196,199 **** // void finish_game( void ) { ! } \ No newline at end of file --- 196,199 ---- // void finish_game( void ) { ! } diff -crBN NinjaFlare/Source/level.cpp NinjaFlareLinux/Source/level.cpp *** NinjaFlare/Source/level.cpp Mon Apr 29 01:38:58 2013 --- NinjaFlareLinux/Source/level.cpp Wed May 1 13:58:24 2013 *************** *** 1,4 **** ! #include #include "video.h" #include "level.h" #include "types.h" --- 1,4 ---- ! #include #include "video.h" #include "level.h" #include "types.h" *************** *** 335,338 **** } // return false; ! } \ No newline at end of file --- 335,338 ---- } // return false; ! } diff -crBN NinjaFlare/Source/particles.cpp NinjaFlareLinux/Source/particles.cpp *** NinjaFlare/Source/particles.cpp Mon Apr 29 01:30:06 2013 --- NinjaFlareLinux/Source/particles.cpp Wed May 1 13:58:30 2013 *************** *** 1,4 **** ! #include #include "particles.h" #include "types.h" #include "delta.h" --- 1,4 ---- ! #include #include "particles.h" #include "types.h" #include "delta.h" *************** *** 206,209 **** // alive++; }; ! } \ No newline at end of file --- 206,209 ---- // alive++; }; ! } diff -crBN NinjaFlare/Source/player.cpp NinjaFlareLinux/Source/player.cpp *** NinjaFlare/Source/player.cpp Mon Apr 29 01:39:58 2013 --- NinjaFlareLinux/Source/player.cpp Wed May 1 13:58:38 2013 *************** *** 1,5 **** // ! #include #include "player.h" #include "delta.h" #include "constants.h" --- 1,5 ---- // ! #include #include "player.h" #include "delta.h" #include "constants.h" *************** *** 444,447 **** gPlayer.vy = -5.0f; gPlayer.vx *= 0.25f; gPlayer.vx -= 3.0f; ! } \ No newline at end of file --- 444,447 ---- gPlayer.vy = -5.0f; gPlayer.vx *= 0.25f; gPlayer.vx -= 3.0f; ! } diff -crBN NinjaFlare/Source/sound.cpp NinjaFlareLinux/Source/sound.cpp *** NinjaFlare/Source/sound.cpp Tue Apr 23 17:32:20 2013 --- NinjaFlareLinux/Source/sound.cpp Wed May 1 13:59:59 2013 *************** *** 1,4 **** ! #include #include "sound.h" #include "assets.h" --- 1,4 ---- ! //#include #include "sound.h" #include "assets.h" *************** *** 11,19 **** if ( num < 0 ) return; if ( num >= getSoundCount( ) ) return; // play the audio already ! if ( BASS_ChannelPlay( sound[ num ].data, TRUE ) != TRUE ) { int err = BASS_ErrorGetCode( ); printf( "\nbass error %d\n", err ); ! } } --- 11,19 ---- if ( num < 0 ) return; if ( num >= getSoundCount( ) ) return; // play the audio already ! /*if ( BASS_ChannelPlay( sound[ num ].data, TRUE ) != TRUE ) { int err = BASS_ErrorGetCode( ); printf( "\nbass error %d\n", err ); ! }*/ }