-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starts to implement into. Removes some unused textures from game folder.
- Loading branch information
Showing
11 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,4 @@ function main() | |
#include "ini.c" | ||
#include "settings.c" | ||
#include "splashscreen.c" | ||
#include "briefing.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#include "briefing.h" | ||
|
||
BMAP * briefing_background = "intro_background.png"; | ||
BMAP * briefing_startbtn = "intro_start.png"; | ||
BMAP * briefing_rotor = "intro_rotor.png"; | ||
BMAP * briefing_startbtn_dis = "intro_start_inactive.png"; | ||
|
||
VECTOR briefing_startbutton_min, briefing_startbutton_max; | ||
|
||
bool briefing_done; | ||
|
||
void briefing_mouseclick() | ||
{ | ||
if(mouse_pos.x < briefing_startbutton_min.x) | ||
return; | ||
if(mouse_pos.y < briefing_startbutton_min.y) | ||
return; | ||
if(mouse_pos.x >= briefing_startbutton_max.x) | ||
return; | ||
if(mouse_pos.y >= briefing_startbutton_max.y) | ||
return; | ||
briefing_done = true; | ||
} | ||
|
||
void briefing_init() | ||
{ | ||
|
||
} | ||
|
||
void briefing_open() | ||
{ | ||
on_mouse_left = briefing_mouseclick; | ||
briefing_done = false; | ||
} | ||
|
||
void briefing_update() | ||
{ | ||
var scale_x = screen_size.x / bmap_width(briefing_background); | ||
var scale_y = screen_size.y / bmap_height(briefing_background); | ||
var scale = minv(scale_x, scale_y); | ||
|
||
var pos_x = (screen_size.x - scale * bmap_width(briefing_background)) / 2; | ||
var pos_y = (screen_size.y - scale * bmap_height(briefing_background)) / 2; | ||
|
||
draw_quad( | ||
briefing_background, | ||
vector(pos_x, pos_y, 0), | ||
NULL, | ||
NULL, | ||
vector(scale, scale, 0), | ||
NULL, | ||
100, | ||
0); | ||
|
||
draw_quad( | ||
briefing_rotor, | ||
vector(pos_x + scale * 1688, pos_y + scale * 764, 0), | ||
NULL, | ||
NULL, | ||
vector(scale, scale, 0), | ||
NULL, | ||
100, | ||
-total_ticks | ||
); | ||
|
||
briefing_startbutton_min.x = pos_x + scale * 1613; | ||
briefing_startbutton_min.y = pos_y + scale * 59; | ||
briefing_startbutton_max.x = briefing_startbutton_min.x + scale * bmap_width(briefing_startbtn); | ||
briefing_startbutton_max.y = briefing_startbutton_min.y + scale * bmap_height(briefing_startbtn); | ||
|
||
BMAP * bmp = briefing_startbtn_dis; | ||
if(mouse_pos.x >= briefing_startbutton_min.x && mouse_pos.y >= briefing_startbutton_min.y) | ||
{ | ||
if(mouse_pos.x < briefing_startbutton_max.x && mouse_pos.y < briefing_startbutton_max.y) | ||
{ | ||
bmp = briefing_startbtn; | ||
} | ||
} | ||
|
||
draw_quad( | ||
bmp, | ||
briefing_startbutton_min, | ||
NULL, | ||
NULL, | ||
vector(scale, scale, 0), | ||
NULL, | ||
100, | ||
0 | ||
); | ||
} | ||
|
||
void briefing_close() | ||
{ | ||
on_mouse_left = NULL; | ||
} | ||
|
||
bool briefing_isDone() | ||
{ | ||
return briefing_done; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef BRIEFING_H | ||
#define BRIEFING_H | ||
|
||
#include "global.h" | ||
|
||
void briefing_init(void); | ||
void briefing_open(void); | ||
void briefing_update(void); | ||
void briefing_close(void); | ||
bool briefing_isDone(void); | ||
|
||
#endif // BRIEFING_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ void splashscreen_update() | |
0 | ||
), | ||
NULL, | ||
30, | ||
310, | ||
0 | ||
); | ||
|
||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.