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
This commit is contained in:
MegaMech
2024-03-23 01:57:53 -06:00
committed by GitHub
parent 5c6fa9c1f6
commit cd7dd6f59a
10 changed files with 545 additions and 7 deletions
+1 -6
View File
@@ -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;