Skip to content

Commit

Permalink
Add ceil lamp
Browse files Browse the repository at this point in the history
  • Loading branch information
nerudaj committed Jan 2, 2024
1 parent f2511eb commit f8ad21b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 4 deletions.
Binary file modified resources/graphics/editor-items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/graphics/editor-items.png.clip
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"height": 112,
"left": 0
},
"nframes": 38,
"nframes": 39,
"offset": 0
}
Binary file modified resources/graphics/sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions resources/graphics/sprites.png.clip
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"tiles_per_row": 9,
"tiles_per_row": 10,
"frame": {
"width": 16,
"height": 16
Expand All @@ -9,11 +9,11 @@
"vertical": 0
},
"bounds": {
"width": 144,
"width": 160,
"top": 0,
"height": 160,
"left": 0
},
"nframes": 90,
"nframes": 91,
"offset": 0
}
1 change: 1 addition & 0 deletions src/lib-defines/include/LevelItemId.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum class LevelItemId
Unused18,
Pillar,
FloorLamp,
CeilLamp,
Unused19,
Unused20,
};
Expand Down
3 changes: 3 additions & 0 deletions src/lib-game/include/core/EntityDefinitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ const static inline auto ENTITY_PROPERTIES =
EntityProperties { .radius = 3_px,
.traits = Trait::Solid,
.initialSpriteIndex = FloorLampA } },
{ EntityType::CeilLamp,
EntityProperties { .radius = 4_px,
.initialSpriteIndex = CeilLampA } },
{ EntityType::ProjectileFlare,
EntityProperties {
.radius = 2_px,
Expand Down
2 changes: 2 additions & 0 deletions src/lib-game/include/core/Enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enum class SpriteId : std::uint8_t
HarpoonA,
PillarA,
FloorLampA,
CeilLampA,
PlayerA0,
PlayerA1,
PlayerA2,
Expand Down Expand Up @@ -164,6 +165,7 @@ enum class EntityType
StaticDecorationBegin,
Pillar,
FloorLamp,
CeilLamp,
StaticDecorationEnd,
Player,

Expand Down
1 change: 1 addition & 0 deletions src/lib-game/src/builder/LightmapBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ std::queue<LightPoint> LightmapBuilder::getItemBasedLightSources(
switch (static_cast<LevelItemId>(thing.id))
{
case FloorLamp:
case CeilLamp:
queue.emplace(
thing.x / voxelSize.x,
thing.y / voxelSize.y,
Expand Down
2 changes: 2 additions & 0 deletions src/lib-game/src/builder/SceneBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ convertLeveldItemIdToEntityType(LevelItemId id) noexcept
return EntityType::Pillar;
case FloorLamp:
return EntityType::FloorLamp;
case CeilLamp:
return EntityType::CeilLamp;
default:
return EntityType::Error;
}
Expand Down

0 comments on commit f8ad21b

Please sign in to comment.