Player sprite
This commit is contained in:
parent
37dcda531e
commit
fba8ac8e52
|
@ -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 |
|
@ -1,3 +0,0 @@
|
|||
example.png:
|
||||
type: bopti-image
|
||||
name: img_example
|
|
@ -0,0 +1,3 @@
|
|||
player.png:
|
||||
type: bopti-image
|
||||
name: img_player
|
Binary file not shown.
After Width: | Height: | Size: 151 B |
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue