update demos
parent
8550b12757
commit
3c3c88df5f
|
@ -1,7 +1,7 @@
|
||||||
// framework demo
|
// framework demo
|
||||||
// - rlyeh, public domain
|
// - rlyeh, public domain
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// options
|
// options
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "fwk.h" // Minimal C sample
|
#include "v4k.h" // Minimal C sample
|
||||||
int main() {
|
int main() {
|
||||||
window_create(75.0, 0); // 75% size, no extra flags
|
window_create(75.0, 0); // 75% size, no extra flags
|
||||||
while( window_swap() && !input(KEY_ESC) ) { // game loop
|
while( window_swap() && !input(KEY_ESC) ) { // game loop
|
||||||
puts("hello FWK from C!");
|
puts("hello V4K from C!");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\00-ui.c` (windows)
|
// `make demos\00-ui.c` (windows)
|
||||||
// `sh MAKE.bat demos/00-ui.c` (linux, osx)
|
// `sh MAKE.bat demos/00-ui.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
float app_volume = 1.00f;
|
float app_volume = 1.00f;
|
||||||
|
@ -82,5 +82,5 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-hello.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-hello.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-video.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-video.c
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\01-sprite.c` (windows)
|
// `make demos\01-sprite.c` (windows)
|
||||||
// `sh MAKE.bat demos/01-sprite.c` (linux, osx)
|
// `sh MAKE.bat demos/01-sprite.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
void demo_kids(vec3 offs) {
|
void demo_kids(vec3 offs) {
|
||||||
// init
|
// init
|
||||||
|
@ -159,9 +159,9 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-audio.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-audio.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-font.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-font.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-spine.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-spine.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-sprite.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-sprite.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-tiled.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-tiled.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-tilemap.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-tilemap.c
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\02-ddraw.c` (windows)
|
// `make demos\02-ddraw.c` (windows)
|
||||||
// `sh MAKE.bat demos/02-ddraw.c` (linux, osx)
|
// `sh MAKE.bat demos/02-ddraw.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
bool do_colliders_demo = 1;
|
bool do_colliders_demo = 1;
|
||||||
|
@ -116,4 +116,4 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-collide.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-collide.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
void ddraw_camera(camera_t *c) {
|
void ddraw_camera(camera_t *c) {
|
||||||
vec3 center = c->position;
|
vec3 center = c->position;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// @todo: instanced poses, instanced render_bones
|
// @todo: instanced poses, instanced render_bones
|
||||||
// @todo: ik, modify bone transform (bone space)
|
// @todo: ik, modify bone transform (bone space)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
typedef struct anims_t {
|
typedef struct anims_t {
|
||||||
int inuse; // animation number in use
|
int inuse; // animation number in use
|
||||||
|
@ -182,5 +182,5 @@ int main() {
|
||||||
// @todo: controller demo: anim controller.lua
|
// @todo: controller demo: anim controller.lua
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-anims.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-anims.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-instanced.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-instanced.c
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\04-actor.c` (windows)
|
// `make demos\04-actor.c` (windows)
|
||||||
// `sh MAKE.bat demos/04-actor.c` (linux, osx)
|
// `sh MAKE.bat demos/04-actor.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// create window (75% sized, MSAAx4)
|
// create window (75% sized, MSAAx4)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// LOD demo, based on Polygon Reduction Demo by Stan Melax (PD)
|
// LOD demo, based on Polygon Reduction Demo by Stan Melax (PD)
|
||||||
// - rlyeh, public domain.
|
// - rlyeh, public domain.
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
aabb mesh_bounds(mesh_t *m) {
|
aabb mesh_bounds(mesh_t *m) {
|
||||||
aabb b = {{1e9,1e9,1e9},{-1e9,-1e9,-1e9}};
|
aabb b = {{1e9,1e9,1e9},{-1e9,-1e9,-1e9}};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// scene demo
|
// scene demo
|
||||||
// - rlyeh, public domain
|
// - rlyeh, public domain
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// options
|
// options
|
||||||
|
@ -224,7 +224,7 @@ while(window_swap() && !input(KEY_ESC)) {
|
||||||
// model_render(sponza, cam.proj, cam.view, sponza.pivot, 0);
|
// model_render(sponza, cam.proj, cam.view, sponza.pivot, 0);
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-material.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-material.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-shadertoy.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-shadertoy.c
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\04-controller.c` (windows)
|
// `make demos\04-controller.c` (windows)
|
||||||
// `sh MAKE.bat demos/04-controller.c` (linux, osx)
|
// `sh MAKE.bat demos/04-controller.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// 75% window, MSAAx2 flag
|
// 75% window, MSAAx2 flag
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// `make demos\07-network.c` (windows)
|
// `make demos\07-network.c` (windows)
|
||||||
// `sh MAKE.bat demos/07-network.c` (linux, osx)
|
// `sh MAKE.bat demos/07-network.c` (linux, osx)
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
volatile int client_socket = -1;
|
volatile int client_socket = -1;
|
||||||
volatile int server_socket = -1;
|
volatile int server_socket = -1;
|
||||||
|
@ -72,9 +72,9 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this demo supersedes following old sources:
|
// this demo supersedes following old sources:
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-demo.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-demo.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-script.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-script.c
|
||||||
// https://github.com/r-lyeh/FWK/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-socket.c
|
// https://github.com/r-lyeh/V4K/blob/45e34d7890b2b8fe1f4994f4b76e496280d83cb6/demos/00-socket.c
|
||||||
|
|
||||||
#if 0 // teal
|
#if 0 // teal
|
||||||
script_run("local tl=require(\"tl\")\ntl.loader()");
|
script_run("local tl=require(\"tl\")\ntl.loader()");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// audio demo
|
// audio demo
|
||||||
// - rlyeh, public domain
|
// - rlyeh, public domain
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// window (80% sized, MSAA x4 flag)
|
// window (80% sized, MSAA x4 flag)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int SKY_DIR = 0;
|
int SKY_DIR = 0;
|
||||||
const char *SKY_DIRS[] = {
|
const char *SKY_DIRS[] = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
float (*ease)(float);
|
float (*ease)(float);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
window_create(0.75, WINDOW_MSAA8);
|
window_create(0.75, WINDOW_MSAA8);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// instanced models demo
|
// instanced models demo
|
||||||
// - rlyeh, public domain.
|
// - rlyeh, public domain.
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
window_create(75, WINDOW_MSAA2);
|
window_create(75, WINDOW_MSAA2);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// @todo: Middle mouse button to pan camera @todo
|
// @todo: Middle mouse button to pan camera @todo
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
#if is(tcc) && !is(win32) // @todo: remove this & test on linux
|
#if is(tcc) && !is(win32) // @todo: remove this & test on linux
|
||||||
int log2_64 (uint64_t value) {
|
int log2_64 (uint64_t value) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
#define SCRIPT(...) #__VA_ARGS__
|
#define SCRIPT(...) #__VA_ARGS__
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// - shears
|
// - shears
|
||||||
// - bounding boxes
|
// - bounding boxes
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
#define spine spine2
|
#define spine spine2
|
||||||
#define spine_render spine_render2
|
#define spine_render spine_render2
|
||||||
#define spine_ui spine_ui2
|
#define spine_ui spine_ui2
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// credits: original lovely demo by rxi (MIT License).
|
// credits: original lovely demo by rxi (MIT License).
|
||||||
// see https://github.com/rxi/autobatch/tree/master/demo/cats
|
// see https://github.com/rxi/autobatch/tree/master/demo/cats
|
||||||
|
|
||||||
#include "fwk.h"
|
#include "v4k.h"
|
||||||
|
|
||||||
texture_t kids, catImage, shadowImage, inputs;
|
texture_t kids, catImage, shadowImage, inputs;
|
||||||
int NUM_SPRITES = 100, NUM_SPRITES_CHANGED = 1;
|
int NUM_SPRITES = 100, NUM_SPRITES_CHANGED = 1;
|
||||||
|
@ -141,7 +141,7 @@ void demo_kids() {
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
window_create(75.f, 0);
|
window_create(75.f, 0);
|
||||||
window_title("FWK - Sprite");
|
window_title("V4K - Sprite");
|
||||||
|
|
||||||
// options
|
// options
|
||||||
int do_cats = 1;
|
int do_cats = 1;
|
||||||
|
|
|
@ -596,7 +596,7 @@ details > summary::-webkit-details-marker {
|
||||||
|Version: | 2023.7 |
|
|Version: | 2023.7 |
|
||||||
|:--------------|:------------|
|
|:--------------|:------------|
|
||||||
|Branch: | main |
|
|Branch: | main |
|
||||||
|Commit: | 17 |
|
|Commit: | 18 |
|
||||||
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
|
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
|
||||||
|
|
||||||
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
|
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
|
||||||
|
|
Loading…
Reference in New Issue