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 4 matches for endif

Wolf3DGuy

Cleaning up Wolf3D - Thu Aug 06, 2020 8:29 am

The last 2 is actually an option in borland compiler, open up your project file click options -> compiler -> Code generation and take out the "X" for both Word Alignment and Treat enums as Ints.

There's a file called version.h that has few lines yet they have a serious role in the code, if you open it you'll see that define SPEAR is commented out, this means that the compiler basically ignores everything that is located between an #ifdef SPEAR - #endif segment. For instance in wl_act2:

Code:
#ifndef SPEAR
   case bossobj:
      SD_PlaySound(MUTTISND);            // JAB
      break;
   case schabbobj:
      SD_PlaySound(MEINGOTTSND);
      break;
   case fakeobj:
      SD_PlaySound(HITLERHASND);
      break;
   case mechahitlerobj:
      SD_PlaySound(SCHEISTSND);
      break;
   case realhitlerobj:
      SD_PlaySound(EVASND);
      break;
   case giftobj:
      SD_PlaySound(DONNERSND);
      break;
   case gretelobj:
      SD_PlaySound(MEINSND);
      break;
   case fatobj:
      SD_PlaySound(ROSESND);
      break;
#else
   case spectreobj:
      SD_PlaySound(GHOSTFADESND);
      break;
   case angelobj:
      SD_PlaySound(ANGELDEATHSND);
      break;
   case transobj:
      SD_PlaySound(TRANSDEATHSND);
      break;
   case uberobj:
      SD_PlaySound(UBERDEATHSND);
      break;
   case willobj:
      SD_PlaySound(WILHELMDEATHSND);
      break;
   case deathobj:
      SD_PlaySound(KNIGHTDEATHSND);
      break;
#endif


In here the #ifndef means if SPEAR is not defined because it's commented out or something, compile these lines for the death sounds of Wolf3D bosses, but because there is an #else which means if SPEAR is actually defined, ignore everything before the #else and compile stuff after the #else, that's how you get the Spear of Destiny stuff, the code is filled with these ifdefs, they're all around and sometimes it can be a mess. It's like if you enable this you get this but if you disable it you'll get that instead. However there's many places in the code where the ifdef spear is missing like in WL_ACT1.

Code:
   case   bo_cross:
   case   bo_chalice:
   case   bo_bible:
   case   bo_crown:
   case   bo_fullheal:
      if (!loadedgame)
        gamestate.treasuretotal++;

   case   bo_firstaid:
   case   bo_key1:
   case   bo_key2:
   case   bo_key3:
   case   bo_key4:
   case   bo_clip:
   case   bo_25clip:
   case   bo_machinegun:
   case   bo_chaingun:
   case   bo_food:
   case   bo_alpo:
   case   bo_gibs:
   case   bo_spear:


bo_spear and bo_25clip are SoD exclusive pickups but because there is no ifdef to separate Spear bonuses from Wolf3D and they still appear in Wolf3D in a way and they're eating up some memory for no reason. In wl_def they're also not separated in the stat_t typedef enum, just like the enemies below a bit.

Asa

Reinstating the overhead map function in Wolf3D - Thu Jul 16, 2020 7:36 pm

I inserted the function you provided and commented out the other one. When I compiled it there were more errors than it had before. I decided to start over. After looking at NY00123's code, I realized that he didn't change or add anything, yet the program compiles to an exact duplicate of the original 1.0, and if that's true then that means the map function, as written, should be usable in any newer version if you know what to edit. I went back to a fresh copy of the WL_Debug.C file and began again. I commented each #if 0 and corresponding #endif one at a time and compiled to see what would happen. Everything was fine (as far as no errors in compile or build) until I removed the last one in the ViewMap() function. Now, just because it compiled and built with the other ones commented doesn't mean the map worked, cause it didn't. But the program ran the way it should otherwise. The problem it had in execution is that if you pressed TAB-O, you had to hit ESC twice to go back to the menu and then return to the game before any other cheats would work again. They would work until you pressed TAB-O, then not work until you went back to the menu and returned to the game again. When I removed the last #if 0, the first error came in. It says that the c in c.button0 is an undefined symbol. c.button0 is treated by that code as a boolean value, in the first case testing for it being true and button0held being false (!button0held), and in the second case checking to see if c.button0 is false (!c.button0). Looking at the function, button0held is being defined as a boolean variable and initially set to false. (I had to un-comment that assignment statement.) c.button0 is not defined anywhere in the file, so I am assuming it must be a global variable of some sort, but I haven't found it in any of the files included in the WL_Debug.C file or that are included in the WL_Def.H file. I would like to know where c.button0 is defined, and to understand why that particular part of the ViewMap() function was set to a compiler directive. Can either of you elaborate?

Oh, by not work, I mean that pressing the keys (like TAB-G to toggle god mode) wouldn't do anything until you went back to the menu and returned to the game.

Asa

God Mode sprite and BJ panting sprites - Wed Jul 08, 2020 8:51 am

Wolf3DGuy wrote:The god mode graphs can be found in SoD that's true, those are missing in Wolf3D, by the panting sprites I believe you mean the intermission screen inbetween levels with the ratios showing up and there's BJ breathing and holding his gun, those 2 sprites appear in the PC version as well, you don't have to add those, unless if you have the steam version of the game, for some reason they added one panting sprite twice so BJ is not animated there, strange that's for sure, but I believe you can find those sprites on Spriters Resource.

If you want to make the god mode faces appear in Wolf3D then you have to do more than just adding those 3 sprites in the vga files, I do not know if you work with DOS or ECWolf now. If you're trying to do it in DOS you have to add the faces after the mutant BJ sprite, then in GFXV_WL6.h you have to add the faces there as well afte Anyway, I will look for r MUTANTBJPIC, let's just call them GODMODEFACE1PIC, GODMODEFACE2PIC and GODMODEFACE3PIC. Also you have to raise the value in ORDERSCREEN by 3, do the same with the values for LATCHPICS_LUMP_END, NUMCHUNKS and NUMPICS as well also after the "File offsets for data items" lines too except for STRUCTPIC, STARTFONT, STARTFONTM and STARTPICS. Next, open up WL_AGENT in DrawFace remove the #ifdef SPEAR and the #endif lines. Save both files then compile the new exe, I believe it should work, if you want to add these in ECWolf then I have no idea how to do that, I hate scripting Doom after all! Cool  Laughing


I looked at the shareware SoD and found the god mode sprites there. I wish I hadn't lost the registered versions of the game and both mission packs, but that is the past and I have to deal with things as they are. Anyway, yes, I am referring to the intermission screen. I have version 1.1 of Wolf3D and it does not have the differing panting sprites. It has the same sprite twice. I never got the steam version of any game, so I know it isn't that. If 1.1 was supposed to have them, then somehow my copy was different. Anyway, I will see about locating the second sprite in the location you mentioned.

I never did anything in the way of modding the files before, other than to play around with the mapedit editor. I used MapEdit 8 (not 8.4), and found WDC when I wanted to look at the sprites. I used it to get a copy of the god mode image I used for my avatar here. That was many years ago. I have just begun to look at the sprites again, but I have never tried to insert graphics into the files before. I don't have the same computer I had back then (it was stolen when I had it stored at a friend's house), so I had to download the editors all over again. I went with HWE because it doesn't need DOSBox to run. When I downloaded ECWolf, I found that I had to run a patch on it to bring the files up-to-date (to v1.4 apparently). That patch didn't add anything to the sprites as far as I can tell. From your response, I take it that ECWolf is based more on the DOOM engine than the original WOLF engine?

I see that code changes are necessary to effect these changes. Is there a particular compiler I should use for recompiling the game? I have never written code for a PC app before.

Wolf3DGuy

God Mode sprite and BJ panting sprites - Wed Jul 08, 2020 4:39 am

The god mode graphs can be found in SoD that's true, those are missing in Wolf3D, by the panting sprites I believe you mean the intermission screen inbetween levels with the ratios showing up and there's BJ breathing and holding his gun, those 2 sprites appear in the PC version as well, you don't have to add those, unless if you have the steam version of the game, for some reason they added one panting sprite twice so BJ is not animated there, strange that's for sure, but I believe you can find those sprites on Spriters Resource.

If you want to make the god mode faces appear in Wolf3D then you have to do more than just adding those 3 sprites in the vga files, I do not know if you work with DOS or ECWolf now. If you're trying to do it in DOS you have to add the faces after the mutant BJ sprite, then in GFXV_WL6.h you have to add the faces there as well after MUTANTBJPIC, let's just call them GODMODEFACE1PIC, GODMODEFACE2PIC and GODMODEFACE3PIC. Also you have to raise the value in ORDERSCREEN by 3, do the same with the values for LATCHPICS_LUMP_END, NUMCHUNKS and NUMPICS as well also after the "File offsets for data items" lines too except for STRUCTPIC, STARTFONT, STARTFONTM and STARTPICS. Next, open up WL_AGENT in DrawFace remove the #ifdef SPEAR and the #endif lines. Save both files then compile the new exe, I believe it should work, if you want to add these in ECWolf then I have no idea how to do that, I hate scripting Doom after all! Cool  Laughing


Back to top

Current date/time is Mon Sep 20, 2021 5:29 pm