|
@@ -50,8 +50,8 @@ void Game::Initialize()
|
|
|
}
|
|
|
|
|
|
SDL_GetCurrentDisplayMode(0, &displayMode);
|
|
|
- this->windowsWidth = displayMode.w;
|
|
|
- this->windowsHeight = displayMode.h;
|
|
|
+ this->windowsWidth = 800;//displayMode.w;
|
|
|
+ this->windowsHeight = 600;//displayMode.h;
|
|
|
|
|
|
this->window = SDL_CreateWindow(NULL, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
|
|
this->windowsWidth, this->windowsHeight, SDL_WINDOW_BORDERLESS);
|
|
@@ -68,7 +68,7 @@ void Game::Initialize()
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- SDL_SetWindowFullscreen(this->window, SDL_WINDOW_FULLSCREEN);
|
|
|
+ //SDL_SetWindowFullscreen(this->window, SDL_WINDOW_FULLSCREEN);
|
|
|
|
|
|
this->isRunning = true;
|
|
|
}
|
|
@@ -111,13 +111,13 @@ void Game::Setup()
|
|
|
|
|
|
tank.addComponent<TransformComponent>(glm::vec2(10, 30), glm::vec2(1, 1), 0);
|
|
|
tank.addComponent<RigidBodyComponent>(glm::vec2(40, 0));
|
|
|
- tank.addComponent<SpriteComponent>("tank-image", 10, 10);
|
|
|
+ tank.addComponent<SpriteComponent>("tank-image", 32, 32);
|
|
|
|
|
|
Entity truck = this->registry->createEntity();
|
|
|
|
|
|
truck.addComponent<TransformComponent>(glm::vec2(50, 100), glm::vec2(1, 1), 0);
|
|
|
truck.addComponent<RigidBodyComponent>(glm::vec2(0, 50));
|
|
|
- truck.addComponent<SpriteComponent>("truck-image", 10, 50);
|
|
|
+ truck.addComponent<SpriteComponent>("truck-image", 32, 32);
|
|
|
}
|
|
|
|
|
|
void Game::Update()
|
|
@@ -167,7 +167,7 @@ void Game::Render()
|
|
|
SDL_RenderClear(this->renderer);
|
|
|
|
|
|
// Do something here
|
|
|
- registry->getSystem<RenderSystem>().update(this->renderer);
|
|
|
+ registry->getSystem<RenderSystem>().update(this->renderer, this->assetStore);
|
|
|
|
|
|
SDL_RenderPresent(this->renderer);
|
|
|
}
|