Skip to content

Commit

Permalink
Merge branch 'blockmapfix' into wiiu-port
Browse files Browse the repository at this point in the history
  • Loading branch information
thearst3rd committed Aug 31, 2021
2 parents a2279b8 + 44acecc commit f8a4ba8
Show file tree
Hide file tree
Showing 40 changed files with 395 additions and 136 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

cmake_minimum_required(VERSION 3.7.2)
project("Crispy Doom" VERSION 5.10.1 LANGUAGES C)
project("Crispy Doom" VERSION 5.10.3 LANGUAGES C)

# Autotools variables
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
56 changes: 54 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,61 @@ After successful compilation the resulting binaries can be found in the `src/` d

## News

### Crispy Doom 5.10.3

Crispy Doom 5.10.3 is released on Aug 17, 2021. It is a bug-fix release fixing a regression in savegame restoring introduced by the A11Y features from the 5.10.2 release.

**New Features and Improvements**

* The translucency map is now always recalculated and no more loaded from a file or lump.
* Autoload directories are now also supported for "sideloaded" PWADs - i.e. nerve.wad, masterlevels.wad and sigil.wad (thanks @Raddatoons).

**Bug Fixes**

* Rendered sector lightlevels are now saved in savegames if they are different from the logical lightlevels, fixing a regression intruduced with A11Y support (thanks Alaux).
* The green color translation range has been fine-tuned so that light-blue isn't preferred over green anymore (thanks maxmanium).
* The CMake build system has been updated for A11Y (thanks @vanfanel).

Crispy Doom 5.10.3 is based on Chocolate Doom 3.0.1 and has merged all changes to the Chocolate Doom master branch up to commit [`3524a67d`](https://github.com/chocolate-doom/chocolate-doom/commit/3524a67dd3c7d48a172c83d3ae170a7176fb3cfa).

### Crispy Doom 5.10.2

Crispy Doom 5.10.2 is released on Aug 10, 2021. It is a minor release introducing basic accessibility features and accumulated fixes since the previous release.

**New Features and Improvements**

* Smooth automap rotation and srolling have been implemented (by @JNechaevsky).
* Autoload directories for PWADs are now supported (thanks @OpenRift412 for the suggestion and @rfomin for the prior implementation in Woof!).
* Basic accessibility features have been added and can be toggled in the Accessibility menu of the setup tool:
* Flickering Sector Lighting (disables sectors changing their light levels)
* Weapon Flash Lighting (disables weapon flashes changing the ambient light levels)
* Weapon Flash Sprite (disables rendering of weapon flashes sprites)
* Palette Changes (disables palette changes upon damage, item pickup, or when wearing the radiation suit)
* Invulnerability Colormap (disables colormap changes during invulnerability)

**Bug Fixes**

* In NRFTL the TITLEPIC is only replaced with the INTERPIC if the former is from the IWAD (thanks @OpenRift412).
* Overlaid automap remainings are now cleared from the demo loop (by @JNechaevsky).
* Adjusting of the BLOCKMAP boundaries to match the Vanilla algorithm has been reverted. Although this was done in the Vanilla algorithm, it doesn't match what's done in the algorithms used by MBF and Boom - and thus PrBoom+ which uses the latter. This fixes sync for one demo reported by galileo31dos01 on 5L1C.wad MAP01.
* The Compatibility menu has been removed from the setup tool, it is obsolete for all games now.
* The translucency table is now always calculated at gamma level 0, fixing potentially incorrect entries (by @JNechaevsky).
* The episode menu is now rendered with the HUD font if the graphics are both from an IWAD and if the patch width for "Hell on Earth" is longer than "No Rest for the Living" (thanks thanks @hackneyed-one).
* Automap rotation variables are now properly initialized, preventing line shaking (by @JNechaevsky).

**Crispy Heretic**

* The `-demoext` parameter (even though enabled by default) only applies to demos loaded on the command line.

**Crispy Hexen**

* Hexen: Restore pointers to `mobj_t` with garbage identity as `NULL` pointers (by @Dasperal).

Crispy Doom 5.10.2 is based on Chocolate Doom 3.0.1 and has merged all changes to the Chocolate Doom master branch up to commit [`3524a67d`](https://github.com/chocolate-doom/chocolate-doom/commit/3524a67dd3c7d48a172c83d3ae170a7176fb3cfa).

### Crispy Doom 5.10.1

Crispy Doom 5.10.1 is currently under development.
Crispy Doom 5.10.1 is released on Mar 24, 2021. It is a minor release containing the accumulated fixes of the past weeks.

**New Features and Improvements**

Expand All @@ -268,7 +320,7 @@ Crispy Doom 5.10.1 is currently under development.
* There are now separate mouse sensitivities for turn, strafe and y-axis.
* Heretic now has a "demowarp" feature, i.e. support for using both `-playdemo` and `-warp` on the command line (thanks @thom-wye).

Crispy Doom 5.10.1 is based on Chocolate Doom 3.0.1 and has merged all changes to the Chocolate Doom master branch up to commit [`d5b1a695`](https://github.com/chocolate-doom/chocolate-doom/commit/d5b1a695090eb49da3a4277686a30920cd5de046).
Crispy Doom 5.10.1 is based on Chocolate Doom 3.0.1 and has merged all changes to the Chocolate Doom master branch up to commit [`5003ab52`](https://github.com/chocolate-doom/chocolate-doom/commit/5003ab5283ff27c951c97b064c26cdde2bb0f427).

### Crispy Doom 5.10.0

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(Crispy Doom, 5.10.1,
AC_INIT(Crispy Doom, 5.10.3,
[email protected], crispy-doom)

PACKAGE_SHORTNAME=${PACKAGE_NAME% Doom}
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ target_link_libraries("${PROGRAM_PREFIX}server" SDL2::SDL2main SDL2::net)
# Source files used by the game binaries (chocolate-doom, etc.)

set(GAME_SOURCE_FILES
a11y.c a11y.h
aes_prng.c aes_prng.h
d_event.c d_event.h
doomkeys.h
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ z_native.c z_zone.h
# Source files used by the game binaries (chocolate-doom, etc.)

GAME_SOURCE_FILES=\
a11y.c a11y.h \
aes_prng.c aes_prng.h \
d_event.c d_event.h \
doomkeys.h \
Expand Down
24 changes: 24 additions & 0 deletions src/a11y.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
// Copyright(C) 2021 Fabian Greffrath
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// DESCRIPTION:
// Accessibility specific variables.
//

int a11y_sector_lighting = 1;
int a11y_weapon_flash = 1;
int a11y_weapon_pspr = 1;
int a11y_palette_changes = 1;
int a11y_invul_colormap = 1;
32 changes: 32 additions & 0 deletions src/a11y.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
// Copyright(C) 2021 Fabian Greffrath
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// DESCRIPTION:
// Accessibility specific variables.
//


#ifndef __A11Y_H__
#define __A11Y_H__

extern int a11y_sector_lighting;
extern int a11y_weapon_flash;
extern int a11y_weapon_pspr;
extern int a11y_palette_changes;
extern int a11y_invul_colormap;

// [crispy] A11Y number of player sprites to draw
extern int numrpsprites;
#endif
1 change: 0 additions & 1 deletion src/crispy.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
static crispy_t crispy_s = {
0,
.extautomap = 1,
.extsaveg = 1,
#ifdef __WIIU__
// High resolution can lag on Wii U...
// But, lets enable smooth framerate and widescreen by default
Expand Down
1 change: 0 additions & 1 deletion src/crispy.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ typedef struct
int demotimerdir;
int demobar;
int extautomap;
int extsaveg;
int flipcorpses;
int freeaim;
int freelook;
Expand Down
9 changes: 9 additions & 0 deletions src/doom/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ void AM_initVariables(void)

m_x = plr->mo->x - m_w/2;
m_y = plr->mo->y - m_h/2;

// [JN] Predefine rotation variables for AM_rotatePoint.
mapcenter.x = m_x + m_w / 2;
mapcenter.y = m_y + m_h / 2;
if (!(!followplayer && crispy->automapoverlay))
{
mapangle = ANG90 - plr->mo->angle;
}

AM_changeWindowLoc();

// for saving & restoring
Expand Down
7 changes: 6 additions & 1 deletion src/doom/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "i_video.h"

#include "g_game.h"
#include "a11y.h" // [crispy] A11Y

#include "hu_stuff.h"
#include "wi_stuff.h"
Expand Down Expand Up @@ -413,6 +414,11 @@ void D_BindVariables(void)
// [crispy] unconditionally disable savegame and demo limits
// M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit);
// M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit);
M_BindIntVariable("a11y_sector_lighting", &a11y_sector_lighting);
M_BindIntVariable("a11y_weapon_flash", &a11y_weapon_flash);
M_BindIntVariable("a11y_weapon_pspr", &a11y_weapon_pspr);
M_BindIntVariable("a11y_palette_changes", &a11y_palette_changes);
M_BindIntVariable("a11y_invul_colormap", &a11y_invul_colormap);
M_BindIntVariable("show_endoom", &show_endoom);
M_BindIntVariable("show_diskicon", &show_diskicon);

Expand Down Expand Up @@ -446,7 +452,6 @@ void D_BindVariables(void)
M_BindIntVariable("crispy_demotimer", &crispy->demotimer);
M_BindIntVariable("crispy_demotimerdir", &crispy->demotimerdir);
M_BindIntVariable("crispy_extautomap", &crispy->extautomap);
M_BindIntVariable("crispy_extsaveg", &crispy->extsaveg);
M_BindIntVariable("crispy_flipcorpses", &crispy->flipcorpses);
M_BindIntVariable("crispy_freeaim", &crispy->freeaim);
M_BindIntVariable("crispy_freelook", &crispy->freelook);
Expand Down
33 changes: 31 additions & 2 deletions src/doom/d_pwad.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
#include <stdlib.h>

#include "doomstat.h"
#include "deh_str.h"
#include "deh_main.h"
#include "d_iwad.h"
#include "m_config.h"
#include "m_misc.h"
#include "w_main.h"
#include "w_wad.h"

extern char *iwadfile;
Expand All @@ -33,6 +35,7 @@ void D_LoadSigilWad (void)
{
int i, j;
char *sigil_wad = NULL, *sigil_shreds = NULL;
char *sigil_basename, *autoload_dir;
char *dirname;

const char *const sigil_wads[] = {
Expand Down Expand Up @@ -119,6 +122,7 @@ void D_LoadSigilWad (void)

printf(" [Sigil] adding %s\n", sigil_wad);
W_AddFile(sigil_wad);
sigil_basename = M_StringDuplicate(M_BaseName(sigil_wad));
free(sigil_wad);

// [crispy] load SIGIL_SHREDS.WAD
Expand Down Expand Up @@ -157,12 +161,19 @@ void D_LoadSigilWad (void)
{
j = W_CheckNumForName(sigil_lumps[i].name);

if (j != -1 && !strncasecmp(W_WadNameForLump(lumpinfo[j]), "SIGIL", 5))
if (j != -1 && !strcasecmp(W_WadNameForLump(lumpinfo[j]), sigil_basename))
{
memcpy(lumpinfo[j]->name, sigil_lumps[i].new_name, 8);
}
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(sigil_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
free(sigil_basename);

// [crispy] regenerate the hashtable
W_GenerateHashTable();
}
Expand Down Expand Up @@ -197,6 +208,8 @@ static boolean CheckNerveLoaded (void)
// [crispy] auto-load NERVE.WAD if available
static void CheckLoadNerve (void)
{
const char *nerve_basename;
char *autoload_dir;
int i, j;

static const struct {
Expand Down Expand Up @@ -232,6 +245,7 @@ static void CheckLoadNerve (void)

printf(" [No Rest for the Living] adding %s\n", crispy->havenerve);
W_AddFile(crispy->havenerve);
nerve_basename = M_BaseName(crispy->havenerve);

// [crispy] add indicators to level and level name patch lump names
for (i = 0; i < 9; i++)
Expand All @@ -258,6 +272,12 @@ static void CheckLoadNerve (void)
}
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(nerve_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);

// [crispy] regenerate the hashtable
W_GenerateHashTable();

Expand Down Expand Up @@ -295,6 +315,8 @@ static boolean CheckMasterlevelsLoaded (void)
// [crispy] auto-load the single MASTERLEVELS.WAD if available
static boolean CheckLoadMasterlevels (void)
{
const char *master_basename;
char *autoload_dir;
int i, j;

if (strrchr(iwadfile, DIR_SEPARATOR) != NULL)
Expand Down Expand Up @@ -322,6 +344,7 @@ static boolean CheckLoadMasterlevels (void)

printf(" [The Master Levels] adding %s\n", crispy->havemaster);
W_AddFile(crispy->havemaster);
master_basename = M_BaseName(crispy->havemaster);

// [crispy] add indicators to level and level name patch lump names
for (i = 0; i < 21; i++)
Expand All @@ -346,6 +369,12 @@ static boolean CheckLoadMasterlevels (void)
strcat(lumpinfo[j]->name, "M");
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(master_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);

// [crispy] regenerate the hashtable
W_GenerateHashTable();

Expand Down
20 changes: 6 additions & 14 deletions src/doom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,12 +2220,10 @@ void G_DoLoadGame (void)
I_Error("Could not load savegame %s", savename);
}

// [crispy] read extended savegame data
if (crispy->extsaveg)
{
// [crispy] first pass, read "savewadfilename"
P_ReadExtendedSaveGameData(0);
}
// [crispy] read extended savegame data,
// first pass: read "savewadfilename"
P_ReadExtendedSaveGameData(0);

// [crispy] check if WAD file is valid to restore saved map
if (savewadfilename)
{
Expand Down Expand Up @@ -2277,10 +2275,7 @@ void G_DoLoadGame (void)
I_Error ("Bad savegame");

// [crispy] read more extended savegame data
if (crispy->extsaveg)
{
P_ReadExtendedSaveGameData(1);
}
P_ReadExtendedSaveGameData(1);

fclose(save_stream);
#ifdef __WIIU__
Expand Down Expand Up @@ -2378,10 +2373,7 @@ void G_DoSaveGame (void)

P_WriteSaveGameEOF();
// [crispy] write extended savegame data
if (crispy->extsaveg)
{
P_WriteExtendedSaveGameData();
}
P_WriteExtendedSaveGameData();

// [crispy] unconditionally disable savegame and demo limits
/*
Expand Down
6 changes: 0 additions & 6 deletions src/doom/m_crispy.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ void M_CrispyToggleExtAutomap(int choice)
crispy->extautomap = !crispy->extautomap;
}

void M_CrispyToggleExtsaveg(int choice)
{
choice = 0;
crispy->extsaveg = !crispy->extsaveg;
}

void M_CrispyToggleFlipcorpses(int choice)
{
if (gameversion == exe_chex)
Expand Down
1 change: 0 additions & 1 deletion src/doom/m_crispy.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ extern void M_CrispyToggleDemoTimer(int choice);
extern void M_CrispyToggleDemoTimerDir(int choice);
extern void M_CrispyToggleDemoUseTimer(int choice);
extern void M_CrispyToggleExtAutomap(int choice);
extern void M_CrispyToggleExtsaveg(int choice);
extern void M_CrispyToggleFlipcorpses(int choice);
extern void M_CrispyToggleFreeaim(int choice);
extern void M_CrispyToggleFreelook(int choice);
Expand Down
Loading

0 comments on commit f8a4ba8

Please sign in to comment.