-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.cpp
More file actions
37 lines (32 loc) · 1.3 KB
/
program.cpp
File metadata and controls
37 lines (32 loc) · 1.3 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
//By: Peter Tieu
//Link to GitHub: https://github.com/PeterTieu/Battle-Star
//Link to YouTube Gameplay: https://www.youtube.com/watch?v=b79-vNMa7Xs&feature=youtu.be
#include "splashkit.h"
#include "battlestar.h"
#include "player.h"
#include "enemy.h"
#include "asteroid.h"
#include "item.h"
#include "background.h"
#include "menu.h"
//Main execution function
int main()
{
// game_data game; //Declare Game variable
load_resources(); //Load all resources in the resource bundle
open_window("Battle Star - TieuTech", 1000, 812); //Open the Window
menu_data menu = new_menu(); //Create a new Main Menu
//While the program quit request has not been made and the Menu Quit Requested flag is false
while (!quit_requested() && !menu.program_quit_requested)
{
process_events(); //Allow SplashKit to react to user interactions
clear_screen(); //Clear the screen
draw_menu(menu); //Draw the Main Menu
handle_menu_input(menu); //Shows the button the cursor is on
clear_screen(COLOR_BLACK); //Clear the screen to a black color
update_menu(menu); //Update the Main Menu
draw_menu(menu); //Draw the Main Menu
refresh_screen(60); //Refresh the screen at 60 fps
}
return 0;
}