00001
00002 #ifndef VISIBOX_H
00003 #define VISIBOX_H
00004
00005 #ifdef _N64
00006 #include "model.h"
00007 #endif
00008 #include "world.h"
00009
00010
00011
00012 #define VISIBOX_MAX 400
00013 #define VISIBOX_MAX_ID 64
00014
00015 #define VISIBOX_CAMERA 1
00016 #define VISIBOX_CUBE 2
00017
00018 enum {
00019 VISI_AXIS_XY,
00020 VISI_AXIS_XZ,
00021 VISI_AXIS_ZY,
00022 VISI_AXIS_X,
00023 VISI_AXIS_Y,
00024 VISI_AXIS_Z,
00025 };
00026
00027 typedef struct {
00028 char Flag, ID, pad[2];
00029 float xmin, xmax;
00030 float ymin, ymax;
00031 float zmin, zmax;
00032 } VISIBOX;
00033
00034 typedef struct {
00035 VISIMASK Mask;
00036 long ID;
00037 float xmin, xmax;
00038 float ymin, ymax;
00039 float zmin, zmax;
00040 } PERM_VISIBOX;
00041
00042 typedef struct {
00043 long Count;
00044 PERM_VISIBOX *VisiBoxes;
00045 } PERM_VISIBOX_HEADER;
00046
00047
00048
00049 #ifdef _PC
00050 extern void LoadVisiBoxes(char *file);
00051 extern void SaveVisiBoxes(char *file);
00052 extern void EditVisiBoxes(void);
00053 extern void DisplayVisiBoxInfo(VISIBOX *visibox);
00054 extern void DisplayCamVisiMask(void);
00055 extern void DrawVisiBoxes(void);
00056 #else
00057 #ifdef _N64
00058 void LoadVisiBoxes(FIL_ID file);
00059 #endif
00060 #endif
00061 extern void InitVisiBoxes(void);
00062 extern VISIBOX *AllocVisiBox(void);
00063 extern void FreeVisiBox(VISIBOX *visibox);
00064 extern void SetPermVisiBoxes(void);
00065 extern VISIMASK SetObjectVisiMask(BOUNDING_BOX *box);
00066 extern char TestObjectVisiboxes(BOUNDING_BOX *box);
00067 extern void SetCameraVisiMask(VEC *pos);
00068
00069
00070
00071 extern VISIMASK CamVisiMask;
00072 extern long CubeVisiBoxCount, VisiPerPoly;
00073 extern PERM_VISIBOX CubeVisiBox[VISIBOX_MAX];
00074 extern VISIBOX *CurrentVisiBox;
00075
00076 #endif