From 72e9a870c28c42e72cc8aff9f1d3480541199e7d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 27 Mar 2010 21:12:08 +0000 Subject: [PATCH] - added Gez's patch to move Hexen's startup notches out of the EXE. SVN r2250 (trunk) --- src/win32/st_start.cpp | 82 +++++++++++++++---------------------- wadsrc/static/netnotch.dat | Bin 0 -> 32 bytes wadsrc/static/notch.dat | Bin 0 -> 184 bytes 3 files changed, 32 insertions(+), 50 deletions(-) create mode 100644 wadsrc/static/netnotch.dat create mode 100644 wadsrc/static/notch.dat diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index f2a62c4c2a..8fe844f700 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -153,10 +153,15 @@ class FHexenStartupScreen : public FGraphicalStartupScreen { public: FHexenStartupScreen(int max_progress, HRESULT &hr); + ~FHexenStartupScreen(); void Progress(); void NetProgress(int count); void NetDone(); + + // Hexen's notch graphics, converted to chunky pixels. + BYTE * NotchBits; + BYTE * NetNotchBits; }; class FStrifeStartupScreen : public FGraphicalStartupScreen @@ -253,55 +258,6 @@ static const RGBQUAD TextModePalette[16] = { HI, HI, HI, 0 }, // F white }; -// Hexen's notch graphics, converted to chunky pixels. - -static const BYTE NotchBits[] = -{ - 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x68, 0x86, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x78, 0x87, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd8, 0x8d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd8, 0x8d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd8, 0x8d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd8, 0x8d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd8, 0x87, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xd7, 0x7d, 0x60, 0x00, 0x00, - 0x00, 0x66, 0x99, 0x99, 0x96, 0x69, 0x66, 0x00, - 0x00, 0x69, 0x96, 0x99, 0x69, 0x96, 0x96, 0x00, - 0x06, 0x9d, 0x99, 0x69, 0x96, 0xd9, 0x79, 0x60, - 0x06, 0x7d, 0xdd, 0xdd, 0xdd, 0xdd, 0x77, 0x60, - 0x06, 0x78, 0x88, 0x88, 0x88, 0x88, 0xd6, 0x60, - 0x06, 0x7a, 0xaa, 0xaa, 0xaa, 0xaa, 0xd6, 0x60, - 0x06, 0x7a, 0x77, 0x77, 0x77, 0xa7, 0x96, 0x60, - 0x06, 0x77, 0xa7, 0x77, 0x77, 0xa7, 0x96, 0x60, - 0x06, 0x97, 0xa7, 0x79, 0x77, 0x77, 0x96, 0x60, - 0x00, 0x67, 0x79, 0x99, 0x99, 0xd7, 0x96, 0x60, - 0x00, 0x69, 0x99, 0x66, 0x69, 0x69, 0x66, 0x00 -}; - -static const BYTE NetNotchBits[] = -{ - 0x52, 0x20, - 0x23, 0x25, - 0x33, 0x25, - 0x31, 0x35, - 0x31, 0x35, - 0x31, 0x35, - 0x33, 0x35, - 0x31, 0x35, - 0x31, 0x35, - 0x31, 0x25, - 0x33, 0x35, - 0x31, 0x20, - 0x21, 0x35, - 0x23, 0x25, - 0x52, 0x20, - 0x05, 0x50 -}; - // CODE -------------------------------------------------------------------- //========================================================================== @@ -678,13 +634,23 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr) : FGraphicalStartupScreen(max_progress) { int startup_lump = Wads.CheckNumForName ("STARTUP"); + int netnotch_lump = Wads.CheckNumForName ("NETNOTCH"); + int notch_lump = Wads.CheckNumForName ("NOTCH"); hr = E_FAIL; - if (startup_lump < 0 || Wads.LumpLength (startup_lump) != 153648 || !ST_Util_CreateStartupWindow()) + if (startup_lump < 0 || Wads.LumpLength (startup_lump) != 153648 || !ST_Util_CreateStartupWindow() || + netnotch_lump < 0 || Wads.LumpLength (netnotch_lump) != ST_NETNOTCH_WIDTH / 2 * ST_NETNOTCH_HEIGHT || + notch_lump < 0 || Wads.LumpLength (notch_lump) != ST_NOTCH_WIDTH / 2 * ST_NOTCH_HEIGHT) { + NetNotchBits = NotchBits = NULL; return; } + NetNotchBits = new BYTE[ST_NETNOTCH_WIDTH / 2 * ST_NETNOTCH_HEIGHT]; + Wads.ReadLump (netnotch_lump, NetNotchBits); + NotchBits = new BYTE[ST_NOTCH_WIDTH / 2 * ST_NOTCH_HEIGHT]; + Wads.ReadLump (notch_lump, NotchBits); + BYTE startup_screen[153648]; union { @@ -723,6 +689,22 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr) hr = S_OK; } +//========================================================================== +// +// FHexenStartupScreen Deconstructor +// +// Frees the notch pictures. +// +//========================================================================== + +FHexenStartupScreen::~FHexenStartupScreen() +{ + if (NotchBits) + delete[] NotchBits; + if (NetNotchBits) + delete[] NetNotchBits; +} + //========================================================================== // // FHexenStartupScreen :: Progress diff --git a/wadsrc/static/netnotch.dat b/wadsrc/static/netnotch.dat new file mode 100644 index 0000000000000000000000000000000000000000..d1a430adf3c141ca2a523939abb708ce6a0e5bee GIT binary patch literal 32 fcmWGiP*ycoH8cf5V=!r`3ZxYjO_f!H6j%cQV{irS literal 0 HcmV?d00001 diff --git a/wadsrc/static/notch.dat b/wadsrc/static/notch.dat new file mode 100644 index 0000000000000000000000000000000000000000..ef0b13af671f8e1d07acf79ac67dace823912955 GIT binary patch literal 184 zcmajXF$w}f429uWMGFs^YBZf)c7z2hwXuz)upaOfp2F3_yZCgr_lNKi2mydChb?AT z_uq=;zPmYehhz77{^NW%jmpE48CC#`v