18 for (
int i = 0; i < 3; i++)
21 opr = int(activeCityAnimationParts[i].size);
61 for (
int i = 0; i < 3; i++)
67 if (activeCityAnimationParts[i].direction ==
'+')
70 activeCityAnimationParts[i].
size += float(0.07);
73 if (activeCityAnimationParts[i].size >= 20)
75 activeCityAnimationParts[i].
direction =
'-';
80 if (activeCityAnimationParts[i].direction ==
'-')
83 activeCityAnimationParts[i].
size -= float(0.07);
86 if (activeCityAnimationParts[i].size <= 5)
88 activeCityAnimationParts[i].
direction =
'+';
103 componentPtr->
state = -1;
105 else if (!showComponent)
108 componentPtr->
state = 1;
112 switch (componentPtr->
state)
116 componentPtr->
pos.
y -= 2.5;
119 if (componentPtr->
pos.
y <= endY)
122 componentPtr->
pos.
y = endY;
125 componentPtr->
state = 0;
131 componentPtr->
pos.
y += 2.5;
134 if (componentPtr->
pos.
y >= 1080)
137 componentPtr->
pos.
y = 1080;
140 componentPtr->
state = 0;
171 switch (quizPtr->
state)
175 quizPtr->
pos.
x -= 2.5;
178 if (quizPtr->
pos.
x <= 956)
181 quizPtr->
pos.
x = 956;
190 quizPtr->
pos.
x += 2.5;
193 if (quizPtr->
pos.
x >= 1920)
196 quizPtr->
pos.
x = 1920;
217 if (popUpAnimationFramePtr->
pos.
y == 913)
240 for (
int i = 0; i < 40; i++)
248 *warningScreentimePtr = 2.5f;
251 StartTimer(warningTimerPtr, *warningScreentimePtr);
263 *wariningVisiblePtr =
true;
268 *wariningVisiblePtr =
false;
272 if (!showPopUpMenu && popUpMenuFrame.
pos.
y == 1080)
275 warningAnimationFramePtr->
pos.
x = 1475;
280 warningAnimationFramePtr->
pos.
x = 936;
290 if ((i == 0 || i == 1) && index != 0 && index != 25 && index != 35 && index != 30 && index != 20 && index != 10 && index != 15)
304 if (i == 0 || i == 1)
317 if (index == 25 || index == 35 || index == 30 || index == 20 || index == 10 || index == 15)
319 if (i == 0 || i == 1)
338 if (quizAnimationFrame.
pos.
x == 956)
341 for (
int i = 0; i < 4; i++)
360 for (
int i = 0; i < 4; i++)
368 drawOptionComponent(options, options[i].trueAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 802, index, i);
371 drawOptionComponent(options, options[i].trueAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 869, index, i);
374 drawOptionComponent(options, options[i].trueAnswerIndicator, quizAnimationFrame.
pos.
x + 78, quizAnimationFrame.
pos.
y + 937, index, i);
377 drawOptionComponent(options, options[i].trueAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 1005, index, i);
387 drawOptionComponent(options, options[i].falseAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 802, index, i);
390 drawOptionComponent(options, options[i].falseAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 869, index, i);
393 drawOptionComponent(options, options[i].falseAnswerIndicator, quizAnimationFrame.
pos.
x + 78, quizAnimationFrame.
pos.
y + 937, index, i);
396 drawOptionComponent(options, options[i].falseAnswerIndicator, quizAnimationFrame.
pos.
x + 77, quizAnimationFrame.
pos.
y + 1004, index, i);
void manageWarningAnimation(Vector2 mousePoint, City cities[40], City activeCity, PopUpAnimationFrame *warningAnimationFramePtr, PopUpAnimationFrame popUpMenuFrame, Timer *warningTimerPtr, float *warningScreentimePtr, bool *wariningVisiblePtr, bool showPopUpMenu)
Manage warning animation.
void drawQuizOptionsHover(Option options[4], PopUpAnimationFrame quizAnimationFrame, int index)
Draw quiz options hover effect.
void drawOptionIndicators(City activeCity, Option options[4], PopUpAnimationFrame quizAnimationFrame, bool optionSelected, int index)
Draw option indicators to show if the selected option was true or false.
void drawPopUpMenuHover(Rectangle confirmHitbox, Rectangle denyHitbox, Texture2D confirmHover, Texture2D denyHover, PopUpAnimationFrame *popUpAnimationFramePtr)
Draw popUp buttons hover effect.
void drawPopUpAnimationBottom(PopUpAnimationFrame *componentPtr, float endY, bool showComponent)
Draw pop-up animation across its different states.
void drawActiveCityAnimation(ActiveCityAnimationFrame *activeCityAnimationParts, City activeCity)
Draw active city animation.
void drawPopUpAnimationSide(PopUpAnimationFrame *quizPtr, Texture2D texture, bool showQuiz)
Draw pop-up animation side.
void drawOptionComponent(Option options[4], Texture2D texture, float x, float y, int index, int i)
Draw option components.
#define frame1
Define active city animation colors.
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
RLAPI Vector2 GetMousePosition(void)
RLAPI bool IsMouseButtonPressed(int button)
RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
RLAPI void DrawCircleV(Vector2 center, float radius, Color color)
Define Active city animation frame struct.
Define Pop up animation frame.
void StartTimer(Timer *timer, float lifetime)
Start or restart a timer with a specific lifetime.
void UpdateTimer(Timer *timer)
Update a timer with the current frame time.
bool TimerDone(Timer *timer)
Check if a timer is done.