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:
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* PROJECT: DVS
|
||||
* SUBSYSTEM: VL
|
||||
* MODULE: basictypes.def
|
||||
*
|
||||
* File: $RCSfile: basictypes.def,v $
|
||||
* Revision: $Revision: 0.4 $
|
||||
* Date: $Date: 1993/09/24 11:29:01 $
|
||||
* Author: $Author: jon $
|
||||
* RCS Ident: $Id: basictypes.def,v 0.4 1993/09/24 11:29:01 jon Exp $
|
||||
*
|
||||
* FUNCTION:
|
||||
* This module is used to hold the parameterised definitions of the basic
|
||||
* types used throughout the system for all the machines supported. When
|
||||
* porting to a new architecture all type stuff should be modified in
|
||||
* here. There should be no machine dependant code anywhere else!
|
||||
*
|
||||
* each of the basic type int8 uint8 etc, etc is defined in terms of
|
||||
* standard ansi 'C' types here, and given a enum name for conveniance.
|
||||
*
|
||||
* The format is DEF_TYPE ( <enum name>, <type name>, <ansi 'C' equiv> )
|
||||
*
|
||||
* $Log: basictypes.def,v $
|
||||
Revision 0.4 1993/09/24 11:29:01 jon
|
||||
Release 2.0.4
|
||||
|
||||
Revision 1.1 93/07/12 08:12:21 john
|
||||
Initial revision
|
||||
|
||||
# Revision 1.6 1993/03/19 15:24:22 john
|
||||
# added definition for system V release 4.2
|
||||
#
|
||||
# Revision 1.5 1992/09/28 17:19:58 mark
|
||||
# Added definitions for IRIS Indigo
|
||||
#
|
||||
# Revision 1.4 1992/09/15 13:47:54 jeff
|
||||
# now use _SYSV386 not SYSV386
|
||||
#
|
||||
# Revision 1.3 1992/09/15 13:10:32 jeff
|
||||
# added defs for SYSV386 targets.
|
||||
#
|
||||
# Revision 1.2 1992/09/14 13:18:53 jeff
|
||||
# progress, progreess....
|
||||
#
|
||||
# Revision 1.1 1992/07/27 12:24:20 jeff
|
||||
# Initial revision
|
||||
#
|
||||
*
|
||||
* Copyright (c) 1992 Division Ltd.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This Document may not, in whole or in part, be copied,
|
||||
* photocopied, reproduced, translated, or reduced to any
|
||||
* electronic medium or machine readable form without prior
|
||||
* written consent from Division Ltd.
|
||||
*/
|
||||
|
||||
|
||||
DEF_TYPE( INT8, int8, signed char )
|
||||
DEF_TYPE( UINT8, uint8, unsigned char )
|
||||
DEF_TYPE( INT16, int16, signed short )
|
||||
DEF_TYPE( UINT16, uint16, unsigned short )
|
||||
DEF_TYPE( INT32, int32, signed int )
|
||||
DEF_TYPE( UINT32, uint32, unsigned int )
|
||||
DEF_TYPE( FLOAT32, float32, float)
|
||||
DEF_TYPE( FLOAT64, float64, double)
|
||||
|
||||
/*
|
||||
* Note we may need to put ifdefs back in here for some machines IE 64Bit processors ?
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* PROJECT: DVS
|
||||
* SUBSYSTEM: vl
|
||||
* MODULE: basictypes.h
|
||||
*
|
||||
* File: $RCSfile: basictypes.h,v $
|
||||
* Revision: $Revision: 1.1 $
|
||||
* Date: $Date: 1993/07/12 08:12:20 $
|
||||
* Author: $Author: john $
|
||||
* RCS Ident: $Id: basictypes.h,v 1.1 1993/07/12 08:12:20 john Exp $
|
||||
*
|
||||
* FUNCTION:
|
||||
*
|
||||
* This file contains the lowest level definitions needed by
|
||||
* the vl library.
|
||||
*
|
||||
* $Log: basictypes.h,v $
|
||||
* Revision 1.1 1993/07/12 08:12:20 john
|
||||
* Initial revision
|
||||
*
|
||||
* Revision 1.3 1992/08/19 11:50:24 jeff
|
||||
* got rid of temporary bodge definition of agentlist now i've got the real thing.
|
||||
*
|
||||
* Revision 1.2 1992/07/27 13:30:38 jon
|
||||
* Temporary fix. AgentList is uint32 not void type.
|
||||
*
|
||||
* Revision 1.1 1992/07/27 12:24:20 jeff
|
||||
* Initial revision
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1992 Division Ltd.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This Document may not, in whole or in part, be copied,
|
||||
* photocopied, reproduced, translated, or reduced to any
|
||||
* electronic medium or machine readable form without prior
|
||||
* written consent from Division Ltd.
|
||||
*/
|
||||
#ifndef _BASIC_TYPES_H
|
||||
#define _BASIC_TYPES_H
|
||||
|
||||
|
||||
/*
|
||||
* mangle the basictypes.def file to get machine specific low level
|
||||
* definitions for all our basic types.
|
||||
*/
|
||||
#define DEF_TYPE(a,b,c) typedef c b;
|
||||
#include "basictyp.def"
|
||||
#undef DEF_TYPE
|
||||
|
||||
/*
|
||||
* generate an enum list of all the symbolic values for the types.
|
||||
*/
|
||||
#define DEF_TYPE(a,b,c) a,
|
||||
typedef enum BasicType {
|
||||
#include "basictyp.def"
|
||||
LAST_TYPE
|
||||
} BasicType;
|
||||
#undef DEF_TYPE
|
||||
#define BASIC_TYPE_CNT ((int)LAST_TYPE)
|
||||
|
||||
typedef char *String;
|
||||
|
||||
/*
|
||||
* A structure to define the names etc of the basic types for internal
|
||||
* use.
|
||||
*/
|
||||
typedef struct TypeSpec{
|
||||
int8 endian16[3];
|
||||
int8 endian32[5];
|
||||
struct {
|
||||
String name;
|
||||
uint32 size;
|
||||
uint32 alignment;
|
||||
}Sizes[BASIC_TYPE_CNT];
|
||||
} *TypeSpec;
|
||||
|
||||
extern void GenBasicTypes(TypeSpec spec);
|
||||
|
||||
#endif /* _BASIC_TYPES_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,634 @@
|
||||
#ifndef dpl_h
|
||||
#define dpl_h
|
||||
|
||||
/* **************************************************
|
||||
|
||||
Copyright DIVISION Limited (c) 1994
|
||||
All rights reserved
|
||||
|
||||
|
||||
File : dpl.h
|
||||
Project : dpl interface
|
||||
Author : PJA
|
||||
Date : 18/6/94
|
||||
|
||||
Function: Introduces all the datatypes and functions
|
||||
used by the dpl interface
|
||||
|
||||
History : Rev 1.0, 18 / 06 / 1994
|
||||
|
||||
**************************** */
|
||||
|
||||
#include "dpltypes.h"
|
||||
|
||||
/*{{{ DPL API ====> list management*/
|
||||
extern void
|
||||
dpl_AddZoneToScene ( dpl_ZONE *z );
|
||||
extern void
|
||||
dpl_AddViewToScene ( dpl_VIEW *v );
|
||||
extern void
|
||||
dpl_AddZoneToView ( dpl_VIEW *v, dpl_ZONE *z );
|
||||
extern void
|
||||
dpl_AddLightToLmodel ( dpl_LMODEL *lm, dpl_LIGHT *l );
|
||||
extern void
|
||||
dpl_AddLodToObject ( dpl_OBJECT *o, dpl_LOD *lod );
|
||||
extern void
|
||||
dpl_AddGeogroupToLod ( dpl_LOD *l, dpl_GEOGROUP *gg );
|
||||
extern void
|
||||
dpl_AddGeometryToGeogroup ( dpl_GEOGROUP *gg, dpl_GEOMETRY *g );
|
||||
extern void
|
||||
dpl_AddPathToFilepath ( dpl_FILEPATH *fp, dpl_PATHITEM *pi );
|
||||
extern void
|
||||
dpl_AddExtToFilepath ( dpl_FILEPATH *fp, dpl_EXTNITEM *ei );
|
||||
|
||||
extern void
|
||||
dpl_RemoveZoneFromScene ( dpl_ZONE *z );
|
||||
extern void
|
||||
dpl_RemoveViewFromScene ( dpl_VIEW *v );
|
||||
extern void
|
||||
dpl_RemoveZoneFromView ( dpl_VIEW *v, dpl_ZONE *z );
|
||||
extern void
|
||||
dpl_RemoveLightFromLmodel ( dpl_LMODEL *lm, dpl_LIGHT *l );
|
||||
extern void
|
||||
dpl_RemoveLodFromObject ( dpl_OBJECT *o, dpl_LOD *lod );
|
||||
extern void
|
||||
dpl_RemoveGeogroupFromLod ( dpl_LOD *l, dpl_GEOGROUP *gg );
|
||||
extern void
|
||||
dpl_RemoveGeometryFromGeogroup ( dpl_GEOGROUP *gg, dpl_GEOMETRY *g );
|
||||
extern void
|
||||
dpl_RemovePathFromFilepath ( dpl_FILEPATH *fp, dpl_PATHITEM *pi );
|
||||
extern void
|
||||
dpl_RemoveExtFromFilepath ( dpl_FILEPATH *fp, dpl_EXTNITEM *ei );
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> tree management*/
|
||||
extern void
|
||||
dpl_NestDCS ( dpl_DCS *parent, dpl_DCS *child );
|
||||
|
||||
extern void
|
||||
dpl_LinkDCS ( dpl_DCS *bro, dpl_DCS *sis );
|
||||
|
||||
extern void
|
||||
dpl_PruneDCS ( dpl_DCS *node );
|
||||
|
||||
/*}}} */
|
||||
|
||||
/*{{{ DPL API ====> SCENE functions*/
|
||||
|
||||
extern void
|
||||
dpl_DrawScene ( int32 double_buffered );
|
||||
|
||||
extern int32
|
||||
dpl_DrawSceneComplete ( void );
|
||||
|
||||
extern void
|
||||
dpl_WaitSceneComplete ( void );
|
||||
|
||||
extern dpl_ZONE *
|
||||
dpl_GetSceneFirstZone ( void );
|
||||
|
||||
extern dpl_ZONE *
|
||||
dpl_GetSceneNextZone ( void );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> ZONE functions*/
|
||||
|
||||
extern dpl_ZONE *
|
||||
dpl_NewZone ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteZone ( dpl_ZONE *z );
|
||||
|
||||
extern dpl_DCS *
|
||||
dpl_GetZoneRootDcs ( dpl_ZONE *z );
|
||||
|
||||
extern void
|
||||
dpl_SetZoneRootDcs ( dpl_ZONE *z, dpl_DCS *h );
|
||||
|
||||
extern dpl_LMODEL *
|
||||
dpl_GetZoneLmodel ( dpl_ZONE *z );
|
||||
|
||||
extern void
|
||||
dpl_SetZoneLmodel ( dpl_ZONE *z, dpl_LMODEL *lm );
|
||||
|
||||
extern int32
|
||||
dpl_GetZoneEnable ( dpl_ZONE *z );
|
||||
|
||||
extern void
|
||||
dpl_SetZoneEnable ( dpl_ZONE *z, int32 i );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> DCS functions*/
|
||||
|
||||
extern dpl_DCS *
|
||||
dpl_NewDcs ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteDcs ( dpl_DCS *h );
|
||||
|
||||
extern void
|
||||
dpl_GetDcsLinkage ( dpl_DCS *node, dpl_DCS **parent, dpl_DCS **child, dpl_DCS **sibling );
|
||||
|
||||
extern void
|
||||
dpl_SetDcsNode ( dpl_DCS *hnode, dpl_node *cnode );
|
||||
|
||||
#define dpl_SetDcsLight(a,b) dpl_SetDcsNode(a,&(b)->dplnode)
|
||||
#define dpl_SetDcsInstance(a,b) dpl_SetDcsNode(a,&(b)->dplnode)
|
||||
|
||||
extern dpl_node *
|
||||
dpl_GetDcsNode ( dpl_DCS *hnode );
|
||||
|
||||
extern dpl_type
|
||||
dpl_GetDcsNodeType ( dpl_DCS *hnode );
|
||||
|
||||
extern void
|
||||
dpl_SetDcsMatrix ( dpl_DCS *hnode, dpl_MATRIX *m );
|
||||
|
||||
extern void
|
||||
dpl_GetDcsMatrix ( dpl_DCS *hnode, dpl_MATRIX m ) ;
|
||||
|
||||
|
||||
extern void
|
||||
dpl_SetDcsNodeEnable ( dpl_DCS *hnode, int32 enable );
|
||||
|
||||
extern void
|
||||
dpl_SetDcsSubtreeEnable ( dpl_DCS *hnode, int32 enable );
|
||||
|
||||
extern int32
|
||||
dpl_GetDcsNodeEnable ( dpl_DCS *hnode );
|
||||
|
||||
extern int32
|
||||
dpl_GetDcsSubtreeEnable ( dpl_DCS *hnode );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> INSTANCE functions*/
|
||||
|
||||
extern dpl_INSTANCE *
|
||||
dpl_NewInstance ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteInstance ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceObject ( dpl_INSTANCE *i, dpl_OBJECT *o );
|
||||
|
||||
extern dpl_OBJECT *
|
||||
dpl_GetInstanceObject ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceFrontMaterial ( dpl_INSTANCE * i, dpl_MATERIAL *m );
|
||||
|
||||
extern dpl_MATERIAL *
|
||||
dpl_GetInstanceFrontMaterial ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceBackMaterial ( dpl_INSTANCE *i, dpl_MATERIAL *m );
|
||||
|
||||
extern dpl_MATERIAL *
|
||||
dpl_GetInstanceBackMaterial ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceFrontTexture ( dpl_INSTANCE *i, dpl_TEXTURE *t );
|
||||
|
||||
extern dpl_TEXTURE *
|
||||
dpl_GetInstanceFrontTexture ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceBackTexture ( dpl_INSTANCE *i, dpl_TEXTURE *t );
|
||||
|
||||
extern dpl_TEXTURE *
|
||||
dpl_GetInstanceBackTexture ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceForceLOD ( dpl_INSTANCE *i, dpl_LOD *l );
|
||||
|
||||
extern dpl_LOD *
|
||||
dpl_GetInstanceForceLOD ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceBillboard ( dpl_INSTANCE *i, int32 b );
|
||||
|
||||
extern int32
|
||||
dpl_GetInstanceBillboard ( dpl_INSTANCE *i );
|
||||
|
||||
extern void
|
||||
dpl_SetInstanceIntersect ( dpl_INSTANCE *i, dpl_isect_mode m );
|
||||
|
||||
extern dpl_isect_mode
|
||||
dpl_GetInstanceIntersect ( dpl_INSTANCE *i );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> LIGHT functions*/
|
||||
|
||||
extern dpl_LMODEL *
|
||||
dpl_NewLmodel ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteLmodel ( dpl_LMODEL *lm );
|
||||
|
||||
extern dpl_LIGHT *
|
||||
dpl_GetLmodelFirstLight ( dpl_LMODEL *lm );
|
||||
|
||||
extern dpl_LIGHT *
|
||||
dpl_GetLmodelNextLight ( dpl_LMODEL *lm );
|
||||
|
||||
extern dpl_LIGHT *
|
||||
dpl_NewLight ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteLight ( dpl_LIGHT *l );
|
||||
|
||||
extern void
|
||||
dpl_SetLightType ( dpl_LIGHT *l, dpl_light_type t );
|
||||
|
||||
extern dpl_light_type
|
||||
dpl_GetLightType ( dpl_LIGHT *l );
|
||||
|
||||
extern void
|
||||
dpl_SetLightColor ( dpl_LIGHT *l, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetLightColor ( dpl_LIGHT *l, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetLightRadii ( dpl_LIGHT *l, float32 r0, float32 r1 );
|
||||
|
||||
extern void
|
||||
dpl_GetLightRadii ( dpl_LIGHT *l, float32 *r0,float32 *r1 );
|
||||
|
||||
extern void
|
||||
dpl_SetLightUmbra ( dpl_LIGHT *l, float32 th1, float32 th2 );
|
||||
|
||||
extern void
|
||||
dpl_GetLightUmbra ( dpl_LIGHT *l, float32 *th1, float32 *th2 );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> VIEW functions*/
|
||||
|
||||
extern dpl_VIEW *
|
||||
dpl_NewView ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteView ( dpl_VIEW *v );
|
||||
|
||||
extern void
|
||||
dpl_SetViewMatrix ( dpl_VIEW *v, dpl_MATRIX m );
|
||||
|
||||
extern void
|
||||
dpl_GetViewMatrix ( dpl_VIEW *v, dpl_MATRIX m );
|
||||
|
||||
extern void
|
||||
dpl_SetViewClipPlanes ( dpl_VIEW *v, float32 hither, float32 yon );
|
||||
|
||||
extern void
|
||||
dpl_GetViewClipPlanes ( dpl_VIEW *v, float32 *hither, float32 *yon );
|
||||
|
||||
extern void
|
||||
dpl_SetViewBackGround ( dpl_VIEW *v, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetViewBackGround ( dpl_VIEW *v, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetViewFog ( dpl_VIEW *v, int32 enable,
|
||||
float32 r, float32 g, float32 b,
|
||||
float32 neer, float32 phar );
|
||||
|
||||
extern void
|
||||
dpl_GetViewFog ( dpl_VIEW *v, int32 *enable,
|
||||
float32 *r, float32 *g, float32 *b,
|
||||
float32 *neer, float32 *phar );
|
||||
|
||||
extern void
|
||||
dpl_SetViewProjection ( dpl_VIEW *v,
|
||||
float32 x_size, float32 y_size,
|
||||
float32 x0, float32 y0,
|
||||
float32 x1, float32 y1,
|
||||
float32 zeye );
|
||||
|
||||
extern void
|
||||
dpl_GetViewProjection ( dpl_VIEW *v,
|
||||
float32 *x_size, float32 *y_size,
|
||||
float32 *x0, float32 *y0,
|
||||
float32 *x1, float32 *y1,
|
||||
float32 *zeye );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> MATERIAL functions*/
|
||||
|
||||
extern dpl_MATERIAL *
|
||||
dpl_NewMaterial ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteMaterial ( dpl_MATERIAL *m );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialAmbient ( dpl_MATERIAL *m, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetMaterialAmbient ( dpl_MATERIAL *m, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialEmissive ( dpl_MATERIAL *m, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetMaterialEmissive ( dpl_MATERIAL *m, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialDiffuse ( dpl_MATERIAL *m, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetMaterialDiffuse ( dpl_MATERIAL *m, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialSpecular ( dpl_MATERIAL *m, float32 r, float32 g, float32 b, float32 shininess );
|
||||
|
||||
extern void
|
||||
dpl_GetMaterialSpecular ( dpl_MATERIAL *m, float32 *r, float32 *g, float32 *b, float32 *shininess );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialOpacity ( dpl_MATERIAL *m, float32 r, float32 g, float32 b );
|
||||
|
||||
extern void
|
||||
dpl_GetMaterialOpacity ( dpl_MATERIAL *m, float32 *r, float32 *g, float32 *b );
|
||||
|
||||
extern void
|
||||
dpl_SetMaterialTexture ( dpl_MATERIAL *m, dpl_TEXTURE *t );
|
||||
|
||||
extern dpl_TEXTURE *
|
||||
dpl_GetMaterialTexture ( dpl_MATERIAL *m );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> TEXTURE functions*/
|
||||
|
||||
extern dpl_TEXMAP *
|
||||
dpl_NewTexMap ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteTexMap ( dpl_TEXMAP *tm );
|
||||
|
||||
extern void
|
||||
dpl_SetTexMapEdgeSize ( dpl_TEXMAP *tm, int32 u, int32 v );
|
||||
|
||||
extern void
|
||||
dpl_GetTexMapEdgeSize ( dpl_TEXMAP *tm, int32 *u, int32 *v );
|
||||
|
||||
extern void
|
||||
dpl_SetTexMapTexelSize ( dpl_TEXMAP *tm, int32 bytes_per_pixel );
|
||||
|
||||
extern int32
|
||||
dpl_GetTexMapTexelSize ( dpl_TEXMAP *tm );
|
||||
|
||||
extern void
|
||||
dpl_SetTexMapTexels ( dpl_TEXMAP *tm,
|
||||
int32 *texels,
|
||||
int32 u_size,
|
||||
int32 v_size,
|
||||
int32 mode );
|
||||
|
||||
extern dpl_TEXTURE *
|
||||
dpl_NewTexture ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteTexture ( dpl_TEXTURE *t );
|
||||
|
||||
extern void
|
||||
dpl_SetTextureMode ( dpl_TEXTURE *t, int32 m );
|
||||
|
||||
extern int32
|
||||
dpl_GetTextureMode ( dpl_TEXTURE *t );
|
||||
|
||||
extern int32
|
||||
dpl_LoadTexmap ( dpl_TEXMAP *t, char *fname );
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> RAMP functions*/
|
||||
extern dpl_RAMP *
|
||||
dpl_NewRamp ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteRamp ( dpl_RAMP *m );
|
||||
|
||||
extern void
|
||||
dpl_SetRampColors ( dpl_RAMP *m,
|
||||
float r0, float g0, float b0,
|
||||
float r1, float g1, float b1 );
|
||||
|
||||
extern void
|
||||
dpl_GetRampColors ( dpl_RAMP *m, float *r0, float *g0, float *b0,
|
||||
float *r1, float *g1, float *b1 );
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> FILEPATH CONTROL functions*/
|
||||
|
||||
extern dpl_FILEPATH *
|
||||
dpl_NewFilePath ( void );
|
||||
|
||||
extern dpl_PATHITEM *
|
||||
dpl_NewPathItem ( void );
|
||||
|
||||
extern dpl_EXTNITEM *
|
||||
dpl_NewExtnItem ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteFilePath ( dpl_FILEPATH *fp );
|
||||
|
||||
extern void
|
||||
dpl_DeletePathItem ( dpl_PATHITEM *fp );
|
||||
|
||||
extern void
|
||||
dpl_DeleteExtnItem ( dpl_PATHITEM *fp );
|
||||
|
||||
extern void
|
||||
dpl_SetPathItemPath ( dpl_PATHITEM *i, char *s );
|
||||
|
||||
extern char *
|
||||
dpl_GetPathItemPath ( dpl_PATHITEM *p );
|
||||
|
||||
extern void
|
||||
dpl_SetExtnItemExtn ( dpl_EXTNITEM *p, char *s );
|
||||
|
||||
extern char *
|
||||
dpl_GetExtnItemExtn ( dpl_EXTNITEM *p );
|
||||
|
||||
extern void
|
||||
dpl_SetExtnItemLoadFunc ( dpl_EXTNITEM *p, load_function l );
|
||||
|
||||
extern load_function
|
||||
dpl_GetExtnItemLoadFunc ( dpl_EXTNITEM *p );
|
||||
|
||||
extern void
|
||||
dpl_SetGeometryFilePath ( dpl_FILEPATH *fp );
|
||||
|
||||
extern dpl_FILEPATH *
|
||||
dpl_GetGeometryFilePath ( void );
|
||||
|
||||
extern void
|
||||
dpl_SetTextureFilePath ( dpl_FILEPATH *fp );
|
||||
|
||||
extern dpl_FILEPATH *
|
||||
dpl_GetTextureFilePath ( void );
|
||||
|
||||
extern char *
|
||||
dpl_FindFile ( dpl_FILEPATH *fp, char *root_name, load_function *ext_func );
|
||||
|
||||
extern char *
|
||||
dpl_FindGeometryFile ( char *root_name, load_function *ext_func );
|
||||
|
||||
extern char *
|
||||
dpl_FindTextureFile ( char *root_name, load_function *ext_func );
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> GEOMETRY functions*/
|
||||
|
||||
extern dpl_OBJECT *
|
||||
dpl_NewObject ( void );
|
||||
|
||||
extern dpl_LOD *
|
||||
dpl_NewLod ( void );
|
||||
|
||||
extern dpl_GEOGROUP *
|
||||
dpl_NewGeogroup ( void );
|
||||
|
||||
extern dpl_GEOMETRY *
|
||||
dpl_NewGeometry ( void );
|
||||
|
||||
extern dpl_LOD *
|
||||
dpl_GetObjectFirstLod ( dpl_OBJECT *o );
|
||||
|
||||
extern dpl_LOD *
|
||||
dpl_GetObjectNextLod ( dpl_OBJECT *o );
|
||||
|
||||
extern void
|
||||
dpl_DeleteObject ( dpl_OBJECT *o );
|
||||
|
||||
extern void
|
||||
dpl_DeleteLod ( dpl_LOD *o );
|
||||
|
||||
extern void
|
||||
dpl_DeleteGeogroup ( dpl_GEOGROUP *o );
|
||||
|
||||
extern void
|
||||
dpl_DeleteGeometry ( dpl_GEOMETRY *o );
|
||||
|
||||
extern dpl_geo_type
|
||||
dpl_GetGeometryGeotype ( dpl_GEOMETRY *g );
|
||||
|
||||
extern void
|
||||
dpl_SetGeometryGeotype ( dpl_GEOMETRY *g, dpl_geo_type gt );
|
||||
|
||||
extern int32
|
||||
dpl_SetGeometryVertices ( dpl_GEOMETRY *g,
|
||||
dpl_VERTEX_LIST *v,
|
||||
dpl_CONNECTION_LIST *con );
|
||||
|
||||
extern int32
|
||||
dpl_GetGeometryNumVertices ( dpl_GEOMETRY *g );
|
||||
|
||||
extern dpl_VERTEX *
|
||||
dpl_GetGeometryVertex ( dpl_GEOMETRY *g, int vertex_index );
|
||||
|
||||
extern int32
|
||||
dpl_GetGeometryNumConnections ( dpl_GEOMETRY *g );
|
||||
|
||||
extern dpl_CONNECTION *
|
||||
dpl_GetGeometryConnection ( dpl_GEOMETRY *g, int vertex_index );
|
||||
|
||||
extern dpl_VERTEX_LIST *
|
||||
dpl_NewVertices ( int n_vertices );
|
||||
|
||||
extern dpl_CONNECTION_LIST *
|
||||
dpl_NewConnections ( int n_connections );
|
||||
|
||||
extern void
|
||||
dpl_BoundLod ( dpl_LOD *lod );
|
||||
|
||||
extern void
|
||||
dpl_BoundGeogroup ( dpl_GEOGROUP *gg );
|
||||
|
||||
extern int32
|
||||
dpl_LoadObject ( dpl_OBJECT *o, char *fname );
|
||||
|
||||
extern void
|
||||
dpl_MorphObject ( dpl_OBJECT *morphed,
|
||||
dpl_OBJECT *a,
|
||||
dpl_OBJECT *b, float32 alpha );
|
||||
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> NAMETABLE ACCESS functions*/
|
||||
extern dpl_NAME *
|
||||
dpl_NewName ( void );
|
||||
|
||||
extern void
|
||||
dpl_DeleteName ( dpl_NAME *n );
|
||||
|
||||
extern void
|
||||
dpl_SetNameString ( dpl_NAME *n, char * s );
|
||||
|
||||
extern void
|
||||
dpl_SetNameNode ( dpl_NAME *n, dpl_node *dn );
|
||||
|
||||
extern void
|
||||
dpl_AddNameToNametable ( dpl_NAME *n );
|
||||
|
||||
extern void
|
||||
dpl_RemoveNameFromNametable ( dpl_NAME *n );
|
||||
|
||||
extern void
|
||||
dpl_NameNode ( dpl_node *n, char *s );
|
||||
|
||||
extern dpl_node *
|
||||
dpl_FindNamedNode ( char *str );
|
||||
|
||||
extern dpl_node *
|
||||
dpl_FindNamedTypedNode ( dpl_type t, char *str );
|
||||
|
||||
extern void
|
||||
dpl_ClearNameTable ( void );
|
||||
|
||||
extern char *
|
||||
dpl_TypeToString ( dpl_type t );
|
||||
/*}}} */
|
||||
/*{{{ DPL API ====> GENERAL CONTROL functions*/
|
||||
extern void
|
||||
dpl_SetWarningLevel ( int32 w );
|
||||
|
||||
extern int32
|
||||
dpl_GetWarningLevel ( void );
|
||||
|
||||
extern int32
|
||||
dpl_Init ( char *dpl_arg );
|
||||
|
||||
extern void
|
||||
dpl_Exit ( int32 exit_code );
|
||||
|
||||
extern void
|
||||
dpl_SetCacheMode ( dpl_cache_mode m );
|
||||
|
||||
extern dpl_cache_mode
|
||||
dpl_GetCacheMode ();
|
||||
|
||||
extern dpl_STATISTICS
|
||||
dpl_Statistics ( void );
|
||||
|
||||
extern dpl_VERSION
|
||||
dpl_Version ( void );
|
||||
|
||||
extern char *
|
||||
dpl_Status ( void );
|
||||
|
||||
extern void
|
||||
dpl_ReadFrameStore ( int32 *pixels, int32 x, int32 y, int32 n_pixels );
|
||||
|
||||
extern dpl_INSTANCE *
|
||||
dpl_SectVector ( dpl_POINT sect,
|
||||
float32 x0, float32 y0, float32 z0,
|
||||
float32 x1, float32 y1, float32 z1 );
|
||||
|
||||
extern dpl_INSTANCE *
|
||||
dpl_SectPixel ( dpl_POINT sect, float32 x, float32 y );
|
||||
|
||||
|
||||
/*}}} */
|
||||
|
||||
#define dpl_Flush(n) (((dpl_node *)(n))->flush)((dpl_node *)(n))
|
||||
#define dpl_Hide(n) (((dpl_node *)(n))->hide)((dpl_node *)(n))
|
||||
#define dpl_Unhide(n) (((dpl_node *)(n))->unhide)((dpl_node *)(n))
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,501 @@
|
||||
#ifndef dpltyp_h
|
||||
#define dpltyp_h
|
||||
|
||||
/* **************************************************
|
||||
|
||||
Copyright DIVISION Limited (c) 1994
|
||||
All rights reserved
|
||||
|
||||
|
||||
File : dpltypes.h
|
||||
Project : dpl interface
|
||||
Author : PJA
|
||||
Date : 18/6/94
|
||||
|
||||
Function: Introduces all the datatypes
|
||||
|
||||
History : Rev 1.0, 18 / 06 / 1994
|
||||
1.1, 22 / 06 / 1994 fixed unimplementable lists by
|
||||
introducing dpl_superlist
|
||||
1.2, 27 / 06 / 1994 dislocated heirarchy from instances
|
||||
and dropped back to matrix-only DCS
|
||||
|
||||
**************************** */
|
||||
|
||||
#include "basictyp.h"
|
||||
|
||||
typedef enum dpl_type {
|
||||
dpl_type_error,
|
||||
dpl_type_scene,
|
||||
dpl_type_zone,
|
||||
dpl_type_view,
|
||||
dpl_type_instance,
|
||||
dpl_type_dcs,
|
||||
dpl_type_lmodel,
|
||||
dpl_type_light,
|
||||
dpl_type_object,
|
||||
dpl_type_lod,
|
||||
dpl_type_geogroup,
|
||||
dpl_type_geometry,
|
||||
dpl_type_material,
|
||||
dpl_type_texmap,
|
||||
dpl_type_texture,
|
||||
dpl_type_ramp,
|
||||
dpl_type_filepath,
|
||||
dpl_type_pathitem,
|
||||
dpl_type_extnitem,
|
||||
dpl_type_nameitem
|
||||
} dpl_type;
|
||||
|
||||
typedef enum dpl_light_type {
|
||||
dpl_light_type_error,
|
||||
dpl_light_type_disable,
|
||||
dpl_light_type_ambient,
|
||||
dpl_light_type_directional,
|
||||
dpl_light_type_point,
|
||||
dpl_light_type_conical
|
||||
} dpl_light_type;
|
||||
|
||||
typedef enum dpl_cache_mode {
|
||||
dpl_cache_mode_error,
|
||||
dpl_cache_mode_write_back,
|
||||
dpl_cache_mode_write_thru
|
||||
} dpl_cache_mode;
|
||||
|
||||
typedef enum dpl_geo_type {
|
||||
dpl_g_type_error,
|
||||
dpl_g_type_empty,
|
||||
dpl_g_type_tristrip,
|
||||
dpl_g_type_polystrip,
|
||||
dpl_g_type_pmesh,
|
||||
dpl_g_type_spheres,
|
||||
dpl_g_type_string,
|
||||
dpl_g_type_lines,
|
||||
dpl_g_type_polyline
|
||||
} dpl_geo_type;
|
||||
|
||||
typedef enum dpl_isect_mode {
|
||||
dpl_isect_mode_error,
|
||||
dpl_isect_mode_none,
|
||||
dpl_isect_mode_obj,
|
||||
dpl_isect_mode_geogroup,
|
||||
dpl_isect_mode_geometry
|
||||
} dpl_isect_mode;
|
||||
|
||||
/* forward declare everything - it gets circular down there */
|
||||
|
||||
#define dpl_arg_sep '~'
|
||||
|
||||
#define dcs_node_enable 0x1
|
||||
#define dcs_subtree_enable 0x2
|
||||
|
||||
#define dpl_draw_faceted 0x00
|
||||
#define dpl_draw_smooth 0x01
|
||||
#define dpl_draw_colored 0x02
|
||||
#define dpl_draw_luminance 0x04
|
||||
#define dpl_draw_textured 0x08
|
||||
#define dpl_draw_3dtextured 0x10
|
||||
#define dpl_draw_front 0x200
|
||||
#define dpl_draw_back 0x400
|
||||
|
||||
#define dpl_X 0
|
||||
#define dpl_Y 1
|
||||
#define dpl_Z 2
|
||||
#define dpl_W 3
|
||||
|
||||
#ifdef MS_DOS
|
||||
#define dpl_path_separator '\\'
|
||||
#else
|
||||
#define dpl_path_separator '/'
|
||||
#endif
|
||||
|
||||
/*
|
||||
NOTE in rpc implementations, the rather large overhead
|
||||
of the dpl_node dplnode is never passed over to the
|
||||
remote renderer, its just in the host space for management
|
||||
*/
|
||||
|
||||
typedef int32 (*node_function)( struct s_dplnode *);
|
||||
|
||||
typedef struct s_dplnode {
|
||||
void *app_specific;
|
||||
int32 hidden;
|
||||
node_function ghost_create;
|
||||
node_function ghost_delete;
|
||||
node_function flush;
|
||||
node_function hide;
|
||||
node_function unhide;
|
||||
int32 ref_count;
|
||||
void *remote;
|
||||
dpl_type type_check;
|
||||
} dpl_node;
|
||||
|
||||
typedef dpl_node* (*node_create_function)( void );
|
||||
|
||||
typedef struct s_dplremote_node {
|
||||
void *remote;
|
||||
dpl_type type_check;
|
||||
} dpl_remote_node;
|
||||
|
||||
#ifdef REMOTE
|
||||
#define dpl_node dpl_remote_node
|
||||
#endif
|
||||
|
||||
typedef int32 (*load_function)( dpl_node *, char * );
|
||||
|
||||
typedef struct s_dpllist {
|
||||
dpl_node *item;
|
||||
dpl_type type_check;
|
||||
struct s_dpllist *next;
|
||||
struct s_dpllist *prev;
|
||||
} dpl_list;
|
||||
|
||||
/*
|
||||
the dpl_superlist is used as the head node for
|
||||
dpl_lists
|
||||
*/
|
||||
|
||||
typedef struct s_dplsuperlist {
|
||||
dpl_node *dplnode;
|
||||
|
||||
dpl_list *last_accessed;
|
||||
dpl_list *head;
|
||||
dpl_list *tail;
|
||||
} dpl_superlist;
|
||||
|
||||
typedef struct s_dplscene {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_superlist zone_list;
|
||||
dpl_superlist view_list;
|
||||
} dpl_SCENE;
|
||||
|
||||
/* MATRICES are embedded in VIEWs and in HNODEs */
|
||||
|
||||
typedef float32 dpl_POINT [4];
|
||||
typedef float32 dpl_MATRIX[4][4];
|
||||
|
||||
/* ****************************
|
||||
the HNODE is a heirarchy node, a general binary
|
||||
tree contruction node. It contains links up, down and
|
||||
along the tree, plus a local data pointer, the dpl_node*
|
||||
|
||||
the dpl_node* in here may be NULL, in which case
|
||||
the HNODE is operating as an articulation point,
|
||||
it may be a dpl_INSTANCE, or it may be a dpl_LIGHT.
|
||||
any other node type in an HNODE is illegal, and
|
||||
strictly enforceable
|
||||
|
||||
The renderer's cull phase must traverse the whole tree,
|
||||
in order that lights embedded in the tree have their location /
|
||||
direction cosine correctly set. We may still cull the rendering
|
||||
of sub-trees by clearing the sub-tree enable bit of the HNODE.
|
||||
|
||||
*/
|
||||
|
||||
typedef struct s_dpldcs {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_node *node;
|
||||
dpl_MATRIX matrix;
|
||||
int32 enable;
|
||||
int32 identity; /* a traversal optimization */
|
||||
struct s_dpldcs *parent;
|
||||
struct s_dpldcs *sibling;
|
||||
struct s_dpldcs *child;
|
||||
} dpl_DCS;
|
||||
|
||||
typedef struct s_dplview {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_MATRIX matrix;
|
||||
int32 enable;
|
||||
float32 x0, y0, x1, y1, zeye;
|
||||
float32 x_size, y_size;
|
||||
float32 hither_clip;
|
||||
float32 yon_clip;
|
||||
float32 back_color[3];
|
||||
int32 fog_enable;
|
||||
float32 fog[5]; /* near, phar, r, g, b */
|
||||
dpl_superlist zone_list;
|
||||
} dpl_VIEW;
|
||||
|
||||
|
||||
typedef struct s_dpllmodel {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_superlist light_list;
|
||||
} dpl_LMODEL;
|
||||
|
||||
typedef struct s_dpllight {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_DCS *dcs;
|
||||
int32 light_type;
|
||||
float32 color [3];
|
||||
float32 radius [2]; /* for radial lights */
|
||||
float32 umbra [2]; /* for conical lights */
|
||||
#ifdef REMOTE
|
||||
float32 position[3];
|
||||
#endif
|
||||
} dpl_LIGHT;
|
||||
|
||||
typedef struct s_dplzone {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_DCS *root;
|
||||
dpl_LMODEL *lmodel;
|
||||
int32 enable;
|
||||
} dpl_ZONE;
|
||||
|
||||
typedef struct s_dpltexture {
|
||||
dpl_node dplnode;
|
||||
|
||||
struct s_dpltexmap *texmap;
|
||||
|
||||
int32 minify;
|
||||
int32 magnify;
|
||||
int32 alpha;
|
||||
int32 wrap_u;
|
||||
int32 wrap_v;
|
||||
int32 detail;
|
||||
float32 u0;
|
||||
float32 v0;
|
||||
float32 du;
|
||||
float32 dv;
|
||||
float32 animate_time;
|
||||
int32 animate_behaviour;
|
||||
} dpl_TEXTURE;
|
||||
|
||||
typedef struct s_dpltexmap {
|
||||
dpl_node dplnode;
|
||||
|
||||
int32 *texels;
|
||||
int32 u_size;
|
||||
int32 v_size;
|
||||
int32 bits_per_texel;
|
||||
#if REMOTE
|
||||
int32 hwareSize;
|
||||
int32 hwareOffs;
|
||||
int32 bilinear;
|
||||
#endif
|
||||
} dpl_TEXMAP;
|
||||
|
||||
|
||||
typedef struct s_dplramp {
|
||||
dpl_node dplnode;
|
||||
|
||||
float32 color0[3];
|
||||
float32 color1[3];
|
||||
} dpl_RAMP;
|
||||
|
||||
typedef struct s_dplmtl {
|
||||
dpl_node dplnode;
|
||||
|
||||
struct s_dpltexture *texture;
|
||||
float32 emissive [3];
|
||||
float32 ambient [3];
|
||||
float32 diffuse [3];
|
||||
float32 opacity [3];
|
||||
float32 specular [4];
|
||||
dpl_RAMP *ramp;
|
||||
} dpl_MATERIAL;
|
||||
|
||||
|
||||
typedef struct s_dplinstance {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_DCS *dcs;
|
||||
int32 billboard;
|
||||
dpl_isect_mode intersectmode;
|
||||
struct s_dplobject *object;
|
||||
struct s_dpllod *forcelod;
|
||||
struct s_dplmtl *f_material;
|
||||
struct s_dplmtl *b_material;
|
||||
struct s_dpltexture *f_texture;
|
||||
struct s_dpltexture *b_texture;
|
||||
#if REMOTE
|
||||
int32 frame_count;
|
||||
int32 last_LOD_index;
|
||||
#endif
|
||||
} dpl_INSTANCE;
|
||||
|
||||
typedef struct s_dplobject {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_superlist lod_list;
|
||||
} dpl_OBJECT;
|
||||
|
||||
typedef struct s_dpllod {
|
||||
dpl_node dplnode;
|
||||
|
||||
float32 bounds[2][4];
|
||||
dpl_OBJECT *parent;
|
||||
dpl_superlist geogroup_list;
|
||||
float32 switch_in;
|
||||
float32 switch_out;
|
||||
} dpl_LOD;
|
||||
|
||||
typedef struct s_dplgeogroup {
|
||||
dpl_node dplnode;
|
||||
|
||||
float32 bounds[2][4];
|
||||
dpl_LOD *parent;
|
||||
int32 draw_mode;
|
||||
dpl_superlist geometry_list;
|
||||
dpl_MATERIAL *f_material;
|
||||
dpl_MATERIAL *b_material;
|
||||
} dpl_GEOGROUP;
|
||||
|
||||
/* NBB these geometry primitives are NOT supersets of dpl_node */
|
||||
|
||||
typedef struct s_vert {
|
||||
dpl_POINT position; /* x, y, z, w */
|
||||
dpl_POINT normcol; /* r, g, b alpha */
|
||||
float32 texcoords [3];
|
||||
struct s_vert *next;
|
||||
} dpl_HOST_VERTEX;
|
||||
|
||||
typedef struct s_rvert {
|
||||
dpl_POINT position; /* 0 */
|
||||
dpl_POINT normcol; /* 16 */
|
||||
float32 texcoords [3]; /* 32 */
|
||||
struct s_rvert *next; /* 44 */
|
||||
dpl_POINT xform_posn; /* 48 */
|
||||
float32 rendered_color[3]; /* 64 */
|
||||
int32 touched; /* 76 */
|
||||
} dpl_REMOTE_VERTEX;
|
||||
|
||||
typedef struct s_rconn {
|
||||
struct s_rconn *next;
|
||||
int32 n_verts;
|
||||
int32 indices[6]; /* allow up to hexagons, make structure 8 words long */
|
||||
} dpl_HOST_CONNECTION;
|
||||
|
||||
typedef struct s_conn {
|
||||
struct s_conn *next; /* 0 */
|
||||
int32 n_verts; /* 4 */
|
||||
dpl_REMOTE_VERTEX* indices[6]; /* 8 */
|
||||
dpl_POINT planeEqn; /* 32 */
|
||||
float32 rendered_color[3]; /* 48 */
|
||||
int32 touched; /* 60 */
|
||||
} dpl_REMOTE_CONNECTION;
|
||||
|
||||
#define DPL_VERTICES_PER_BLOCK 8
|
||||
#define DPL_CONNECTIONS_PER_BLOCK 8
|
||||
|
||||
typedef struct s_vert_list {
|
||||
struct s_vert_list *next;
|
||||
int32 n_vertices;
|
||||
dpl_HOST_VERTEX vertices[DPL_VERTICES_PER_BLOCK];
|
||||
} dpl_HOST_VERTEX_LIST;
|
||||
|
||||
typedef struct s_conn_list {
|
||||
struct s_conn_list *next;
|
||||
int32 n_connections;
|
||||
dpl_HOST_CONNECTION connections[DPL_CONNECTIONS_PER_BLOCK];
|
||||
} dpl_HOST_CONNECTION_LIST;
|
||||
|
||||
typedef struct s_rvert_list {
|
||||
struct s_rvert_list *next;
|
||||
int32 n_vertices;
|
||||
dpl_REMOTE_VERTEX vertices[DPL_VERTICES_PER_BLOCK];
|
||||
} dpl_REMOTE_VERTEX_LIST;
|
||||
|
||||
typedef struct s_rconn_list {
|
||||
struct s_rconn_list *next;
|
||||
int32 n_connections;
|
||||
dpl_REMOTE_CONNECTION connections[DPL_CONNECTIONS_PER_BLOCK];
|
||||
} dpl_REMOTE_CONNECTION_LIST;
|
||||
|
||||
#if REMOTE
|
||||
#define dpl_VERTEX dpl_REMOTE_VERTEX
|
||||
#define dpl_VERTEX_LIST dpl_REMOTE_VERTEX_LIST
|
||||
#define dpl_CONNECTION dpl_REMOTE_CONNECTION
|
||||
#define dpl_CONNECTION_LIST dpl_REMOTE_CONNECTION_LIST
|
||||
#else
|
||||
#define dpl_VERTEX dpl_HOST_VERTEX
|
||||
#define dpl_VERTEX_LIST dpl_HOST_VERTEX_LIST
|
||||
#define dpl_CONNECTION dpl_HOST_CONNECTION
|
||||
#define dpl_CONNECTION_LIST dpl_HOST_CONNECTION_LIST
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct s_dplgeometry {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_geo_type geometry_type;
|
||||
|
||||
dpl_GEOGROUP *parent;
|
||||
dpl_CONNECTION_LIST *connections;
|
||||
dpl_VERTEX_LIST *vertices;
|
||||
#if REMOTE
|
||||
int32 variable_alpha;
|
||||
#endif
|
||||
|
||||
} dpl_GEOMETRY;
|
||||
|
||||
typedef struct s_dplnameitem {
|
||||
dpl_node dplnode;
|
||||
|
||||
char *name;
|
||||
dpl_node *item;
|
||||
} dpl_NAME;
|
||||
|
||||
typedef struct s_dplpathitem {
|
||||
dpl_node dplnode;
|
||||
|
||||
char *path;
|
||||
} dpl_PATHITEM;
|
||||
|
||||
typedef struct s_dplextnitem {
|
||||
dpl_node dplnode;
|
||||
|
||||
char *extn;
|
||||
load_function load_ext;
|
||||
} dpl_EXTNITEM;
|
||||
|
||||
typedef struct s_dpl_filepath {
|
||||
dpl_node dplnode;
|
||||
|
||||
dpl_superlist path_list;
|
||||
dpl_superlist extn_list;
|
||||
} dpl_FILEPATH;
|
||||
|
||||
/* ******************************************
|
||||
|
||||
BEWARE ! ! ! ! !
|
||||
|
||||
FOR REASONS OF STORAGE AND APPLICATIONS EFFICIENCY, THE FOLLOWING
|
||||
DATA TYPES ARE N O T SUPERSETS OF DPL_NODE
|
||||
|
||||
BE CAREFUL DEALING WITH VERTICES
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* typedefs for tracing performance */
|
||||
|
||||
typedef struct s_dpl_statistics {
|
||||
float32 polys_in_last_frame;
|
||||
float32 last_edit_time;
|
||||
float32 last_cull_time;
|
||||
float32 last_frame_time;
|
||||
float32 last_frame_time_sb;
|
||||
float32 polys_per_second;
|
||||
float32 polys_per_second_sb;
|
||||
} dpl_STATISTICS;
|
||||
|
||||
typedef struct s_dpl_version {
|
||||
int32 host;
|
||||
int32 major_version;
|
||||
int32 minor_version;
|
||||
int32 firmware_major_version;
|
||||
int32 firmware_minor_version;
|
||||
char detailed[256];
|
||||
} dpl_VERSION;
|
||||
|
||||
typedef void (*vfptr)();
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#ifndef matrix_h
|
||||
#define matrix_h
|
||||
|
||||
/* **************************************************
|
||||
|
||||
Copyright DIVISION Limited (c) 1994
|
||||
All rights reserved
|
||||
|
||||
|
||||
File : dpl.h
|
||||
Project : dpl interface
|
||||
Author : PJA
|
||||
Date : 18/6/94
|
||||
|
||||
Function: Introduces all the datatypes and functions
|
||||
used by the dpl interface
|
||||
|
||||
History : Rev 1.0, 18 / 06 / 1994
|
||||
|
||||
**************************** */
|
||||
|
||||
#include "dpltypes.h"
|
||||
|
||||
extern void dpl_SetAngleMode( int degrees );
|
||||
extern void dpl_IdMatrix ( dpl_MATRIX m );
|
||||
extern void dpl_Translate( dpl_MATRIX m, float32 dx, float32 dy, float32 dz );
|
||||
extern void dpl_Rotate ( dpl_MATRIX m, float32 angle, int32 axis );
|
||||
extern void dpl_Scale ( dpl_MATRIX m, float32 x, float32 y, float32 z );
|
||||
extern void dpl_Concat ( dpl_MATRIX m, dpl_MATRIX a, dpl_MATRIX b );
|
||||
extern void dpl_Invert ( dpl_MATRIX inverse, dpl_MATRIX mat );
|
||||
extern void dpl_XformPoint ( dpl_POINT q, dpl_POINT p, dpl_MATRIX m );
|
||||
#endif
|
||||
Reference in New Issue
Block a user