Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


Search found 1 match for defines

Asa

Reinstating the overhead map function in Wolf3D - Fri Jul 17, 2020 7:06 am

OK. I'm beginning to get the picture now. So, because the tile16s from the original 1.0 are not there anymore we can't make use of them. I had noticed that the map in the 1.0 shareware version I downloaded seemed like it was missing the sprites. I don't remember the one I played when Wolf3D was first released being all blue like that. But my memory is not what it used to be, so I never know for sure if I'm remembering correctly or not. Plus, I also had the Mac version when it came out and the map function in it was amazing. I believe it used reduced versions of the wall sprites to render the overhead map, and it only showed you the parts you had seen. If you hadn't gotten there yet, the map didn't show it. Also, I haven't found an editor that will show me the tile16s in the 1.0 I have if they are there, so I can't be sure if what I'm seeing in that version is accurate or not.

Well, I will start adding the functions back in and see how much progress I can make. Hopefully it won't be too much longer and I'll have a working map in v1.4.

I do have one question. In the thread on DHW, the instructions said to comment (remove) the #defines for VIEWTILEX and VIEWTILEY at the top of the file. Should I do that, or leave them in? I have been wondering about that since you told me that everything in the DOS version is 16s anyway.

OK, so I put all the code back in, and I compiled it to see what it would report. Below are the errors it reported.

Code:
 int xstart, ystart, VIEWTILEX, VIEWTILEY; // line 613, ERROR: expected (I guess because I didn't comment the initial #defines at the top of the file)

if (scaleFactor < 4)        TileMSize = 32; // line 736, ERROR: Undefined symbol 'scalefactor'

else if (TEXTURESIZE == 128){ TileMSize = 128;  pixelSize = 1; } // line 754, ERROR: Undefined symbol 'TEXTURESIZE'

VIEWTILEX = viewwidth/(TileMSize*pixelSize); // line 772, ERROR: Lvalue required
VIEWTILEY = viewheight/(TileMSize*pixelSize); // line 773, ERROR: Lvalue required

if (VIEWTILEX > MAPSIZE) VIEWTILEX = MAPSIZE; // line 775, ERROR: Lvalue required
if (VIEWTILEY > MAPSIZE) VIEWTILEY = MAPSIZE; // line 776, ERROR: Lvalue required

xstart = (screenWidth-viewwidth)/2; // line 785, ERROR: Undefined symbol 'screenWidth'
ystart = (screenHeight-STATUSLINES*scaleFactor-viewheight)/2; // line 786, ERROR: Undefined symbol 'screenHeight'

objtype *obj  = (objtype *)((uintptr_t)tile); // line 863, ERRORS: Undefined symbol 'uintptr_t', ) expected

VW_UpdateScreen(); // line 873, ERROR: Type mismatch in redeclaration of 'VW_UpdateScreen'

if (Keyboard[sc_P]) // line 875, ERROR: Declaration terminated incorrectly

} // ERROR: Unexpected }


Commenting the #defines got rid of the errors on lines 613, 772, 773, 775 and 776.


Code:
if (scaleFactor < 4)        TileMSize = 32; // line 736, ERROR: Undefined symbol 'scalefactor'

else if (TEXTURESIZE == 128){ TileMSize = 128;  pixelSize = 1; } // line 754, ERROR: Undefined symbol 'TEXTURESIZE'

xstart = (screenWidth-viewwidth)/2; // line 785, ERROR: Undefined symbol 'screenWidth'
ystart = (screenHeight-STATUSLINES*scaleFactor-viewheight)/2; // line 786, ERROR: Undefined symbol 'screenHeight'

objtype *obj  = (objtype *)((uintptr_t)tile); // line 863, ERRORS: Undefined symbol 'uintptr_t', ) expected

VW_UpdateScreen(); // line 873, ERROR: Type mismatch in redeclaration of 'VW_UpdateScreen'

if (Keyboard[sc_P]) // line 875, ERROR: Declaration terminated incorrectly

} // ERROR: Unexpected }


So, what's with all the undefined symbols? I'm thinking that the redeclaration may be because it doesn't include the type before the function name?


Back to top

Current date/time is Sat Apr 27, 2024 9:04 pm