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 41

Asa

Reinstating the overhead map function in Wolf3D - Tue Aug 04, 2020 12:20 pm

Looking at the elevators in the overhead map you see this:

Topics tagged under 41 on Wolf3d Haven Forum Elevators

I have always wondered why it doesn't show the elevator control where it should be instead of the elevator wall. Well, Adam Biser gave me a code segment that he says will deal with this, but because of the way it's written, I'm not sure where to put it.

Code:
if ((x > 0 && (unsigned&#41;actorat[x - 1][y] < MAXWALLTILES&#41; || (x < 63 && (unsigned&#41;actorat[x + 1][y] < MAXWALLTILES&#41;&#41;
{
    // When there's a wall to the left or right, draw the elevator side.
} else {
    // Draw the elevator switch
}


I'm sure it uses the LatchDrawTile(sx,sy,tile); statement where the comments are, but I'm not certain how to identify the tile16's. I know that the wall is 21 and the control is supposed to be 22, but (even though the images suggest it's the down control) the control inserted into the game when 22 is used is the up control, not the down control. I replaced the down control tile16 with a up control one, and now when I look at the controls in the game and then go to the overhead map, the tile16 for the up control wall is correct. I don't know if any of this is making sense.

Let me start again. There are two elevator control textures, one for the control you see when you first enter the elevator, and one for what you see after you press the spacebar. The first one has the down arrow lit and the up arrow dim. The second one has the down arrow dim and the up arrow lit. Also, the switch between them is down in the first and up in the second. I call these the down and up controls, respectively. In the textures, the elevator wall occurs at #40, the down elevator at #41, the dark blank side of the up control at #42 and the up control at #43.

In the tile16's, the side wall is at position #21, the down control at #22 and there is no tile16 for the dark blank sidewall or the up control. In the game map, a code of 21 places an elevator down control with an elevator side wall on either side of it in that position in the map. The overhead map will show a side wall, not an elevator control. a code of 22 placed in the game map places an up elevator control with the dark blank sidewall in that position in the map. The overhead map shows the elevator down control in that position.

The code Adam gave me is supposed to detect if the elevator control is facing a wall on either side or both sides. If on one side, then place the elevator down control tile16 in the overhead map there. If walls are on both sides, place the elevator wall tile16 in that position in the overhead map. I like this, as it is more along the lines of what the overhead map should be displaying, rather than what it does display. The problem, for me, is that because he coded the if statement the way he did, I'm not sure where it goes in the code as it exists now. and then, I think the latchdrawtile statement will state 21 if a wall or 22 of a control, but I'm again not sure.


Back to top

Current date/time is Fri Apr 19, 2024 11:12 am