summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-03-23 01:57:53 -0600
committerGitHub <noreply@github.com>2024-03-23 01:57:53 -0600
commitcd7dd6f59a9b0ffb867fcd7b80a6c05def701088 (patch)
tree8c07c17342f850dbad89dd77f215f179572e6db6 /lib
parent5c6fa9c1f6ad4b07426a6f360ccf2d54b0c94cb8 (diff)
Add Mtx, float, and mk64 Factories (#43)
* Create MtxFactory.cpp * Add mtx factory * Implement mtx output * Changed implementation * Update comment * Finish Mtx factory * Add float factory * Add runtime error for untested code * Add DrivingBehaviour factory & fix bug * Remove limit * Add mk64 graphics * Changes * fix * Update * Improve error checking
Diffstat (limited to 'lib')
-rw-r--r--lib/n64graphics/n64graphics.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/n64graphics/n64graphics.c b/lib/n64graphics/n64graphics.c
index 0ff7bc7..39db002 100644
--- a/lib/n64graphics/n64graphics.c
+++ b/lib/n64graphics/n64graphics.c
@@ -509,7 +509,7 @@ rgba* png2rgba(unsigned char* png_input, int size_input, int* width, int* height
}
rgb* png2rgb(unsigned char* png_input, int size_input, int* width, int* height) {
- rgba* img = NULL;
+ rgb* img = NULL;
int w = 0;
int h = 0;
int channels = 0;
@@ -538,11 +538,6 @@ rgb* png2rgb(unsigned char* png_input, int size_input, int* width, int* height)
img[idx].red = data[channels * idx];
img[idx].green = data[channels * idx + 1];
img[idx].blue = data[channels * idx + 2];
- if (channels == 4) {
- img[idx].alpha = data[channels * idx + 3];
- } else {
- img[idx].alpha = 0xFF;
- }
}
}
break;