Other random edits
This commit is contained in:
@@ -18,7 +18,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
|
||||
CPMAddPackage(
|
||||
NAME J3ML
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.4.zip
|
||||
@@ -26,7 +25,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-23.zip
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/Prerelease-25.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
@@ -39,7 +38,6 @@ CPMAddPackage(
|
||||
URL https://git.redacted.cc/josh/ReJUI/archive/Prerelease-5.1.zip
|
||||
)
|
||||
|
||||
|
||||
add_subdirectory(Core)
|
||||
add_subdirectory(Server)
|
||||
add_subdirectory(Client)
|
||||
|
@@ -12,6 +12,7 @@ namespace CaveGame::Client {
|
||||
using CaveGame::Core::Entity;
|
||||
class GameSession : public Scene {
|
||||
public:
|
||||
GameSession() = default;
|
||||
GameSession(bool createNewWorld);
|
||||
|
||||
void Update(float elapsed) override;
|
||||
|
@@ -30,8 +30,11 @@ void CaveGame::Client::GameSession::Update(float elapsed) {
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
CaveGame::Client::GameSession::GameSession(bool overwite_world) : Scene() {
|
||||
world = new LocalWorld("test_world", 0, overwite_world);
|
||||
//hud = new JUI::Scene();
|
||||
}
|
||||
|
||||
void CaveGame::Client::GameSession::PassWindowSize(const Vector2 &size) {
|
||||
|
@@ -302,7 +302,6 @@ namespace CaveGame::Client {
|
||||
}
|
||||
|
||||
void LocalWorld::BuildHUD() {
|
||||
//hud = new JUI::Scene();
|
||||
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@ int main(int argc, char** argv) {
|
||||
//srand(0);
|
||||
|
||||
auto* window = new CaveGame::ClientApp::CaveGameWindow("Re-CaveGame", 800, 600);
|
||||
//window->SetResizable(true);
|
||||
window->Run();
|
||||
|
||||
SteamAPI_Shutdown();
|
||||
|
@@ -13,7 +13,7 @@ namespace CaveGame::ClientApp
|
||||
{
|
||||
splash_ctx = new CaveGame::Client::Splash();
|
||||
menu_ctx = new CaveGame::Client::MainMenu();
|
||||
//game_ctx = new CaveGame::Client::GameSession();
|
||||
game_ctx = new CaveGame::Client::GameSession();
|
||||
|
||||
menu_ctx->RequestWorld += [this](Client::SingleplayerSessionInfo info) {
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace CaveGame::ClientApp
|
||||
if (IsKeyDown(Keys::R))
|
||||
game_ctx->world->RefreshAll();
|
||||
|
||||
if (mbd)
|
||||
if (IsMouseButtonDown(MouseButtons::Left))
|
||||
{
|
||||
|
||||
Vector2 transformed = game_ctx->world->camera.ScreenToWorld(GetMouseCoordinates());
|
||||
@@ -172,6 +172,17 @@ namespace CaveGame::ClientApp
|
||||
game_ctx->world->SetTile(transformed.x, transformed.y+1, Core::TileID::AIR);
|
||||
game_ctx->world->SetTile(transformed.x, transformed.y-1, Core::TileID::AIR);
|
||||
}
|
||||
|
||||
if (IsMouseButtonDown(MouseButtons::Right))
|
||||
{
|
||||
|
||||
Vector2 transformed = game_ctx->world->camera.ScreenToWorld(GetMouseCoordinates());
|
||||
game_ctx->world->SetTile(transformed.x, transformed.y, Core::TileID::GRASS);
|
||||
game_ctx->world->SetTile(transformed.x+1, transformed.y, Core::TileID::GRASS);
|
||||
game_ctx->world->SetTile(transformed.x-1, transformed.y, Core::TileID::GRASS);
|
||||
game_ctx->world->SetTile(transformed.x, transformed.y+1, Core::TileID::GRASS);
|
||||
game_ctx->world->SetTile(transformed.x, transformed.y-1, Core::TileID::GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
void CaveGameWindow::Update(float elapsed)
|
||||
|
Reference in New Issue
Block a user