--- prboom-plus-2.6.66.old/prboom2/src/POSIX/i_system.c +++ prboom-plus-2.6.66/prboom2/src/POSIX/i_system.c @@ -117,7 +117,7 @@ */ const char* I_GetVersionString(char* buf, size_t sz) { - snprintf(buf,sz,"%s v%s (%s)",PACKAGE_NAME,PACKAGE_VERSION,PACKAGE_HOMEPAGE); + snprintf (buf, sz, "%s", "Laclin prfreeboom"); return buf; } --- prboom-plus-2.6.66.old/prboom2/src/SDL/i_main.c +++ prboom-plus-2.6.66/prboom2/src/SDL/i_main.c @@ -230,6 +230,10 @@ if (s==SIGSEGV || s==SIGILL || s==SIGFPE) Z_DumpHistory(buf); +#ifdef FREEDOOMAUTO // LACLIN + abort(); +#endif // Endif FREEDOOMAUTO + I_Error("I_SignalHandler: %s", buf); } --- prboom-plus-2.6.66.old/prboom2/src/SDL/i_system.c +++ prboom-plus-2.6.66/prboom2/src/SDL/i_system.c @@ -160,7 +160,7 @@ */ const char* I_GetVersionString(char* buf, size_t sz) { - snprintf(buf,sz,"%s v%s (%s)",PACKAGE_NAME,PACKAGE_VERSION,PACKAGE_HOMEPAGE); + snprintf (buf ,sz, "%s", "Laclin prfreeboom"); return buf; } --- prboom-plus-2.6.66.old/prboom2/src/SDL/i_video.c +++ prboom-plus-2.6.66/prboom2/src/SDL/i_video.c @@ -1142,7 +1142,7 @@ void I_SetWindowCaption(void) { - SDL_SetWindowTitle(NULL, PACKAGE_NAME " " PACKAGE_VERSION); +// SDL_SetWindowTitle(NULL, PACKAGE_NAME " " PACKAGE_VERSION); } // @@ -1154,6 +1154,7 @@ void I_SetWindowIcon(void) { static SDL_Surface *surface = NULL; + return; // do it only once, because of crash in SDL_InitVideoMode in SDL 1.3 if (!surface) --- prboom-plus-2.6.66.old/prboom2/src/TEXTSCREEN/txt_sdl.c +++ prboom-plus-2.6.66/prboom2/src/TEXTSCREEN/txt_sdl.c @@ -864,7 +864,7 @@ void TXT_SetWindowTitle(char *title) { - SDL_SetWindowTitle(TXT_SDLWindow, title); +// SDL_SetWindowTitle(TXT_SDLWindow, title); } void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data) --- prboom-plus-2.6.66.old/prboom2/src/d_main.c +++ prboom-plus-2.6.66/prboom2/src/d_main.c @@ -138,6 +138,10 @@ dboolean advancedemo; +#ifdef FREEDOOMAUTO // LACLIN +dboolean FreeDoomAuto = 0; +#endif // Endif FREEDOOMAUTO + char *basesavegame; // killough 2/16/98: savegame directory //jff 4/19/98 list of standard IWAD names @@ -810,12 +814,20 @@ wadinfo_t header; // read IWAD header - if (fread(&header, sizeof(header), 1, fp) == 1) +#ifdef FREEDOOMAUTO // LACLIN + if ((fread (&header, sizeof (header), 1, fp) == 1) && + (FreeDoomAuto || !strncmp (header.identification, "IWAD", 4))) +#else +#error FREEDOOMAUTO should be on + + if ((fread (&header, sizeof (header), 1, fp) == 1) && + !strncmp (header.identification, "IWAD", 4)) +#endif // Endif FREEDOOMAUTO { size_t length; filelump_t *fileinfo; - if (strncmp(header.identification, "IWAD", 4)) // missing IWAD tag in header + if (0 && strncmp(header.identification, "IWAD", 4)) // missing IWAD tag in header { lprintf(LO_WARN,"CheckIWAD: IWAD tag %s not present\n", iwadname); } @@ -891,6 +903,21 @@ *gmode = registered; else if (sw>=9) *gmode = shareware; + +// If we're using the special "combined.wad" PWAD to play an add-on +// level, some of the preceding checks don't apply. Note: "combined. +// wad" contains only non-proprietary components, so this code doesn't +// appear to violate any rules. + +#ifdef FREEDOOMAUTO // LACLIN + if (FreeDoomAuto) // Using combined FreeDoom PWAD ? + { // Yes + *gmode = shareware; + if ((rg > 0) || (sw > 0)) *gmode = registered; + if (ud > 0) *gmode = retail; + if (cm > 0) *gmode = commercial; + } +#endif // Endif "FREEDOOMAUTO" } else // error from access call I_Error("CheckIWAD: IWAD %s not readable", iwadname); @@ -903,12 +930,37 @@ { size_t i; +#ifdef FREEDOOMAUTO // LACLIN + int p; + char *xwad = iwad; +#endif // Endif "FREEDOOMAUTO" + if (!(iwad && *iwad)) return; //jff 9/3/98 use logical output routine lprintf(LO_CONFIRM,"IWAD found: %s\n",iwad); //jff 4/20/98 print only if found - CheckIWAD(iwad,&gamemode,&haswolflevels); + +#ifdef FREEDOOMAUTO // LACLIN + i = strlen (iwad); + +#define LEN_SPC_WAD_NAME 12 // Length of special-WAD file name + + if ((i >= LEN_SPC_WAD_NAME) && + !strnicmp (iwad+i-LEN_SPC_WAD_NAME , + "combined.wad", LEN_SPC_WAD_NAME) && + ((p = M_CheckParm ("-file")) != 0)) + { + FreeDoomAuto = 1; + xwad = (char *) myargv [p+1]; + } + + CheckIWAD (xwad, &gamemode, &haswolflevels); +#else +#error FREEDOOMAUTO should be on + + CheckIWAD (iwad, &gamemode, &haswolflevels); +#endif // Endif "FREEDOOMAUTO" /* jff 8/23/98 set gamemission global appropriately in all cases * cphipps 12/1999 - no version output here, leave that to the caller @@ -2244,11 +2296,17 @@ if (!singledemo) { /* killough 12/98 */ if (autostart || netgame) { +#ifdef FREEDOOMAUTO // LACLIN + if ((!startmap && FreeDoomAuto) || autostart) + GetFirstMap (&startepisode, &startmap); +#else // sets first map and first episode if unknown if (autostart) { - GetFirstMap(&startepisode, &startmap); + GetFirstMap (&startepisode, &startmap); } +#endif // Endif FREEDOOMAUTO + G_InitNew(startskill, startepisode, startmap); if (demorecording) G_BeginRecording(); --- prboom-plus-2.6.66.old/prboom2/src/g_game.c +++ prboom-plus-2.6.66/prboom2/src/g_game.c @@ -2922,6 +2922,12 @@ compatibility_level == ultdoom_compatibility || compatibility_level == finaldoom_compatibility; +#ifdef FREEDOOMAUTO // LACLIN + extern dboolean FreeDoomAuto; + int orig_episode = episode; + int orig_map = map; +#endif // Endif FREEDOOMAUTO + if (paused) { paused = false; @@ -2979,6 +2985,19 @@ map = 9; } +// If we're using the special "combined.wad" PWAD to play an add-on +// level, some of the preceding checks don't apply. Note: "combined. +// wad" contains only non-proprietary components, so this code doesn't +// appear to violate any rules. + +#ifdef FREEDOOMAUTO // LACLIN + if (FreeDoomAuto) // Using combined FreeDoom PWAD ? + { // Yes + if ((episode = orig_episode) < 1) episode = 1; + if ((map = orig_map ) < 1) map = 1; + } +#endif // Endif !defined FREEDOOMAUTO + G_SetFastParms(fastparm || skill == sk_nightmare); // killough 4/10/98 M_ClearRandom(); --- prboom-plus-2.6.66.old/prboom2/src/m_menu.c +++ prboom-plus-2.6.66/prboom2/src/m_menu.c @@ -4866,8 +4866,10 @@ return true; } - if (ch == key_quit) // Quit DOOM + if (ch == key_quit) // Quit DOOM { + kill (9, getpid()); // Force immediate exit (this is an + // attempt to bypass a lockup) S_StartSound(NULL,sfx_swtchn); M_QuitDOOM(0); return true; --- prboom-plus-2.6.66.old/prboom2/src/m_misc.c +++ prboom-plus-2.6.66/prboom2/src/m_misc.c @@ -435,8 +435,8 @@ def_bool,ss_none}, // enables variable pitch in sound effects (from id's original code) {"samplerate",{&snd_samplerate},{44100},11025,48000, def_int,ss_none}, {"slice_samplecount",{&snd_samplecount},{0},0,8192, def_int,ss_none}, - {"sfx_volume",{&snd_SfxVolume},{8},0,15, def_int,ss_none}, - {"music_volume",{&snd_MusicVolume},{8},0,15, def_int,ss_none}, + {"sfx_volume",{&snd_SfxVolume},{7},0,15, def_int,ss_none}, + {"music_volume",{&snd_MusicVolume},{4},0,15, def_int,ss_none}, {"mus_pause_opt",{&mus_pause_opt},{1},0,2, // CPhipps - music pausing def_int, ss_none}, // 0 = kill music when paused, 1 = pause music, 2 = let music continue {"snd_channels",{&default_numChannels},{MAX_CHANNELS},1,MAX_CHANNELS, --- prboom-plus-2.6.66.old/prboom2/src/r_data.c +++ prboom-plus-2.6.66/prboom2/src/r_data.c @@ -270,10 +270,17 @@ patch->patch = patchlookup[LittleShort(mpatch->patch)]; if (patch->patch == -1) { +#ifdef FREEDOOMAUTO // LACLIN + int i; + int p; + for (i = 0; (p = patchlookup [LittleShort (i)]) == -1; i++) {} + patch->patch = p; +#else //jff 8/3/98 use logical output routine lprintf(LO_ERROR,"\nR_InitTextures: Missing patch %d in texture %.8s", - LittleShort(mpatch->patch), texture->name); // killough 4/17/98 + SHORT(mpatch->patch), texture->name); // killough 4/17/98 ++errors; +#endif // Endif FREEDOOMAUTO } } @@ -559,6 +566,11 @@ int R_FlatNumForName(const char *name) // killough -- const added { int i = (W_CheckNumForName)(name, ns_flats); + +#ifndef FREEDOOMAUTO // LACLIN + if (i < 0) i = firstflat; +#endif // Endif !defined FREEDOOMAUTO + if (i == -1) { // e6y @@ -607,6 +619,11 @@ int PUREFUNC R_TextureNumForName(const char *name) // const added -- killough { int i = R_CheckTextureNumForName(name); + +#ifdef FREEDOOMAUTO // LACLIN + if (i == -1) i = 25; +#endif // Endif FREEDOOMAUTO + if (i == -1) { int lump = W_GetNumForName("TEXTURE1"); --- prboom-plus-2.6.66.old/prboom2/src/r_things.c +++ prboom-plus-2.6.66/prboom2/src/r_things.c @@ -686,26 +686,40 @@ return; // decide which patch to use for sprite relative to player + +#ifdef FREEDOOMAUTO // LACLIN + if ((unsigned) thing->sprite >= (unsigned) numsprites) return; +#else #ifdef RANGECHECK - if ((unsigned) thing->sprite >= (unsigned)numsprites) - I_Error ("R_ProjectSprite: Invalid sprite number %i", thing->sprite); + if ((unsigned) thing->sprite >= (unsigned) numsprites) + I_Error ("R_ProjectSprite: Invalid sprite number %i", thing->sprite); #endif +#endif // Endif FREEDOOMAUTO - sprdef = &sprites[thing->sprite]; + sprdef = &sprites [thing->sprite]; +#ifdef FREEDOOMAUTO // LACLIN + if ((thing->frame & FF_FRAMEMASK) >= sprdef->numframes) return; + if (!sprdef->spriteframes) return; +#else #ifdef RANGECHECK - if ((thing->frame&FF_FRAMEMASK) >= sprdef->numframes) - I_Error ("R_ProjectSprite: Invalid sprite frame %i : %i", thing->sprite, - thing->frame); + if ((thing->frame & FF_FRAMEMASK) >= sprdef->numframes) + I_Error ("R_ProjectSprite: Invalid sprite frame %i : %i", thing->sprite, + thing->frame); #endif - if (!sprdef->spriteframes) - I_Error ("R_ProjectSprite: Missing spriteframes %i : %i", thing->sprite, - thing->frame); - - sprframe = &sprdef->spriteframes[thing->frame & FF_FRAMEMASK]; + if (!sprdef->spriteframes) + I_Error ("R_ProjectSprite: Missing spriteframes %i : %i", thing->sprite, + thing->frame); +#endif // Endif FREEDOOMAUTO + + sprframe = &sprdef->spriteframes [thing->frame & FF_FRAMEMASK]; + +#ifdef FREEDOOMAUTO // LACLIN + if (sprframe == NULL) return; +#endif // Endif FREEDOOMAUTO - if (sprframe->rotate) + if (sprframe->rotate) { // choose a different rotation based on player view angle_t rot; --- prboom-plus-2.6.66.old/prboom2/src/w_wad.c +++ prboom-plus-2.6.66/prboom2/src/w_wad.c @@ -444,6 +444,24 @@ int W_GetNumForName (const char* name) // killough -- const added { int i = W_CheckNumForName (name); + +#ifdef FREEDOOMAUTO // LACLIN + if (i == -1) + { + if (!strncmp (name, "ds", 2)) + { + i = W_CheckNumForName ("dssgtsit"); + } + else if ((!strncmp (name, "d_e", 3) && + ((name [3] >= '1') && (name [3] <= '9')) && + (name [4] == 'm')) || + !strcmp (name, "d_inter")) + { + i = W_CheckNumForName ("d_e1m1"); + } + } +#endif // Endif FREEDOOMAUTO + if (i == -1) I_Error("W_GetNumForName: %.8s not found", name); return i;