preload dialog text shader

This commit is contained in:
Andrei Alexeyev 2019-09-12 18:33:08 +03:00
parent a84f7c8629
commit 5187bb785d
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
3 changed files with 10 additions and 0 deletions

View file

@ -415,3 +415,7 @@ void dialog_update(Dialog **d) {
bool dialog_is_active(Dialog *d) {
return d && (d->pos < d->count);
}
void dialog_preload(void) {
preload_resource(RES_SHADER_PROGRAM, "text_dialog", RESF_DEFAULT);
}

View file

@ -82,6 +82,8 @@ void dialog_update(Dialog **d) attr_nonnull(1);
bool dialog_is_active(Dialog *d);
void dialog_preload(void);
// FIXME: might not be the best place for this
typedef struct PlayerDialogProcs {
void (*stage1_pre_boss)(Dialog *d);

View file

@ -628,6 +628,10 @@ static void stage_preload(void) {
lasers_preload();
enemies_preload();
if(global.stage->type != STAGE_SPELL) {
dialog_preload();
}
global.stage->procs->preload();
}