-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathModuleSceneCongrats.cpp
More file actions
62 lines (54 loc) · 1.39 KB
/
ModuleSceneCongrats.cpp
File metadata and controls
62 lines (54 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "Globals.h"
#include "Application.h"
#include "ModuleTextures.h"
#include "ModuleRender.h"
#include "ModulePlayer.h"
#include "ModuleInput.h"
#include "ModuleFadeToBlack.h"
#include "ModuleSceneMainMenu.h"
#include "ModuleSceneCongrats.h"
#include "Globals.h"
#include "Application.h"
#include "ModuleTextures.h"
#include "ModuleSceneStage1.h"
#include "ModuleParticles.h"
#include "ModuleAudio.h"
#include "ModuleFonts.h"
ModuleSceneCongrats::ModuleSceneCongrats()
{
// Background
background = { 0, 0, 384, 256 };
}
ModuleSceneCongrats::~ModuleSceneCongrats()
{}
// Load assets
bool ModuleSceneCongrats::Start()
{
App->player->Enable();
App->particles->Enable();
App->font->Enable();
LOG("Loading background assets");
bool ret = true;
graphics = App->textures->Load("Assets/Credits.png");
return ret;
}
// Update: draw background
update_status ModuleSceneCongrats::Update()
{
// Draw everything --------------------------------------
App->render->Blit(graphics, 0, 0, &background, 1.0f);
if (App->input->keyboard[SDL_SCANCODE_RETURN] == 1 || App->input->controller[START] == KEY_STATE::KEY_DOWN)
{
App->fade->FadeToBlack(App->scene_congrats, App->scene_MainMenu, 2);
}
return UPDATE_CONTINUE;
}
// Load assets
bool ModuleSceneCongrats::CleanUp()
{
// TODO 5: Remove all memory leaks
LOG("Unloading MainMenu stage");
App->textures->Unload(graphics);
graphics = nullptr;
return true;
}