home *** CD-ROM | disk | FTP | other *** search
- /*
- (c) 1990 S.Hawtin.
- Permission is granted to copy this file provided
- 1) It is not used for commercial gain
- 2) This notice is included in all copies
- 3) Altered copies are marked as such
-
- No liability is accepted for the contents of the file.
-
- 3D.h within NorthC render
- */
-
- /*
- Define the size of the screen, for PAL height is 256 otherwise height is
- 199
- */
- /* Uncomment next line for full PAL screen */
- /* #define PAL */
-
- #define SC_WIDTH 320
-
- #ifdef PAL
- #define SC_HEIGHT 255
- #else
- #define SC_HEIGHT 199
- #endif
-
- #define SC_TOP 10
-
- /* Define the data structures for the simple renderer */
-
- typedef struct
- {int x,y,z;
- } Vector;
-
- typedef struct
- {
- Vector logical; /* Logical position */
- Vector screen; /* Screen position */
- int is_done; /* True if calculation has been done */
- } Vertex;
-
- typedef struct
- {
- Vertex *v1; /* Corners of the triangle */
- Vertex *v2;
- Vertex *v3;
- Vertex centre;
- Vector normal;
- int shade; /* Value between 0..255 for shade */
- } Triangle;
-
- /* Set TEST_LIGHTS to make lights move and object stay still */
- /* #define TEST_LIGHTS 1 */
-
- /* Scale factor for reducing large pictures */
- #define SCALE 1
-