@@ -1,3 +1,4 @@ | |||
add_library(core.mod SHARED src/mod.cc) | |||
set_target_properties(core.mod PROPERTIES OUTPUT_NAME mod PREFIX "") | |||
target_link_libraries(core.mod libswan) | |||
file(COPY assets DESTINATION .) |
@@ -1,7 +1,8 @@ | |||
include_directories("${CMAKE_CURRENT_LIST_DIR}/include/swan") | |||
add_library(libswan SHARED | |||
src/Chunk.cc | |||
src/Body.cc | |||
src/Chunk.cc | |||
src/Game.cc | |||
src/Mod.cc | |||
src/Player.cc |
@@ -28,10 +28,14 @@ int main() { | |||
game.world_->player_ = new Player(Vec2(1, 1)); | |||
Tile::ID tStone = game.world_->getTileID("core::stone"); | |||
Tile::ID tGrass = game.world_->getTileID("core::grass"); | |||
WorldPlane &plane = game.world_->getPlane(game.world_->current_plane_); | |||
for (int x = 1; x < 10; ++x) { | |||
for (int y = 3; y < 10; ++y) { | |||
plane.setTile(x, y, tStone); | |||
if (y == 3) | |||
plane.setTile(x, y, tGrass); | |||
else | |||
plane.setTile(x, y, tStone); | |||
} | |||
} | |||