Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptLineStudios committed Oct 31, 2024
2 parents ba05a2a + f561951 commit 2f57ade
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ Waphics allows you to easily create video games in C and export them to the web
<li>Keyboard input (mouse input to come)</li>
<li>Playing sounds</li>
<li>Rendering primitimes (circles, rectangles, triangles)</li>
<li>Image rendering</li>
<li>Image rendering (with scaling using uv coordinates)</li>
<li>Alpha blending</li>
</ul>

```C
#define WAPHICS_IMPLEMENTATION
#include "src/waphics.c"

#include "assets/block.h"

#define WIDTH 1000
#define HEIGHT 600

Expand All @@ -36,13 +34,10 @@ uint32_t *run(void) {
waphics_draw_rect(display, RECT(0, 0, 50, 50), RGB(255, 0, 0));
//draw a blue circle
waphics_draw_circle(display, CIRCLE(100, 100, 50), RGB(0, 100, 100));
//draw an image
waphics_draw_image(display, RECT(x, 0, 16, 16), 10, block_pixels);

if (get_key(KEY_D)) x+=10;
if (get_key(KEY_A)) x-=10;


return display.pixels;
}
```
Expand Down

0 comments on commit 2f57ade

Please sign in to comment.