Browse Source

hey

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
6aee9762b1
3 changed files with 8 additions and 2 deletions
  1. 1
    0
      core.mod/CMakeLists.txt
  2. 2
    1
      libswan/CMakeLists.txt
  3. 5
    1
      src/main.cc

+ 1
- 0
core.mod/CMakeLists.txt View File

@@ -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 .)

+ 2
- 1
libswan/CMakeLists.txt View File

@@ -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

+ 5
- 1
src/main.cc View File

@@ -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);
}
}


Loading…
Cancel
Save