mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
git subrepo clone https://github.com/HarbourMasters/soh.git
subrepo: subdir: "soh" merged: "ba904bbd0" upstream: origin: "https://github.com/HarbourMasters/soh.git" branch: "master" commit: "ba904bbd0" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
0bb0e7b53b
commit
39cc86c260
2466 changed files with 451557 additions and 0 deletions
62
soh/include/z64light.h
Normal file
62
soh/include/z64light.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
#ifndef Z64LIGHT_H
|
||||
#define Z64LIGHT_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "ultra64/gbi.h"
|
||||
#include "z64math.h"
|
||||
#include "color.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 x;
|
||||
/* 0x2 */ s16 y;
|
||||
/* 0x4 */ s16 z;
|
||||
/* 0x6 */ u8 color[3];
|
||||
/* 0x9 */ u8 drawGlow;
|
||||
/* 0xA */ s16 radius;
|
||||
} LightPoint; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s8 x;
|
||||
/* 0x1 */ s8 y;
|
||||
/* 0x2 */ s8 z;
|
||||
/* 0x3 */ u8 color[3];
|
||||
} LightDirectional; // size = 0x6
|
||||
|
||||
typedef union {
|
||||
LightPoint point;
|
||||
LightDirectional dir;
|
||||
} LightParams; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ LightParams params;
|
||||
} LightInfo; // size = 0xE
|
||||
|
||||
typedef struct Lights {
|
||||
/* 0x00 */ u8 numLights;
|
||||
/* 0x08 */ Lightsn l;
|
||||
} Lights; // size = 0x80
|
||||
|
||||
typedef struct LightNode {
|
||||
/* 0x0 */ LightInfo* info;
|
||||
/* 0x4 */ struct LightNode* prev;
|
||||
/* 0x8 */ struct LightNode* next;
|
||||
} LightNode; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ LightNode* listHead;
|
||||
/* 0x4 */ u8 ambientColor[3];
|
||||
/* 0x7 */ u8 fogColor[3];
|
||||
/* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - 1000
|
||||
/* 0xC */ s16 fogFar; // how far until fog starts to saturate. range 0 - 1000
|
||||
} LightContext; // size = 0x10
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ LIGHT_POINT_NOGLOW,
|
||||
/* 0x01 */ LIGHT_DIRECTIONAL,
|
||||
/* 0x02 */ LIGHT_POINT_GLOW
|
||||
} LightType;
|
||||
|
||||
typedef void (*LightsBindFunc)(Lights* lights, LightParams* params, Vec3f* vec);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue