sda4: commit the Glaze developer hard-drive dump

Un-ignored: the dev drive is the ground truth the restoration and
emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer
source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio
content). Kept in-repo for the pod-owner community.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-04 19:41:15 -05:00
co-authored by Claude Fable 5
parent 504aef88d4
commit db7745fcd0
19993 changed files with 1983033 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
FOG 250.0 1900.0 0.1 0.3 0.4
BACKGND 0.4 0.6 0.8
AMBIENT 0.3 0.3 0.3
LIGHT 0.7 0.7 0.7 40 60 20
GEOMETRY ..\vwe_ftp
TEXTURE ..\vwe_ftp
STATIC texcliff 1 0 -3 -500 0 000 0
STATIC texcliff 1 0 -3 -400 0 000 0
STATIC texcliff 1 0 -3 -300 0 000 0
STATIC texcliff 1 0 -3 -200 0 000 0
STATIC texcliff 1 0 -3 -100 0 000 0
STATIC texcliff 1 0 -3 000 0 000 0
STATIC texcliff 1 0 -3 500 0 000 0
STATIC texcliff 1 0 -3 400 0 000 0
STATIC texcliff 1 0 -3 300 0 000 0
STATIC texcliff 1 0 -3 200 0 000 0
STATIC texcliff 1 0 -3 100 0 000 0
STATIC texcliff 1 0 -3 -500 0 180 0
STATIC texcliff 1 0 -3 -400 0 180 0
STATIC texcliff 1 0 -3 -300 0 180 0
STATIC texcliff 1 0 -3 -200 0 180 0
STATIC texcliff 1 0 -3 -100 0 180 0
STATIC texcliff 1 0 -3 000 0 180 0
STATIC texcliff 1 0 -3 500 0 180 0
STATIC texcliff 1 0 -3 400 0 180 0
STATIC texcliff 1 0 -3 300 0 180 0
STATIC texcliff 1 0 -3 200 0 180 0
STATIC texcliff 1 0 -3 100 0 180 0
STATIC pstrut 1 -6 -3 -500 0 000 0
STATIC pstrut 1 -6 -3 -400 0 000 0
STATIC pstrut 1 -6 -3 -300 0 000 0
STATIC pstrut 1 -6 -3 -200 0 000 0
STATIC pstrut 1 -6 -3 -100 0 000 0
STATIC pstrut 1 -6 -3 000 0 000 0
STATIC pstrut 1 -6 -3 500 0 000 0
STATIC pstrut 1 -6 -3 400 0 000 0
STATIC pstrut 1 -6 -3 300 0 000 0
STATIC pstrut 1 -6 -3 200 0 000 0
STATIC pstrut 1 -6 -3 100 0 000 0
STATIC plant1 1.0 -15 -4 60 0 70 90
STATIC plant1 1.0 -9 -4 31 0 280 90
STATIC plant1 1.0 18 -4 -20 0 90 90
STATIC plant1 1.0 -22 -4 -60 0 260 90
DYNAMIC manyball 1.0 tumble.spl 0.0 0.023
DYNAMIC manyball 1.0 tumble.spl 3.45 0.032
DYNAMIC zygote 1.0 tumble2.spl 0.0 0.015
DYNAMIC zygote 1.25 tumble2.spl 4.15 0.021
STATIC many 1.0 0 8 0 0 0 0
STATIC many 1.2 0 9 0 20 50 70
+60
View File
@@ -0,0 +1,60 @@
FOG 250.0 1900.0 0.1 0.3 0.4
BACKGND 0.4 0.6 0.8
AMBIENT 0.3 0.3 0.3
LIGHT 0.7 0.7 0.7 40 60 20
GEOMETRY ..\geometry
TEXTURE ..\texture
STATIC texcliff 1 0 -3 -500 0 000 0
STATIC texcliff 1 0 -3 -400 0 000 0
STATIC texcliff 1 0 -3 -300 0 000 0
STATIC texcliff 1 0 -3 -200 0 000 0
STATIC texcliff 1 0 -3 -100 0 000 0
STATIC texcliff 1 0 -3 000 0 000 0
STATIC texcliff 1 0 -3 500 0 000 0
STATIC texcliff 1 0 -3 400 0 000 0
STATIC texcliff 1 0 -3 300 0 000 0
STATIC texcliff 1 0 -3 200 0 000 0
STATIC texcliff 1 0 -3 100 0 000 0
STATIC texcliff 1 0 -3 -500 0 180 0
STATIC texcliff 1 0 -3 -400 0 180 0
STATIC texcliff 1 0 -3 -300 0 180 0
STATIC texcliff 1 0 -3 -200 0 180 0
STATIC texcliff 1 0 -3 -100 0 180 0
STATIC texcliff 1 0 -3 000 0 180 0
STATIC texcliff 1 0 -3 500 0 180 0
STATIC texcliff 1 0 -3 400 0 180 0
STATIC texcliff 1 0 -3 300 0 180 0
STATIC texcliff 1 0 -3 200 0 180 0
STATIC texcliff 1 0 -3 100 0 180 0
STATIC pstrut 1 -6 -3 -500 0 000 0
STATIC pstrut 1 -6 -3 -400 0 000 0
STATIC pstrut 1 -6 -3 -300 0 000 0
STATIC pstrut 1 -6 -3 -200 0 000 0
STATIC pstrut 1 -6 -3 -100 0 000 0
STATIC pstrut 1 -6 -3 000 0 000 0
STATIC pstrut 1 -6 -3 500 0 000 0
STATIC pstrut 1 -6 -3 400 0 000 0
STATIC pstrut 1 -6 -3 300 0 000 0
STATIC pstrut 1 -6 -3 200 0 000 0
STATIC pstrut 1 -6 -3 100 0 000 0
STATIC plant1 1.0 -15 -4 60 0 70 90
STATIC plant1 1.0 -9 -4 31 0 280 90
STATIC plant1 1.0 18 -4 -20 0 90 90
STATIC plant1 1.0 -22 -4 -60 0 260 90
DYNAMIC manyball 1.0 tumble.spl 0.0 0.023
DYNAMIC manyball 1.0 tumble.spl 3.45 0.032
DYNAMIC zygote 1.0 tumble2.spl 0.0 0.015
DYNAMIC zygote 1.25 tumble2.spl 4.15 0.021
STATIC many 1.0 0 8 0 0 0 0
STATIC many 1.2 0 9 0 20 50 70
+55
View File
@@ -0,0 +1,55 @@
FOG 250.0 1900.0 0.1 0.3 0.4
BACKGND 0.4 0.6 0.8
AMBIENT 0.3 0.3 0.3
LIGHT 0.7 0.7 0.7 40 60 20
GEOMETRY ..\geometry
TEXTURE ..\texture
STATIC texcliff 1 0 -3 -500 0 000 0
STATIC texcliff 1 0 -3 -400 0 000 0
STATIC texcliff 1 0 -3 -300 0 000 0
STATIC texcliff 1 0 -3 -200 0 000 0
STATIC texcliff 1 0 -3 -100 0 000 0
STATIC texcliff 1 0 -3 000 0 000 0
STATIC texcliff 1 0 -3 500 0 000 0
STATIC texcliff 1 0 -3 400 0 000 0
STATIC texcliff 1 0 -3 300 0 000 0
STATIC texcliff 1 0 -3 200 0 000 0
STATIC texcliff 1 0 -3 100 0 000 0
STATIC texcliff 1 0 -3 -500 0 180 0
STATIC texcliff 1 0 -3 -400 0 180 0
STATIC texcliff 1 0 -3 -300 0 180 0
STATIC texcliff 1 0 -3 -200 0 180 0
STATIC texcliff 1 0 -3 -100 0 180 0
STATIC texcliff 1 0 -3 000 0 180 0
STATIC texcliff 1 0 -3 500 0 180 0
STATIC texcliff 1 0 -3 400 0 180 0
STATIC texcliff 1 0 -3 300 0 180 0
STATIC texcliff 1 0 -3 200 0 180 0
STATIC texcliff 1 0 -3 100 0 180 0
STATIC pstrut 1 -6 -3 -500 0 000 0
STATIC pstrut 1 -6 -3 -400 0 000 0
STATIC pstrut 1 -6 -3 -300 0 000 0
STATIC pstrut 1 -6 -3 -200 0 000 0
STATIC pstrut 1 -6 -3 -100 0 000 0
STATIC pstrut 1 -6 -3 000 0 000 0
STATIC pstrut 1 -6 -3 500 0 000 0
STATIC pstrut 1 -6 -3 400 0 000 0
STATIC pstrut 1 -6 -3 300 0 000 0
STATIC pstrut 1 -6 -3 200 0 000 0
STATIC pstrut 1 -6 -3 100 0 000 0
STATIC plant1 1.0 -15 -4 60 0 70 90
STATIC plant1 1.0 -9 -4 31 0 280 90
STATIC plant1 1.0 18 -4 -20 0 90 90
STATIC plant1 1.0 -22 -4 -60 0 260 90
DYNAMIC dzygote 1.0 tumble2.spl 0.0 0.015
DYNAMIC dzygote 1.25 tumble2.spl 4.15 0.021

+168
View File
@@ -0,0 +1,168 @@
CLIP 0.5 500.0
FOG 70.0 300.0 0.45 0.34 0.34
BACKGND 0.4 0.6 0.8
AMBIENT 0.5 0.65 0.75
LIGHT 1 .9 .7 -1000 150 50
STATIC hill 5 250 -3 080 0 030 0
STATIC hill 2 150 -3 -100 0 090 0
STATIC hill 9 -350 -3 -170 0 160 0
STATIC hill 4 -50 -3 -300 0 240 0
STATIC plant1 9.0 -45 -14 160 0 270 90
STATIC plant1 4.2 -80 -4 120 0 280 90
STATIC plant1 3.0 18 -4 -20 0 090 90
STATIC plant1 4.0 -15 -4 -160 0 260 90
STATIC ground 1 0000 -3 000 0 000 0
STATIC ground 1 0000 -3 100 0 000 0
STATIC ground 1 0000 -3 200 0 000 0
STATIC ground 1 0000 -3 300 0 000 0
STATIC ground 1 0000 -3 400 0 000 0
STATIC ground 1 0000 -3 500 0 000 0
STATIC ground 1 0000 -3 -100 0 000 0
STATIC ground 1 0000 -3 -200 0 000 0
STATIC ground 1 0000 -3 -300 0 000 0
STATIC ground 1 0000 -3 -400 0 000 0
STATIC ground 1 0000 -3 -500 0 000 0
STATIC ground 1 0100 -3 000 0 00 0
STATIC ground 1 0100 -3 100 0 00 0
STATIC ground 1 0100 -3 200 0 00 0
STATIC ground 1 0100 -3 300 0 00 0
STATIC ground 1 0100 -3 400 0 00 0
STATIC ground 1 0100 -3 500 0 00 0
STATIC ground 1 0100 -3 -100 0 000 0
STATIC ground 1 0100 -3 -200 0 000 0
STATIC ground 1 0100 -3 -300 0 000 0
STATIC ground 1 0100 -3 -400 0 000 0
STATIC ground 1 0100 -3 -500 0 000 0
STATIC ground 1 0200 -3 000 0 00 0
STATIC ground 1 0200 -3 100 0 00 0
STATIC ground 1 0200 -3 200 0 00 0
STATIC ground 1 0200 -3 300 0 00 0
STATIC ground 1 0200 -3 400 0 00 0
STATIC ground 1 0200 -3 500 0 00 0
STATIC ground 1 0200 -3 -100 0 000 0
STATIC ground 1 0200 -3 -200 0 000 0
STATIC ground 1 0200 -3 -300 0 000 0
STATIC ground 1 0200 -3 -400 0 000 0
STATIC ground 1 0200 -3 -500 0 000 0
STATIC ground 1 0300 -3 000 0 00 0
STATIC ground 1 0300 -3 100 0 00 0
STATIC ground 1 0300 -3 200 0 00 0
STATIC ground 1 0300 -3 300 0 00 0
STATIC ground 1 0300 -3 400 0 00 0
STATIC ground 1 0300 -3 500 0 00 0
STATIC ground 1 0300 -3 -100 0 000 0
STATIC ground 1 0300 -3 -200 0 000 0
STATIC ground 1 0300 -3 -300 0 000 0
STATIC ground 1 0300 -3 -400 0 000 0
STATIC ground 1 0300 -3 -500 0 000 0
STATIC ground 1 0400 -3 000 0 00 0
STATIC ground 1 0400 -3 100 0 00 0
STATIC ground 1 0400 -3 200 0 00 0
STATIC ground 1 0400 -3 300 0 00 0
STATIC ground 1 0400 -3 400 0 00 0
STATIC ground 1 0400 -3 500 0 00 0
STATIC ground 1 0400 -3 -100 0 000 0
STATIC ground 1 0400 -3 -200 0 000 0
STATIC ground 1 0400 -3 -300 0 000 0
STATIC ground 1 0400 -3 -400 0 000 0
STATIC ground 1 0400 -3 -500 0 000 0
STATIC ground 1 0500 -3 000 0 00 0
STATIC ground 1 0500 -3 100 0 00 0
STATIC ground 1 0500 -3 200 0 00 0
STATIC ground 1 0500 -3 300 0 00 0
STATIC ground 1 0500 -3 400 0 00 0
STATIC ground 1 0500 -3 500 0 00 0
STATIC ground 1 0500 -3 -100 0 000 0
STATIC ground 1 0500 -3 -200 0 000 0
STATIC ground 1 0500 -3 -300 0 000 0
STATIC ground 1 0500 -3 -400 0 000 0
STATIC ground 1 0500 -3 -500 0 000 0
STATIC ground 1 -100 -3 000 0 00 0
STATIC ground 1 -100 -3 100 0 00 0
STATIC ground 1 -100 -3 200 0 00 0
STATIC ground 1 -100 -3 300 0 00 0
STATIC ground 1 -100 -3 400 0 00 0
STATIC ground 1 -100 -3 500 0 00 0
STATIC ground 1 -100 -3 -100 0 000 0
STATIC ground 1 -100 -3 -200 0 000 0
STATIC ground 1 -100 -3 -300 0 000 0
STATIC ground 1 -100 -3 -400 0 000 0
STATIC ground 1 -100 -3 -500 0 000 0
STATIC ground 1 -200 -3 000 0 00 0
STATIC ground 1 -200 -3 100 0 00 0
STATIC ground 1 -200 -3 200 0 00 0
STATIC ground 1 -200 -3 300 0 00 0
STATIC ground 1 -200 -3 400 0 00 0
STATIC ground 1 -200 -3 500 0 00 0
STATIC ground 1 -200 -3 -100 0 000 0
STATIC ground 1 -200 -3 -200 0 000 0
STATIC ground 1 -200 -3 -300 0 000 0
STATIC ground 1 -200 -3 -400 0 000 0
STATIC ground 1 -200 -3 -500 0 000 0
STATIC ground 1 -300 -3 000 0 00 0
STATIC ground 1 -300 -3 100 0 00 0
STATIC ground 1 -300 -3 200 0 00 0
STATIC ground 1 -300 -3 300 0 00 0
STATIC ground 1 -300 -3 400 0 00 0
STATIC ground 1 -300 -3 500 0 00 0
STATIC ground 1 -300 -3 -100 0 000 0
STATIC ground 1 -300 -3 -200 0 000 0
STATIC ground 1 -300 -3 -300 0 000 0
STATIC ground 1 -300 -3 -400 0 000 0
STATIC ground 1 -300 -3 -500 0 000 0
STATIC ground 1 -400 -3 000 0 00 0
STATIC ground 1 -400 -3 100 0 00 0
STATIC ground 1 -400 -3 200 0 00 0
STATIC ground 1 -400 -3 300 0 00 0
STATIC ground 1 -400 -3 400 0 00 0
STATIC ground 1 -400 -3 500 0 00 0
STATIC ground 1 -400 -3 -100 0 000 0
STATIC ground 1 -400 -3 -200 0 000 0
STATIC ground 1 -400 -3 -300 0 000 0
STATIC ground 1 -400 -3 -400 0 000 0
STATIC ground 1 -400 -3 -500 0 000 0
STATIC ground 1 -500 -3 000 0 00 0
STATIC ground 1 -500 -3 100 0 00 0
STATIC ground 1 -500 -3 200 0 00 0
STATIC ground 1 -500 -3 300 0 00 0
STATIC ground 1 -500 -3 400 0 00 0
STATIC ground 1 -500 -3 500 0 00 0
STATIC ground 1 -500 -3 -100 0 000 0
STATIC ground 1 -500 -3 -200 0 000 0
STATIC ground 1 -500 -3 -300 0 000 0
STATIC ground 1 -500 -3 -400 0 000 0
STATIC ground 1 -500 -3 -500 0 000 0
+55
View File
@@ -0,0 +1,55 @@
FOG 250.0 1900.0 0.1 0.3 0.4
BACKGND 0.4 0.6 0.8
AMBIENT 0.3 0.3 0.3
LIGHT 0.7 0.7 0.7 40 60 20
GEOMETRY ..\geometry
TEXTURE ..\texture
STATIC texcliff 1 0 -3 -500 0 000 0
STATIC texcliff 1 0 -3 -400 0 000 0
STATIC texcliff 1 0 -3 -300 0 000 0
STATIC texcliff 1 0 -3 -200 0 000 0
STATIC texcliff 1 0 -3 -100 0 000 0
STATIC texcliff 1 0 -3 000 0 000 0
STATIC texcliff 1 0 -3 500 0 000 0
STATIC texcliff 1 0 -3 400 0 000 0
STATIC texcliff 1 0 -3 300 0 000 0
STATIC texcliff 1 0 -3 200 0 000 0
STATIC texcliff 1 0 -3 100 0 000 0
STATIC texcliff 1 0 -3 -500 0 180 0
STATIC texcliff 1 0 -3 -400 0 180 0
STATIC texcliff 1 0 -3 -300 0 180 0
STATIC texcliff 1 0 -3 -200 0 180 0
STATIC texcliff 1 0 -3 -100 0 180 0
STATIC texcliff 1 0 -3 000 0 180 0
STATIC texcliff 1 0 -3 500 0 180 0
STATIC texcliff 1 0 -3 400 0 180 0
STATIC texcliff 1 0 -3 300 0 180 0
STATIC texcliff 1 0 -3 200 0 180 0
STATIC texcliff 1 0 -3 100 0 180 0
STATIC pstrut 1 -6 -3 -500 0 000 0
STATIC pstrut 1 -6 -3 -400 0 000 0
STATIC pstrut 1 -6 -3 -300 0 000 0
STATIC pstrut 1 -6 -3 -200 0 000 0
STATIC pstrut 1 -6 -3 -100 0 000 0
STATIC pstrut 1 -6 -3 000 0 000 0
STATIC pstrut 1 -6 -3 500 0 000 0
STATIC pstrut 1 -6 -3 400 0 000 0
STATIC pstrut 1 -6 -3 300 0 000 0
STATIC pstrut 1 -6 -3 200 0 000 0
STATIC pstrut 1 -6 -3 100 0 000 0
STATIC plant1 1.0 -15 -4 60 0 70 90
STATIC plant1 1.0 -9 -4 31 0 280 90
STATIC plant1 1.0 18 -4 -20 0 90 90
STATIC plant1 1.0 -22 -4 -60 0 260 90
DYNAMIC zygote 1.0 tumble2.spl 0.0 0.015
DYNAMIC zygote 1.25 tumble2.spl 4.15 0.021

Binary file not shown.
+548
View File
@@ -0,0 +1,548 @@
/*
FILE : testpp5.c
PROJECT : pxpl5 renderer test
Author : Phil Atkin
(C) Division Ltd 1993.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <math.h>
#include "dpl.h"
#include "matrix.h"
#include "startup.h"
#include "spline.h"
#include "camera.h"
char *progname;
static char *dpl_arg;
/* a few static dpltypes */
static dpl_ZONE *zone=NULL;
static dpl_LMODEL *lmodel=NULL;
static dpl_LIGHT *direct=NULL;
static dpl_LIGHT *ambient=NULL;
static dpl_VIEW *eye, *rye;
/*{{{ void eyeStuff ( VIEW *view )*/
void eyeStuff ( dpl_VIEW *view, int left )
{
float scale=1.0;
dpl_IdMatrix(view->matrix);
dpl_Translate (view->matrix, scale*1.275, 0, 0 );
dpl_Rotate (view->matrix, 180, dpl_Y );
dpl_Translate (view->matrix, 0, 0, -48 );
dpl_Flush (view);
}
/*}}} */
/*{{{ char *makeVizName ( char *name )*/
char vizStr [256];
char *makeVizName ( char *name )
{
char *root;
if ((root=getenv("VIZPATH")) == NULL)
return(name);
else {
strcpy ( vizStr, root );
strcat ( vizStr, name );
return ( vizStr );
}
}
/*}}} */
/*{{{ char *makeTexName ( char *name )*/
char texStr [256];
char *makeTexName ( char *name )
{
char *root;
if ((root=getenv("TEXTURE")) == NULL)
return(name);
else {
strcpy ( texStr, root );
strcat ( texStr, name );
return ( texStr );
}
}
/*}}} */
/*{{{ char *makedplName ( char *name )*/
char *makedplName ( char *dplstr, char *name )
{
char *root;
if ((root=getenv("DVIEWBIN")) == NULL)
return(name);
else {
strcpy ( dplstr, root );
strcat ( dplstr, name );
return ( dplstr );
}
}
/*}}} */
/*{{{ int env2hex ()*/
int env2hex ( char *env_str, int default_v )
{
char *s;
int v;
if (s = getenv(env_str)) {
if (sscanf(s, "%x", &v) == 1) {
return v;
}
}
printf ("Defaulting on %s to 0x%x\n", env_str, default_v );
return default_v;
}
/*}}} */
/*{{{ cheesy scene file support*/
/*{{{ about the cheesy file format*/
/*
this is a DEAD quick and dirty 'get-your-geometry-executing' thing,
which loads up a scene, and constantly executes it, allowing the
user to wander round by keyboard flight.
it only took 30 minutes to write so is not supported.
cheesy scene format is
FOG z0 z1 r g b
BACKGND r g b
AMBIENT r g b
LIGHT r g b dx dy dz
STATIC name scale px py pz rx ry rz
DYNAMIC name scale splinefile t0 dt
*/
/*}}} */
/*{{{ cheesy structure*/
typedef struct s_cheesy {
dpl_DCS *dcs;
cntl_point *p;
float scale;
float t, dt;
struct s_cheesy *next;
} cheesy_scene;
cheesy_scene *camembert=NULL;
/*}}} */
/*{{{ static cheesy_scene *load_cheesy_scene ( char *s )*/
static cheesy_scene *load_cheesy_scene ( char *s )
{
cheesy_scene *cheesy_head=NULL;
FILE *fp=fopen(s, "rt" );
int read;
dpl_DCS *zone_root;
dpl_DCS *geom_root,
*geom_tail=NULL;
dpl_DCS *light_root,
*light_tail=NULL;
char *str=malloc(256);
if (fp==NULL) {
printf ("couldnt open scene file\n" );
exit(666);
}
zone_root =dpl_NewDcs();
light_root=dpl_NewDcs();
geom_root =dpl_NewDcs();
light_tail=light_root;
geom_tail =geom_root;
lmodel=dpl_NewLmodel ();
dpl_SetZoneRootDcs ( zone, zone_root );
dpl_SetZoneLmodel ( zone, lmodel );
dpl_LinkDcs ( zone_root, light_root );
dpl_NestDcs ( zone_root, geom_root );
read=fscanf( fp, "%s ", str );
while (read == 1) {
float neer, phar, r, g, b;
if (strncmp ( str, "//", 2) == 0) {
// read=fscanf( fp, "%s\n", str ); // throw away
str=fgets( str, 256, fp ); // throw away
}
else if (strncmp ( str, "CLIP", 4) == 0) {
read=fscanf( fp, "%f %f\n", &neer, &phar ); // throw away
/* see main() below */
}
else if (strncmp ( str, "FOG", 3) == 0) {
/*{{{ */
read=fscanf( fp, "%f %f %f %f %f\n", &neer, &phar, &r, &g, &b );
printf ("fog %f, %f %f, %f, %f\n", neer, phar, r, g, b );
dpl_SetViewFog ( eye, 1, r, g, b, neer, phar );
if (rye)
dpl_SetViewFog ( rye, 1, r, g, b, neer, phar );
/*}}} */
}
else if (strncmp ( str, "BACKGND", 7) == 0) {
/*{{{ */
read=fscanf( fp, "%f %f %f\n", &r, &g, &b );
printf ("set background %f, %f, %f\n", r, g, b );
dpl_SetViewBackGround ( eye, r, g, b );
if (rye) dpl_SetViewBackGround ( rye, r, g, b );
/*}}} */
}
else if (strncmp ( str, "STATIC", 5) == 0) {
/*{{{ */
dpl_DCS *d;
dpl_INSTANCE *i;
dpl_OBJECT *o;
read=fscanf( fp, "%s ", str );
printf ("create static object %s\n", str );
d=geom_tail;
o=dpl_NewObject();
if (o) {
float scale, tx, ty, tz, rx, ry, rz;
dpl_LoadObject ( o, str );
printf ("loaded object\n" );
read=fscanf( fp, "%f %f %f %f %f %f %f\n",
&scale, &tx, &ty, &tz, &rx, &ry, &rz );
printf ("translate %f %f %f\n", tx, ty, tz );
i=dpl_NewInstance();
dpl_SetInstanceObject ( i, o );
dpl_IdMatrix ( d->matrix );
dpl_Rotate ( d->matrix, rz, dpl_Z );
dpl_Rotate ( d->matrix, rx, dpl_X );
dpl_Rotate ( d->matrix, ry, dpl_Y );
dpl_Scale ( d->matrix, scale, scale, scale );
dpl_Translate ( d->matrix, tx, ty, tz );
d->identity=0;
dpl_SetDcsInstance ( d, i );
d=dpl_NewDcs ();
dpl_LinkDcs ( geom_tail, d );
geom_tail=d;
dpl_Hide(o);
}
else {
printf ("Failed to load object from file %s\n", str );
exit(666);
}
/*}}} */
}
else if (strncmp ( str, "DYNAMIC", 7) == 0) {
/*{{{ */
cheesy_scene *edam=malloc(sizeof(cheesy_scene));
dpl_DCS *d;
dpl_INSTANCE *i;
dpl_OBJECT *o;
read=fscanf( fp, "%s ", str );
printf ("create dynamic object %s\n", str );
o=dpl_NewObject();
if (o) {
float scale, t0, dt;
dpl_LoadObject ( o, str );
read=fscanf( fp, "%f %s %f %f\n",
&scale, str, &t0, &dt );
printf ("spline file %s\n", str );
i=dpl_NewInstance();
dpl_SetInstanceObject ( i, o );
d=geom_tail;
edam->p=init_splines ( str );
edam->scale = scale;
edam->t =t0;
edam->dt=dt;
edam->dcs=geom_tail;
edam->next=cheesy_head;
cheesy_head=edam;
dpl_SetDcsInstance ( d, i );
d=dpl_NewDcs ();
dpl_LinkDcs ( geom_tail, d );
geom_tail=d;
dpl_Hide(o);
}
else {
printf ("Failed to load object from file %s\n", str );
exit(666);
}
/*}}} */
}
else if (strncmp ( str, "AMBIENT", 6) == 0) {
/*{{{ */
dpl_LIGHT *light;
float r, g, b;
read=fscanf( fp, "%f %f %f\n", &r, &g, &b );
light=dpl_NewLight();
dpl_SetLightType ( light, dpl_light_type_ambient );
dpl_SetLightColor ( light, r, g, b );
dpl_AddLightToLmodel ( lmodel, light );
/*}}} */
}
else if (strncmp ( str, "LIGHT", 5) == 0) {
/*{{{ */
dpl_DCS *d;
dpl_LIGHT *light;
float r, g, b, x, y, z;
read=fscanf( fp, "%f %f %f %f %f %f\n", &r, &g, &b, &x, &y, &z );
d=light_tail;
light=dpl_NewLight();
dpl_SetLightType ( light, dpl_light_type_directional );
dpl_SetLightColor ( light, r, g, b );
dpl_AddLightToLmodel ( lmodel, light );
d=light_tail;
dpl_SetDcsLight ( d, light );
dpl_IdMatrix ( d->matrix );
dpl_Rotate ( d->matrix, z, dpl_Z );
dpl_Rotate ( d->matrix, x, dpl_X );
dpl_Rotate ( d->matrix, y, dpl_Y );
d->identity=0;
dpl_Flush(d);
d=dpl_NewDcs ();
dpl_LinkDcs ( light_tail, d );
light_tail=d;
/*}}} */
}
else {
printf ("Huh, dont understand %s\n", str );
exit(666);
}
read=fscanf( fp, "%s ", str );
}
fclose(fp);
printf ("hey, read the scene\n" );
fflush(stdout);
free(str);
return cheesy_head;
}
/*}}} */
/*{{{ static execute ( cheesy_scene *s )*/
static execute ( cheesy_scene *s )
{
while (s) {
cntl_point *p=s->p;
if (p) {
dpl_DCS *d=s->dcs;
float t, px, py, pz, rx, ry, rz;
t=s->t;
px=eval(p->x_pos_cubic, t );
py=eval(p->y_pos_cubic, t );
pz=eval(p->z_pos_cubic, t );
rx=eval(p->x_rot_cubic, t );
ry=eval(p->y_rot_cubic, t );
rz=eval(p->z_rot_cubic, t );
p = walk_spline ( p, &s->t, s->dt );
s->p = p;
dpl_IdMatrix ( d->matrix );
dpl_Rotate ( d->matrix, rz, dpl_Z );
dpl_Rotate ( d->matrix, rx, dpl_X );
dpl_Rotate ( d->matrix, ry, dpl_Y );
dpl_Scale ( d->matrix, s->scale, s->scale, s->scale );
dpl_Translate ( d->matrix, px, py, pz );
dpl_Flush(d);
}
s=s->next;
}
}
/*}}} */
/*}}} */
/*{{{ int nain ( int argc, char *argv[])*/
int nain ( int argc, char *argv[])
{
dpl_node *sky;
zone=initialize_all ( dpl_arg,
0,
&eye, &rye, far_clip / 2.0f );
camembert=load_cheesy_scene ( argv[1] );
/*{{{ make sky move*/
if (sky=dpl_FindNamedTypedNode ( dpl_type_texture, "sky_tex")) {
dpl_TEXTURE *tex=(dpl_TEXTURE *) sky;
tex->u0=0;
tex->v0=0;
tex->dv=0.13f;
tex->du=0.0373f;
dpl_Flush(tex);
}
/*
*/
/*}}} */
/*{{{ make plant move*/
if (sky=dpl_FindNamedTypedNode ( dpl_type_texture, "plant")) {
dpl_TEXTURE *tex=(dpl_TEXTURE *) sky;
tex->u0=0;
tex->v0=0;
tex->dv=0.1;
tex->du=0.913f;
dpl_Flush(tex);
}
/*}}} */
/*{{{ make fish move*/
if (sky=dpl_FindNamedTypedNode ( dpl_type_texture, "plant4")) {
dpl_TEXTURE *tex=(dpl_TEXTURE *) sky;
tex->u0=0;
tex->v0=0;
tex->dv=0.6;
tex->du=0.0f;
dpl_Flush(tex);
}
/*}}} */
while (1) {
if (argc > 2)
camera_move ( eye, argv[2],
NULL, 0.0f, 0.0132f );
else
camera_move_kbd ( eye, "dontneed.one",
NULL, 1.0f, 0.0057f );
dpl_DrawScene (1);
execute ( camembert );
}
return 0;
}
/*}}} */
/*{{{ int main ( int argc, char *argv[] )*/
int main ( int argc, char *argv[] )
{
FILE *fp;
int read;
char *str;
progname=argv[0];
if (argc < 2) {
printf ("usage %s: <scenefile> [camera_spline_file]\n", argv[0] );
exit(666);
}
else {
dpl_arg=getenv("dplarg");
/* dpl_SetWarningLevel ( 100 ); */
if (dpl_arg) {
if (screen_resolution ( dpl_arg ) == 0) {
printf ("failed to understand video format\n"); //(redundant message)
exit(666);
}
}
else {
printf ("failed to getenv dplarg\n");
exit(666);
}
near_clip=6.0;
far_clip =12000.0f;
fp = fopen( argv[1], "rt" );
if (fp==NULL) {
printf ("couldnt open scene file\n" );
exit(666);
}
str=malloc(256);
read=fscanf( fp, "%s ", str );
while (read == 1) {
float neer, phar;
if (strncmp ( str, "CLIP", 4) == 0) {
/*{{{ */
read=fscanf( fp, "%f %f\n", &neer, &phar );
printf ("clip %f, %f\n", neer, phar );
near_clip = neer;
far_clip = phar;
break;
/*}}} */
}
read=fscanf( fp, "%s ", str );
}
fclose(fp);
fflush(stdout);
free(str);
nain ( argc, argv );
}
return 0;
}
/*}}} */
Binary file not shown.
+27
View File
@@ -0,0 +1,27 @@
How to Fly
Important: Make sure <Num Lock> is ON!
'5' key - forward velocity
'0' key - rearward velocity
left arrow - leftward velocity
right arrow - rightward velocity
up arrow - upward velocity
down arrow - downward velocity
'4' key - left yaw velocity
'6' key - right yaw velocity
'2' key - up pitch velocity
'8' key - down pitch velocity
'7' key - left roll velocity
'9' key - right roll velocity
'-' key - decrease keyboard rate
'+' key - increase keyboard rate
'*' key - stop roll, pitch & yaw
space bar - full stop
enter key - full reset
esc key - exit program
+309
View File
@@ -0,0 +1,309 @@
// kamera.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <math.h>
#include <conio.h>
#include "dpl.h"
#include "matrix.h"
#include "spline.h"
/*{{{ static float atan2deg ( float dz, float dx )*/
static float _atan2deg ( float dz, float dx )
{
float angle;
if ((dx*dx) < 0.0001f) {
angle=(dz>0) ? 90.0f : -90.0f;
return angle;
}
else {
return (180.0f / 3.1415926535f) * atan2 ( dz, dx );
}
}
/*}}} */
/*{{{ static void xformpoint ( POINT q, POINT p, MATRIX m )*/
static void _xformpoint ( dpl_POINT q, dpl_POINT p, dpl_MATRIX m )
{
dpl_POINT r;
int i;
for (i=0; i<4; i++ ) {
r[i]=(p[0]*m[0][i])+
(p[1]*m[1][i])+
(p[2]*m[2][i])+
(p[3]*m[3][i]);
}
memcpy ( q, r, sizeof(dpl_POINT));
}
/*}}} */
/*{{{ void look_at ( VIEW *v, float *from, float *at, float z_spin )*/
void look_at ( dpl_VIEW *v, float *from, float *at, float z_spin )
{
/* construct a view from 2 points */
float dx, dy, dz;
float px, py, pz;
float thetax, thetay, thetaz;
float yaw, roll;
dpl_MATRIX m;
dpl_POINT p, q;
/* put 'at' at origin, construct a vector from 'from' */
px=from[0]; py=from[1]; pz=from[2];
dx=at[0]-px;
dy=at[1]-py;
dz=at[2]-pz;
thetaz=0.0f;
thetay=0.0f;
thetax=0.0f;
p[0]=dx;
p[1]=dy;
p[2]=dz;
p[3]=1;
yaw=-_atan2deg ( dz, dx );
dpl_IdMatrix ( m );
dpl_Rotate ( m, -yaw, dpl_Y );
_xformpoint ( q, p, m );
roll=_atan2deg(q[1], q[0] );
/* project onto x-z plane, assuming camera is initially looking down -z */
dpl_IdMatrix ( v->matrix );
/* apply angles to matrix */
dpl_Rotate ( v->matrix, z_spin, dpl_Z );
dpl_Rotate ( v->matrix, roll, dpl_X );
dpl_Rotate ( v->matrix, yaw-90.0f, dpl_Y );
dpl_Translate( v->matrix, px, py, pz );
}
/*}}} */
static int camera_inited=0;
static float camera_t=0.0f;
static cntl_point *camerahead=NULL;
/*{{{ void camera_move ( VIEW *eye,*/
void camera_move ( dpl_VIEW *eye,
char *spline_file,
dpl_POINT look_at_point,
float scale_fac,
float dt )
{
cntl_point *p=camerahead;
float t=camera_t;
float px, py, pz, rx, ry, rz;
dpl_POINT evalp;
if (camera_inited == 0) {
camera_inited=1;
p=init_splines(spline_file);
t=0;
}
px=eval(p->x_pos_cubic, t );
py=eval(p->y_pos_cubic, t );
pz=eval(p->z_pos_cubic, t );
rx=eval(p->x_rot_cubic, t );
ry=eval(p->y_rot_cubic, t );
rz=eval(p->z_rot_cubic, t );
camerahead=walk_spline ( p, &t, dt );
camera_t=t;
/* we have wobbled the spline according to the file - now build the
view matrix */
/*
eye->matrix[3][0]=px+look_at_point[0];
eye->matrix[3][1]=py+look_at_point[1];
eye->matrix[3][2]=pz+look_at_point[2];
look_at ( eye, &eye->matrix[3][0], look_at_point, rz );
*/
dpl_IdMatrix ( eye->matrix );
dpl_Rotate ( eye->matrix, rz, dpl_Z );
dpl_Rotate ( eye->matrix, rx, dpl_X );
dpl_Rotate ( eye->matrix, ry, dpl_Y );
dpl_Translate ( eye->matrix, px, py, pz );
dpl_Flush(eye);
}
/*}}} */
/*{{{ void camera_move_kbd ( VIEW *eye,*/
static float
px, py, pz,
yaw, pitch, roll,
x_velocity, y_velocity, z_velocity,
pitch_velocity, yaw_velocity, roll_velocity,
dspin, dspeed;
static int
enhanced_key = 0, //Flag: True if next char is enhanced key.
first_time = -1;
void full_reset_kbd()
{
yaw = pitch = roll = 0.0f;
x_velocity = y_velocity = z_velocity = 0.0f;
px = pz = 0.0f;
py = 5.0f; // height off ground
pitch_velocity = yaw_velocity = roll_velocity = 0.0f;
dspin = 0.2f;
dspeed = 0.2f;
printf ("rate: ....");
}
void camera_move_kbd ( dpl_VIEW *eye,
char *spline_file,
dpl_POINT look_at_point,
float scale_fac,
float dt )
{
dpl_POINT vel0, vel1;
int stdout_dirty = 0;
if (first_time) {
first_time = 0;
full_reset_kbd();
stdout_dirty = -1;
}
/* compute roll, pitch, yaw from keyboard input */
if (kbhit()) {
int ch;
ch = getch();
if (enhanced_key) {
enhanced_key = 0; //False
switch (ch) {
case 'H': // 0,72 'H' up arrow
y_velocity+=dspeed;
break;
case 'P': // 0,80 'P' down arrow
y_velocity-=dspeed;
break;
case 'M': // 0,77 'M' left arrow
x_velocity+=dspeed;
break;
case 'K': // 0,75 'K' right arrow
x_velocity-=dspeed;
break;
}
}
else if (ch == 0) {
enhanced_key = -1; //True
}
else {
switch (ch) {
case '7' : /* roll left */
roll_velocity += dspin;
break;
case '9': /* roll right */
roll_velocity -= dspin;
break;
case '4' : /* swing left weeet chariot */
yaw_velocity+=dspin;
break;
case '6' : /* right */
yaw_velocity-=dspin;
break;
case '2' : /* upp */
pitch_velocity+=dspin;
break;
case '8' : /* downnn */
pitch_velocity-=dspin;
break;
case '5' : /* go faster */
z_velocity+=dspeed;
break;
case '0' : /* decelerate */
z_velocity-=dspeed;
break;
case 13 : /* Enter - full reset */
printf ("<reset>\n");
full_reset_kbd();
stdout_dirty = -1;
// v--fall through--v //
case ' ' : /* space - full stop (set speed to 0) */
x_velocity=0.0f;
y_velocity=0.0f;
z_velocity=0.0f;
// v--fall through--v //
case '*' :
pitch_velocity = 0.0f;
yaw_velocity = 0.0f;
roll_velocity = 0.0f;
break;
case '/' :
pitch = 0.0f;
yaw = 0.0f;
roll = 0.0f;
break;
case '-' :
if (dspin > 0.06f) {
dspin -= 0.05f;
printf("\b \b");
} else {
putchar('\007');
}
stdout_dirty = -1;
if (dspeed > 0.06f) dspeed -= 0.05f;
break;
case '+' :
if (dspin < 1.99f) {
dspin += 0.05f;
putchar('.');
} else {
putchar('\007');
}
stdout_dirty = -1;
if (dspeed < 1.99f) dspeed += 0.05f;
break;
case 27 : /* Esc - exit program */
printf("<exit>\n");
exit(0);
}
}
}
if (stdout_dirty) fflush(stdout);
vel0[0]=x_velocity;
vel0[1]=y_velocity;
vel0[2]=-z_velocity;
dpl_IdMatrix ( eye->matrix );
roll += roll_velocity;
pitch += pitch_velocity;
yaw += yaw_velocity;
dpl_Rotate ( eye->matrix, roll, dpl_Z );
dpl_Rotate ( eye->matrix, pitch, dpl_X );
dpl_Rotate ( eye->matrix, yaw, dpl_Y );
_xformpoint ( vel1, vel0, eye->matrix );
px+=vel1[0];
py+=vel1[1];
pz+=vel1[2];
dpl_Translate ( eye->matrix, px, py, pz );
dpl_Flush ( eye );
}
/*}}} */
+50
View File
@@ -0,0 +1,50 @@
CLIP 0.5 1900.0
FOG 25.0 1900.0 0.1 0.3 0.4
BACKGND 0.4 0.6 0.8
AMBIENT 0.3 0.3 0.3
LIGHT 0.95 0.95 0.95 40 60 20
STATIC texcliff 1 0 -3 -500 0 000 0
STATIC texcliff 1 0 -3 -400 0 000 0
STATIC texcliff 1 0 -3 -300 0 000 0
STATIC texcliff 1 0 -3 -200 0 000 0
STATIC texcliff 1 0 -3 -100 0 000 0
STATIC texcliff 1 0 -3 000 0 000 0
STATIC texcliff 1 0 -3 500 0 000 0
STATIC texcliff 1 0 -3 400 0 000 0
STATIC texcliff 1 0 -3 300 0 000 0
STATIC texcliff 1 0 -3 200 0 000 0
STATIC texcliff 1 0 -3 100 0 000 0
STATIC texcliff 1 0 -3 -500 0 180 0
STATIC texcliff 1 0 -3 -400 0 180 0
STATIC texcliff 1 0 -3 -300 0 180 0
STATIC texcliff 1 0 -3 -200 0 180 0
STATIC texcliff 1 0 -3 -100 0 180 0
STATIC texcliff 1 0 -3 000 0 180 0
STATIC texcliff 1 0 -3 500 0 180 0
STATIC texcliff 1 0 -3 400 0 180 0
STATIC texcliff 1 0 -3 300 0 180 0
STATIC texcliff 1 0 -3 200 0 180 0
STATIC texcliff 1 0 -3 100 0 180 0
STATIC pstrut 1 -6 -3 -500 0 000 0
STATIC pstrut 1 -6 -3 -400 0 000 0
STATIC pstrut 1 -6 -3 -300 0 000 0
STATIC pstrut 1 -6 -3 -200 0 000 0
STATIC pstrut 1 -6 -3 -100 0 000 0
STATIC pstrut 1 -6 -3 000 0 000 0
STATIC pstrut 1 -6 -3 500 0 000 0
STATIC pstrut 1 -6 -3 400 0 000 0
STATIC pstrut 1 -6 -3 300 0 000 0
STATIC pstrut 1 -6 -3 200 0 000 0
STATIC pstrut 1 -6 -3 100 0 000 0
STATIC plant1 1.0 -15 -4 60 0 70 90
STATIC plant1 1.0 -9 -4 20 0 280 90
STATIC plant1 1.0 18 -4 -20 0 90 90
STATIC plant1 1.0 -22 -4 -60 0 260 90
View File
+1
View File
@@ -0,0 +1 @@
set DPLARG=/tranny~..\vrendmon.btl~/i860~..\vrend.mng~/link_A~3~/link_B~-1~/device~0x150~/video~svga~/n_860s~1
+18
View File
@@ -0,0 +1,18 @@
[edit-]
screen=80 50
toggles=1 1 0 1 0 0
srch=
src=
rpl=
file=c:\spheres\examples\dcanal.scn 1 35 11 35
[brief]
file=c:\spheres\examples\dcanal.scn 1 35 11 35 1 47 78 1 c=0
[shared-]
pmark=c:\spheres\examples\dcanal.scn 11 35
[brief-scrap]
0 3
STATIC many 1.0 0 8 0 0 0 0
STATIC many 1.2 0 9 0 20 50 70
[end-brief-scrap]

+11
View File
@@ -0,0 +1,11 @@
10
-9 8 21 20 30 60
-9.2 7.4 20 120 80 10
-8.7 7.1 19 -20 330 -50
-9.2 6.5 21 40 230 40
-9.6 5.2 20 80 130 -30
-9.2 4 21 -20 -30 -60
-9.1 5.3 19 50 -230 -160
-8.3 7.1 21 90 -190 10
-9.0 9 20 -80 -30 120
-8.6 7.2 20 40 130 80
+11
View File
@@ -0,0 +1,11 @@
10
9 18 -31 20 30 60
9.2 17.4 -30 120 80 10
8.7 17.1 -29 -20 330 -50
9.2 16.5 -31 40 230 40
9.6 15.2 -30 80 130 -30
9.2 14 -31 -20 -30 -60
9.1 15.3 -29 50 -230 -160
8.3 17.1 -31 90 -190 10
9.0 19 -30 -80 -30 120
8.6 17.2 -30 40 130 80