Player sprite

This commit is contained in:
Masséna Fezard | Nounouille 2021-03-07 16:32:24 +01:00
parent 37dcda531e
commit fba8ac8e52
6 changed files with 8 additions and 6 deletions

View File

@ -22,7 +22,7 @@ set(ASSETS_fx
# ...
)
set(ASSETS_cg
assets-cg/example.png
assets-cg/img/player.png
# ...
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,3 +0,0 @@
example.png:
type: bopti-image
name: img_example

View File

@ -0,0 +1,3 @@
player.png:
type: bopti-image
name: img_player

BIN
assets-cg/img/player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@ -3,6 +3,8 @@
int main(void)
{
extern bopti_image_t img_player;
int running = 1;
// player (i don't know how to use struct sorry)
@ -12,9 +14,9 @@ int main(void)
// main loop
while(running) {
dclear(C_WHITE);
dclear(C_BLACK);
// drawing the player
drect(player_x, player_y, player_x + 16, player_y + 16, C_GREEN);
dimage(player_x, player_y, &img_player);
dupdate();
clearevents();