#ifndef __TEST_H__ #define __TEST_H__ #include "shtypes.h" #include "shmath.h" #include "tex.h" #define WAD_ADDR 0x2200000 #define ZONE_ADDR 0x6040000 #define VRAM_ADDR 0x04000000 #define FRAME_BUF_ADDR 0x04000200 #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 224 #define COLOR1 0x0000001c #define COLOR2 0x0000fc00 #define COLOR3 0x000003e0 #define RED 0x0000001c #define BLUE 0x0000fc00 #define GREEN 0x000003e0 #define WHITE 0x0000ffff #define writePixel(a, b, c) \ (*( ((PIXEL *)FRAME_BUF_ADDR) + ( b * SCREEN_WIDTH ) + a ) = \ c ) #define FLOOR( a ) (a & 0xffff0000) struct Vertex { Int16 x; Int16 y; }; typedef struct Vertex Vertex; struct FixVert { Fixed32 x; Fixed32 y; }; typedef struct FixVert FixVert; struct Triangle { Int16 color; Vertex v[3]; }; typedef struct Triangle Triangle; struct Quad { Int16 color; Vertex v[4]; }; typedef struct Quad Quad; struct Line { Int16 color; Vertex v[2]; }; typedef struct Line Line; void quadTex( Quad *poly, Texture *tex ); void cQuadFill( Quad *poly, Int16 color ); void cTriFill( Triangle *poly, Int16 color ); #endif /* __TEST_H__ */