Bladeren bron

Replace tsodingPog with the ethically sourced Lena image

rexim 2 jaren geleden
bovenliggende
commit
baf72b6e46
8 gewijzigde bestanden met toevoegingen van 10 en 7 verwijderingen
  1. BIN
      assets/Lena_112.png
  2. 4 4
      demos/squish.c
  3. 2 0
      demos/triangle.c
  4. 3 3
      demos/triangleTex.c
  5. 1 0
      nobuild.c
  6. BIN
      wasm/squish.wasm
  7. BIN
      wasm/triangle.wasm
  8. BIN
      wasm/triangleTex.wasm

BIN
assets/Lena_112.png


+ 4 - 4
demos/squish.c

@@ -1,5 +1,5 @@
 #include "vc.c"
-#include "./assets/tsodinPog.c"
+#include "./assets/Lena_112.c"
 
 #define WIDTH 960
 #define HEIGHT 720
@@ -22,13 +22,13 @@ Olivec_Canvas vc_render(float dt)
     olivec_fill(dst_canvas, 0xFF181818);
 
     int factor = 100;
-    int w = tsodinPog_width*SRC_SCALE - t*factor;
-    int h = tsodinPog_height*SRC_SCALE + t*factor;
+    int w = Lena_112_width*SRC_SCALE - t*factor;
+    int h = Lena_112_height*SRC_SCALE + t*factor;
 
     olivec_sprite_copy_bilinear(
         dst_canvas,
         WIDTH/2 - w/2, HEIGHT - h, w, h,
-        olivec_canvas(tsodinPog_pixels, tsodinPog_width, tsodinPog_height, tsodinPog_width));
+        olivec_canvas(Lena_112_pixels, Lena_112_width, Lena_112_height, Lena_112_width));
 
     return dst_canvas;
 }

+ 2 - 0
demos/triangle.c

@@ -2,6 +2,8 @@
 
 #define WIDTH 960
 #define HEIGHT 720
+// #define WIDTH 1920
+// #define HEIGHT 1080
 #define BACKGROUND_COLOR 0xFF181818
 #define CIRCLE_RADIUS 100
 #define CIRCLE_COLOR 0x99AA2020

+ 3 - 3
demos/triangleTex.c

@@ -1,5 +1,5 @@
 #include "vc.c"
-#include "assets/tsodinPog.c"
+#include "assets/Lena_112.c"
 
 #define WIDTH 960
 #define HEIGHT 720
@@ -18,7 +18,7 @@ float cosf(float x);
 Olivec_Canvas vc_render(float dt)
 {
     Olivec_Canvas oc = olivec_canvas(pixels, WIDTH, HEIGHT, WIDTH);
-    Olivec_Canvas tsodinPog = olivec_canvas(tsodinPog_pixels, tsodinPog_width, tsodinPog_height, tsodinPog_width);
+    Olivec_Canvas Lena_112 = olivec_canvas(Lena_112_pixels, Lena_112_width, Lena_112_height, Lena_112_width);
 
     olivec_fill(oc, BACKGROUND_COLOR);
 
@@ -51,7 +51,7 @@ Olivec_Canvas vc_render(float dt)
                 uvs[i2][0], uvs[i2][1],
                 uvs[i3][0], uvs[i3][1],
                 1, 1, 1,
-                tsodinPog
+                Lena_112
             );
        }
     }

+ 1 - 0
nobuild.c

@@ -14,6 +14,7 @@ void build_assets(void)
 {
     MKDIRS("build", "assets");
     CMD("./build/tools/png2c", "-n", "tsodinPog", "-o", "./build/assets/tsodinPog.c", "./assets/tsodinPog.png");
+    CMD("./build/tools/png2c", "-n", "Lena_112", "-o", "./build/assets/Lena_112.c", "./assets/Lena_112.png");
     CMD("./build/tools/png2c", "-n", "tsodinCup", "-o", "./build/assets/tsodinCup.c", "./assets/tsodinCup.png");
     CMD("./build/tools/png2c", "-n", "oldstone", "-o", "./build/assets/oldstone.c", "./assets/oldstone.png");
     CMD("./build/tools/png2c", "-n", "lavastone", "-o", "./build/assets/lavastone.c", "./assets/lavastone.png");

BIN
wasm/squish.wasm


BIN
wasm/triangle.wasm


BIN
wasm/triangleTex.wasm