Compare commits
4 Commits
8f9a18d960
...
4c837eff0a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c837eff0a | ||
| c02273d29d | |||
| fec7e08c2b | |||
| 0f937e2e02 |
@ -8,7 +8,7 @@ namespace ZL {
|
||||
int Environment::windowHeaderHeight = 0;
|
||||
int Environment::width = 0;
|
||||
int Environment::height = 0;
|
||||
float Environment::zoom = 6.f;
|
||||
float Environment::zoom = 14.f;
|
||||
|
||||
bool Environment::leftPressed = false;
|
||||
bool Environment::rightPressed = false;
|
||||
|
||||
32
Game.h
32
Game.h
@ -25,6 +25,7 @@ namespace ZL {
|
||||
void update();
|
||||
void render();
|
||||
|
||||
|
||||
bool shouldExit() const { return Environment::exitGameLoop; }
|
||||
|
||||
private:
|
||||
@ -33,6 +34,7 @@ namespace ZL {
|
||||
void drawCubemap();
|
||||
void drawShip();
|
||||
void drawBoxes();
|
||||
void drawUI();
|
||||
|
||||
SDL_Window* window;
|
||||
SDL_GLContext glContext;
|
||||
@ -41,6 +43,32 @@ namespace ZL {
|
||||
size_t newTickCount;
|
||||
size_t lastTickCount;
|
||||
|
||||
|
||||
std::vector<BoxCoords> boxCoordsArr;
|
||||
std::vector<VertexRenderStruct> boxRenderArr;
|
||||
|
||||
|
||||
std::shared_ptr<Texture> buttonTexture;
|
||||
VertexRenderStruct button;
|
||||
|
||||
std::shared_ptr<Texture> musicVolumeBarTexture;
|
||||
VertexRenderStruct musicVolumeBar;
|
||||
|
||||
std::shared_ptr<Texture> musicVolumeBarButtonTexture;
|
||||
VertexRenderStruct musicVolumeBarButton;
|
||||
|
||||
|
||||
bool isDraggingVolume = false;
|
||||
float musicVolume = 0.0f;
|
||||
float volumeBarMinX = 1190.0f;
|
||||
float volumeBarMaxX = 1200.0f;
|
||||
float volumeBarMinY = 100.0f;
|
||||
float volumeBarMaxY = 600.0f;
|
||||
float musicVolumeBarButtonButtonCenterX = 1195.0f;
|
||||
float musicVolumeBarButtonButtonRadius = 25.0f;
|
||||
void UpdateVolumeFromMouse(int mouseX, int mouseY);
|
||||
void UpdateVolumeKnob();
|
||||
|
||||
static const size_t CONST_TIMER_INTERVAL = 10;
|
||||
static const size_t CONST_MAX_TIME_INTERVAL = 1000;
|
||||
|
||||
@ -55,10 +83,8 @@ namespace ZL {
|
||||
std::shared_ptr<Texture> boxTexture;
|
||||
VertexDataStruct boxBase;
|
||||
|
||||
std::vector<BoxCoords> boxCoordsArr;
|
||||
std::vector<VertexRenderStruct> boxRenderArr;
|
||||
|
||||
SparkEmitter sparkEmitter;
|
||||
};
|
||||
|
||||
|
||||
} // namespace ZL
|
||||
BIN
resources/button.png
(Stored with Git LFS)
Normal file
BIN
resources/button.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/musicVolumeBarButton.png
(Stored with Git LFS)
Normal file
BIN
resources/musicVolumeBarButton.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
resources/musicVolumeBarTexture.png
(Stored with Git LFS)
Normal file
BIN
resources/musicVolumeBarTexture.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user