v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
32
source/game/StarLightSource.cpp
Normal file
32
source/game/StarLightSource.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "StarLightSource.hpp"
|
||||
#include "StarDataStreamExtra.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
void LightSource::translate(Vec2F const& pos) {
|
||||
position += pos;
|
||||
}
|
||||
|
||||
DataStream& operator<<(DataStream& ds, LightSource const& lightSource) {
|
||||
ds.write(lightSource.position);
|
||||
ds.write(lightSource.color);
|
||||
ds.write(lightSource.pointLight);
|
||||
ds.write(lightSource.pointBeam);
|
||||
ds.write(lightSource.beamAngle);
|
||||
ds.write(lightSource.beamAmbience);
|
||||
|
||||
return ds;
|
||||
}
|
||||
|
||||
DataStream& operator>>(DataStream& ds, LightSource& lightSource) {
|
||||
ds.read(lightSource.position);
|
||||
ds.read(lightSource.color);
|
||||
ds.read(lightSource.pointLight);
|
||||
ds.read(lightSource.pointBeam);
|
||||
ds.read(lightSource.beamAngle);
|
||||
ds.read(lightSource.beamAmbience);
|
||||
|
||||
return ds;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue