summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Unbehaun <frostworks@gmx.de>2009-10-12 09:51:02 +0200
committerMarcel Unbehaun <frostworks@gmx.de>2009-10-12 09:51:02 +0200
commit03e25cc441eb2f516454a3d99ce3d05f13084c84 (patch)
tree1ce326adf8a953520a8823f3bff593d216d712c9 /games-puzzle
parent(games-arcade/prototype) initial wip prototype-1.0.ebuild (diff)
downloadgamerlay-03e25cc441eb2f516454a3d99ce3d05f13084c84.tar.gz
gamerlay-03e25cc441eb2f516454a3d99ce3d05f13084c84.tar.bz2
gamerlay-03e25cc441eb2f516454a3d99ce3d05f13084c84.zip
(games-puzzle/laserreaction) initial laserreaction-1.0.ebuild
(games-puzzle/laserreaction) newManifest (games-puzzle/laserreaction) new files/laserreaction-1.0-includes.patch (games-puzzle/laserreaction) new files/laserreaction-1.0-makefile.patch (games-puzzle/laserreaction) new files/laserreaction-1.0-misc.patch (games-puzzle/laserreaction) new files/laserreaction-1.0-sound.patch (games-puzzle/laserreaction) new metadata.xml
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/laserreaction/Manifest7
-rw-r--r--games-puzzle/laserreaction/files/laserreaction-1.0-includes.patch55
-rw-r--r--games-puzzle/laserreaction/files/laserreaction-1.0-makefile.patch33
-rw-r--r--games-puzzle/laserreaction/files/laserreaction-1.0-misc.patch53
-rw-r--r--games-puzzle/laserreaction/files/laserreaction-1.0-sound.patch498
-rw-r--r--games-puzzle/laserreaction/laserreaction-1.0.ebuild49
-rw-r--r--games-puzzle/laserreaction/metadata.xml9
7 files changed, 704 insertions, 0 deletions
diff --git a/games-puzzle/laserreaction/Manifest b/games-puzzle/laserreaction/Manifest
new file mode 100644
index 0000000..ecc2236
--- /dev/null
+++ b/games-puzzle/laserreaction/Manifest
@@ -0,0 +1,7 @@
+AUX laserreaction-1.0-includes.patch 1314 RMD160 445366783638d27721feb79d0df1050da6951e5f SHA1 8afb747e9d6473d17a51e0ad9724a19aa6079260 SHA256 3e8a568889775d1969d695f7f8360ae9e4d795b5e0102e90b56dbd455318cac3
+AUX laserreaction-1.0-makefile.patch 831 RMD160 36519e831614bc44fe70164a32b5b72452d13de8 SHA1 621ac55ff342cf644b79e0fa972c23ed4f219c05 SHA256 c55e28b2def9e6213703a836c5475ab3ef8d074cb209206a53dde084f49fc4b8
+AUX laserreaction-1.0-misc.patch 1484 RMD160 92084d9db315e89c94fa92917977c25fa2132a32 SHA1 88127b9dfb3f8be7cf78719ae120f2da60d6cd2e SHA256 d5928cf98f26c0e772d9a134f431d5650442f89138eccff7ff219c35e9d341f2
+AUX laserreaction-1.0-sound.patch 11210 RMD160 b836ace016d8802bf29768eb0586ee76ec42b86a SHA1 c81047015ab4f005b9c3bb96aaf8a1bde627e8f2 SHA256 bbef4065cad329cac7601cf99517d1f161217e2d406e26863bb08d229e90d72a
+DIST LD10.zip 2478110 RMD160 20ad21a40e48a6294026aae7774cd0980feb7cf9 SHA1 f44293b42feedf5d76c17e96adcdc7eac560733c SHA256 85bb26c4e394bf9d0c4c5bdd38430bd2ad6d0d2d5317059253cfc8e8b5c8c398
+EBUILD laserreaction-1.0.ebuild 1113 RMD160 5accf66ac47c40f63663a6d171f4fafbc014b979 SHA1 344f3382ba3867250b31b9bada2f821248da1724 SHA256 bcc9b4d2d188c5e6ab0fd2e159dc30036d3bf11a8e3c182f1352e9ac7f4bcf8b
+MISC metadata.xml 249 RMD160 220cde0fc1a8d7d355705f0f6772bd8d77cdc17a SHA1 34b33eb8d24cd8bfef2ddfb8e80334fd77cc9488 SHA256 3875fd5008d7f5bfe7f3cf7bf330c209a5034f5988d37c1699fb3be35a7be906
diff --git a/games-puzzle/laserreaction/files/laserreaction-1.0-includes.patch b/games-puzzle/laserreaction/files/laserreaction-1.0-includes.patch
new file mode 100644
index 0000000..c48a7c3
--- /dev/null
+++ b/games-puzzle/laserreaction/files/laserreaction-1.0-includes.patch
@@ -0,0 +1,55 @@
+diff -Naur Font.cpp Font.cpp
+--- Font.cpp 2009-10-02 12:17:55.000000000 +0200
++++ Font.cpp 2009-10-02 12:28:33.000000000 +0200
+@@ -1,6 +1,7 @@
+ #include "Font.h"
+-#include <windows.h>
+-#include <gl/gl.h>
++//#include <windows.h>
++#include <GL/gl.h>
++#include <cstring>
+ Font::Font()
+ {
+ mScale = 1.0f;
+diff -Naur Game.h Game.h
+--- Game.h 2009-10-02 12:17:55.000000000 +0200
++++ Game.h 2009-10-02 12:26:36.000000000 +0200
+@@ -1,12 +1,12 @@
+ #pragma once
+-#include <sdl.h>
++#include <SDL/SDL.h>
+ #ifdef WIN32
+ #include <windows.h>
+ #endif
+-#include <gl/gl.h>
+-#include <il/il.h>
+-#include <il/ilu.h>
+-#include <il/ilut.h>
++#include <GL/gl.h>
++#include <IL/il.h>
++#include <IL/ilu.h>
++#include <IL/ilut.h>
+ #include "Timer.h"
+ #include "Button.h"
+ #include "FileIO.h"
+diff -Naur Main.cpp Main.cpp
+--- Main.cpp 2009-10-02 12:17:55.000000000 +0200
++++ Main.cpp 2009-10-02 12:26:47.000000000 +0200
+@@ -1,6 +1,6 @@
+ #include "Game.h"
+ #include <iostream>
+-#include <tchar.h>
++//#include <tchar.h>
+ /*=================================*/
+ /*= Main Entry =*/
+ /*=================================*/
+diff -Naur Timer.h Timer.h
+--- Timer.h 2009-10-02 12:17:55.000000000 +0200
++++ Timer.h 2009-10-02 12:26:12.000000000 +0200
+@@ -1,5 +1,5 @@
+ #pragma once
+-#include <sdl.h>
++#include <SDL/SDL.h>
+ class Timer
+ {
+ private:
diff --git a/games-puzzle/laserreaction/files/laserreaction-1.0-makefile.patch b/games-puzzle/laserreaction/files/laserreaction-1.0-makefile.patch
new file mode 100644
index 0000000..66461cd
--- /dev/null
+++ b/games-puzzle/laserreaction/files/laserreaction-1.0-makefile.patch
@@ -0,0 +1,33 @@
+diff -Naur Makefile Makefile
+--- Makefile 1970-01-01 01:00:00.000000000 +0100
++++ Makefile 2009-10-02 12:20:08.000000000 +0200
+@@ -0,0 +1,29 @@
++CPP = g++
++CFLAGS = -O2 -g -Wno-deprecated
++INCLUDES = -I/usr/include/ -I./ -I/usr/include/GL
++LDFLAGS = -lGL -lGLU -lILUT -ILU -lIL -lfmod
++
++DEST = .
++
++LD = gcc
++
++SDL_LDFLAGS = $(shell sdl-config --libs)
++SDL_CFLAGS = $(shell sdl-config --cflags) $(CFLAGS)
++
++MAKEFILE = Makefile
++
++OBJS = Button.o Font.o Game.o Main.o Sound.o Timer.o
++PRINT = pr
++
++PROGRAM = ../LaserReaction/laserreaction
++
++SHELL = /bin/sh
++
++%.o: %.cpp
++ $(CPP) $(INCLUDES) $(CFLAGS) -c $<
++all: $(PROGRAM)
++
++$(PROGRAM): $(OBJS) $(LIBS)
++ @echo "Linking $(PROGRAM) ..."
++ $(LD) -o $(PROGRAM) $(OBJS) $(LDFLAGS) $(SDL_LDFLAGS)
++
diff --git a/games-puzzle/laserreaction/files/laserreaction-1.0-misc.patch b/games-puzzle/laserreaction/files/laserreaction-1.0-misc.patch
new file mode 100644
index 0000000..5ceda8b
--- /dev/null
+++ b/games-puzzle/laserreaction/files/laserreaction-1.0-misc.patch
@@ -0,0 +1,53 @@
+diff -Naur Game.cpp Game.cpp
+--- Game.cpp 2009-10-02 12:17:55.000000000 +0200
++++ Game.cpp 2009-10-02 12:33:33.000000000 +0200
+@@ -58,7 +58,7 @@
+ LoadStage();
+
+ printf("Loading music\n");
+- InitializeSoundSystem();
++ InitFmod();
+ if(!music.Load("Data/LD10.mp3",true))
+ {
+ printf("Failed to load LD10.mp3\n");
+@@ -115,6 +115,12 @@
+ return true;
+ }
+
++void Game::InitFmod()
++{
++ FSOUND_Init(44100, 32, 0);
++}
++
++
+ /*===========================================================*/
+ /*= Pump =*/
+ /*===========================================================*/
+diff -Naur Game.h Game.h
+--- Game.h 2009-10-02 12:26:36.000000000 +0200
++++ Game.h 2009-10-02 12:31:26.000000000 +0200
+@@ -1,3 +1,4 @@
++#define ILUT_USE_OPENGL
+ #pragma once
+ #include <SDL/SDL.h>
+ #ifdef WIN32
+@@ -68,6 +69,7 @@
+
+ unsigned int LoadImage(char* name, unsigned int& w, unsigned int& h);
+ void SetOrtho(int w, int h);
++ void InitFmod();
+ void BindTexture(unsigned int id);
+ void RenderGame(const float interp);
+ void RenderTile(TileMap t, int frame, int x, int y, int w, int h);
+diff -Naur Main.cpp Main.cpp
+--- Main.cpp 2009-10-02 12:26:47.000000000 +0200
++++ Main.cpp 2009-10-02 12:31:46.000000000 +0200
+@@ -4,7 +4,7 @@
+ /*=================================*/
+ /*= Main Entry =*/
+ /*=================================*/
+-int _tmain(int argc, _TCHAR* argv[])
++int main(int argc, char* argv[])
+ {
+ Game* pGame = new Game(true);
+ //delete pGame;
diff --git a/games-puzzle/laserreaction/files/laserreaction-1.0-sound.patch b/games-puzzle/laserreaction/files/laserreaction-1.0-sound.patch
new file mode 100644
index 0000000..9163261
--- /dev/null
+++ b/games-puzzle/laserreaction/files/laserreaction-1.0-sound.patch
@@ -0,0 +1,498 @@
+diff -Naur Sound.cpp Sound.cpp
+--- Sound.cpp 2009-10-02 12:17:55.000000000 +0200
++++ Sound.cpp 2009-10-02 12:23:34.000000000 +0200
+@@ -1,375 +1,109 @@
+ #include "Sound.h"
+-#if SOUND_SYSTEM == USE_FMODEX
+-FMOD_RESULT result;
+-FMOD::System *pSystem;
+-#endif
+-void InitializeSoundSystem()
+-{
+-//#if SOUND_SYSTEM == USE_BASS
+-//#else
+-//#endif
+-#if SOUND_SYSTEM == USE_FMODEX
+- result = FMOD::System_Create(&pSystem); // Create the main system object.
+- if (result != FMOD_OK)
+- {
+- return;
+- }
+-
+- result = pSystem->init(100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
+- if (result != FMOD_OK)
+- {
+- return;
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+- if (BASS_Init(-1,44100,BASS_DEVICE_SPEAKERS,0,NULL)==FALSE)
+- {
+- return;
+- }
+-#else
+- FSOUND_Init(44100, 96, 0);
+-#endif
+-}
+-void ShutDownSoundSystem()
+-{
+-#if SOUND_SYSTEM == USE_FMODEX
+- pSystem->close();
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_Free();
+-#else
+- FSOUND_Close();
+-#endif
+-}
+-void UpdateSoundSystem()
+-{
+-#if SOUND_SYSTEM == USE_FMODEX
+- pSystem->update();
+-#endif
+-}
+-void SoundSystemPause(bool paused)
+-{
+-#if SOUND_SYSTEM == USE_BASS
+- paused?
+- BASS_Pause(): BASS_Start();
+-#endif
+-}
+
+-void SetGlobalVolume(int music, int sfx)
++void Sound::Volume(int channel,int vol)
+ {
+-#if SOUND_SYSTEM == USE_BASS
+- BASS_SetConfig(BASS_CONFIG_GVOL_SAMPLE,sfx);
+- BASS_SetConfig(BASS_CONFIG_GVOL_MUSIC,music);
+-#endif
+-}
+-void StopAllSound()
+-{
+-#if SOUND_SYSTEM == USE_BASS
+- BASS_Stop();
+- SoundSystemPause(false);
+-#endif
++ FSOUND_SetVolume(channel,vol);
+ }
+-
+-
+-
+ bool Sample::Load(char* sound, bool loop)
+ {
+-#if SOUND_SYSTEM == USE_FMODEX
+- if(loop)
+- pSystem->createSound(sound,FMOD_2D | FMOD_LOOP_NORMAL,NULL,&pSample);
+- else
+- pSystem->createSound(sound,FMOD_2D,NULL,&pSample);
+- if(pSample == 0)
+- {
+- return false;
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+- if(loop)
+- pSample = BASS_SampleLoad(FALSE,sound,0,0,1,BASS_SAMPLE_LOOP);
+- else
+- pSample = BASS_SampleLoad(FALSE,sound,0,0,1,0);
+- if(pSample == 0)
+- {
+- return false;
+- }
+-#else
+ if(loop)
+ {
+ if((pSample = FSOUND_Sample_Load(FSOUND_FREE,sound,FSOUND_NORMAL | FSOUND_LOOP_NORMAL,0,0))==0)
+ {
+- return false;
++ printf("Failed to load sample: %s\n",sound);
++ return false;
+ }
+ }
+ else
+ {
+ if((pSample = FSOUND_Sample_Load(FSOUND_FREE,sound,FSOUND_NORMAL | FSOUND_LOOP_OFF,0,0))==0)
+ {
++ printf("Failed to load sample: %s\n",sound);
+ return false;
+ }
+ }
+-#endif
+ return true;
+ }
+ int Sample::Play()
+ {
+ if(pSample)
+-#if SOUND_SYSTEM == USE_FMODEX
+- {
+- FMOD::Channel* c;
+- pSystem->playSound(FMOD_CHANNEL_FREE,pSample,false,&c);
+- c->getIndex(&miChannelID);
+- return miChannelID;
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+- {
+- BASS_ChannelPlay(BASS_SampleGetChannel(pSample,FALSE),TRUE);
+- }
+-#else
+ return(FSOUND_PlaySound(FSOUND_FREE,pSample));
+-#endif
+ return -1;
+ }
+ void Sample::Play(int channel)
+ {
+ if(pSample)
+-#if SOUND_SYSTEM == USE_FMODEX
+- {
+-// FMOD::Channel* c;
+-// pSystem->getChannel(channel,&c);
+- pSystem->playSound((FMOD_CHANNELINDEX)(channel),pSample,false,NULL);
+- miChannelID = channel;
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+- {
+- Stop(0);
+- BASS_ChannelPlay(BASS_SampleGetChannel(pSample,FALSE),FALSE);
+- }
+-#else
+ FSOUND_PlaySound(channel,pSample);
+-#endif
+ }
+ void Sample::Stop(int channel)
+ {
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Channel* c;
+- pSystem->getChannel(miChannelID,&c);
+- c->stop();
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_SampleStop(pSample);
+-#else
+ FSOUND_StopSound(channel);
+-#endif
+ }
+ void Sample::Discard()
+ {
+ if(pSample)
+-#if SOUND_SYSTEM == USE_FMODEX
+- pSample->release();
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_SampleFree(pSample);
+-#else
+ FSOUND_Sample_Free(pSample);
+-#endif
+ // pSample = 0;
+ }
+ void Sample::SetFrequency(int channel,int frequency)
+ {
+-#if SOUND_SYSTEM == USE_FMODEX
+ FSOUND_SetFrequency(channel,frequency);
+-#endif
+ }
+ void Sample::SetDefaults(int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan)
+ {
+-#if SOUND_SYSTEM == USE_FMODEX
+ FSOUND_Sample_SetDefaultsEx(pSample,deffreq,defvol,defpan,defpri,varfreq,varvol,varpan);
+-#endif
+ }
+-void Sample::Volume(int channel,int vol)
+-{
+-#if SOUND_SYSTEM == USE_FMODEX
+- FSOUND_SetVolume(channel,vol);
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_ChannelSetAttributes(pSample,-1,vol,-101);
+-#endif
+-}
+-//================================================================================================//
+- /***********************
+- ** streams **
+- ************************/
+-//================================================================================================//
+ bool Stream::Load(char* stream, bool loop)
+ {
+- if((pStream = BASS_StreamCreateFile(FALSE,stream, 0, 0, loop? BASS_SAMPLE_LOOP:0))==0)
+- {
+- return false;
+- }
+- return true;
+-}
+-int Stream::Play()
+-{
+- BASS_ChannelPlay(pStream,true);
+- return 0;
+-}
+-void Stream::Play(int channel)
+-{
+- if(pStream)
+- {
+- if(BASS_ChannelPlay(pStream,false)==FALSE)
+- printf("Failed to play\n");
+-
+- }
+-}
+-void Stream::Stop(int channel)
+-{
+- BASS_ChannelStop(pStream);
+-}
+-void Stream::Discard()
+-{
+- BASS_StreamFree(pStream);
+-}
+-void Stream::Volume(int channel,int vol)
+-{
+- BASS_ChannelSetAttributes(pStream,-1,vol,-101);
+-}
+-//================================================================================================//
+- /***********************
+- ** modules **
+- ************************/
+-//================================================================================================//
+-bool Track::Load(char* stream, bool loop)
+-{
+-#if SOUND_SYSTEM == USE_FMODEX
+- if(loop)
+- pSystem->createSound(stream,FMOD_2D | FMOD_LOOP_NORMAL,NULL,&pStream);
+- else
+- pSystem->createSound(stream,FMOD_2D | FMOD_ACCURATETIME,NULL,&pStream);
+- if(pStream == 0)
+- {
+- return false;
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+ if(loop)
+- pStream = BASS_MusicLoad(FALSE,stream,0,0,BASS_SAMPLE_LOOP,0);
+- else
+- pStream = BASS_MusicLoad(FALSE,stream,0,0,0,0);
+- if(pStream == 0)
+ {
+- return false;
+- }
+-#else
+- if(loop)
+- {
+- if((pStream = FMUSIC_LoadSong(stream))==0)
++ if((pStream = FSOUND_Stream_Open(stream,FSOUND_NORMAL | FSOUND_LOOP_NORMAL,0,0))==0)
+ {
++ printf("Failed to load sample: %s\n",stream);
+ return false;
+ }
+- FMUSIC_SetLooping(pStream,true);
+ }
+ else
+ {
+- if((pStream = FMUSIC_LoadSong(stream))==0)
++ if((pStream = FSOUND_Stream_Open(stream,FSOUND_NORMAL,0,0))==0)
+ {
++ printf("Failed to load sample: %s\n",stream);
+ return false;
+ }
+- FMUSIC_SetLooping(pStream,false);
+ }
+-#endif
+ return true;
+ }
+-int Track::Play()
++int Stream::Play()
+ {
+ if(pStream)
+- {
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Channel* c;
+- pSystem->playSound(FMOD_CHANNEL_FREE,pStream,false,&c);
+- c->getIndex(&miChannelID);
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_ChannelPlay(pStream,true);
+-#else
+- miChannelID = FMUSIC_PlaySong(pStream);
+-#endif
+- return miChannelID;
+- }
++ return(FSOUND_Stream_Play(FSOUND_FREE,pStream));
+ return -1;
+ }
+-void Track::Play(int channel)
++void Stream::Play(int channel)
+ {
+ if(pStream)
+- {
+-#if SOUND_SYSTEM == USE_FMODEX
+- // FMOD::Channel* c;
+- // pSystem->getChannel(channel,&c);
+- pSystem->playSound((FMOD_CHANNELINDEX)(channel),pStream,false,NULL);
+-// pSystem->playSound(FMOD_CHANNEL_REUSE,pStream,false,&c);
+- miChannelID = channel;
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_ChannelPlay(pStream,true);
+-#else
+- miChannelID = FMUSIC_PlaySong(pStream);
+-#endif
+- }
++ FSOUND_Stream_Play(channel,pStream);
++// return(FSOUND_Stream_Play(channel,pStream));
++// return -1;
+ }
+-void Track::Stop(int i)
++void Stream::Stop(int channel)
+ {
+ if(pStream)
+-#if SOUND_SYSTEM == USE_FMODEX
+- {
+- FMOD::Channel* c;
+- pSystem->getChannel(miChannelID,&c);
+- c->stop();
+- }
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_ChannelStop(pStream);
+-#else
+- FMUSIC_StopSong(pStream);
+-#endif
++ FSOUND_Stream_Stop(pStream);
+ }
+-void Track::Discard()
++void Stream::Discard()
+ {
+ if(pStream)
+-#if SOUND_SYSTEM == USE_FMODEX
+- pStream->release();
+-#elif SOUND_SYSTEM == USE_BASS
+- BASS_MusicFree(pStream);
+-#else
+- FMUSIC_FreeSong(pStream);
+-#endif
++ FSOUND_Stream_Close(pStream);
+ pStream = 0;
+ }
+-bool Track::IsFinished()
+-{
+- if(pStream)
+- {
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Channel* c;
+- pSystem->getChannel(miChannelID,&c);
+- bool playing;
+- c->isPlaying(&playing);
+- if(!playing)
+-#elif SOUND_SYSTEM == USE_BASS
+- if(BASS_ChannelIsActive(pStream) == BASS_ACTIVE_STOPPED)
+-#else
+- if(FMUSIC_IsFinished(pStream))
+-#endif
+- return true;
+- }
+- return false;
+-}
+-bool Track::IsPlaying()
++void Stream::Seek(int ms, int channel)
+ {
+ if(pStream)
+ {
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Channel* c;
+- pSystem->getChannel(miChannelID,&c);
+- bool playing;
+- c->isPlaying(&playing);
+- if(playing)
+-#elif SOUND_SYSTEM == USE_BASS
+- if(BASS_ChannelIsActive(pStream) == BASS_ACTIVE_PLAYING)
+-#else
+- if(FMUSIC_IsPlaying(pStream))
+-#endif
+- return true;
++ FSOUND_Stream_Play(channel,pStream);
++ FSOUND_SetPaused(channel,true);
++ FSOUND_Stream_SetTime(pStream,ms);
++ FSOUND_SetPaused(channel,false);
+ }
+- return false;
+ }
+\ Kein Zeilenumbruch am Dateiende.
+diff -Naur Sound.h Sound.h
+--- Sound.h 2009-10-02 12:17:55.000000000 +0200
++++ Sound.h 2009-10-02 12:23:34.000000000 +0200
+@@ -1,25 +1,7 @@
+ #pragma once
+-//#define USE_FMODEX
+-#define USE_FMODEX 0
+-#define USE_FMOD 2
+-#define USE_BASS 1
+-
+-#define SOUND_SYSTEM USE_BASS
+-#if SOUND_SYSTEM == USE_FMODEX
+-#include <FMODEX/fmod.hpp>
+-#elif SOUND_SYSTEM == USE_BASS
+-#include <bass.h>
+-#else
+-#include <FMOD/fmod.h>
+-#endif
++#include <fmod.h>
+ #include <stdio.h>
+
+-void InitializeSoundSystem();
+-void ShutDownSoundSystem();
+-void UpdateSoundSystem();
+-void SetGlobalVolume(int music, int sfx);
+-void SoundSystemPause(bool paused);
+-void StopAllSound();
+ class Sound
+ {
+ public:
+@@ -27,9 +9,7 @@
+ virtual int Play()=0;//returns channel
+ virtual void Stop(int channel)=0;
+ virtual void Discard()=0;
+- virtual void Volume(int channel,int vol)=0;
+-
+- int miChannelID;
++ void Volume(int channel,int vol);
+ };
+
+
+@@ -45,49 +25,20 @@
+ void Discard();
+ void SetFrequency(int channel,int frequency);
+ void SetDefaults(int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan);
+- void Volume(int channel,int vol);
+ private:
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Sound * pSample;
+-#elif SOUND_SYSTEM == USE_BASS
+- HSAMPLE pSample;
+-#else
+ FSOUND_SAMPLE* pSample;
+-#endif
+ };
+-
+ class Stream : public Sound
+ {
+ public:
+ Stream(){pStream = 0;}
++// ~Stream(){ Discard(); }
+ bool Load(char* sound, bool loop);
+ int Play();
+ void Play(int channel);
+ void Stop(int channel);
+ void Discard();
+- void Volume(int channel,int vol);
+-private:
+- HSTREAM pStream;
+-};
+-
+-class Track : public Sound
+-{
+-public:
+- Track(){pStream = 0;}
+- bool Load(char* sound, bool loop);
+- int Play();
+- void Play(int channel);
+- void Stop(int i);
+- void Discard();
+- bool IsFinished();
+- bool IsPlaying();
+- void Volume(int channel,int vol);
++ void Seek(int ms, int channel);
+ private:
+-#if SOUND_SYSTEM == USE_FMODEX
+- FMOD::Sound* pStream;
+-#elif SOUND_SYSTEM == USE_BASS
+- HMUSIC pStream;
+-#else
+- FMUSIC_MODULE* pStream;
+-#endif
++ FSOUND_STREAM* pStream;
+ };
diff --git a/games-puzzle/laserreaction/laserreaction-1.0.ebuild b/games-puzzle/laserreaction/laserreaction-1.0.ebuild
new file mode 100644
index 0000000..92fda6d
--- /dev/null
+++ b/games-puzzle/laserreaction/laserreaction-1.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+inherit eutils games
+
+DESCRIPTION="laser game entry for ludum dare 10"
+HOMEPAGE="http://xout.blackened-interactive.com/OldGames.html"
+SRC_URI="http://xout.blackened-interactive.com/dump/new/LD10.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/libsdl
+ media-libs/devil
+ media-libs/fmod"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/LD10/Src
+
+src_prepare(){
+ edos2unix *.{cpp,h}
+ epatch ${FILESDIR}/"${P}-makefile.patch"
+ epatch ${FILESDIR}/"${P}-includes.patch"
+ epatch ${FILESDIR}/"${P}-misc.patch"
+ epatch ${FILESDIR}/"${P}-sound.patch"
+ sed -i -e "s:Data/:"${GAMES_DATADIR}"/"${PN}"/:g" -i Game.cpp
+
+}
+
+src_install() {
+ dogamesbin ../LaserReaction/${PN} || die "dogamesbin ${PN} failed"
+
+ local datadir="${GAMES_DATADIR}"/"${PN}"
+ dodir ${datadir}
+ insinto "${datadir}"
+ doins -r ../LaserReaction/Data/* || die "doins resources failed"
+ make_desktop_entry "${PN}" "${PN}"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+}
diff --git a/games-puzzle/laserreaction/metadata.xml b/games-puzzle/laserreaction/metadata.xml
new file mode 100644
index 0000000..4e4714e
--- /dev/null
+++ b/games-puzzle/laserreaction/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>frostworks@gmx.de</email>
+ <name>Marcel Unbehaun</name>
+</maintainer>
+<herd>games</herd>
+</pkgmetadata>