diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-27 16:07:17 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-27 16:07:17 +1100 |
commit | f08ffe2162f9c3298f04174de7303bcbcdaf2a01 (patch) | |
tree | 2a13b67ffdeef540dcbd387b6848b561728ef466 /source/game/StarLightSource.cpp | |
parent | b50244ade5415f9f84db9d54995faacffe6fd691 (diff) | |
parent | 888cde79ef8f6d1b008e86207b41e1fd686c7636 (diff) |
Merge branch 'light-test'
Diffstat (limited to 'source/game/StarLightSource.cpp')
-rw-r--r-- | source/game/StarLightSource.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/game/StarLightSource.cpp b/source/game/StarLightSource.cpp index 65b7429..b20b15c 100644 --- a/source/game/StarLightSource.cpp +++ b/source/game/StarLightSource.cpp @@ -3,6 +3,12 @@ namespace Star { +EnumMap<LightType> const LightTypeNames{ + {LightType::Spread, "Spread"}, + {LightType::Point, "Point"}, + {LightType::PointAsSpread, "PointAsSpread"} +}; + void LightSource::translate(Vec2F const& pos) { position += pos; } @@ -10,7 +16,7 @@ void LightSource::translate(Vec2F const& pos) { DataStream& operator<<(DataStream& ds, LightSource const& lightSource) { ds.write(lightSource.position); ds.write(lightSource.color); - ds.write(lightSource.pointLight); + ds.write(lightSource.type); ds.write(lightSource.pointBeam); ds.write(lightSource.beamAngle); ds.write(lightSource.beamAmbience); @@ -21,7 +27,7 @@ DataStream& operator<<(DataStream& ds, LightSource const& lightSource) { DataStream& operator>>(DataStream& ds, LightSource& lightSource) { ds.read(lightSource.position); ds.read(lightSource.color); - ds.read(lightSource.pointLight); + ds.read(lightSource.type); ds.read(lightSource.pointBeam); ds.read(lightSource.beamAngle); ds.read(lightSource.beamAmbience); |