Skip to content

Commit

Permalink
Fixing some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
robrohan committed Oct 24, 2023
1 parent a8e336b commit 6d8a19c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ points into that file:
|init()| Called once at the start of the app|
|main_loop(time)| Called every frame with time being time since app start|

You can also add your own files entry files in the examples directory, and then pass them to the build script using the _MAIN_ variable. For example:
You can also add your own entry files in the examples directory, and then pass them to the build script using the _MAIN_ variable. For example:

```{sh}
make build MAIN=examples/example1.c
```

will build the WASM file using `example1.c` as the entry point.
This will build the WASM file using `example1.c` as the entry point.

### Getting Started

Expand Down
8 changes: 3 additions & 5 deletions examples/example0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#include "../src/wefx.h"

/*
* - the top-left is (0,0) and the pixel coordinates increase
* in the right and down directions
* - the bottom-left is (0,0) and the pixel coordinates increase
* in the right and up directions
* - the pixel centers have integer coordinates.
*/
#define W 105
#define H 50

// Called once at startup
// note: memory not initialized yet so 'print's wont work
// note: memory not initialized yet so 'print' will not work
EXPORT int init()
{
// Open a "window"
Expand All @@ -36,8 +36,6 @@ void input(int time, wefx_event_queue *wefx_q)
if (wefx_q == NULL)
return;

// print("input called");

// we need to at least drain the event queue
// or we'll eventually run out of memory
wefx_event *e = wefx_dequeue(wefx_q);
Expand Down

0 comments on commit 6d8a19c

Please sign in to comment.