runtime: CMake-ify

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-01-18 15:55:06 +01:00
parent 717609a900
commit 24788185aa
184 changed files with 2957 additions and 2527 deletions
+42
View File
@@ -0,0 +1,42 @@
#include "std.hpp"
#include "emitter.hpp"
Emitter::Emitter(){
}
Emitter::Emitter( const Emitter &t ){
}
Emitter::~Emitter(){
}
void Emitter::beginRender( float tween ){
Object::beginRender( tween );
vel=getRenderTform().v-pos;
pos=getRenderTform().v;
for( int k=0;k<channels.size();++k ){
gxChannel *chan=channels[k];
if( !chan->isPlaying() ){
channels[k]=0;
continue;
}
chan->set3d( &pos.x,&vel.x );
}
}
gxChannel *Emitter::emitSound( gxSound *sound ){
gxChannel *chan=sound->play3d( &pos.x,&vel.x );
for( int k=0;k<channels.size();++k ){
if( chan=channels[k] ) return chan;
if( channels[k] ) continue;
channels[k]=chan;
return chan;
}
channels.push_back( chan );
return chan;
}