diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 52aabec8bd..dd47759d93 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -535,90 +535,15 @@ add_executable( zdoom WIN32 x86.cpp zstrformat.cpp zstring.cpp - g_doom/a_arachnotron.cpp - g_doom/a_archvile.cpp - g_doom/a_bossbrain.cpp - g_doom/a_bruiser.cpp - g_doom/a_cacodemon.cpp - g_doom/a_cyberdemon.cpp - g_doom/a_demon.cpp - g_doom/a_doomimp.cpp g_doom/a_doommisc.cpp - g_doom/a_doomweaps.cpp - g_doom/a_fatso.cpp - g_doom/a_keen.cpp - g_doom/a_lostsoul.cpp - g_doom/a_painelemental.cpp - g_doom/a_possessed.cpp - g_doom/a_revenant.cpp - g_doom/a_scriptedmarine.cpp - g_doom/a_spidermaster.cpp g_doom/doom_sbar.cpp - g_heretic/a_chicken.cpp - g_heretic/a_dsparil.cpp - g_heretic/a_hereticartifacts.cpp - g_heretic/a_hereticimp.cpp g_heretic/a_hereticmisc.cpp - g_heretic/a_hereticweaps.cpp - g_heretic/a_ironlich.cpp - g_heretic/a_knight.cpp - g_heretic/a_wizard.cpp g_heretic/heretic_sbar.cpp - g_hexen/a_bats.cpp - g_hexen/a_bishop.cpp - g_hexen/a_blastradius.cpp - g_hexen/a_boostarmor.cpp - g_hexen/a_centaur.cpp - g_hexen/a_clericflame.cpp - g_hexen/a_clericholy.cpp - g_hexen/a_clericmace.cpp - g_hexen/a_clericstaff.cpp - g_hexen/a_dragon.cpp - g_hexen/a_fighteraxe.cpp - g_hexen/a_fighterhammer.cpp - g_hexen/a_fighterplayer.cpp - g_hexen/a_fighterquietus.cpp - g_hexen/a_firedemon.cpp - g_hexen/a_flechette.cpp - g_hexen/a_fog.cpp - g_hexen/a_healingradius.cpp - g_hexen/a_heresiarch.cpp - g_hexen/a_hexenspecialdecs.cpp - g_hexen/a_iceguy.cpp - g_hexen/a_korax.cpp - g_hexen/a_magecone.cpp - g_hexen/a_magelightning.cpp - g_hexen/a_magestaff.cpp - g_hexen/a_magewand.cpp - g_hexen/a_pig.cpp - g_hexen/a_serpent.cpp - g_hexen/a_spike.cpp - g_hexen/a_summon.cpp - g_hexen/a_teleportother.cpp - g_hexen/a_wraith.cpp + g_hexen/a_hexenmisc.cpp g_hexen/hexen_sbar.cpp g_raven/a_artitele.cpp g_raven/a_minotaur.cpp - g_strife/a_acolyte.cpp - g_strife/a_alienspectres.cpp - g_strife/a_coin.cpp - g_strife/a_crusader.cpp - g_strife/a_entityboss.cpp - g_strife/a_inquisitor.cpp - g_strife/a_loremaster.cpp - g_strife/a_macil.cpp - g_strife/a_oracle.cpp - g_strife/a_programmer.cpp - g_strife/a_reaver.cpp - g_strife/a_rebels.cpp - g_strife/a_sentinel.cpp - g_strife/a_spectral.cpp - g_strife/a_stalker.cpp - g_strife/a_strifeitems.cpp g_strife/a_strifestuff.cpp - g_strife/a_strifeweapons.cpp - g_strife/a_templar.cpp - g_strife/a_thingstoblowup.cpp g_strife/strife_sbar.cpp g_shared/a_action.cpp g_shared/a_armor.cpp diff --git a/src/am_map.cpp b/src/am_map.cpp index 6b0c33a9de..2476d93a6b 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -44,6 +44,7 @@ // Needs access to LFB. #include "v_video.h" +#include "v_palette.h" #include "v_text.h" diff --git a/src/ct_chat.cpp b/src/ct_chat.cpp index f728995acd..f527ac1b33 100644 --- a/src/ct_chat.cpp +++ b/src/ct_chat.cpp @@ -22,6 +22,7 @@ #include "c_console.h" #include "c_dispatch.h" #include "c_cvars.h" +#include "d_player.h" #include "v_text.h" #include "v_video.h" #include "gi.h" diff --git a/src/d_main.cpp b/src/d_main.cpp index b59324d9f4..257650d616 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -98,6 +98,7 @@ #include "g_level.h" #include "d_event.h" #include "d_netinf.h" +#include "v_palette.h" EXTERN_CVAR(Bool, hud_althud) void DrawHUD(); diff --git a/src/doomstat.cpp b/src/doomstat.cpp index 4018b7e437..0fe988a92f 100644 --- a/src/doomstat.cpp +++ b/src/doomstat.cpp @@ -29,7 +29,6 @@ #include "i_system.h" #include "g_level.h" #include "p_local.h" -#include "p_acs.h" int SaveVersion; diff --git a/src/f_finale.cpp b/src/f_finale.cpp index 49d37b3ae2..6037af5036 100644 --- a/src/f_finale.cpp +++ b/src/f_finale.cpp @@ -48,6 +48,7 @@ #include "r_translate.h" #include "g_level.h" #include "d_event.h" +#include "v_palette.h" static void FadePic (); static void GetFinaleText (const char *msgLumpName); diff --git a/src/farchive.h b/src/farchive.h index fefc3200b3..9af7d25baa 100644 --- a/src/farchive.h +++ b/src/farchive.h @@ -283,6 +283,14 @@ inline FArchive &operator<< (FArchive &arc, T* &object) FArchive &operator<< (FArchive &arc, const PClass * &info); +class FFont; +FArchive &SerializeFFontPtr (FArchive &arc, FFont* &font); +template<> inline FArchive &operator<< (FArchive &arc, FFont* &font) +{ + return SerializeFFontPtr (arc, font); +} + + template inline FArchive &operator<< (FArchive &arc, TArray &self) { diff --git a/src/g_doom/a_arachnotron.cpp b/src/g_doom/a_arachnotron.cpp index d92d0acba1..19c3bb63ad 100644 --- a/src/g_doom/a_arachnotron.cpp +++ b/src/g_doom/a_arachnotron.cpp @@ -1,9 +1,11 @@ +/* #include "actor.h" #include "s_sound.h" #include "p_local.h" #include "p_enemy.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ DEFINE_ACTION_FUNCTION(AActor, A_BspiAttack) { diff --git a/src/g_doom/a_archvile.cpp b/src/g_doom/a_archvile.cpp index 620e572604..25df2087e5 100644 --- a/src/g_doom/a_archvile.cpp +++ b/src/g_doom/a_archvile.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -6,6 +7,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ // // PIT_VileCheck diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 77bfc39356..6cf9146cbe 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -9,6 +10,7 @@ #include "thingdef/thingdef.h" #include "doomstat.h" #include "g_level.h" +*/ static FRandom pr_brainscream ("BrainScream"); static FRandom pr_brainexplode ("BrainExplode"); diff --git a/src/g_doom/a_bruiser.cpp b/src/g_doom/a_bruiser.cpp index 948e6016ef..24c6c48eb1 100644 --- a/src/g_doom/a_bruiser.cpp +++ b/src/g_doom/a_bruiser.cpp @@ -1,14 +1,3 @@ -#include "actor.h" -#include "info.h" -#include "m_random.h" -#include "s_sound.h" -#include "p_local.h" -#include "p_enemy.h" -#include "doomstat.h" -#include "gstrings.h" -#include "a_action.h" -#include "thingdef/thingdef.h" - static FRandom pr_bruisattack ("BruisAttack"); diff --git a/src/g_doom/a_cacodemon.cpp b/src/g_doom/a_cacodemon.cpp index e594ec7edb..0eb9238906 100644 --- a/src/g_doom/a_cacodemon.cpp +++ b/src/g_doom/a_cacodemon.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "a_action.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_headattack ("HeadAttack"); diff --git a/src/g_doom/a_cyberdemon.cpp b/src/g_doom/a_cyberdemon.cpp index a01709595d..f13728e48b 100644 --- a/src/g_doom/a_cyberdemon.cpp +++ b/src/g_doom/a_cyberdemon.cpp @@ -1,9 +1,11 @@ +/* #include "actor.h" #include "p_local.h" #include "s_sound.h" #include "p_enemy.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ DEFINE_ACTION_FUNCTION(AActor, A_CyberAttack) { diff --git a/src/g_doom/a_demon.cpp b/src/g_doom/a_demon.cpp index 7f6bc0cdfe..c890c32b04 100644 --- a/src/g_doom/a_demon.cpp +++ b/src/g_doom/a_demon.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -6,6 +7,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_sargattack ("SargAttack"); diff --git a/src/g_doom/a_doomimp.cpp b/src/g_doom/a_doomimp.cpp index bbbb2fe0f3..401fa4577f 100644 --- a/src/g_doom/a_doomimp.cpp +++ b/src/g_doom/a_doomimp.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_troopattack ("TroopAttack"); diff --git a/src/g_doom/a_doommisc.cpp b/src/g_doom/a_doommisc.cpp index 230d58a1c4..898068d66c 100644 --- a/src/g_doom/a_doommisc.cpp +++ b/src/g_doom/a_doommisc.cpp @@ -1,6 +1,5 @@ #include "actor.h" #include "info.h" -#include "p_enemy.h" #include "p_local.h" #include "a_sharedglobal.h" #include "m_random.h" @@ -8,6 +7,31 @@ #include "doomstat.h" #include "gstrings.h" #include "thingdef/thingdef.h" +#include "g_level.h" +#include "p_enemy.h" +#include "a_doomglobal.h" +#include "a_specialspot.h" +#include "templates.h" +#include "m_bbox.h" + +// Include all the other Doom stuff here to reduce compile time +#include "a_arachnotron.cpp" +#include "a_archvile.cpp" +#include "a_bossbrain.cpp" +#include "a_bruiser.cpp" +#include "a_cacodemon.cpp" +#include "a_cyberdemon.cpp" +#include "a_demon.cpp" +#include "a_doomimp.cpp" +#include "a_doomweaps.cpp" +#include "a_fatso.cpp" +#include "a_keen.cpp" +#include "a_lostsoul.cpp" +#include "a_painelemental.cpp" +#include "a_possessed.cpp" +#include "a_revenant.cpp" +#include "a_spidermaster.cpp" +#include "a_scriptedmarine.cpp" // The barrel of green goop ------------------------------------------------ diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 1ead3d7dd3..ac4e0a0e3c 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "s_sound.h" @@ -12,6 +13,7 @@ #include "templates.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_punch ("Punch"); static FRandom pr_saw ("Saw"); diff --git a/src/g_doom/a_fatso.cpp b/src/g_doom/a_fatso.cpp index 809eccd0cc..b93019a3bb 100644 --- a/src/g_doom/a_fatso.cpp +++ b/src/g_doom/a_fatso.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ // // Mancubus attack, diff --git a/src/g_doom/a_keen.cpp b/src/g_doom/a_keen.cpp index 6cf4952347..7c7be9f486 100644 --- a/src/g_doom/a_keen.cpp +++ b/src/g_doom/a_keen.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -5,6 +6,7 @@ #include "p_enemy.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ // // A_KeenDie diff --git a/src/g_doom/a_lostsoul.cpp b/src/g_doom/a_lostsoul.cpp index 7334674733..df7cd743b1 100644 --- a/src/g_doom/a_lostsoul.cpp +++ b/src/g_doom/a_lostsoul.cpp @@ -1,3 +1,4 @@ +/* #include "templates.h" #include "actor.h" #include "info.h" @@ -9,6 +10,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ FRandom pr_lost ("LostMissileRange"); diff --git a/src/g_doom/a_painelemental.cpp b/src/g_doom/a_painelemental.cpp index 23c5d5a6a3..ad42378032 100644 --- a/src/g_doom/a_painelemental.cpp +++ b/src/g_doom/a_painelemental.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_enemy.h" @@ -7,6 +8,7 @@ #include "m_bbox.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ DECLARE_ACTION(A_SkullAttack) diff --git a/src/g_doom/a_possessed.cpp b/src/g_doom/a_possessed.cpp index 395b485d1b..e435bff143 100644 --- a/src/g_doom/a_possessed.cpp +++ b/src/g_doom/a_possessed.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "gstrings.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_posattack ("PosAttack"); static FRandom pr_sposattack ("SPosAttack"); diff --git a/src/g_doom/a_revenant.cpp b/src/g_doom/a_revenant.cpp index ae18257a0d..9b610ac11d 100644 --- a/src/g_doom/a_revenant.cpp +++ b/src/g_doom/a_revenant.cpp @@ -1,3 +1,4 @@ +/* #include "templates.h" #include "actor.h" #include "info.h" @@ -9,6 +10,7 @@ #include "a_action.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ static FRandom pr_tracer ("Tracer"); static FRandom pr_skelfist ("SkelFist"); diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index a43f4f637a..7ee65bad91 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "p_enemy.h" #include "a_action.h" @@ -9,6 +10,7 @@ #include "r_translate.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ #define MARINE_PAIN_CHANCE 160 diff --git a/src/g_doom/a_spidermaster.cpp b/src/g_doom/a_spidermaster.cpp index cea5fdc04b..a29561b56e 100644 --- a/src/g_doom/a_spidermaster.cpp +++ b/src/g_doom/a_spidermaster.cpp @@ -1,3 +1,4 @@ +/* #include "templates.h" #include "actor.h" #include "m_random.h" @@ -6,6 +7,7 @@ #include "p_enemy.h" #include "a_action.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_spidrefire ("SpidRefire"); diff --git a/src/g_doom/doom_sbar.cpp b/src/g_doom/doom_sbar.cpp index fb11dd16f5..0349182c13 100644 --- a/src/g_doom/doom_sbar.cpp +++ b/src/g_doom/doom_sbar.cpp @@ -16,6 +16,7 @@ #include "r_translate.h" #include "sbarinfo.h" #include "g_level.h" +#include "v_palette.h" #define ST_EVILGRINCOUNT (2*TICRATE) diff --git a/src/g_game.cpp b/src/g_game.cpp index 31f29ebb67..18e2b7560a 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -41,9 +41,7 @@ #include "m_random.h" #include "m_crc32.h" #include "i_system.h" -#include "p_setup.h" #include "p_saveg.h" -#include "p_effect.h" #include "p_tick.h" #include "d_main.h" #include "wi_stuff.h" diff --git a/src/g_heretic/a_chicken.cpp b/src/g_heretic/a_chicken.cpp index 287bd0820d..dd2983afc4 100644 --- a/src/g_heretic/a_chicken.cpp +++ b/src/g_heretic/a_chicken.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -11,6 +12,7 @@ #include "d_event.h" #include "gstrings.h" #include "thingdef/thingdef.h" +*/ void P_UpdateBeak (AActor *actor); diff --git a/src/g_heretic/a_dsparil.cpp b/src/g_heretic/a_dsparil.cpp index a51ac56141..a02e28ed3d 100644 --- a/src/g_heretic/a_dsparil.cpp +++ b/src/g_heretic/a_dsparil.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -10,6 +11,7 @@ #include "a_specialspot.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ static FRandom pr_s2fx1 ("S2FX1"); static FRandom pr_scrc1atk ("Srcr1Attack"); diff --git a/src/g_heretic/a_hereticartifacts.cpp b/src/g_heretic/a_hereticartifacts.cpp index d19c9713d1..32e3ab9e51 100644 --- a/src/g_heretic/a_hereticartifacts.cpp +++ b/src/g_heretic/a_hereticartifacts.cpp @@ -1,11 +1,12 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ // Tome of power ------------------------------------------------------------ diff --git a/src/g_heretic/a_hereticimp.cpp b/src/g_heretic/a_hereticimp.cpp index a65d3dcc15..ef586a067a 100644 --- a/src/g_heretic/a_hereticimp.cpp +++ b/src/g_heretic/a_hereticimp.cpp @@ -1,12 +1,13 @@ +/* #include "templates.h" #include "actor.h" #include "info.h" #include "m_random.h" #include "s_sound.h" #include "p_local.h" -#include "p_enemy.h" #include "gstrings.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_imp ("ImpExplode"); diff --git a/src/g_heretic/a_hereticmisc.cpp b/src/g_heretic/a_hereticmisc.cpp index 273403ab39..85c75ca349 100644 --- a/src/g_heretic/a_hereticmisc.cpp +++ b/src/g_heretic/a_hereticmisc.cpp @@ -1,6 +1,5 @@ #include "actor.h" #include "info.h" -#include "p_enemy.h" #include "a_pickups.h" #include "a_action.h" #include "m_random.h" @@ -8,6 +7,24 @@ #include "s_sound.h" #include "gstrings.h" #include "thingdef/thingdef.h" +#include "p_enemy.h" +#include "a_specialspot.h" +#include "g_level.h" +#include "a_sharedglobal.h" +#include "templates.h" +#include "r_translate.h" +#include "doomstat.h" + +// Include all the other Heretic stuff here to reduce compile time +#include "a_chicken.cpp" +#include "a_dsparil.cpp" +#include "a_hereticartifacts.cpp" +#include "a_hereticimp.cpp" +#include "a_hereticweaps.cpp" +#include "a_ironlich.cpp" +#include "a_knight.cpp" +#include "a_wizard.cpp" + static FRandom pr_podpain ("PodPain"); static FRandom pr_makepod ("MakePod"); @@ -15,7 +32,7 @@ static FRandom pr_teleg ("TeleGlitter"); static FRandom pr_teleg2 ("TeleGlitter2"); static FRandom pr_volcano ("VolcanoSet"); static FRandom pr_blast ("VolcanoBlast"); -static FRandom pr_impact ("VolcBallImpact"); +static FRandom pr_volcimpact ("VolcBallImpact"); //---------------------------------------------------------------------------- // @@ -184,7 +201,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VolcBallImpact) angle >>= ANGLETOFINESHIFT; tiny->momx = FixedMul (FRACUNIT*7/10, finecosine[angle]); tiny->momy = FixedMul (FRACUNIT*7/10, finesine[angle]); - tiny->momz = FRACUNIT + (pr_impact() << 9); + tiny->momz = FRACUNIT + (pr_volcimpact() << 9); P_CheckMissileSpawn (tiny); } } diff --git a/src/g_heretic/a_hereticweaps.cpp b/src/g_heretic/a_hereticweaps.cpp index 3c2b09e254..c7aa8b9e0b 100644 --- a/src/g_heretic/a_hereticweaps.cpp +++ b/src/g_heretic/a_hereticweaps.cpp @@ -1,3 +1,4 @@ +/* #include "templates.h" #include "actor.h" #include "info.h" @@ -8,13 +9,11 @@ #include "p_pspr.h" #include "p_local.h" #include "gstrings.h" -#include "p_effect.h" -#include "gstrings.h" -#include "p_enemy.h" #include "gi.h" #include "r_translate.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_sap ("StaffAtkPL1"); static FRandom pr_sap2 ("StaffAtkPL2"); diff --git a/src/g_heretic/a_ironlich.cpp b/src/g_heretic/a_ironlich.cpp index b77fdf4eb1..db4fa270b3 100644 --- a/src/g_heretic/a_ironlich.cpp +++ b/src/g_heretic/a_ironlich.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -8,6 +9,7 @@ #include "gstrings.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ static FRandom pr_foo ("WhirlwindDamage"); static FRandom pr_atk ("LichAttack"); diff --git a/src/g_heretic/a_knight.cpp b/src/g_heretic/a_knight.cpp index 41e95dd70e..bc830b3985 100644 --- a/src/g_heretic/a_knight.cpp +++ b/src/g_heretic/a_knight.cpp @@ -1,13 +1,14 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" #include "s_sound.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "a_sharedglobal.h" #include "gstrings.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_dripblood ("DripBlood"); static FRandom pr_knightatk ("KnightAttack"); diff --git a/src/g_heretic/a_wizard.cpp b/src/g_heretic/a_wizard.cpp index 16cb8269f9..df1429849e 100644 --- a/src/g_heretic/a_wizard.cpp +++ b/src/g_heretic/a_wizard.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "a_action.h" #include "gstrings.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_wizatk3 ("WizAtk3"); diff --git a/src/g_heretic/heretic_sbar.cpp b/src/g_heretic/heretic_sbar.cpp index d4ed61aafb..4583189f92 100644 --- a/src/g_heretic/heretic_sbar.cpp +++ b/src/g_heretic/heretic_sbar.cpp @@ -15,6 +15,7 @@ #include "a_keys.h" #include "r_translate.h" #include "g_level.h" +#include "v_palette.h" static FRandom pr_chainwiggle; diff --git a/src/g_hexen/a_bats.cpp b/src/g_hexen/a_bats.cpp index ebb653227c..89802fd435 100644 --- a/src/g_hexen/a_bats.cpp +++ b/src/g_hexen/a_bats.cpp @@ -1,9 +1,11 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" #include "p_local.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_batspawn ("BatSpawn"); static FRandom pr_batmove ("BatMove"); diff --git a/src/g_hexen/a_bishop.cpp b/src/g_hexen/a_bishop.cpp index 73b158730e..33ae5dd971 100644 --- a/src/g_hexen/a_bishop.cpp +++ b/src/g_hexen/a_bishop.cpp @@ -1,12 +1,13 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" #include "s_sound.h" -#include "p_enemy.h" #include "a_action.h" #include "m_random.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_boom ("BishopBoom"); static FRandom pr_atk ("BishopAttack"); diff --git a/src/g_hexen/a_blastradius.cpp b/src/g_hexen/a_blastradius.cpp index 26dc707b18..53ed196353 100644 --- a/src/g_hexen/a_blastradius.cpp +++ b/src/g_hexen/a_blastradius.cpp @@ -1,3 +1,4 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" @@ -5,6 +6,7 @@ #include "p_local.h" #include "p_enemy.h" #include "s_sound.h" +*/ #define BLAST_RADIUS_DIST 255*FRACUNIT #define BLAST_SPEED 20*FRACUNIT diff --git a/src/g_hexen/a_boostarmor.cpp b/src/g_hexen/a_boostarmor.cpp index ca7c6c9dc9..9a386569f9 100644 --- a/src/g_hexen/a_boostarmor.cpp +++ b/src/g_hexen/a_boostarmor.cpp @@ -1,3 +1,4 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" @@ -5,6 +6,7 @@ #include "p_local.h" #include "gi.h" #include "s_sound.h" +*/ // Boost Armor Artifact (Dragonskin Bracers) -------------------------------- diff --git a/src/g_hexen/a_centaur.cpp b/src/g_hexen/a_centaur.cpp index e16ed2e06f..f7ba3b99f9 100644 --- a/src/g_hexen/a_centaur.cpp +++ b/src/g_hexen/a_centaur.cpp @@ -1,8 +1,10 @@ +/* #include "actor.h" #include "p_enemy.h" #include "a_action.h" #include "m_random.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_centaurdefend ("CentaurDefend"); diff --git a/src/g_hexen/a_clericflame.cpp b/src/g_hexen/a_clericflame.cpp index d7975edea9..22e8e3fcec 100644 --- a/src/g_hexen/a_clericflame.cpp +++ b/src/g_hexen/a_clericflame.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,12 +6,12 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ const fixed_t FLAMESPEED = fixed_t(0.45*FRACUNIT); const fixed_t CFLAMERANGE = 12*64*FRACUNIT; diff --git a/src/g_hexen/a_clericholy.cpp b/src/g_hexen/a_clericholy.cpp index d76f5b031f..9573cadfa8 100644 --- a/src/g_hexen/a_clericholy.cpp +++ b/src/g_hexen/a_clericholy.cpp @@ -1,15 +1,16 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" #include "m_random.h" #include "s_sound.h" -#include "p_enemy.h" #include "a_hexenglobal.h" #include "gstrings.h" #include "a_weaponpiece.h" #include "thingdef/thingdef.h" #include "g_level.h" #include "doomstat.h" +*/ #define BLAST_FULLSTRENGTH 255 diff --git a/src/g_hexen/a_clericmace.cpp b/src/g_hexen/a_clericmace.cpp index cfdf588299..d834dcd1be 100644 --- a/src/g_hexen/a_clericmace.cpp +++ b/src/g_hexen/a_clericmace.cpp @@ -1,11 +1,13 @@ +/* #include "m_random.h" #include "p_local.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ extern void AdjustPlayerAngle (AActor *pmo, AActor *linetarget); -static FRandom pr_atk ("CMaceAttack"); +static FRandom pr_maceatk ("CMaceAttack"); //=========================================================================== // @@ -27,7 +29,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CMaceAttack) return; } - damage = 25+(pr_atk()&15); + damage = 25+(pr_maceatk()&15); for (i = 0; i < 16; i++) { angle = player->mo->angle+i*(ANG45/16); diff --git a/src/g_hexen/a_clericstaff.cpp b/src/g_hexen/a_clericstaff.cpp index 87b4691217..09067aaf79 100644 --- a/src/g_hexen/a_clericstaff.cpp +++ b/src/g_hexen/a_clericstaff.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,12 +6,12 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_staffcheck ("CStaffCheck"); static FRandom pr_blink ("CStaffBlink"); diff --git a/src/g_hexen/a_dragon.cpp b/src/g_hexen/a_dragon.cpp index 7d9a376076..569aff6b84 100644 --- a/src/g_hexen/a_dragon.cpp +++ b/src/g_hexen/a_dragon.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_enemy.h" @@ -6,7 +7,7 @@ #include "m_random.h" #include "s_sound.h" #include "thingdef/thingdef.h" - +*/ static FRandom pr_dragonseek ("DragonSeek"); static FRandom pr_dragonflight ("DragonFlight"); diff --git a/src/g_hexen/a_fighteraxe.cpp b/src/g_hexen/a_fighteraxe.cpp index f6ac7e68f1..9e2e369639 100644 --- a/src/g_hexen/a_fighteraxe.cpp +++ b/src/g_hexen/a_fighteraxe.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,17 +6,16 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" -#include "p_effect.h" #include "thingdef/thingdef.h" +*/ #define AXERANGE ((fixed_t)(2.25*MELEERANGE)) -static FRandom pr_atk ("FAxeAtk"); +static FRandom pr_axeatk ("FAxeAtk"); void A_FAxeCheckReady (AActor *actor); void A_FAxeCheckUp (AActor *actor); @@ -203,8 +203,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeAttack) } AActor *pmo=player->mo; - damage = 40+(pr_atk()&15); - damage += pr_atk()&7; + damage = 40+(pr_axeatk()&15); + damage += pr_axeatk()&7; power = 0; weapon = player->ReadyWeapon; if (player->ReadyWeapon->Ammo1->Amount > 0) diff --git a/src/g_hexen/a_fighterhammer.cpp b/src/g_hexen/a_fighterhammer.cpp index 649b5961b6..2de5e6189e 100644 --- a/src/g_hexen/a_fighterhammer.cpp +++ b/src/g_hexen/a_fighterhammer.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,16 +6,16 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ const fixed_t HAMMER_RANGE = MELEERANGE+MELEERANGE/2; -static FRandom pr_atk ("FHammerAtk"); +static FRandom pr_hammeratk ("FHammerAtk"); extern void AdjustPlayerAngle (AActor *pmo, AActor *linetarget); @@ -40,7 +41,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FHammerAttack) } AActor *pmo=player->mo; - damage = 60+(pr_atk()&63); + damage = 60+(pr_hammeratk()&63); power = 10*FRACUNIT; for (i = 0; i < 16; i++) { diff --git a/src/g_hexen/a_fighterplayer.cpp b/src/g_hexen/a_fighterplayer.cpp index 014b159bf0..ba1bc9e821 100644 --- a/src/g_hexen/a_fighterplayer.cpp +++ b/src/g_hexen/a_fighterplayer.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,11 +6,10 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" - +*/ // Fighter Weapon Base Class ------------------------------------------------ diff --git a/src/g_hexen/a_fighterquietus.cpp b/src/g_hexen/a_fighterquietus.cpp index e5b2d880b6..3012913a6a 100644 --- a/src/g_hexen/a_fighterquietus.cpp +++ b/src/g_hexen/a_fighterquietus.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,12 +6,12 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "a_weaponpiece.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_quietusdrop ("QuietusDrop"); static FRandom pr_fswordflame ("FSwordFlame"); diff --git a/src/g_hexen/a_firedemon.cpp b/src/g_hexen/a_firedemon.cpp index b9d24bec8f..bf26dbcd0b 100644 --- a/src/g_hexen/a_firedemon.cpp +++ b/src/g_hexen/a_firedemon.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -6,6 +7,7 @@ #include "a_action.h" #include "m_random.h" #include "thingdef/thingdef.h" +*/ #define FIREDEMON_ATTACK_RANGE 64*8*FRACUNIT diff --git a/src/g_hexen/a_flechette.cpp b/src/g_hexen/a_flechette.cpp index a1ea8339b6..496390a782 100644 --- a/src/g_hexen/a_flechette.cpp +++ b/src/g_hexen/a_flechette.cpp @@ -1,10 +1,10 @@ +/* #include "actor.h" #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "m_random.h" #include "a_action.h" @@ -12,6 +12,7 @@ #include "w_wad.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ static FRandom pr_poisonbag ("PoisonBag"); static FRandom pr_poisoncloud ("PoisonCloud"); diff --git a/src/g_hexen/a_fog.cpp b/src/g_hexen/a_fog.cpp index df72807125..ea4864fff5 100644 --- a/src/g_hexen/a_fog.cpp +++ b/src/g_hexen/a_fog.cpp @@ -1,6 +1,8 @@ +/* #include "m_random.h" #include "p_local.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_fogspawn ("FogSpawn"); diff --git a/src/g_hexen/a_healingradius.cpp b/src/g_hexen/a_healingradius.cpp index 8a8ad17bc8..b827f666b7 100644 --- a/src/g_hexen/a_healingradius.cpp +++ b/src/g_hexen/a_healingradius.cpp @@ -1,15 +1,16 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "m_random.h" #include "a_action.h" #include "a_hexenglobal.h" #include "gi.h" #include "doomstat.h" +*/ #define HEAL_RADIUS_DIST 255*FRACUNIT diff --git a/src/g_hexen/a_heresiarch.cpp b/src/g_hexen/a_heresiarch.cpp index e4274a126e..6ce8bf6dbc 100644 --- a/src/g_hexen/a_heresiarch.cpp +++ b/src/g_hexen/a_heresiarch.cpp @@ -1,15 +1,15 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" #include "s_sound.h" -#include "p_enemy.h" #include "a_action.h" #include "m_random.h" #include "a_hexenglobal.h" #include "i_system.h" -#include "p_acs.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ //============================================================================ // diff --git a/src/g_hexen/a_hexenmisc.cpp b/src/g_hexen/a_hexenmisc.cpp new file mode 100644 index 0000000000..ff6b56202a --- /dev/null +++ b/src/g_hexen/a_hexenmisc.cpp @@ -0,0 +1,53 @@ +#include "actor.h" +#include "info.h" +#include "p_local.h" +#include "s_sound.h" +#include "a_action.h" +#include "m_random.h" +#include "a_sharedglobal.h" +#include "a_hexenglobal.h" +#include "i_system.h" +#include "thingdef/thingdef.h" +#include "gi.h" +#include "g_level.h" +#include "p_enemy.h" +#include "a_weaponpiece.h" +#include "doomstat.h" +#include "p_lnspec.h" +#include "p_terrain.h" +#include "m_bbox.h" +#include "ravenshared.h" + +// Include all the Hexen stuff here to reduce compile time +#include "a_bats.cpp" +#include "a_bishop.cpp" +#include "a_blastradius.cpp" +#include "a_boostarmor.cpp" +#include "a_centaur.cpp" +#include "a_clericflame.cpp" +#include "a_clericholy.cpp" +#include "a_clericmace.cpp" +#include "a_clericstaff.cpp" +#include "a_dragon.cpp" +#include "a_fighteraxe.cpp" +#include "a_fighterhammer.cpp" +#include "a_fighterplayer.cpp" +#include "a_fighterquietus.cpp" +#include "a_firedemon.cpp" +#include "a_flechette.cpp" +#include "a_fog.cpp" +#include "a_healingradius.cpp" +#include "a_heresiarch.cpp" +#include "a_hexenspecialdecs.cpp" +#include "a_iceguy.cpp" +#include "a_korax.cpp" +#include "a_magecone.cpp" +#include "a_magelightning.cpp" +#include "a_magestaff.cpp" +#include "a_magewand.cpp" +#include "a_pig.cpp" +#include "a_serpent.cpp" +#include "a_spike.cpp" +#include "a_summon.cpp" +#include "a_teleportother.cpp" +#include "a_wraith.cpp" diff --git a/src/g_hexen/a_hexenspecialdecs.cpp b/src/g_hexen/a_hexenspecialdecs.cpp index 8c65ba34f1..fca9badece 100644 --- a/src/g_hexen/a_hexenspecialdecs.cpp +++ b/src/g_hexen/a_hexenspecialdecs.cpp @@ -2,10 +2,10 @@ ** Decorations that do special things */ +/* #include "actor.h" #include "info.h" #include "a_action.h" -#include "p_enemy.h" #include "m_random.h" #include "s_sound.h" #include "p_local.h" @@ -14,6 +14,7 @@ #include "thingdef/thingdef.h" #include "g_level.h" #include "doomstat.h" +*/ static FRandom pr_pottery ("PotteryExplode"); static FRandom pr_bit ("PotteryChooseBit"); diff --git a/src/g_hexen/a_iceguy.cpp b/src/g_hexen/a_iceguy.cpp index e3c751a7a5..cbc9a54afe 100644 --- a/src/g_hexen/a_iceguy.cpp +++ b/src/g_hexen/a_iceguy.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -6,6 +7,7 @@ #include "a_action.h" #include "m_random.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_iceguylook ("IceGuyLook"); static FRandom pr_iceguychase ("IceGuyChase"); diff --git a/src/g_hexen/a_korax.cpp b/src/g_hexen/a_korax.cpp index 9a30850c50..242c390663 100644 --- a/src/g_hexen/a_korax.cpp +++ b/src/g_hexen/a_korax.cpp @@ -16,17 +16,18 @@ // 255 For use in death script (spawn spots) //=========================================================================== +/* #include "actor.h" #include "info.h" #include "p_local.h" #include "p_spec.h" #include "s_sound.h" -#include "p_enemy.h" #include "a_action.h" #include "m_random.h" #include "i_system.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ const int KORAX_SPIRIT_LIFETIME = 5*TICRATE/5; // 5 seconds const int KORAX_COMMAND_HEIGHT = 120; @@ -60,7 +61,7 @@ static FRandom pr_koraxcommand ("KoraxCommand"); static FRandom pr_kspiritweave ("KSpiritWeave"); static FRandom pr_kspiritseek ("KSpiritSeek"); static FRandom pr_kspiritroam ("KSpiritRoam"); -static FRandom pr_missile ("SKoraxMissile"); +static FRandom pr_kmissile ("SKoraxMissile"); void A_KoraxChase (AActor *); void A_KoraxStep (AActor *); @@ -511,7 +512,7 @@ AActor *P_SpawnKoraxMissile (fixed_t x, fixed_t y, fixed_t z, an = R_PointToAngle2(x, y, dest->x, dest->y); if (dest->flags & MF_SHADOW) { // Invisible target - an += pr_missile.Random2()<<21; + an += pr_kmissile.Random2()<<21; } th->angle = an; an >>= ANGLETOFINESHIFT; diff --git a/src/g_hexen/a_magecone.cpp b/src/g_hexen/a_magecone.cpp index 36caa65d98..97bee7302b 100644 --- a/src/g_hexen/a_magecone.cpp +++ b/src/g_hexen/a_magecone.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,12 +6,12 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ const int SHARDSPAWN_LEFT = 1; const int SHARDSPAWN_RIGHT = 2; diff --git a/src/g_hexen/a_magelightning.cpp b/src/g_hexen/a_magelightning.cpp index df369798db..88d0d3c1c3 100644 --- a/src/g_hexen/a_magelightning.cpp +++ b/src/g_hexen/a_magelightning.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,13 +6,13 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ #define ZAGSPEED FRACUNIT diff --git a/src/g_hexen/a_magestaff.cpp b/src/g_hexen/a_magestaff.cpp index 00072210b9..2eb15c7300 100644 --- a/src/g_hexen/a_magestaff.cpp +++ b/src/g_hexen/a_magestaff.cpp @@ -1,14 +1,15 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" #include "m_random.h" #include "s_sound.h" -#include "p_enemy.h" #include "a_hexenglobal.h" #include "gstrings.h" #include "a_weaponpiece.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_mstafftrack ("MStaffTrack"); static FRandom pr_bloodscourgedrop ("BloodScourgeDrop"); diff --git a/src/g_hexen/a_magewand.cpp b/src/g_hexen/a_magewand.cpp index 82f7a01687..aadbb154d4 100644 --- a/src/g_hexen/a_magewand.cpp +++ b/src/g_hexen/a_magewand.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -5,12 +6,12 @@ #include "d_player.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "a_action.h" #include "p_pspr.h" #include "gstrings.h" #include "a_hexenglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_smoke ("MWandSmoke"); diff --git a/src/g_hexen/a_pig.cpp b/src/g_hexen/a_pig.cpp index 2ff019b991..e86efffb55 100644 --- a/src/g_hexen/a_pig.cpp +++ b/src/g_hexen/a_pig.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "gi.h" #include "m_random.h" @@ -11,6 +12,7 @@ #include "d_event.h" #include "gstrings.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_snoutattack ("SnoutAttack"); static FRandom pr_pigattack ("PigAttack"); diff --git a/src/g_hexen/a_serpent.cpp b/src/g_hexen/a_serpent.cpp index 9e2d6624db..bf4f8be63e 100644 --- a/src/g_hexen/a_serpent.cpp +++ b/src/g_hexen/a_serpent.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -7,6 +8,7 @@ #include "m_random.h" #include "p_terrain.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_serpentchase ("SerpentChase"); static FRandom pr_serpenthump ("SerpentHump"); diff --git a/src/g_hexen/a_spike.cpp b/src/g_hexen/a_spike.cpp index 1e9d7f9d8e..ea9d7c3d2c 100644 --- a/src/g_hexen/a_spike.cpp +++ b/src/g_hexen/a_spike.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "s_sound.h" #include "m_bbox.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_thrustraise ("ThrustRaise"); diff --git a/src/g_hexen/a_summon.cpp b/src/g_hexen/a_summon.cpp index 74644d27c0..4335abed03 100644 --- a/src/g_hexen/a_summon.cpp +++ b/src/g_hexen/a_summon.cpp @@ -1,13 +1,14 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "ravenshared.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ void A_Summon (AActor *); diff --git a/src/g_hexen/a_teleportother.cpp b/src/g_hexen/a_teleportother.cpp index 887887a833..2b1bbcc55f 100644 --- a/src/g_hexen/a_teleportother.cpp +++ b/src/g_hexen/a_teleportother.cpp @@ -1,15 +1,16 @@ +/* #include "info.h" #include "a_pickups.h" #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "p_lnspec.h" #include "m_random.h" #include "thingdef/thingdef.h" #include "g_level.h" #include "doomstat.h" +*/ #define TELEPORT_LIFE 1 diff --git a/src/g_hexen/a_wraith.cpp b/src/g_hexen/a_wraith.cpp index 976f27ccb3..3cf4b987d6 100644 --- a/src/g_hexen/a_wraith.cpp +++ b/src/g_hexen/a_wraith.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "info.h" #include "p_local.h" @@ -7,6 +8,7 @@ #include "m_random.h" #include "a_sharedglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_stealhealth ("StealHealth"); static FRandom pr_wraithfx2 ("WraithFX2"); diff --git a/src/g_hexen/hexen_sbar.cpp b/src/g_hexen/hexen_sbar.cpp index ca88699738..75dc0f2304 100644 --- a/src/g_hexen/hexen_sbar.cpp +++ b/src/g_hexen/hexen_sbar.cpp @@ -16,6 +16,7 @@ #include "a_keys.h" #include "r_translate.h" #include "a_weaponpiece.h" +#include "v_palette.h" class FManaBar : public FTexture diff --git a/src/g_level.cpp b/src/g_level.cpp index ddeaec6c74..9b4a48235d 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -77,6 +77,7 @@ #include "cmdlib.h" #include "d_net.h" #include "d_netinf.h" +#include "v_palette.h" #include "gi.h" diff --git a/src/g_level.h b/src/g_level.h index 39feead28b..b288cc06e9 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -122,7 +122,7 @@ #define LEVEL_SMOOTHLIGHTING UCONST64(0x100000000000000) // Level uses the smooth lighting feature. -struct acsdefered_s; +struct acsdefered_t; struct FSpecialAction { @@ -171,7 +171,7 @@ struct level_info_t int musicorder; FCompressedMemFile *snapshot; DWORD snapshotVer; - struct acsdefered_s *defered; + struct acsdefered_t *defered; char skypic2[9]; float skyspeed1; float skyspeed2; diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index b791629703..74c7f5303f 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -8,7 +8,6 @@ #include "p_local.h" #include "p_spec.h" #include "p_lnspec.h" -#include "p_enemy.h" #include "p_effect.h" #include "a_artifacts.h" #include "sbar.h" @@ -19,6 +18,7 @@ #include "a_morph.h" #include "g_level.h" #include "doomstat.h" +#include "v_palette.h" static FRandom pr_torch ("Torch"); diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index d6f56a1bd8..e77e352b32 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -43,6 +43,7 @@ #include "c_dispatch.h" #include "d_net.h" #include "colormatcher.h" +#include "v_palette.h" static fixed_t DecalWidth, DecalLeft, DecalRight; static fixed_t SpreadZ; @@ -301,7 +302,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const default: return Z; case RF_RELUPPER: - if (curline->linedef->flags & ML_DONTPEGTOP) + if (line->flags & ML_DONTPEGTOP) { return Z + front->GetPlaneTexZ(sector_t::ceiling); } @@ -310,7 +311,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const return Z + back->GetPlaneTexZ(sector_t::ceiling); } case RF_RELLOWER: - if (curline->linedef->flags & ML_DONTPEGBOTTOM) + if (line->flags & ML_DONTPEGBOTTOM) { return Z + front->GetPlaneTexZ(sector_t::ceiling); } @@ -319,7 +320,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const return Z + back->GetPlaneTexZ(sector_t::floor); } case RF_RELMID: - if (curline->linedef->flags & ML_DONTPEGBOTTOM) + if (line->flags & ML_DONTPEGBOTTOM) { return Z + front->GetPlaneTexZ(sector_t::floor); } diff --git a/src/g_shared/a_morph.cpp b/src/g_shared/a_morph.cpp index 24e466a387..825fed5002 100644 --- a/src/g_shared/a_morph.cpp +++ b/src/g_shared/a_morph.cpp @@ -4,7 +4,6 @@ #include "gstrings.h" #include "p_local.h" #include "gi.h" -#include "p_enemy.h" #include "s_sound.h" #include "m_random.h" #include "a_sharedglobal.h" diff --git a/src/g_shared/a_puzzleitems.cpp b/src/g_shared/a_puzzleitems.cpp index b7ab3bc1af..68bca31fbb 100644 --- a/src/g_shared/a_puzzleitems.cpp +++ b/src/g_shared/a_puzzleitems.cpp @@ -3,7 +3,6 @@ #include "a_artifacts.h" #include "gstrings.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "c_console.h" #include "doomstat.h" diff --git a/src/g_shared/a_soundsequence.cpp b/src/g_shared/a_soundsequence.cpp index 52f587ea29..94e8e1e600 100644 --- a/src/g_shared/a_soundsequence.cpp +++ b/src/g_shared/a_soundsequence.cpp @@ -65,6 +65,7 @@ #include "s_sound.h" #include "m_random.h" #include "s_sndseq.h" +#include "farchive.h" // SoundSequenceSlot -------------------------------------------------------- diff --git a/src/g_shared/sbar.h b/src/g_shared/sbar.h index 99453cddea..00f471c1e8 100644 --- a/src/g_shared/sbar.h +++ b/src/g_shared/sbar.h @@ -36,7 +36,6 @@ #include "v_collection.h" #include "v_text.h" -struct patch_t; class player_t; struct FRemapTable; diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index 66e58ec50c..63dc55a88a 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -55,6 +55,7 @@ #include "a_weaponpiece.h" #include "a_strifeglobal.h" #include "g_level.h" +#include "v_palette.h" static FRandom pr_chainwiggle; //use the same method of chain wiggling as heretic. diff --git a/src/g_shared/shared_sbar.cpp b/src/g_shared/shared_sbar.cpp index c019d4150e..f72ef0958f 100644 --- a/src/g_shared/shared_sbar.cpp +++ b/src/g_shared/shared_sbar.cpp @@ -46,11 +46,12 @@ #include "v_text.h" #include "s_sound.h" #include "gi.h" -#include "p_effect.h" #include "doomstat.h" #include "g_level.h" #include "d_net.h" #include "colormatcher.h" +#include "v_palette.h" + #include "../version.h" #define XHAIRSHRINKSIZE (FRACUNIT/18) diff --git a/src/g_strife/a_acolyte.cpp b/src/g_strife/a_acolyte.cpp index f46109dfec..72f1cd0d1c 100644 --- a/src/g_strife/a_acolyte.cpp +++ b/src/g_strife/a_acolyte.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -8,6 +9,7 @@ #include "doomdata.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ //============================================================================ // diff --git a/src/g_strife/a_alienspectres.cpp b/src/g_strife/a_alienspectres.cpp index d77a99065c..085113f9fc 100644 --- a/src/g_strife/a_alienspectres.cpp +++ b/src/g_strife/a_alienspectres.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -10,6 +11,7 @@ #include "gstrings.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_spectrespawn ("AlienSpectreSpawn"); static FRandom pr_spectrechunk ("212e4"); diff --git a/src/g_strife/a_coin.cpp b/src/g_strife/a_coin.cpp index 3a4605b052..dd36100398 100644 --- a/src/g_strife/a_coin.cpp +++ b/src/g_strife/a_coin.cpp @@ -1,6 +1,8 @@ +/* #include "a_pickups.h" #include "a_strifeglobal.h" #include "gstrings.h" +*/ // Coin --------------------------------------------------------------------- diff --git a/src/g_strife/a_crusader.cpp b/src/g_strife/a_crusader.cpp index bcab75493c..cd0a14ea53 100644 --- a/src/g_strife/a_crusader.cpp +++ b/src/g_strife/a_crusader.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -6,6 +7,7 @@ #include "s_sound.h" #include "a_strifeglobal.h" #include "thingdef/thingdef.h" +*/ bool Sys_1ed64 (AActor *self) { diff --git a/src/g_strife/a_entityboss.cpp b/src/g_strife/a_entityboss.cpp index 0d6156248c..b221c7c2df 100644 --- a/src/g_strife/a_entityboss.cpp +++ b/src/g_strife/a_entityboss.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -7,6 +8,7 @@ #include "a_strifeglobal.h" #include "thingdef/thingdef.h" #include "g_level.h" +*/ static FRandom pr_entity ("Entity"); diff --git a/src/g_strife/a_inquisitor.cpp b/src/g_strife/a_inquisitor.cpp index c2beb7fcbd..e6aabff162 100644 --- a/src/g_strife/a_inquisitor.cpp +++ b/src/g_strife/a_inquisitor.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -5,6 +6,7 @@ #include "p_enemy.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_inq ("Inquisitor"); diff --git a/src/g_strife/a_loremaster.cpp b/src/g_strife/a_loremaster.cpp index 731a75dc06..ebe5c6a6da 100644 --- a/src/g_strife/a_loremaster.cpp +++ b/src/g_strife/a_loremaster.cpp @@ -1,11 +1,12 @@ +/* #include "actor.h" #include "a_action.h" #include "a_strifeglobal.h" #include "m_random.h" -#include "p_enemy.h" #include "p_local.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ // Loremaster (aka Priest) -------------------------------------------------- diff --git a/src/g_strife/a_macil.cpp b/src/g_strife/a_macil.cpp index 76f6333d6b..6557ef7cf3 100644 --- a/src/g_strife/a_macil.cpp +++ b/src/g_strife/a_macil.cpp @@ -1,10 +1,11 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "a_strifeglobal.h" +*/ // Macil (version 2) --------------------------------------------------------- diff --git a/src/g_strife/a_oracle.cpp b/src/g_strife/a_oracle.cpp index 50cf78f8e6..11a9a52e48 100644 --- a/src/g_strife/a_oracle.cpp +++ b/src/g_strife/a_oracle.cpp @@ -1,8 +1,11 @@ +/* #include "actor.h" #include "a_action.h" #include "a_strifeglobal.h" #include "p_enemy.h" +#include "r_defs.h" #include "thingdef/thingdef.h" +*/ class AOracle : public AActor { diff --git a/src/g_strife/a_programmer.cpp b/src/g_strife/a_programmer.cpp index 2eee0aa8da..a8bcf42ec3 100644 --- a/src/g_strife/a_programmer.cpp +++ b/src/g_strife/a_programmer.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -9,7 +10,7 @@ #include "thingdef/thingdef.h" #include "g_level.h" #include "doomstat.h" - +*/ static FRandom pr_prog ("Programmer"); // The Programmer level ending thing ---------------------------------------- diff --git a/src/g_strife/a_reaver.cpp b/src/g_strife/a_reaver.cpp index 08042c6539..893386534e 100644 --- a/src/g_strife/a_reaver.cpp +++ b/src/g_strife/a_reaver.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "p_enemy.h" #include "a_action.h" @@ -6,6 +7,7 @@ #include "p_local.h" #include "a_strifeglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_reaverattack ("ReaverAttack"); diff --git a/src/g_strife/a_rebels.cpp b/src/g_strife/a_rebels.cpp index 4519b26cf2..2625ca173b 100644 --- a/src/g_strife/a_rebels.cpp +++ b/src/g_strife/a_rebels.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -9,6 +10,7 @@ #include "a_strifeglobal.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_shootgun ("ShootGun"); diff --git a/src/g_strife/a_sentinel.cpp b/src/g_strife/a_sentinel.cpp index c957ac2c2b..141ad2b8b7 100644 --- a/src/g_strife/a_sentinel.cpp +++ b/src/g_strife/a_sentinel.cpp @@ -1,9 +1,11 @@ +/* #include "actor.h" #include "p_enemy.h" #include "a_action.h" #include "p_local.h" #include "m_random.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_sentinelrefire ("SentinelRefire"); diff --git a/src/g_strife/a_spectral.cpp b/src/g_strife/a_spectral.cpp index 92c96b18cf..5ec8a4fa0f 100644 --- a/src/g_strife/a_spectral.cpp +++ b/src/g_strife/a_spectral.cpp @@ -1,12 +1,13 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" #include "p_local.h" -#include "p_enemy.h" #include "s_sound.h" #include "m_random.h" #include "a_strifeglobal.h" #include "thingdef/thingdef.h" +*/ AActor *P_SpawnSubMissile (AActor *source, const PClass *type, AActor *target); diff --git a/src/g_strife/a_stalker.cpp b/src/g_strife/a_stalker.cpp index f49bf42cd2..67cbd3282d 100644 --- a/src/g_strife/a_stalker.cpp +++ b/src/g_strife/a_stalker.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -5,6 +6,7 @@ #include "p_enemy.h" #include "s_sound.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_stalker ("Stalker"); diff --git a/src/g_strife/a_strifeitems.cpp b/src/g_strife/a_strifeitems.cpp index 9e65dbfee8..b8f28d8ae7 100644 --- a/src/g_strife/a_strifeitems.cpp +++ b/src/g_strife/a_strifeitems.cpp @@ -1,3 +1,4 @@ +/* #include "info.h" #include "a_pickups.h" #include "d_player.h" @@ -15,7 +16,7 @@ #include "thingdef/thingdef.h" #include "g_level.h" #include "doomstat.h" - +*/ // Degnin Ore --------------------------------------------------------------- IMPLEMENT_CLASS(ADegninOre) diff --git a/src/g_strife/a_strifestuff.cpp b/src/g_strife/a_strifestuff.cpp index 2bd4685ff4..a65cc91b46 100644 --- a/src/g_strife/a_strifestuff.cpp +++ b/src/g_strife/a_strifestuff.cpp @@ -12,6 +12,32 @@ #include "c_console.h" #include "thingdef/thingdef.h" #include "doomstat.h" +#include "gstrings.h" +#include "a_keys.h" +#include "a_sharedglobal.h" +#include "templates.h" +#include "d_event.h" + +// Include all the other Strife stuff here to reduce compile time +#include "a_acolyte.cpp" +#include "a_alienspectres.cpp" +#include "a_coin.cpp" +#include "a_crusader.cpp" +#include "a_entityboss.cpp" +#include "a_inquisitor.cpp" +#include "a_loremaster.cpp" +#include "a_macil.cpp" +#include "a_oracle.cpp" +#include "a_programmer.cpp" +#include "a_reaver.cpp" +#include "a_rebels.cpp" +#include "a_sentinel.cpp" +#include "a_spectral.cpp" +#include "a_stalker.cpp" +#include "a_strifeitems.cpp" +#include "a_strifeweapons.cpp" +#include "a_templar.cpp" +#include "a_thingstoblowup.cpp" // Notes so I don't forget them: // Strife does some extra stuff in A_Explode if a player caused the explosion. (probably NoiseAlert) @@ -521,7 +547,7 @@ void APowerCoupling::Die (AActor *source, AActor *inflictor) players[i].mo->GiveInventoryType (QuestItemClasses[5]); S_Sound (CHAN_VOICE, "svox/voc13", 1, ATTN_NORM); players[i].SetLogNumber (13); - P_DropItem (this, "BrokenPowerCoupling", -1, 256); + P_DropItem (this, PClass::FindClass("BrokenPowerCoupling"), -1, 256); Destroy (); } diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index c9382fa28c..72b49e9006 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -1,3 +1,4 @@ +/* #include "a_pickups.h" #include "p_local.h" #include "m_random.h" @@ -7,6 +8,7 @@ #include "templates.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ // Note: Strife missiles do 1-4 times their damage amount. // Doom missiles do 1-8 times their damage amount, so to diff --git a/src/g_strife/a_templar.cpp b/src/g_strife/a_templar.cpp index 79ea9960b9..afdac2e152 100644 --- a/src/g_strife/a_templar.cpp +++ b/src/g_strife/a_templar.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "a_action.h" @@ -6,6 +7,7 @@ #include "s_sound.h" #include "a_strifeglobal.h" #include "thingdef/thingdef.h" +*/ static FRandom pr_templar ("Templar"); diff --git a/src/g_strife/a_thingstoblowup.cpp b/src/g_strife/a_thingstoblowup.cpp index be167e3837..8c68f26002 100644 --- a/src/g_strife/a_thingstoblowup.cpp +++ b/src/g_strife/a_thingstoblowup.cpp @@ -1,3 +1,4 @@ +/* #include "actor.h" #include "m_random.h" #include "p_local.h" @@ -8,6 +9,7 @@ #include "thingdef/thingdef.h" #include "thingdef/thingdef.h" #include "doomstat.h" +*/ static FRandom pr_bang4cloud ("Bang4Cloud"); static FRandom pr_lightout ("LightOut"); diff --git a/src/g_strife/strife_sbar.cpp b/src/g_strife/strife_sbar.cpp index d0fd3ad27d..782eec96da 100644 --- a/src/g_strife/strife_sbar.cpp +++ b/src/g_strife/strife_sbar.cpp @@ -16,6 +16,7 @@ #include "gi.h" #include "g_level.h" #include "colormatcher.h" +#include "v_palette.h" // Number of tics to move the popscreen up and down. #define POP_TIME (TICRATE/8) diff --git a/src/hu_scores.cpp b/src/hu_scores.cpp index eaf6678625..2366c924f3 100644 --- a/src/hu_scores.cpp +++ b/src/hu_scores.cpp @@ -43,6 +43,9 @@ #include "doomstat.h" #include "g_level.h" #include "d_netinf.h" +#include "v_font.h" +#include "v_palette.h" +#include "d_player.h" // MACROS ------------------------------------------------------------------ diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index cac837b6e1..10ae08d556 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -39,7 +39,6 @@ #include "w_wad.h" #include "a_keys.h" #include "templates.h" -#include "p_lnspec.h" #include "c_console.h" #include "r_translate.h" #include "g_level.h" diff --git a/src/m_menu.cpp b/src/m_menu.cpp index e7d97544f5..a6f2411aff 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -45,6 +45,7 @@ #include "i_system.h" #include "i_video.h" #include "v_video.h" +#include "v_palette.h" #include "w_wad.h" #include "r_local.h" #include "hu_stuff.h" diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 5a96560041..381656e030 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -57,6 +57,7 @@ #include "i_system.h" #include "i_video.h" #include "v_video.h" +#include "r_defs.h" #include "hu_stuff.h" diff --git a/src/m_options.cpp b/src/m_options.cpp index 82d84b178c..09b9af6417 100644 --- a/src/m_options.cpp +++ b/src/m_options.cpp @@ -60,6 +60,7 @@ #include "gi.h" #include "r_local.h" +#include "v_palette.h" #include "gameconfigfile.h" #include "hu_stuff.h" diff --git a/src/m_png.cpp b/src/m_png.cpp index 0405caef16..1a33221e21 100644 --- a/src/m_png.cpp +++ b/src/m_png.cpp @@ -44,6 +44,7 @@ #include "m_crc32.h" #include "m_swap.h" #include "c_cvars.h" +#include "r_defs.h" #include "v_video.h" #include "m_png.h" #include "templates.h" diff --git a/src/p_3dmidtex.cpp b/src/p_3dmidtex.cpp index 039e9871d1..ef449ecd37 100644 --- a/src/p_3dmidtex.cpp +++ b/src/p_3dmidtex.cpp @@ -37,7 +37,6 @@ #include "templates.h" #include "p_local.h" -#include "p_lnspec.h" //============================================================================ diff --git a/src/p_3dmidtex.h b/src/p_3dmidtex.h index 6b7201b7b6..278a191771 100644 --- a/src/p_3dmidtex.h +++ b/src/p_3dmidtex.h @@ -3,8 +3,10 @@ #define __3DMIDTEX_H #include "doomtype.h" -#include "r_defs.h" +class DInterpolation; +struct sector_t; +struct line_t; class AActor; bool P_Scroll3dMidtex(sector_t *sector, int crush, fixed_t move, bool ceiling); diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 11c86b6c6a..b64ce92a6b 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5705,7 +5705,7 @@ static void addDefered (level_info_t *i, acsdefered_t::EType type, int script, i { if (i) { - acsdefered_t *def = new acsdefered_s; + acsdefered_t *def = new acsdefered_t; def->next = i->defered; def->type = type; @@ -5795,13 +5795,13 @@ void P_TerminateScript (int script, char *map) SetScriptState (script, DLevelScript::SCRIPT_PleaseRemove); } -FArchive &operator<< (FArchive &arc, acsdefered_s *&defertop) +FArchive &operator<< (FArchive &arc, acsdefered_t *&defertop) { BYTE more; if (arc.IsStoring ()) { - acsdefered_s *defer = defertop; + acsdefered_t *defer = defertop; more = 1; while (defer) { @@ -5817,14 +5817,14 @@ FArchive &operator<< (FArchive &arc, acsdefered_s *&defertop) } else { - acsdefered_s **defer = &defertop; + acsdefered_t **defer = &defertop; arc << more; while (more) { - *defer = new acsdefered_s; + *defer = new acsdefered_t; arc << more; - (*defer)->type = (acsdefered_s::EType)more; + (*defer)->type = (acsdefered_t::EType)more; arc << (*defer)->script << (*defer)->playernum << (*defer)->arg0 << (*defer)->arg1 << (*defer)->arg2; defer = &((*defer)->next); diff --git a/src/p_acs.h b/src/p_acs.h index 630dc408f1..19457ed6e0 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -731,9 +731,9 @@ private: }; // The structure used to control scripts between maps -struct acsdefered_s +struct acsdefered_t { - struct acsdefered_s *next; + struct acsdefered_t *next; enum EType { @@ -746,8 +746,7 @@ struct acsdefered_s int arg0, arg1, arg2; int playernum; }; -typedef struct acsdefered_s acsdefered_t; -FArchive &operator<< (FArchive &arc, acsdefered_s *&defer); +FArchive &operator<< (FArchive &arc, acsdefered_t *&defer); #endif //__P_ACS_H__ diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 72b8257a32..444601a2a7 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -36,6 +36,7 @@ #include "actor.h" #include "r_data.h" +#include "r_main.h" #include "p_conversation.h" #include "w_wad.h" #include "cmdlib.h" diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 535f1877eb..48a2bdd3ed 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -48,6 +48,7 @@ #include "s_sound.h" #include "templates.h" #include "gi.h" +#include "v_palette.h" #include "colormatcher.h" CVAR (Int, cl_rockettrails, 1, CVAR_ARCHIVE); diff --git a/src/p_effect.h b/src/p_effect.h index 4f1dbf0d88..1ca18e3404 100644 --- a/src/p_effect.h +++ b/src/p_effect.h @@ -50,6 +50,7 @@ #define FX_WHITEFOUNTAIN 0x00070000 struct particle_t; +class AActor; particle_t *JitterParticle (int ttl); diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 951fd16691..8584f4e235 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -33,7 +33,6 @@ #include "p_local.h" #include "m_bbox.h" #include "p_lnspec.h" -#include "p_effect.h" #include "s_sound.h" #include "g_game.h" #include "doomstat.h" diff --git a/src/p_enemy.h b/src/p_enemy.h index 7bb11faec4..a994fe5184 100644 --- a/src/p_enemy.h +++ b/src/p_enemy.h @@ -1,9 +1,14 @@ #ifndef __P_ENEMY_H__ #define __P_ENEMY_H__ -#include "r_defs.h" #include "thingdef/thingdef.h" +struct sector_t; +class AActor; +class AInventory; +struct PClass; + + enum dirtype_t { DI_EAST, @@ -29,10 +34,6 @@ bool P_TryWalk (AActor *actor); void P_NewChaseDir (AActor *actor); bool P_LookForPlayers (AActor *actor, INTBOOL allaround); AInventory *P_DropItem (AActor *source, const PClass *type, int special, int chance); -inline AInventory *P_DropItem (AActor *source, const char *type, int special, int chance) -{ - return P_DropItem (source, PClass::FindClass (type), special, chance); -} void P_TossItem (AActor *item); DECLARE_ACTION(A_Look) diff --git a/src/p_enemy_a_lookex.cpp b/src/p_enemy_a_lookex.cpp index fadf3ffd3b..2e580eb450 100644 --- a/src/p_enemy_a_lookex.cpp +++ b/src/p_enemy_a_lookex.cpp @@ -6,7 +6,6 @@ #include "doomdef.h" #include "p_local.h" #include "p_lnspec.h" -#include "p_effect.h" #include "s_sound.h" #include "g_game.h" #include "doomstat.h" diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 39c556d3dd..ccd2b85601 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -58,6 +58,7 @@ #include "g_level.h" #include "d_event.h" #include "colormatcher.h" +#include "v_palette.h" // MACROS ------------------------------------------------------------------ diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 47d9f54ed6..dae12a868a 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -23,7 +23,6 @@ #include "doomstat.h" #include "gi.h" #include "p_pspr.h" -#include "p_effect.h" #include "templates.h" #include "thingdef/thingdef.h" #include "g_level.h" diff --git a/src/p_pspr.h b/src/p_pspr.h index 49e6c469ab..97533a2ba6 100644 --- a/src/p_pspr.h +++ b/src/p_pspr.h @@ -28,16 +28,6 @@ #include "tables.h" #include "thingdef/thingdef.h" - -// -// Needs to include the precompiled -// sprite animation tables. -// Header generated by multigen utility. -// This includes all the data for thing animation, -// i.e. the Thing Atrributes table -// and the Frame Sequence table. -#include "info.h" - #define WEAPONBOTTOM 128*FRACUNIT // [RH] +0x6000 helps it meet the screen bottom @@ -81,9 +71,13 @@ typedef struct pspdef_s } pspdef_t; +class FArchive; + FArchive &operator<< (FArchive &, pspdef_t &); class player_t; +class AActor; +struct FState; void P_SetPsprite (player_t *player, int position, FState *state); void P_SetPspriteNF (player_t *player, int position, FState *state); diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index cb19684e1a..ac2643af59 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -41,7 +41,6 @@ #include "r_state.h" #include "m_random.h" #include "p_saveg.h" -#include "p_acs.h" #include "s_sndseq.h" #include "v_palette.h" #include "a_sharedglobal.h" diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index b7cefb4e3a..6f02ea470b 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -25,6 +25,7 @@ #include "p_spec.h" #include "c_cvars.h" #include "doomstat.h" +#include "v_palette.h" // [RH] diff --git a/src/p_setup.h b/src/p_setup.h index 8bb97ea981..abe7dd2a2b 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -24,7 +24,6 @@ #define __P_SETUP__ #include "w_wad.h" -#include "files.h" #include "doomdata.h" diff --git a/src/p_things.cpp b/src/p_things.cpp index 30e08ebf1b..deaddd233b 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -34,7 +34,6 @@ #include "doomtype.h" #include "p_local.h" -#include "p_effect.h" #include "info.h" #include "s_sound.h" #include "tables.h" diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 5561caebd1..56506bbb7c 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -24,7 +24,6 @@ #include "p_local.h" #include "p_effect.h" -#include "p_acs.h" #include "c_console.h" #include "b_bot.h" #include "s_sound.h" diff --git a/src/p_trace.h b/src/p_trace.h index 291a5ecef2..be3dda84ed 100644 --- a/src/p_trace.h +++ b/src/p_trace.h @@ -34,7 +34,12 @@ #ifndef __P_TRACE_H__ #define __P_TRACE_H__ -#include "r_defs.h" +#include +#include "basictypes.h" + +struct sector_t; +struct line_t; +class AActor; enum ETraceResult { diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 2f8232f74b..7cfc8ddc0e 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -42,6 +42,7 @@ #include "gi.h" #include "r_sky.h" #include "g_level.h" +#include "v_palette.h" //=========================================================================== // diff --git a/src/p_user.cpp b/src/p_user.cpp index 434a771884..7a573baef4 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -35,7 +35,6 @@ #include "m_random.h" #include "p_pspr.h" #include "p_enemy.h" -#include "p_effect.h" #include "s_sound.h" #include "a_sharedglobal.h" #include "a_keys.h" diff --git a/src/r_data.cpp b/src/r_data.cpp index 6d4a6feadd..f382b9a207 100644 --- a/src/r_data.cpp +++ b/src/r_data.cpp @@ -43,6 +43,9 @@ #include "v_text.h" #include "st_start.h" #include "doomstat.h" +#include "r_bsp.h" +#include "r_segs.h" +#include "v_palette.h" static int R_CountGroup (const char *start, const char *end); diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 764d543385..e26b000481 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -37,6 +37,7 @@ #include "g_game.h" #include "g_level.h" #include "r_translate.h" +#include "v_palette.h" #include "gi.h" #include "stats.h" diff --git a/src/r_draw.h b/src/r_draw.h index a8d8367c09..518a7c4f71 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -232,7 +232,7 @@ extern "C" const BYTE* ds_source; extern "C" int ds_color; // [RH] For flat color (no texturing) -extern BYTE shadetables[NUMCOLORMAPS*16*256]; +extern BYTE shadetables[/*NUMCOLORMAPS*16*256*/]; extern FDynamicColormap ShadeFakeColormap[16]; extern BYTE identitymap[256]; extern BYTE *dc_translation; diff --git a/src/r_local.h b/src/r_local.h index edff92c4a1..b4508a2296 100644 --- a/src/r_local.h +++ b/src/r_local.h @@ -36,10 +36,6 @@ // Separate header file for each module. // #include "r_main.h" -#include "r_bsp.h" -#include "r_segs.h" -#include "r_plane.h" -#include "r_data.h" #include "r_things.h" #include "r_draw.h" @@ -49,4 +45,6 @@ void R_InitPicAnims (); void R_AddSimpleAnim (FTextureID picnum, int animcount, int animtype, DWORD animspeed /* in ms */, DWORD speedrange=0); void R_UpdateAnimations (DWORD mstime); +bool R_AlignFlat (int linenum, int side, int fc); + #endif // __R_LOCAL_H__ diff --git a/src/r_main.cpp b/src/r_main.cpp index 3f673513de..0698952aaf 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -47,6 +47,9 @@ #include "r_translate.h" #include "p_3dmidtex.h" #include "r_interpolate.h" +#include "r_bsp.h" +#include "r_plane.h" +#include "v_palette.h" // MACROS ------------------------------------------------------------------ diff --git a/src/r_main.h b/src/r_main.h index 35517e51ce..049f12131e 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -29,7 +29,6 @@ #include "d_player.h" #include "r_data.h" -#include "r_bsp.h" #include "r_state.h" diff --git a/src/r_plane.cpp b/src/r_plane.cpp index cc465ca394..13221b9e50 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -52,6 +52,10 @@ #include "cmdlib.h" #include "d_net.h" #include "g_level.h" +#include "r_bsp.h" +#include "r_plane.h" +#include "r_segs.h" +#include "v_palette.h" //EXTERN_CVAR (Int, tx) //EXTERN_CVAR (Int, ty) diff --git a/src/r_plane.h b/src/r_plane.h index 2960a98bdf..d52fc6db2e 100644 --- a/src/r_plane.h +++ b/src/r_plane.h @@ -102,7 +102,6 @@ visplane_t *R_FindPlane visplane_t *R_CheckPlane (visplane_t *pl, int start, int stop); -bool R_AlignFlat (int linenum, int side, int fc); // [RH] Added for multires support bool R_PlaneInitData (void); diff --git a/src/r_polymost.cpp b/src/r_polymost.cpp index 0c55773e3b..e143b98bd0 100644 --- a/src/r_polymost.cpp +++ b/src/r_polymost.cpp @@ -78,6 +78,9 @@ Low priority: #include "templates.h" #include "r_sky.h" #include "g_level.h" +#include "r_bsp.h" +#include "v_palette.h" +#include "v_font.h" EXTERN_CVAR (Int, r_polymost) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index e7f40d7ab5..3087e0c96c 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -46,6 +46,10 @@ #include "a_sharedglobal.h" #include "d_net.h" #include "g_level.h" +#include "r_bsp.h" +#include "r_plane.h" +#include "r_segs.h" +#include "v_palette.h" #define WALLYREPEAT 8 diff --git a/src/r_segs.h b/src/r_segs.h index f92663ee05..60bc031d12 100644 --- a/src/r_segs.h +++ b/src/r_segs.h @@ -23,6 +23,8 @@ #ifndef __R_SEGS_H__ #define __R_SEGS_H__ +struct drawseg_t; + void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2); extern short *openings; diff --git a/src/r_things.cpp b/src/r_things.cpp index c558d788b1..de1e794c14 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -32,7 +32,6 @@ #include "i_system.h" #include "w_wad.h" #include "r_local.h" -#include "p_effect.h" #include "c_console.h" #include "c_cvars.h" #include "c_dispatch.h" @@ -48,6 +47,11 @@ #include "d_net.h" #include "colormatcher.h" #include "d_netinf.h" +#include "r_bsp.h" +#include "r_plane.h" +#include "r_segs.h" +#include "v_palette.h" + extern FTexture *CrosshairImage; extern fixed_t globaluclip, globaldclip; diff --git a/src/r_translate.cpp b/src/r_translate.cpp index 9e060f83a6..f6ec46c27e 100644 --- a/src/r_translate.cpp +++ b/src/r_translate.cpp @@ -36,11 +36,13 @@ #include "templates.h" #include "r_draw.h" +#include "r_main.h" #include "r_translate.h" #include "v_video.h" #include "g_game.h" #include "colormatcher.h" #include "d_netinf.h" +#include "v_palette.h" #include "gi.h" #include "stats.h" diff --git a/src/s_sndseq.h b/src/s_sndseq.h index 35d4074132..b80e3e817a 100644 --- a/src/s_sndseq.h +++ b/src/s_sndseq.h @@ -2,9 +2,8 @@ #define __S_SNDSEQ_H__ #include -//#include "actor.h" +#include "dobject.h" #include "s_sound.h" -#include "r_defs.h" typedef enum { SEQ_PLATFORM, diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 434fc10a19..6b48825501 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -52,6 +52,7 @@ extern HWND Window; #include "w_wad.h" #include "i_music.h" #include "v_text.h" +#include "v_video.h" #include "v_palette.h" // MACROS ------------------------------------------------------------------ @@ -2147,7 +2148,6 @@ float F_CALLBACK FMODSoundRenderer::RolloffCallback(FMOD_CHANNEL *channel, float void FMODSoundRenderer::DrawWaveDebug(int mode) { const int window_height = 100; - float wavearray[MAXWIDTH]; int window_size; int numoutchans; int y; @@ -2161,6 +2161,8 @@ void FMODSoundRenderer::DrawWaveDebug(int mode) // 16 pixels of padding between each window. window_size = (screen->GetWidth() - 16) / numoutchans - 16; + float *wavearray = (float*)alloca(window_size*sizeof(float)); + y = 16; y = DrawChannelGroupOutput(SfxGroup, wavearray, window_size, window_height, y, mode); y = DrawChannelGroupOutput(MusicGroup, wavearray, window_size, window_height, y, mode >> 2); diff --git a/src/teaminfo.cpp b/src/teaminfo.cpp index fa7316c0d8..0e6e3da950 100644 --- a/src/teaminfo.cpp +++ b/src/teaminfo.cpp @@ -37,7 +37,9 @@ #include "i_system.h" #include "sc_man.h" #include "teaminfo.h" +#include "v_video.h" #include "v_palette.h" +#include "v_font.h" #include "w_wad.h" // MACROS ------------------------------------------------------------------ diff --git a/src/textures/canvastexture.cpp b/src/textures/canvastexture.cpp index 53a62810c9..278145b04b 100644 --- a/src/textures/canvastexture.cpp +++ b/src/textures/canvastexture.cpp @@ -36,6 +36,7 @@ #include "doomtype.h" #include "files.h" #include "r_local.h" +#include "v_palette.h" extern float LastFOV; diff --git a/src/textures/flattexture.cpp b/src/textures/flattexture.cpp index b638239791..2d3327078e 100644 --- a/src/textures/flattexture.cpp +++ b/src/textures/flattexture.cpp @@ -37,6 +37,7 @@ #include "files.h" #include "r_data.h" #include "w_wad.h" +#include "v_palette.h" //========================================================================== // diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 09a70bc170..907a7aea84 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -46,6 +46,7 @@ #include "r_translate.h" #include "bitmap.h" #include "colormatcher.h" +#include "v_palette.h" // On the Alpha, accessing the shorts directly if they aren't aligned on a // 4-byte boundary causes unaligned access warnings. Why it does this at diff --git a/src/textures/patchtexture.cpp b/src/textures/patchtexture.cpp index 4369e5ad00..4a8c93b8aa 100644 --- a/src/textures/patchtexture.cpp +++ b/src/textures/patchtexture.cpp @@ -38,6 +38,7 @@ #include "r_data.h" #include "w_wad.h" #include "templates.h" +#include "v_palette.h" //========================================================================== diff --git a/src/textures/pngtexture.cpp b/src/textures/pngtexture.cpp index 34351a7529..b1168fe572 100644 --- a/src/textures/pngtexture.cpp +++ b/src/textures/pngtexture.cpp @@ -40,6 +40,7 @@ #include "templates.h" #include "m_png.h" #include "bitmap.h" +#include "v_palette.h" //========================================================================== // diff --git a/src/textures/rawpagetexture.cpp b/src/textures/rawpagetexture.cpp index 04f3c17931..c4d3bb6463 100644 --- a/src/textures/rawpagetexture.cpp +++ b/src/textures/rawpagetexture.cpp @@ -37,6 +37,7 @@ #include "files.h" #include "r_data.h" #include "w_wad.h" +#include "v_palette.h" //========================================================================== diff --git a/src/textures/warptexture.cpp b/src/textures/warptexture.cpp index 8f6a1eecd7..82ad00d319 100644 --- a/src/textures/warptexture.cpp +++ b/src/textures/warptexture.cpp @@ -36,6 +36,7 @@ #include "doomtype.h" #include "files.h" #include "r_data.h" +#include "r_main.h" #include "templates.h" diff --git a/src/thingdef/olddecorations.cpp b/src/thingdef/olddecorations.cpp index 80fe983cdd..8e25f7641d 100644 --- a/src/thingdef/olddecorations.cpp +++ b/src/thingdef/olddecorations.cpp @@ -45,7 +45,6 @@ #include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" -#include "p_enemy.h" #include "a_action.h" #include "decallib.h" #include "i_system.h" diff --git a/src/thingdef/thingdef.cpp b/src/thingdef/thingdef.cpp index 72e4d5bddf..42b82c1009 100644 --- a/src/thingdef/thingdef.cpp +++ b/src/thingdef/thingdef.cpp @@ -51,13 +51,11 @@ #include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" -#include "p_enemy.h" #include "a_action.h" #include "decallib.h" #include "m_random.h" #include "i_system.h" #include "p_local.h" -#include "p_effect.h" #include "v_palette.h" #include "doomerrors.h" #include "a_hexenglobal.h" diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index 0010cce96c..fc14386cf9 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -1,6 +1,8 @@ #ifndef __THINGDEF_H #define __THINGDEF_H +#include "doomtype.h" + class FScanner; //========================================================================== diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 45145a5fb4..7a9799d124 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -63,7 +63,9 @@ #include "a_sharedglobal.h" #include "thingdef/thingdef.h" #include "v_video.h" +#include "v_font.h" #include "doomstat.h" +#include "v_palette.h" static FRandom pr_camissile ("CustomActorfire"); diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 6213aa61d8..5c355f8034 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -51,7 +51,6 @@ #include "s_sound.h" #include "cmdlib.h" #include "p_lnspec.h" -#include "p_enemy.h" #include "a_action.h" #include "decallib.h" #include "m_random.h" diff --git a/src/thingdef/thingdef_states.cpp b/src/thingdef/thingdef_states.cpp index 66e8f7d3d1..e814afde9f 100644 --- a/src/thingdef/thingdef_states.cpp +++ b/src/thingdef/thingdef_states.cpp @@ -48,7 +48,6 @@ #include "p_lnspec.h" #include "a_action.h" #include "p_local.h" -#include "p_effect.h" #include "v_palette.h" #include "doomerrors.h" #include "thingdef.h" diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 62d8a12eef..27c8bcf436 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -40,9 +40,11 @@ #include "m_swap.h" #include "r_defs.h" #include "r_draw.h" +#include "r_main.h" #include "r_things.h" #include "r_translate.h" #include "doomstat.h" +#include "v_palette.h" #include "i_system.h" #include "i_video.h" diff --git a/src/v_font.cpp b/src/v_font.cpp index 14150d05af..3e34903109 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -94,12 +94,14 @@ The FON2 header is followed by variable length data: #include "r_draw.h" #include "r_translate.h" #include "colormatcher.h" +#include "v_palette.h" // MACROS ------------------------------------------------------------------ #define DEFAULT_LOG_COLOR PalEntry(223,223,223) // TYPES ------------------------------------------------------------------- +void RecordTextureColors (FTexture *pic, BYTE *colorsused); // This structure is used by BuildTranslations() to hold color information. struct TranslationParm @@ -116,6 +118,34 @@ struct TranslationMap int Number; }; +class FSingleLumpFont : public FFont +{ +public: + FSingleLumpFont (const char *fontname, int lump); + +protected: + void CheckFON1Chars (int lump, const BYTE *data, double *luminosity); + void BuildTranslations2 (); + void FixupPalette (BYTE *identity, double *luminosity, const BYTE *palette, + bool rescale, PalEntry *out_palette); + void LoadFON1 (int lump, const BYTE *data); + void LoadFON2 (int lump, const BYTE *data); + void CreateFontFromPic (FTextureID picnum); +}; + +class FSinglePicFont : public FFont +{ +public: + FSinglePicFont(const char *picname); + + // FFont interface + FTexture *GetChar (int code, int *const width) const; + int GetCharWidth (int code) const; + +protected: + FTextureID PicNum; +}; + // This is a font character that loads a texture and recolors it. class FFontChar1 : public FTexture { diff --git a/src/v_font.h b/src/v_font.h index 3db032c23c..14cf1391ef 100644 --- a/src/v_font.h +++ b/src/v_font.h @@ -35,11 +35,11 @@ #define __V_FONT_H__ #include "doomtype.h" -#include "farchive.h" -#include "textures/textures.h" class DCanvas; struct FRemapTable; +class FTexture; +class FArchive; enum EColorRange { @@ -71,6 +71,7 @@ enum EColorRange extern int NumTextColors; + class FFont { public: @@ -124,40 +125,6 @@ protected: friend FArchive &SerializeFFontPtr (FArchive &arc, FFont* &font); }; -template<> inline FArchive &operator<< (FArchive &arc, FFont* &font) -{ - return SerializeFFontPtr (arc, font); -} - -class FSingleLumpFont : public FFont -{ -public: - FSingleLumpFont (const char *fontname, int lump); - -protected: - void CheckFON1Chars (int lump, const BYTE *data, double *luminosity); - void BuildTranslations2 (); - void FixupPalette (BYTE *identity, double *luminosity, const BYTE *palette, - bool rescale, PalEntry *out_palette); - void LoadFON1 (int lump, const BYTE *data); - void LoadFON2 (int lump, const BYTE *data); - void CreateFontFromPic (FTextureID picnum); -}; - -class FSinglePicFont : public FFont -{ -public: - FSinglePicFont(const char *picname); - - // FFont interface - FTexture *GetChar (int code, int *const width) const; - int GetCharWidth (int code) const; - -protected: - FTextureID PicNum; -}; - -void RecordTextureColors (FTexture *pic, BYTE *colorsused); extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont; diff --git a/src/v_palette.cpp b/src/v_palette.cpp index dd0141aeac..39a2001cdd 100644 --- a/src/v_palette.cpp +++ b/src/v_palette.cpp @@ -55,6 +55,7 @@ #include "gi.h" #include "x86.h" #include "colormatcher.h" +#include "v_palette.h" extern "C" { FDynamicColormap NormalLight; diff --git a/src/v_palette.h b/src/v_palette.h index c8236a3852..71c2cd0473 100644 --- a/src/v_palette.h +++ b/src/v_palette.h @@ -34,8 +34,7 @@ #ifndef __V_PALETTE_H__ #define __V_PALETTE_H__ -#include "doomtype.h" -#include "r_main.h" +#include "basictypes.h" #define MAKERGB(r,g,b) DWORD(((r)<<16)|((g)<<8)|(b)) #define MAKEARGB(a,r,g,b) DWORD(((a)<<24)|((r)<<16)|((g)<<8)|(b)) diff --git a/src/v_video.cpp b/src/v_video.cpp index 955aa0606e..839381b421 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -30,7 +30,6 @@ #include "i_video.h" #include "r_local.h" #include "r_draw.h" -#include "r_plane.h" #include "r_state.h" #include "doomdef.h" @@ -62,6 +61,8 @@ #include "f_wipe.h" #include "m_png.h" #include "colormatcher.h" +#include "v_palette.h" + IMPLEMENT_ABSTRACT_CLASS (DCanvas) IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer) diff --git a/src/v_video.h b/src/v_video.h index a84fc9c7d1..b02e4ea183 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -36,13 +36,10 @@ #include "doomtype.h" -#include "v_palette.h" -#include "v_font.h" - #include "doomdef.h" - -// Needed because we are refering to patches. -#include "r_data.h" +#include "dobject.h" +#include "r_blend.h" +#include "c_cvars.h" extern int CleanWidth, CleanHeight, CleanXfac, CleanYfac; extern int DisplayWidth, DisplayHeight, DisplayBits; @@ -125,6 +122,10 @@ enum ESSType SS_BGRA }; +class FFont; +struct FRemapTable; +class player_t; + // // VIDEO // diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index aa61b8c444..89aa642263 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -67,6 +67,7 @@ #include "st_stuff.h" #include "win32iface.h" #include "doomstat.h" +#include "v_palette.h" // MACROS ------------------------------------------------------------------ diff --git a/src/win32/fb_ddraw.cpp b/src/win32/fb_ddraw.cpp index dfd12ba3cb..006288d5eb 100644 --- a/src/win32/fb_ddraw.cpp +++ b/src/win32/fb_ddraw.cpp @@ -55,6 +55,7 @@ #include "doomerrors.h" #include "win32iface.h" +#include "v_palette.h" // MACROS ------------------------------------------------------------------ diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index f16dfcfd3f..c6daae8497 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -75,6 +75,7 @@ #include "cmdlib.h" #include "g_level.h" #include "doomstat.h" +#include "r_main.h" #include "stats.h" #include "st_start.h" diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index c6cc23b3d5..2753c0aeb9 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -64,6 +64,7 @@ #include "stats.h" #include "doomerrors.h" #include "m_argv.h" +#include "r_defs.h" #include "win32iface.h" diff --git a/src/xlat/parse_xlat.cpp b/src/xlat/parse_xlat.cpp index c1c71a28b5..75f2d3d278 100644 --- a/src/xlat/parse_xlat.cpp +++ b/src/xlat/parse_xlat.cpp @@ -35,10 +35,8 @@ #include "doomtype.h" -#include "tarray.h" #include "w_wad.h" #include "c_console.h" -#include "p_lnspec.h" #include "info.h" #include "gi.h" #include "parsecontext.h" diff --git a/zdoom.vcproj b/zdoom.vcproj index 223218810d..2de46e716d 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -2188,30 +2188,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +