| MCS' Coding Tips "Success!" |
![]() |
Reducing the number of episodes Written by MCS Tested by Marcin Krysiak |
| Main Page News Wolfenstein 3D Texture Library MCS' Coding Tips - "Success"! Utilities Spear Resurrection Wolfendoom Wolf Collection Original Wolf 3D Doom/Duke maps Other Stuff Links Questions? Email us! |
| Let's say you want your addon to have several episodes, but you don't want to make all six episodes available to the player. You could use the shareware method, and bring up a pop-up window that tells the player that the selected episode doesn't exist for whatever reason. But it's also possible to let the episode select screen display just the episodes that are actually available. In this example, we'll assume that you would like to have 3 episodes. All the necessary changes are to be made in WL_MENU.C 1. Locate this line: int EpisodeSelect[6]={1}; change this into int EpisodeSelect[3]={1}; 2. Locate these lines: for (i=0;i<6;i++) VWB_DrawPic(NE_X+32,NE_Y+i*26,C_EPISODE1PIC+i); change into for (i=0;i<3;i++) VWB_DrawPic(NE_X+32,NE_Y+i*26,C_EPISODE1PIC+i); 3. Locate these lines: {0,"",0}, {3,"Episode 4\n" "A Dark Secret",0}, {0,"",0}, {3,"Episode 5\n" "Trail of the Madman",0}, {0,"",0}, {3,"Episode 6\n" "Confrontation",0} and remove them, or comment them out. 4. Locate these lines: strcpy(extension,"WL6"); NewEmenu[2].active = NewEmenu[4].active = NewEmenu[6].active = NewEmenu[8].active = NewEmenu[10].active = EpisodeSelect[1] = EpisodeSelect[2] = EpisodeSelect[3] = EpisodeSelect[4] = EpisodeSelect[5] = 1; and change like this: strcpy(extension,"WL6"); NewEmenu[2].active = NewEmenu[4].active = /* NewEmenu[6].active = NewEmenu[8].active = NewEmenu[10].active = */ EpisodeSelect[1] = EpisodeSelect[2] = 1; /* EpisodeSelect[3] EpisodeSelect[4]= EpisodeSelect[5] = 1; */ If all went well, your episode select screen should look like this: Using this method, you will also be able to use the three slots of the now obsolete episode pics in VGAGRAPH.WL6 for other purposes. Success, MCS. |
![]() |