|
Banjo API 1.1.0-alpha
Low-level C99 game development API
|
#include <banjo/app.h>#include <banjo/bitmap.h>#include <banjo/draw.h>#include <banjo/event.h>#include <banjo/main.h>#include <banjo/math.h>#include <banjo/system.h>#include <banjo/window.h>Go to the source code of this file.
Data Structures | |
| struct | grid_paint |
Macros | |
| #define | CELLS 15 |
| #define | CELL_PX 20 |
| #define | GRID_PX (CELLS * CELL_PX) |
| #define | LEFT_X 20 |
| #define | RIGHT_X (LEFT_X + GRID_PX + 40) |
| #define | GRID_Y 40 |
Functions | |
| static void | fill_cell (struct grid_paint *g, int cx, int cy) |
| static bj_bool | paint_pixel (void *user_data, int x, int y) |
| static bj_bool | paint_cell (void *user_data, int x, int y, bj_real t) |
| static void | draw_grid_lines (struct bj_bitmap *bmp, int origin_x, uint32_t color) |
| static void | draw (struct bj_bitmap *bmp) |
| static void | on_draw (struct bj_window *w, struct bj_render_target *target, const struct bj_rect *dirty, void *user_data) |
| static void * | setup (struct bj_app *app, void *init_data) |
| static void | step (struct bj_app *app, struct bj_tick_info tick, void *user_data) |
| static void | teardown (struct bj_app *app, void *user_data) |
| int | main (int argc, char *argv[]) |
Variables | |
| static struct bj_window * | window = 0 |
| static bj_real | angle = BJ_FZERO |
| struct grid_paint |
Definition at line 40 of file pixel_enumeration.c.
| Data Fields | ||
|---|---|---|
| struct bj_bitmap * | bmp | |
| uint32_t | color | |
| int | origin_x | |
| #define CELL_PX 20 |
Definition at line 30 of file pixel_enumeration.c.
Referenced by draw(), draw_grid_lines(), and fill_cell().
| #define CELLS 15 |
Definition at line 29 of file pixel_enumeration.c.
Referenced by draw_grid_lines(), and fill_cell().
Definition at line 31 of file pixel_enumeration.c.
Referenced by draw_grid_lines(), and setup().
| #define GRID_Y 40 |
Definition at line 34 of file pixel_enumeration.c.
Referenced by draw(), draw_grid_lines(), fill_cell(), and setup().
| #define LEFT_X 20 |
Definition at line 32 of file pixel_enumeration.c.
Referenced by draw().
Definition at line 33 of file pixel_enumeration.c.
|
static |
Definition at line 81 of file pixel_enumeration.c.
|
static |
Definition at line 72 of file pixel_enumeration.c.
Referenced by draw().
|
static |
Definition at line 46 of file pixel_enumeration.c.
Referenced by paint_cell(), and paint_pixel().
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 163 of file pixel_enumeration.c.
|
static |
Definition at line 114 of file pixel_enumeration.c.
Definition at line 66 of file pixel_enumeration.c.
Referenced by draw().
|
static |
Definition at line 60 of file pixel_enumeration.c.
Referenced by draw().
|
static |
Definition at line 124 of file pixel_enumeration.c.
|
static |
Definition at line 142 of file pixel_enumeration.c.
|
static |
Definition at line 157 of file pixel_enumeration.c.
Definition at line 37 of file pixel_enumeration.c.
Referenced by draw(), reset_ball(), and step().
|
static |
Definition at line 36 of file pixel_enumeration.c.