libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Light.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
5
6namespace Fast {
7
8/*
9 We have to keep the Pads since its probably an
10 issue from the sdk, because the documentation expects
11 RGBA, but 'Color' has space for RGB only.
12 https://ultra64.ca/files/documentation/online-manuals/functions_reference_manual_2.0i/gsp/gSPLight.html
13*/
14
15struct LightN64 {
16 uint8_t Color[3];
17 int8_t Pad1;
18 uint8_t ColorCopy[3];
19 int8_t Pad2;
20 uint8_t Direction[3];
21 int8_t Pad3;
22};
23
25 uint8_t Color[3];
26 uint8_t Unk0;
27 uint8_t ColorCopy[3];
28 uint8_t Unk1;
29 int16_t Position[3];
30 uint8_t Unk2;
31};
32
38
40 uint8_t Color[3];
41 int8_t Pad1;
42 uint8_t ColorCopy[3];
43 int8_t Pad2;
44};
45
50
51class Light final : public Ship::Resource<LightEntry> {
52 public:
53 using Resource::Resource;
54
55 Light() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {
56 }
57
60
61 private:
62 LightEntry mLight;
63 std::vector<LightData> mLightData;
64};
65} // namespace Fast
Definition Light.h:51
Light()
Definition Light.h:55
size_t GetPointerSize()
Returns the size (in bytes) of the type pointed to by GetRawPointer().
LightEntry * GetPointer()
Returns a typed pointer to the resource payload.
Typed resource base class that provides a strongly-typed pointer accessor.
Definition Resource.h:73
Definition gfx_direct3d_common.h:19
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Definition Light.h:46
AmbientData Ambient
Definition Light.h:47
LightData Light
Definition Light.h:48
Definition Light.h:15
uint8_t ColorCopy[3]
Definition Light.h:18
int8_t Pad1
Definition Light.h:17
uint8_t Direction[3]
Definition Light.h:20
int8_t Pad2
Definition Light.h:19
uint8_t Color[3]
Definition Light.h:16
int8_t Pad3
Definition Light.h:21
Definition Light.h:24
uint8_t ColorCopy[3]
Definition Light.h:27
uint8_t Unk0
Definition Light.h:26
int16_t Position[3]
Definition Light.h:29
uint8_t Unk2
Definition Light.h:30
uint8_t Color[3]
Definition Light.h:25
uint8_t Unk1
Definition Light.h:28
Definition Light.h:39
int8_t Pad2
Definition Light.h:43
uint8_t ColorCopy[3]
Definition Light.h:42
uint8_t Color[3]
Definition Light.h:40
int8_t Pad1
Definition Light.h:41
Definition Light.h:33
PointLightN64 PointLight
Definition Light.h:35
LightN64 Light
Definition Light.h:34
long long int ForceAlignment[2]
Definition Light.h:36