Well, I added the code from that thread on DHW to WL_DEBUG.C and the compiler is choking on about 16 errors. I really don't know what to do to fix it, so I thought maybe I should start a new thread and ask about getting help to fix it. I know the code in that thread on DHW was for SDL, so I was expecting problems. I just don't have enough knowledge or experience to fix the errors.
There was a piece of the thread that talked about changing unsigned in some places to uint8_t so it would work in MacOSX. There were 2 occurrences of uint8_t in the code, so I changed both of them to unsigned and that got rid of two of the errors. I will see if I can post the errors and the lines they apply to here, but being in DOSBox, I don't know if there's an easy way to save out the messages and the code they relate to. I will edit this post when I have something.
- Code:
void TileMWall(unsigned sx, unsigned sy, unsigned pagenum)
{
unsigned *start;
start = PM_GetPage(pagenum); // line 633 WARNING: Suspicious pointer conversion
for (int x=0;x<TileMSize;x++) // line 635 ERRORs: Expression syntax, Undefined symbol 'x', Statement missing ;
{
for (int y=0;y<TileMSize;y++) // line 637 This line previously had the same errors as line 635, but after changing uint8_t to unsigned these errors went away
{
VWB_BarScaledCoord((sx+x*pixelSize),(sy+y*pixelSize),pixelSize,pixelSize,(int)*start);
start = start + TileMWallRatio;
}
start = start + TEXTURESIZE*(TileMWallRatio-1);
}
}
void TileMDoor(unsigned sx, unsigned sy, byte doornum) // line 647 ERROR: Declaration is not allowed here
{ // line 648 ERROR: Declaration syntax error
.
.
.
VW_UpdateScreen();
if (Keyboard[sc_P])
PictureGrabber();
} // line 871 WARNINGs: 'start' is assigned a value that is never used, Parameter 'sx' is never used, Parameter 'sy' is never used
// #endif
// #if 0
/*
===================
=
= ViewMap
=
===================
*/
OK, I'm finishing up this post. I read your responses and intend to utilize them, but I wanted to finish this post so you can see what I see. Apparently, changing the uint8_t occurrences to unsigned got rid of most of the errors, leaving just the 6 errors and 4 warnings above.
Last edited by Asa on Thu Jul 16, 2020 12:53 pm; edited 4 times in total