ref: f39e80efc3a3a0b5b8b23d806e418dc5673cca98
parent: c5a8fec289146a7a7fb49c0c42f20695ec37e090
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Nov 15 13:50:45 EST 2019
Clean-up GenericLoad.cpp Another ASM-inaccuracy. Dammit.
--- a/src/GenericLoad.cpp
+++ b/src/GenericLoad.cpp
@@ -153,7 +153,7 @@
{1, 1000, {0, 20.0, 0, 0}, {0, 0.0, 0, 0}, {0, 0.0, 0, 0}, 0, 64, 0, 128, 0, 255, 0}
};
-BOOL LoadGenericData()
+BOOL LoadGenericData(void)
{
char str[0x40];
BOOL bError;
@@ -192,112 +192,108 @@
MakeSurface_Resource("CREDIT01", SURFACE_ID_CREDITS_IMAGE);
if (bError)
- {
return FALSE;
- }
- else
- {
- MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_SCREEN_GRAB, TRUE);
- MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_BACKGROUND, FALSE);
- MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_MAP, TRUE);
- MakeSurface_Generic(320, 240, SURFACE_ID_CASTS, FALSE);
- MakeSurface_Generic(256, 256, SURFACE_ID_LEVEL_TILESET, FALSE);
- MakeSurface_Generic(160, 16, SURFACE_ID_ROOM_NAME, FALSE);
- MakeSurface_Generic(40, 240, SURFACE_ID_VALUE_VIEW, FALSE);
- MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_1, FALSE);
- MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_2, FALSE);
- MakeSurface_Generic(320, 16 * MAX_STRIP, SURFACE_ID_CREDIT_CAST, FALSE);
- pt_size = 0;
- pt_size += MakePixToneObject(&gPtpTable[0], 2, 32);
- pt_size += MakePixToneObject(&gPtpTable[2], 2, 33);
- pt_size += MakePixToneObject(&gPtpTable[4], 2, 34);
- pt_size += MakePixToneObject(&gPtpTable[6], 1, 15);
- pt_size += MakePixToneObject(&gPtpTable[7], 1, 24);
- pt_size += MakePixToneObject(&gPtpTable[8], 1, 23);
- pt_size += MakePixToneObject(&gPtpTable[9], 2, 50);
- pt_size += MakePixToneObject(&gPtpTable[11], 2, 51);
- pt_size += MakePixToneObject(&gPtpTable[33], 1, 1);
- pt_size += MakePixToneObject(&gPtpTable[38], 1, 2);
- pt_size += MakePixToneObject(&gPtpTable[56], 1, 29);
- pt_size += MakePixToneObject(&gPtpTable[61], 1, 43);
- pt_size += MakePixToneObject(&gPtpTable[62], 3, 44);
- pt_size += MakePixToneObject(&gPtpTable[65], 1, 45);
- pt_size += MakePixToneObject(&gPtpTable[66], 1, 46);
- pt_size += MakePixToneObject(&gPtpTable[68], 1, 47);
- pt_size += MakePixToneObject(&gPtpTable[49], 3, 35);
- pt_size += MakePixToneObject(&gPtpTable[52], 3, 39);
- pt_size += MakePixToneObject(&gPtpTable[13], 2, 52);
- pt_size += MakePixToneObject(&gPtpTable[28], 2, 53);
- pt_size += MakePixToneObject(&gPtpTable[15], 2, 70);
- pt_size += MakePixToneObject(&gPtpTable[17], 2, 71);
- pt_size += MakePixToneObject(&gPtpTable[19], 2, 72);
- pt_size += MakePixToneObject(&gPtpTable[30], 1, 5);
- pt_size += MakePixToneObject(&gPtpTable[32], 1, 11);
- pt_size += MakePixToneObject(&gPtpTable[35], 1, 4);
- pt_size += MakePixToneObject(&gPtpTable[46], 2, 25);
- pt_size += MakePixToneObject(&gPtpTable[48], 1, 27);
- pt_size += MakePixToneObject(&gPtpTable[54], 2, 28);
- pt_size += MakePixToneObject(&gPtpTable[39], 1, 14);
- pt_size += MakePixToneObject(&gPtpTable[23], 2, 16);
- pt_size += MakePixToneObject(&gPtpTable[25], 3, 17);
- pt_size += MakePixToneObject(&gPtpTable[34], 1, 18);
- pt_size += MakePixToneObject(&gPtpTable[36], 2, 20);
- pt_size += MakePixToneObject(&gPtpTable[31], 1, 22);
- pt_size += MakePixToneObject(&gPtpTable[41], 2, 26);
- pt_size += MakePixToneObject(&gPtpTable[43], 1, 21);
- pt_size += MakePixToneObject(&gPtpTable[44], 2, 12);
- pt_size += MakePixToneObject(&gPtpTable[57], 2, 38);
- pt_size += MakePixToneObject(&gPtpTable[59], 1, 31);
- pt_size += MakePixToneObject(&gPtpTable[60], 1, 42);
- pt_size += MakePixToneObject(&gPtpTable[69], 1, 48);
- pt_size += MakePixToneObject(&gPtpTable[70], 2, 49);
- pt_size += MakePixToneObject(&gPtpTable[72], 1, 100);
- pt_size += MakePixToneObject(&gPtpTable[73], 3, 101);
- pt_size += MakePixToneObject(&gPtpTable[76], 2, 54);
- pt_size += MakePixToneObject(&gPtpTable[78], 2, 102);
- pt_size += MakePixToneObject(&gPtpTable[80], 2, 103);
- pt_size += MakePixToneObject(&gPtpTable[81], 1, 104);
- pt_size += MakePixToneObject(&gPtpTable[82], 1, 105);
- pt_size += MakePixToneObject(&gPtpTable[83], 2, 106);
- pt_size += MakePixToneObject(&gPtpTable[85], 1, 107);
- pt_size += MakePixToneObject(&gPtpTable[86], 1, 30);
- pt_size += MakePixToneObject(&gPtpTable[87], 1, 108);
- pt_size += MakePixToneObject(&gPtpTable[88], 1, 109);
- pt_size += MakePixToneObject(&gPtpTable[89], 1, 110);
- pt_size += MakePixToneObject(&gPtpTable[90], 1, 111);
- pt_size += MakePixToneObject(&gPtpTable[91], 1, 112);
- pt_size += MakePixToneObject(&gPtpTable[92], 1, 113);
- pt_size += MakePixToneObject(&gPtpTable[93], 2, 114);
- pt_size += MakePixToneObject(&gPtpTable[95], 2, 150);
- pt_size += MakePixToneObject(&gPtpTable[97], 2, 151);
- pt_size += MakePixToneObject(&gPtpTable[99], 1, 152);
- pt_size += MakePixToneObject(&gPtpTable[100], 1, 153);
- pt_size += MakePixToneObject(&gPtpTable[101], 2, 154);
- pt_size += MakePixToneObject(&gPtpTable[111], 2, 155);
- pt_size += MakePixToneObject(&gPtpTable[103], 2, 56);
- pt_size += MakePixToneObject(&gPtpTable[105], 2, 40);
- pt_size += MakePixToneObject(&gPtpTable[105], 2, 41);
- pt_size += MakePixToneObject(&gPtpTable[107], 2, 37);
- pt_size += MakePixToneObject(&gPtpTable[109], 2, 57);
- pt_size += MakePixToneObject(&gPtpTable[113], 3, 115);
- pt_size += MakePixToneObject(&gPtpTable[116], 1, 104);
- pt_size += MakePixToneObject(&gPtpTable[117], 3, 116);
- pt_size += MakePixToneObject(&gPtpTable[120], 2, 58);
- pt_size += MakePixToneObject(&gPtpTable[122], 2, 55);
- pt_size += MakePixToneObject(&gPtpTable[124], 2, 117);
- pt_size += MakePixToneObject(&gPtpTable[126], 1, 59);
- pt_size += MakePixToneObject(&gPtpTable[127], 1, 60);
- pt_size += MakePixToneObject(&gPtpTable[128], 1, 61);
- pt_size += MakePixToneObject(&gPtpTable[129], 2, 62);
- pt_size += MakePixToneObject(&gPtpTable[131], 2, 63);
- pt_size += MakePixToneObject(&gPtpTable[133], 2, 64);
- pt_size += MakePixToneObject(&gPtpTable[135], 1, 65);
- pt_size += MakePixToneObject(&gPtpTable[136], 1, 3);
- pt_size += MakePixToneObject(&gPtpTable[137], 1, 6);
- pt_size += MakePixToneObject(&gPtpTable[138], 1, 7);
- sprintf(str, "PixTone = %d byte", pt_size);
- // There must have been some kind of console print function here or something
- return TRUE;
- }
+ MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_SCREEN_GRAB, TRUE);
+ MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_BACKGROUND, FALSE);
+ MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_MAP, TRUE);
+ MakeSurface_Generic(320, 240, SURFACE_ID_CASTS, FALSE);
+ MakeSurface_Generic(256, 256, SURFACE_ID_LEVEL_TILESET, FALSE);
+ MakeSurface_Generic(160, 16, SURFACE_ID_ROOM_NAME, FALSE);
+ MakeSurface_Generic(40, 240, SURFACE_ID_VALUE_VIEW, FALSE);
+ MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_1, FALSE);
+ MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_2, FALSE);
+ MakeSurface_Generic(320, 16 * (MAX_STRIP - 1), SURFACE_ID_CREDIT_CAST, FALSE);
+
+ pt_size = 0;
+ pt_size += MakePixToneObject(&gPtpTable[0], 2, 32);
+ pt_size += MakePixToneObject(&gPtpTable[2], 2, 33);
+ pt_size += MakePixToneObject(&gPtpTable[4], 2, 34);
+ pt_size += MakePixToneObject(&gPtpTable[6], 1, 15);
+ pt_size += MakePixToneObject(&gPtpTable[7], 1, 24);
+ pt_size += MakePixToneObject(&gPtpTable[8], 1, 23);
+ pt_size += MakePixToneObject(&gPtpTable[9], 2, 50);
+ pt_size += MakePixToneObject(&gPtpTable[11], 2, 51);
+ pt_size += MakePixToneObject(&gPtpTable[33], 1, 1);
+ pt_size += MakePixToneObject(&gPtpTable[38], 1, 2);
+ pt_size += MakePixToneObject(&gPtpTable[56], 1, 29);
+ pt_size += MakePixToneObject(&gPtpTable[61], 1, 43);
+ pt_size += MakePixToneObject(&gPtpTable[62], 3, 44);
+ pt_size += MakePixToneObject(&gPtpTable[65], 1, 45);
+ pt_size += MakePixToneObject(&gPtpTable[66], 1, 46);
+ pt_size += MakePixToneObject(&gPtpTable[68], 1, 47);
+ pt_size += MakePixToneObject(&gPtpTable[49], 3, 35);
+ pt_size += MakePixToneObject(&gPtpTable[52], 3, 39);
+ pt_size += MakePixToneObject(&gPtpTable[13], 2, 52);
+ pt_size += MakePixToneObject(&gPtpTable[28], 2, 53);
+ pt_size += MakePixToneObject(&gPtpTable[15], 2, 70);
+ pt_size += MakePixToneObject(&gPtpTable[17], 2, 71);
+ pt_size += MakePixToneObject(&gPtpTable[19], 2, 72);
+ pt_size += MakePixToneObject(&gPtpTable[30], 1, 5);
+ pt_size += MakePixToneObject(&gPtpTable[32], 1, 11);
+ pt_size += MakePixToneObject(&gPtpTable[35], 1, 4);
+ pt_size += MakePixToneObject(&gPtpTable[46], 2, 25);
+ pt_size += MakePixToneObject(&gPtpTable[48], 1, 27);
+ pt_size += MakePixToneObject(&gPtpTable[54], 2, 28);
+ pt_size += MakePixToneObject(&gPtpTable[39], 1, 14);
+ pt_size += MakePixToneObject(&gPtpTable[23], 2, 16);
+ pt_size += MakePixToneObject(&gPtpTable[25], 3, 17);
+ pt_size += MakePixToneObject(&gPtpTable[34], 1, 18);
+ pt_size += MakePixToneObject(&gPtpTable[36], 2, 20);
+ pt_size += MakePixToneObject(&gPtpTable[31], 1, 22);
+ pt_size += MakePixToneObject(&gPtpTable[41], 2, 26);
+ pt_size += MakePixToneObject(&gPtpTable[43], 1, 21);
+ pt_size += MakePixToneObject(&gPtpTable[44], 2, 12);
+ pt_size += MakePixToneObject(&gPtpTable[57], 2, 38);
+ pt_size += MakePixToneObject(&gPtpTable[59], 1, 31);
+ pt_size += MakePixToneObject(&gPtpTable[60], 1, 42);
+ pt_size += MakePixToneObject(&gPtpTable[69], 1, 48);
+ pt_size += MakePixToneObject(&gPtpTable[70], 2, 49);
+ pt_size += MakePixToneObject(&gPtpTable[72], 1, 100);
+ pt_size += MakePixToneObject(&gPtpTable[73], 3, 101);
+ pt_size += MakePixToneObject(&gPtpTable[76], 2, 54);
+ pt_size += MakePixToneObject(&gPtpTable[78], 2, 102);
+ pt_size += MakePixToneObject(&gPtpTable[80], 2, 103);
+ pt_size += MakePixToneObject(&gPtpTable[81], 1, 104);
+ pt_size += MakePixToneObject(&gPtpTable[82], 1, 105);
+ pt_size += MakePixToneObject(&gPtpTable[83], 2, 106);
+ pt_size += MakePixToneObject(&gPtpTable[85], 1, 107);
+ pt_size += MakePixToneObject(&gPtpTable[86], 1, 30);
+ pt_size += MakePixToneObject(&gPtpTable[87], 1, 108);
+ pt_size += MakePixToneObject(&gPtpTable[88], 1, 109);
+ pt_size += MakePixToneObject(&gPtpTable[89], 1, 110);
+ pt_size += MakePixToneObject(&gPtpTable[90], 1, 111);
+ pt_size += MakePixToneObject(&gPtpTable[91], 1, 112);
+ pt_size += MakePixToneObject(&gPtpTable[92], 1, 113);
+ pt_size += MakePixToneObject(&gPtpTable[93], 2, 114);
+ pt_size += MakePixToneObject(&gPtpTable[95], 2, 150);
+ pt_size += MakePixToneObject(&gPtpTable[97], 2, 151);
+ pt_size += MakePixToneObject(&gPtpTable[99], 1, 152);
+ pt_size += MakePixToneObject(&gPtpTable[100], 1, 153);
+ pt_size += MakePixToneObject(&gPtpTable[101], 2, 154);
+ pt_size += MakePixToneObject(&gPtpTable[111], 2, 155);
+ pt_size += MakePixToneObject(&gPtpTable[103], 2, 56);
+ pt_size += MakePixToneObject(&gPtpTable[105], 2, 40);
+ pt_size += MakePixToneObject(&gPtpTable[105], 2, 41);
+ pt_size += MakePixToneObject(&gPtpTable[107], 2, 37);
+ pt_size += MakePixToneObject(&gPtpTable[109], 2, 57);
+ pt_size += MakePixToneObject(&gPtpTable[113], 3, 115);
+ pt_size += MakePixToneObject(&gPtpTable[116], 1, 104);
+ pt_size += MakePixToneObject(&gPtpTable[117], 3, 116);
+ pt_size += MakePixToneObject(&gPtpTable[120], 2, 58);
+ pt_size += MakePixToneObject(&gPtpTable[122], 2, 55);
+ pt_size += MakePixToneObject(&gPtpTable[124], 2, 117);
+ pt_size += MakePixToneObject(&gPtpTable[126], 1, 59);
+ pt_size += MakePixToneObject(&gPtpTable[127], 1, 60);
+ pt_size += MakePixToneObject(&gPtpTable[128], 1, 61);
+ pt_size += MakePixToneObject(&gPtpTable[129], 2, 62);
+ pt_size += MakePixToneObject(&gPtpTable[131], 2, 63);
+ pt_size += MakePixToneObject(&gPtpTable[133], 2, 64);
+ pt_size += MakePixToneObject(&gPtpTable[135], 1, 65);
+ pt_size += MakePixToneObject(&gPtpTable[136], 1, 3);
+ pt_size += MakePixToneObject(&gPtpTable[137], 1, 6);
+ pt_size += MakePixToneObject(&gPtpTable[138], 1, 7);
+ sprintf(str, "PixTone = %d byte", pt_size);
+ // There must have been some kind of console print function here or something
+ return TRUE;
}
--- a/src/GenericLoad.h
+++ b/src/GenericLoad.h
@@ -2,4 +2,4 @@
#include "WindowsWrapper.h"
-BOOL LoadGenericData();
+BOOL LoadGenericData(void);