diff --git a/Source/am_map.c b/Source/am_map.c index 50afe010..c5dc4316 100644 --- a/Source/am_map.c +++ b/Source/am_map.c @@ -640,7 +640,7 @@ void AM_Start() if (!stopped) AM_Stop(); stopped = false; - if (lastlevel != gamemap || lastepisode != gameepisode || hires!=last_hires + if (lastlevel != gamemap || lastepisode != gameepisode || hires!=last_hires || widescreen != last_widescreen) { last_hires = hires; // killough 11/98 diff --git a/Source/d_player.h b/Source/d_player.h index d657821c..7429bfb1 100644 --- a/Source/d_player.h +++ b/Source/d_player.h @@ -169,9 +169,6 @@ typedef struct player_s // True if secret level has been done. boolean didsecret; - // [crispy] show centered "Secret Revealed!" message - //char* centermessage; - // [AM] Previous position of viewz before think. // Used to interpolate between camera positions. angle_t oldviewz; diff --git a/Source/f_finale.c b/Source/f_finale.c index 61e29c22..89519194 100644 --- a/Source/f_finale.c +++ b/Source/f_finale.c @@ -723,7 +723,7 @@ void F_BunnyScroll (void) if (x2 < p2offset) F_DrawPatchCol (x, p1, x2 - p1offset); else - F_DrawPatchCol (x, p2, x2 - p2offset); + F_DrawPatchCol (x, p2, x2 - p2offset); } if (finalecount < 1130) @@ -731,7 +731,7 @@ void F_BunnyScroll (void) if (finalecount < 1180) { V_DrawPatch ((ORIGWIDTH-13*8)/2, - (ORIGHEIGHT-8*8)/2,0, + (ORIGHEIGHT-8*8)/2,0, W_CacheLumpName ("END0",PU_CACHE)); laststage = 0; return; @@ -747,8 +747,8 @@ void F_BunnyScroll (void) } sprintf (name,"END%i",stage); - V_DrawPatch ((ORIGWIDTH-13*8)/2, - (ORIGHEIGHT-8*8)/2,0, + V_DrawPatch ((ORIGWIDTH-13*8)/2, + (ORIGHEIGHT-8*8)/2,0, W_CacheLumpName (name,PU_CACHE)); } diff --git a/Source/hu_stuff.c b/Source/hu_stuff.c index d7ada663..cc341bae 100644 --- a/Source/hu_stuff.c +++ b/Source/hu_stuff.c @@ -43,7 +43,7 @@ int hud_active; //jff 2/17/98 controls heads-up display mode int hud_displayed; //jff 2/23/98 turns heads-up display on/off int hud_nosecrets; //jff 2/18/98 allows secrets line to be disabled in HUD -int hud_secret_message; // "A secret is revealed" message +int hud_secret_message; // "A secret is revealed!" message int hud_distributed; //jff 3/4/98 display HUD in different places on screen int hud_graph_keys=1; //jff 3/7/98 display HUD keys as graphics @@ -453,7 +453,7 @@ void HU_Start(void) // [crispy] re-calculate WIDESCREENDELTA I_GetScreenDimensions(); - + // create the message widget // messages to player in upper-left of screen HUlib_initSText(&w_message, HU_MSGX, HU_MSGY, HU_MSGHEIGHT, hu_font, @@ -1325,6 +1325,7 @@ void HU_Ticker(void) if (showMessages || message_dontfuckwithme) { + // [Woof!] "A secret is revealed!" message if (plr->message == s_HUSTR_SECRETFOUND) { extern int M_StringWidth(const char *string); diff --git a/Source/hu_stuff.h b/Source/hu_stuff.h index 0e2c3ddf..4e815169 100644 --- a/Source/hu_stuff.h +++ b/Source/hu_stuff.h @@ -84,7 +84,7 @@ extern int hud_displayed; // hud is displayed //jff 2/18/98 hud/status control extern int hud_active; // hud mode 0=off, 1=small, 2=full extern int hud_nosecrets; // status does not list secrets/items/kills -extern int hud_secret_message; // "A secret is revealed" message +extern int hud_secret_message; // "A secret is revealed!" message extern int map_player_coords, map_level_stats, map_level_time; // [FG] level stats and level time widgets #endif diff --git a/Source/i_sound.c b/Source/i_sound.c index ce2acc19..ce29f014 100644 --- a/Source/i_sound.c +++ b/Source/i_sound.c @@ -859,9 +859,9 @@ static void MidiProc_RegisterSong(void *data, int size) { char* filename; filename = M_TempFile("doom"); // [crispy] generic filename - + M_WriteFile(filename, data, size); - + if (!I_MidiPipe_RegisterSong(filename)) { fprintf(stderr, "Error loading midi: %s\n", @@ -885,7 +885,7 @@ int I_RegisterSong(void *data, int size) { music = NULL; MidiProc_RegisterSong(data, size); - return 1; + return 1; } else #endif @@ -902,9 +902,9 @@ int I_RegisterSong(void *data, int size) int midlen; memset(&mididata, 0, sizeof(MIDI)); - - if((err = mmus2mid((byte *)data, &mididata, 89, 0))) - { + + if((err = mmus2mid((byte *)data, &mididata, 89, 0))) + { // Nope, not a mus. dprintf("Error loading music: %d", err); return 0; @@ -912,7 +912,7 @@ int I_RegisterSong(void *data, int size) // Hurrah! Let's make it a mid and give it to SDL_mixer MIDIToMidi(&mididata, &mid, &midlen); - + #if defined(_WIN32) if (midi_server_initialized) { @@ -927,15 +927,15 @@ int I_RegisterSong(void *data, int size) rw = SDL_RWFromMem(mid, midlen); music = Mix_LoadMUS_RW(rw, false); - if(music == NULL) - { + if(music == NULL) + { // Conversion failed, free everything SDL_FreeRW(rw); rw = NULL; - free(mid); - } - else - { + free(mid); + } + else + { // Conversion succeeded // -> save memory block to free when unregistering music_block = mid; diff --git a/Source/i_video.c b/Source/i_video.c index e4eaee59..35ffa05c 100644 --- a/Source/i_video.c +++ b/Source/i_video.c @@ -909,8 +909,8 @@ void I_ShutdownGraphics(void) char buf[16]; int buflen; - // Store the (x, y) coordinates of the window - // in the "window_position" config parameter + // Store the (x, y) coordinates of the window + // in the "window_position" config parameter SDL_GetWindowPosition(screen, &x, &y); M_snprintf(buf, sizeof(buf), "%i,%i", x, y); buflen = strlen(buf); @@ -1077,7 +1077,7 @@ static void I_GetWindowPosition(int *x, int *y, int w, int h) void I_GetScreenDimensions(void) { SDL_DisplayMode mode; - int w = 16, h = 10; + int w = 16, h = 9; int ah; static boolean firsttime = true; @@ -1109,24 +1109,6 @@ void I_GetScreenDimensions(void) // [crispy] widescreen rendering makes no sense without aspect ratio correction if (widescreen && useaspect) { - // switch(crispy->widescreen) - // { - // case RATIO_16_10: - // w = 16; - // h = 10; - // break; - // case RATIO_16_9: - // w = 16; - // h = 9; - // break; - // case RATIO_21_9: - // w = 21; - // h = 9; - // break; - // default: - // break; - // } - SCREENWIDTH = w * ah / h; // [crispy] make sure SCREENWIDTH is an integer multiple of 4 ... SCREENWIDTH = (SCREENWIDTH + (hires ? 0 : 3)) & (int)~3; diff --git a/Source/m_menu.c b/Source/m_menu.c index 23a10393..57ecee36 100644 --- a/Source/m_menu.c +++ b/Source/m_menu.c @@ -1786,16 +1786,16 @@ void M_DrawBackground(char* patchname, byte *back_dest) #else // while this pixel-doubles it /* for (y = 0 ; y < SCREENHEIGHT ; src = ((++y & 63)<<6) + back_src, - back_dest += SCREENWIDTH*2) - for (x = 0 ; x < SCREENWIDTH/64 ; x++) - { - int i = 63; - do - back_dest[i*2] = back_dest[i*2+SCREENWIDTH*2] = - back_dest[i*2+1] = back_dest[i*2+SCREENWIDTH*2+1] = src[i]; - while (--i>=0); - back_dest += 128; - } + back_dest += SCREENWIDTH*2) + for (x = 0 ; x < SCREENWIDTH/64 ; x++) + { + int i = 63; + do + back_dest[i*2] = back_dest[i*2+SCREENWIDTH*2] = + back_dest[i*2+1] = back_dest[i*2+SCREENWIDTH*2+1] = src[i]; + while (--i>=0); + back_dest += 128; + } */ for (int y = 0; y < SCREENHEIGHT<<1; y++) for (int x = 0; x < SCREENWIDTH<<1; x += 2) @@ -1810,10 +1810,10 @@ void M_DrawBackground(char* patchname, byte *back_dest) /* for (y = 0 ; y < SCREENHEIGHT ; src = ((++y & 63)<<6) + back_src) for (x = 0 ; x < SCREENWIDTH/64 ; x++) - { - memcpy (back_dest,back_src+((y & 63)<<6),64); - back_dest += 64; - } + { + memcpy (back_dest,back_src+((y & 63)<<6),64); + back_dest += 64; + } */ for (y = 0; y < SCREENHEIGHT; y++) for (x = 0; x < SCREENWIDTH; x++) @@ -2809,7 +2809,7 @@ setup_menu_t stat_settings1[] = // Status Bar and HUD Settings screen {"ARMOR GOOD/EXTRA" ,S_NUM ,m_null,ST_X,ST_Y+13*8, {"armor_green"}}, {"AMMO LOW/OK" ,S_NUM ,m_null,ST_X,ST_Y+14*8, {"ammo_red"}}, {"AMMO OK/GOOD" ,S_NUM ,m_null,ST_X,ST_Y+15*8, {"ammo_yellow"}}, - {"\"A SECRET IS REVEALED\" MESSAGE",S_YESNO,m_null,ST_X,ST_Y+16*8, {"hud_secret_message"}}, + {"\"A SECRET IS REVEALED!\" MESSAGE",S_YESNO,m_null,ST_X,ST_Y+16*8, {"hud_secret_message"}}, // Button for resetting to defaults {0,S_RESET,m_null,X_BUTTON,Y_BUTTON}, diff --git a/Source/m_misc.c b/Source/m_misc.c index 6c844be6..2d17f98d 100644 --- a/Source/m_misc.c +++ b/Source/m_misc.c @@ -1698,11 +1698,12 @@ default_t defaults[] = { "1 to disable display of kills/items/secrets on HUD" }, - { // "A secret is revealed" message + // "A secret is revealed!" message + { "hud_secret_message", (config_t *) &hud_secret_message, NULL, {0}, {0,1}, number, ss_none, wad_no, - "\"A secret is revealed\" message" + "\"A secret is revealed!\" message" }, { // killough 2/8/98: weapon preferences set by user: diff --git a/Source/mmus2mid.c b/Source/mmus2mid.c index b4b64b4a..e1bbbb77 100644 --- a/Source/mmus2mid.c +++ b/Source/mmus2mid.c @@ -303,6 +303,8 @@ int mmus2mid(UBYTE *mus, MIDI *mididata, UWORD division, int nocomp) signed char MUS2MIDchannel[MIDI_TRACKS]; // copy the MUS header from the MUS buffer to the MUSh header structure + + // [Woof!] fix MIDI endianess memcpy(MUSh.ID, mus, 4); MUSh.ScoreLength = READ_INT16(&mus[4]); MUSh.ScoreStart = READ_INT16(&mus[6]); diff --git a/Source/sounds.c b/Source/sounds.c index 7de567d8..d4a36ef1 100644 --- a/Source/sounds.c +++ b/Source/sounds.c @@ -234,7 +234,7 @@ sfxinfo_t S_sfx[] = { { "dgpain", sg_none, 96, 0, -1, -1, 0 }, // [crispy] play DSSECRET if available - { "secret", sg_none, 100, 0, -1, -1, 0 }, + { "secret", sg_none, 100, 0, -1, -1, 0 }, }; //---------------------------------------------------------------------------- diff --git a/Source/st_stuff.c b/Source/st_stuff.c index 39944334..9c163710 100644 --- a/Source/st_stuff.c +++ b/Source/st_stuff.c @@ -386,11 +386,11 @@ void ST_refreshBackground(boolean force) // killough 3/7/98: make face background change with displayplayer if (netgame) V_DrawPatch(ST_FX, 0, BG, faceback[displayplayer]); - + // [crispy] copy entire SCREENWIDTH, to preserve the pattern // to the left and right of the status bar in widescren mode if (!force) - { + { V_CopyRect(ST_X, 0, BG, SCREENWIDTH, ST_HEIGHT, ST_X, ST_Y, FG); } else diff --git a/Source/w_wad.c b/Source/w_wad.c index 68297f31..c1e43c4f 100644 --- a/Source/w_wad.c +++ b/Source/w_wad.c @@ -429,7 +429,7 @@ void W_InitMultipleFiles(char *const *filenames) // killough 4/4/98: add colormap markers W_CoalesceMarkedResource("C_START", "C_END", ns_colormaps); - // To ignore lumps between HI_START / HI_END markers + // [Woof!] namespace to avoid conflicts with high-resolution textures W_CoalesceMarkedResource("HI_START", "HI_END", ns_hires); // set up caching diff --git a/Source/w_wad.h b/Source/w_wad.h index 9c202874..1b0f1090 100644 --- a/Source/w_wad.h +++ b/Source/w_wad.h @@ -70,7 +70,7 @@ typedef struct ns_sprites, ns_flats, ns_colormaps, - ns_hires // namespace to avoid conflicts with high-resolution textures + ns_hires // [Woof!] namespace to avoid conflicts with high-resolution textures } namespace; int handle; diff --git a/midiproc/CMakeLists.txt b/midiproc/CMakeLists.txt index a1ee9608..e597472a 100644 --- a/midiproc/CMakeLists.txt +++ b/midiproc/CMakeLists.txt @@ -3,7 +3,7 @@ if(WIN32) add_executable(woof-midiproc WIN32 buffer.c buffer.h main.c proto.h) - target_woof_settings(woof-midiproc) + target_woof_settings(woof-midiproc) target_include_directories(woof-midiproc PRIVATE "../Source/" "${CMAKE_CURRENT_BINARY_DIR}/../") target_link_libraries(woof-midiproc SDL2::SDL2main SDL2::mixer)