Browse Source

Remove init from VC API

rexim 3 years ago
parent
commit
9265d05534
8 changed files with 0 additions and 14 deletions
  1. 0 2
      demos/3d.c
  2. 0 4
      demos/squish.c
  3. 0 2
      demos/triangle.c
  4. 0 4
      demos/vc.c
  5. 0 2
      js/vc.js
  6. BIN
      wasm/3d.wasm
  7. BIN
      wasm/squish.wasm
  8. BIN
      wasm/triangle.wasm

+ 0 - 2
demos/3d.c

@@ -38,8 +38,6 @@ uint32_t circle_colors[] = {
 static uint32_t pixels[WIDTH*HEIGHT];
 static uint32_t pixels[WIDTH*HEIGHT];
 static float angle = 0;
 static float angle = 0;
 
 
-void init(void) {}
-
 uint32_t *render(float dt)
 uint32_t *render(float dt)
 {
 {
     angle += 0.25*PI*dt;
     angle += 0.25*PI*dt;

+ 0 - 4
demos/squish.c

@@ -12,10 +12,6 @@ float sinf(float);
 uint32_t dst[WIDTH*HEIGHT];
 uint32_t dst[WIDTH*HEIGHT];
 float global_time = 0;
 float global_time = 0;
 
 
-void init(void)
-{
-}
-
 #define SRC_SCALE 3
 #define SRC_SCALE 3
 
 
 uint32_t *render(float dt)
 uint32_t *render(float dt)

+ 0 - 2
demos/triangle.c

@@ -35,8 +35,6 @@ static inline void rotate_point(float *x, float *y)
     *y = sinf(dir)*mag + HEIGHT/2;
     *y = sinf(dir)*mag + HEIGHT/2;
 }
 }
 
 
-void init(void) {}
-
 uint32_t *render(float dt)
 uint32_t *render(float dt)
 {
 {
     Olivec_Canvas oc = olivec_canvas(pixels, WIDTH, HEIGHT, WIDTH);
     Olivec_Canvas oc = olivec_canvas(pixels, WIDTH, HEIGHT, WIDTH);

+ 0 - 4
demos/vc.c

@@ -17,8 +17,6 @@ int main(void)
     SDL_Texture *texture = NULL;
     SDL_Texture *texture = NULL;
 
 
     {
     {
-        init();
-
         if (SDL_Init(SDL_INIT_VIDEO) < 0) return_defer(1);
         if (SDL_Init(SDL_INIT_VIDEO) < 0) return_defer(1);
 
 
         window = SDL_CreateWindow("Olivec", 0, 0, WIDTH, HEIGHT, 0);
         window = SDL_CreateWindow("Olivec", 0, 0, WIDTH, HEIGHT, 0);
@@ -145,8 +143,6 @@ SCALE_DOWN_FACTOR);
 
 
 int main(void)
 int main(void)
 {
 {
-    init();
-
     for (;;) {
     for (;;) {
         compress_pixels(render(1.f/60.f));
         compress_pixels(render(1.f/60.f));
         for (size_t y = 0; y < SCALED_DOWN_HEIGHT; ++y) {
         for (size_t y = 0; y < SCALED_DOWN_HEIGHT; ++y) {

+ 0 - 2
js/vc.js

@@ -32,8 +32,6 @@ async function startDemo(elementId, wasmPath) {
         "env": make_environment(libm)
         "env": make_environment(libm)
     });
     });
 
 
-    w.instance.exports.init();
-
     let prev = null;
     let prev = null;
     function first(timestamp) {
     function first(timestamp) {
         prev = timestamp;
         prev = timestamp;

BIN
wasm/3d.wasm


BIN
wasm/squish.wasm


BIN
wasm/triangle.wasm