summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authorRozelette <Rozelette@users.noreply.github.com>2021-03-27 14:29:30 -0500
committerGitHub <noreply@github.com>2021-03-27 14:29:30 -0500
commitfee7a49abc84fbe91116f969a90570cff15decde (patch)
tree972de249287b0f1d11f04aeb33d28d4e7140f75e /src/code/z_lib.c
parent012e3c21aeb43437d53a90c2fbd8dfe525d95915 (diff)
z_lights fully matched (#80)
* z_lights OK * Documentation * Fixup for z_collision_check * Improve function types of bind functions * Fixup for types
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index cb48e72d3..9e99b9d85 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -538,11 +538,11 @@ void Math_SmoothScaleMaxS(s16* start, s16 target, s16 scale, s16 maxStep) {
*start += v0;
}
-void Color_RGBA8_Copy(ColorRGBA8* dst, ColorRGBA8* src) {
- dst->red = src->red;
- dst->green = src->green;
- dst->blue = src->blue;
- dst->alpha = src->alpha;
+void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
+ dst->r = src->r;
+ dst->g = src->g;
+ dst->b = src->b;
+ dst->a = src->a;
}
void func_801000A4(u16 a0) {
@@ -569,11 +569,11 @@ void Lib_TranslateAndRotateYVec3f(Vec3f* translation, s16 rotation, Vec3f* src,
}
#ifdef NON_MATCHING
-void Lib_LerpRGB(RGB* a, RGB* b, f32 t, RGB* dst) {
+void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst) {
// XXX regalloc is slightly off
- dst->red = (f32)a->red + ((f32)b->red - (f32)a->red) * t;
- dst->green = (f32)a->green + ((f32)b->green - (f32)a->green) * t;
- dst->blue = (f32)a->blue + ((f32)b->blue - (f32)a->blue) * t;
+ dst->r = (f32)a->r + ((f32)b->r - (f32)a->r) * t;
+ dst->g = (f32)a->g + ((f32)b->g - (f32)a->g) * t;
+ dst->b = (f32)a->b + ((f32)b->b - (f32)a->b) * t;
}
#else
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_lib/Lib_LerpRGB.asm")