Scarlet
This commit is contained in:
parent
c104870634
commit
d433f8bc2d
|
@ -23,6 +23,8 @@ set(SOURCES
|
|||
set(ASSETS_cg
|
||||
assets-cg/tileset.png
|
||||
assets-cg/hooksel.png
|
||||
assets-cg/scarletR.png
|
||||
assets-cg/scarletL.png
|
||||
)
|
||||
|
||||
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#define PLAYER_S 12
|
||||
#define PLAYER_W 22
|
||||
#define PLAYER_H 18
|
||||
|
||||
#define PLAYER_ACC 1.5
|
||||
#define PLAYER_FRIC 0.4
|
||||
|
|
|
@ -8,10 +8,10 @@ struct Player {
|
|||
struct Vec2 spawn;
|
||||
struct Vec2 hook_pos;
|
||||
struct Vec2 hook_near;
|
||||
int jumping, airbreak, hooking, locked;
|
||||
int jumping, airbreak, hooking, locked, dir;
|
||||
};
|
||||
|
||||
void player_init(void);
|
||||
void player_update(void);
|
||||
void player_draw(void);
|
||||
void player_draw(int frame);
|
||||
struct Vec2 player_get_pos(void);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "player.h"
|
||||
|
||||
static int running = 1;
|
||||
static int timer = 0;
|
||||
static void init(void);
|
||||
static void update(void);
|
||||
static void draw(void);
|
||||
|
@ -38,6 +39,8 @@ update(void)
|
|||
{
|
||||
input_step();
|
||||
player_update();
|
||||
|
||||
++timer;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -45,7 +48,7 @@ draw(void)
|
|||
{
|
||||
dclear(C_BLACK);
|
||||
level_draw();
|
||||
player_draw();
|
||||
player_draw(timer);
|
||||
hook_debug_draw();
|
||||
dupdate();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue