Add title screen to intro

This commit is contained in:
Bill Rossi 2025-01-30 17:14:28 -05:00
parent d5db1e5e80
commit 9d9654adf6

View File

@ -14,7 +14,7 @@ void display_loading(void) {
Intro *load_intro(void) {
Intro *i = malloc(sizeof(Intro));
i->textures = malloc(sizeof(Texture) * 2);
i->textures = malloc(sizeof(Texture) * 3);
Image bgb = LoadImage("img/made_by_bgb.png");
i->textures[0] = LoadTextureFromImage(bgb);
@ -24,12 +24,16 @@ Intro *load_intro(void) {
i->textures[1] = LoadTextureFromImage(ray);
UnloadImage(ray);
i->texture_count = 2;
Image title = LoadImage("img/title.png");
i->textures[2] = LoadTextureFromImage(title);
UnloadImage(title);
i->texture_count = 3;
i->timer = 0.;
return i;
}
#define SLIDE_TIME 2.0
#define SLIDE_TIME 3.0
#define FADE_IN_TIME 0.5
#define FADE_OUT_TIME 0.5
void intro_display(Intro *intro) {