blob: 09136412f1ca522e284cea863da9e4f099112603 (
plain)
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
|
#include "gunner.h"
static int femme = -1;
static int grayscale = -1;
static int berry = -1;
static int night = -1;
static vec2 position = (vec2){TO_FIXED(32), TO_FIXED(48)};
static vec2 text_pos = (vec2){TO_FIXED(64), TO_FIXED(16)};
void init(void)
{
femme = load_new_tex("assets/femme.png");
grayscale = load_new_shader("assets/gs_full.glsl");
berry = load_font("assets/berry-rotunda.fnt");
load_music("assets/wicked_glee.ogg");
set_music_loop_point(15.73f);
play_music();
}
void update(void)
{
draw_text_font(berry, "Femme is a cute", text_pos, 24, BLACK);
vec2 current_input = get_dir_input();
if(current_input.x != 0 || current_input.y != 0){
position.x += current_input.x;
position.y += current_input.y;
}
set_active_shader(grayscale);
draw_texture(femme, FROM_FIXED(position.x), FROM_FIXED(position.y));
reset_active_shader();
}
void exit(void)
{
}
|