Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
physics_kinematics.c File Reference
#include <banjo/draw.h>
#include <banjo/event.h>
#include <banjo/log.h>
#include <banjo/main.h>
#include <banjo/physics_2d.h>
#include <banjo/renderer.h>
#include <banjo/system.h>
#include <banjo/time.h>
#include <banjo/vec.h>
#include <banjo/window.h>
#include <stdlib.h>
Include dependency graph for physics_kinematics.c:

Macros

#define BJ_AUTOMAIN_CALLBACKS
#define SCREEN_WIDTH   800
#define SCREEN_HEIGHT   600
#define BALLS_LEN   1000
#define BALLS_RADIUS   BJ_F(3.0)
#define GRAVITY   BJ_F(50.0)

Functions

static void reset_ball (size_t at)
static void initialize_balls ()
static void update (bj_real dt)
static void draw ()
int bj_app_begin (void **user_data, int argc, char *argv[])
int bj_app_iterate (void *user_data)
int bj_app_end (void *user_data, int status)

Variables

bj_windowwindow = 0
bj_rendererrenderer = 0
bj_bitmapframebuffer = 0
struct { 
bj_vec2 initial_velocity
bj_vec2 position
uint32_t color
double time_alive
balls [1000]
bj_vec2 gravity
bj_vec2 initial_position
bj_stopwatch stopwatch

Macro Definition Documentation

◆ BALLS_LEN

#define BALLS_LEN   1000

◆ BALLS_RADIUS

#define BALLS_RADIUS   BJ_F(3.0)

◆ BJ_AUTOMAIN_CALLBACKS

#define BJ_AUTOMAIN_CALLBACKS

◆ GRAVITY

#define GRAVITY   BJ_F(50.0)

◆ SCREEN_HEIGHT

#define SCREEN_HEIGHT   600

◆ SCREEN_WIDTH

#define SCREEN_WIDTH   800

Function Documentation

◆ bj_app_begin()

int bj_app_begin ( void ** user_data,
int argc,
char * argv[] )

◆ bj_app_end()

int bj_app_end ( void * user_data,
int status )

◆ bj_app_iterate()

int bj_app_iterate ( void * user_data)

◆ draw()

◆ initialize_balls()

void initialize_balls ( )
static

◆ reset_ball()

void reset_ball ( size_t at)
static

◆ update()

void update ( bj_real dt)
static

Variable Documentation

◆ [struct]

struct { ... } balls[ 1000 ]

◆ framebuffer

◆ gravity

bj_vec2 gravity

◆ initial_position

bj_vec2 initial_position

◆ renderer

bj_renderer* renderer = 0

◆ stopwatch

◆ window

bj_window* window = 0