big refactor
This commit is contained in:
+5
-7
@@ -1,8 +1,6 @@
|
||||
#ifndef LOGO_H
|
||||
#define LOGO_H
|
||||
|
||||
#include "applicationstate.h"
|
||||
|
||||
typedef struct {
|
||||
int frameCounter;
|
||||
int positionX;
|
||||
@@ -30,10 +28,10 @@ void InitLogo(LogoState *l) {
|
||||
l->alpha = 1.0f;
|
||||
}
|
||||
|
||||
void UpdateLogo(LogoState *l, State *state) {
|
||||
void UpdateLogo(LogoState *l, View *currentView, bool *running) {
|
||||
|
||||
if (WindowShouldClose() && !IsKeyPressed(KEY_ESCAPE)) {
|
||||
state->running = false;
|
||||
*running = false;
|
||||
}
|
||||
|
||||
l->frameCounter++;
|
||||
@@ -76,11 +74,11 @@ void UpdateLogo(LogoState *l, State *state) {
|
||||
}
|
||||
}
|
||||
else if (l->state == 4) {
|
||||
state->currentScreen = MENU;
|
||||
*currentView = MENU;
|
||||
}
|
||||
}
|
||||
|
||||
void RenderLogo(const LogoState *l, const State *appState) {
|
||||
void RenderLogo(const LogoState *l, bool *showFPS) {
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
@@ -109,7 +107,7 @@ void RenderLogo(const LogoState *l, const State *appState) {
|
||||
DrawText(TextSubtext("raylib", 0, l->lettersCount), GetScreenWidth() / 2 - 44, GetScreenHeight() / 2 + 48, 50, Fade(BLACK, l->alpha));
|
||||
}
|
||||
|
||||
if (appState->flagFPS){
|
||||
if (*showFPS){
|
||||
DrawFPS(10, 10);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user