diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ec77861e04..0d1d1724aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -726,14 +726,12 @@ add_executable( zdoom WIN32 r_bsp.cpp r_draw.cpp r_drawt.cpp - r_interpolate.cpp r_main.cpp r_plane.cpp r_polymost.cpp r_segs.cpp r_sky.cpp r_things.cpp - r_translate.cpp s_advsound.cpp s_environment.cpp s_playlist.cpp @@ -906,6 +904,8 @@ add_executable( zdoom WIN32 r_data/colormaps.cpp r_data/voxels.cpp r_data/renderstyle.cpp + r_data/r_interpolate.cpp + r_data/r_translate.cpp autozend.cpp ) diff --git a/src/am_map.cpp b/src/am_map.cpp index 6a2d19699a..a411fb570c 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -33,7 +33,7 @@ #include "w_wad.h" #include "a_sharedglobal.h" #include "statnums.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "d_event.h" #include "gi.h" #include "r_bsp.h" diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index c5da6a0ed3..a661ba697e 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -67,7 +67,7 @@ #include "thingdef/thingdef_exp.h" #include "vectors.h" #include "dobject.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "sc_man.h" #include "i_system.h" #include "doomerrors.h" diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index def8006582..deb7c5b225 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -53,7 +53,7 @@ #include "gi.h" #include "m_random.h" #include "teaminfo.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "templates.h" #include "cmdlib.h" diff --git a/src/decallib.cpp b/src/decallib.cpp index 3f8c5debbd..95b77b1a7e 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -44,7 +44,7 @@ #include "templates.h" #include "r_draw.h" #include "a_sharedglobal.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "gi.h" #include "g_level.h" #include "colormatcher.h" diff --git a/src/dobjgc.cpp b/src/dobjgc.cpp index 05d7f3e55d..1bc05269e2 100644 --- a/src/dobjgc.cpp +++ b/src/dobjgc.cpp @@ -67,7 +67,7 @@ #include "c_dispatch.h" #include "p_acs.h" #include "s_sndseq.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "doomstat.h" #include "m_argv.h" #include "po_man.h" diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index 6c717b9982..d678ac379d 100644 --- a/src/dsectoreffect.cpp +++ b/src/dsectoreffect.cpp @@ -26,7 +26,7 @@ #include "gi.h" #include "p_local.h" #include "p_3dmidtex.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "statnums.h" IMPLEMENT_CLASS (DSectorEffect) diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index a6dd7f7b92..55cbab2799 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -7,7 +7,7 @@ #include "p_local.h" #include "a_doomglobal.h" #include "s_sound.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "thingdef/thingdef.h" #include "g_level.h" */ diff --git a/src/g_game.cpp b/src/g_game.cpp index 9fa73aca94..0d39751837 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -72,7 +72,7 @@ #include "gi.h" #include "a_keys.h" #include "a_artifacts.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "cmdlib.h" #include "d_net.h" #include "d_event.h" diff --git a/src/g_heretic/a_hereticmisc.cpp b/src/g_heretic/a_hereticmisc.cpp index 7fc2493789..4304b8207e 100644 --- a/src/g_heretic/a_hereticmisc.cpp +++ b/src/g_heretic/a_hereticmisc.cpp @@ -12,7 +12,7 @@ #include "g_level.h" #include "a_sharedglobal.h" #include "templates.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "doomstat.h" // Include all the other Heretic stuff here to reduce compile time diff --git a/src/g_heretic/a_hereticweaps.cpp b/src/g_heretic/a_hereticweaps.cpp index f6c9df7f2b..d7c083be3b 100644 --- a/src/g_heretic/a_hereticweaps.cpp +++ b/src/g_heretic/a_hereticweaps.cpp @@ -10,7 +10,7 @@ #include "p_local.h" #include "gstrings.h" #include "gi.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "thingdef/thingdef.h" #include "doomstat.h" */ diff --git a/src/g_level.cpp b/src/g_level.cpp index cc3896e0db..bfa7ef1d9d 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -69,9 +69,9 @@ #include "version.h" #include "statnums.h" #include "sbarinfo.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "p_lnspec.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "cmdlib.h" #include "d_net.h" #include "d_netinf.h" diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index 4a10ff08c7..ddac7a400e 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -11,7 +11,7 @@ #include "p_enemy.h" #include "statnums.h" #include "templates.h" -#include "r_translate.h" +#include "r_data/r_translate.h" static FRandom pr_freezedeath ("FreezeDeath"); static FRandom pr_icesettics ("IceSetTics"); diff --git a/src/g_shared/sbarinfo.cpp b/src/g_shared/sbarinfo.cpp index 1d8ffa8de9..6583881b7b 100644 --- a/src/g_shared/sbarinfo.cpp +++ b/src/g_shared/sbarinfo.cpp @@ -50,7 +50,7 @@ #include "i_system.h" #include "sbarinfo.h" #include "gi.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "r_main.h" #include "a_weaponpiece.h" #include "a_strifeglobal.h" diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 556f915638..1ef24689cf 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -45,7 +45,7 @@ #include "actor.h" #include "d_player.h" #include "r_state.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "c_bind.h" #include "g_level.h" #include "p_conversation.h" diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index e2a41ddfd1..0bb699f884 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -40,7 +40,7 @@ #include "a_keys.h" #include "templates.h" #include "c_console.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "g_level.h" #include "d_net.h" #include "d_dehacked.h" diff --git a/src/menu/menu.h b/src/menu/menu.h index dc333b42cb..8a484b7ba9 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -6,7 +6,7 @@ #include "dobject.h" #include "d_player.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "c_cvars.h" #include "v_font.h" #include "version.h" diff --git a/src/menu/playermenu.cpp b/src/menu/playermenu.cpp index de0292f7af..7aa668eaa5 100644 --- a/src/menu/playermenu.cpp +++ b/src/menu/playermenu.cpp @@ -45,7 +45,7 @@ #include "teaminfo.h" #include "v_palette.h" #include "r_state.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "v_text.h" EXTERN_CVAR (String, playerclass) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index ac7e94fa5d..653a309f7d 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -66,7 +66,7 @@ #include "sc_man.h" #include "c_bind.h" #include "info.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "cmdlib.h" #include "m_png.h" #include "p_setup.h" diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 3fff563f89..4d7a6c13e5 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -30,7 +30,7 @@ #include "r_state.h" #include "tables.h" #include "p_3dmidtex.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" //========================================================================== // diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 2985ed4be1..eb1c2b1c00 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -52,7 +52,7 @@ #include "m_random.h" #include "p_conversation.h" #include "a_strifeglobal.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "p_3dmidtex.h" #include "d_net.h" #include "d_event.h" diff --git a/src/p_map.cpp b/src/p_map.cpp index 943852526f..1230aedee8 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -50,7 +50,7 @@ #include "a_sharedglobal.h" #include "p_conversation.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "g_level.h" #define WATER_SINK_FACTOR 3 diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 9c3c84d6f6..adaef861d1 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -53,7 +53,7 @@ #include "thingdef/thingdef.h" #include "g_game.h" #include "teaminfo.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "r_sky.h" #include "g_level.h" #include "d_event.h" diff --git a/src/p_pillar.cpp b/src/p_pillar.cpp index 4faed647f0..2f2c155167 100644 --- a/src/p_pillar.cpp +++ b/src/p_pillar.cpp @@ -37,7 +37,7 @@ #include "p_spec.h" #include "g_level.h" #include "s_sndseq.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" IMPLEMENT_POINTY_CLASS (DPillar) DECLARE_POINTER(m_Interp_Floor) diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 08de630dbd..3564f580b9 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -44,7 +44,7 @@ #include "s_sndseq.h" #include "v_palette.h" #include "a_sharedglobal.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "g_level.h" #include "po_man.h" #include "p_setup.h" diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 0b4fd3dc2d..279d700bdb 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -58,8 +58,8 @@ #include "s_sndseq.h" #include "sbar.h" #include "p_setup.h" -#include "r_translate.h" -#include "r_interpolate.h" +#include "r_data/r_translate.h" +#include "r_data/r_interpolate.h" #include "r_sky.h" #include "cmdlib.h" #include "g_level.h" diff --git a/src/p_spec.cpp b/src/p_spec.cpp index f052a2e380..7cf24b9813 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -66,7 +66,7 @@ #include "c_console.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" static FRandom pr_playerinspecialsector ("PlayerInSpecialSector"); void P_SetupPortals(); diff --git a/src/p_tick.cpp b/src/p_tick.cpp index c0e5dfb143..b2ef3d3791 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -29,7 +29,7 @@ #include "s_sound.h" #include "doomstat.h" #include "sbar.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "i_sound.h" #include "g_level.h" diff --git a/src/po_man.cpp b/src/po_man.cpp index 0f9b0b15a1..0afe9538dd 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -24,7 +24,7 @@ #include "a_sharedglobal.h" #include "r_main.h" #include "p_lnspec.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "g_level.h" #include "po_man.h" #include "p_setup.h" diff --git a/src/r_interpolate.cpp b/src/r_data/r_interpolate.cpp similarity index 95% rename from src/r_interpolate.cpp rename to src/r_data/r_interpolate.cpp index 9bdaeb2136..1e0c0a3b9b 100644 --- a/src/r_interpolate.cpp +++ b/src/r_data/r_interpolate.cpp @@ -35,7 +35,7 @@ #include "p_3dmidtex.h" #include "stats.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "p_local.h" #include "i_system.h" #include "po_man.h" diff --git a/src/r_interpolate.h b/src/r_data/r_interpolate.h similarity index 100% rename from src/r_interpolate.h rename to src/r_data/r_interpolate.h diff --git a/src/r_translate.cpp b/src/r_data/r_translate.cpp similarity index 96% rename from src/r_translate.cpp rename to src/r_data/r_translate.cpp index ad1c845a6c..8e52c0b6dd 100644 --- a/src/r_translate.cpp +++ b/src/r_data/r_translate.cpp @@ -37,7 +37,7 @@ #include "templates.h" #include "r_draw.h" #include "r_main.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "v_video.h" #include "g_game.h" #include "colormatcher.h" diff --git a/src/r_translate.h b/src/r_data/r_translate.h similarity index 100% rename from src/r_translate.h rename to src/r_data/r_translate.h diff --git a/src/r_data/voxels.cpp b/src/r_data/voxels.cpp index eeed037901..3648d3a05b 100644 --- a/src/r_data/voxels.cpp +++ b/src/r_data/voxels.cpp @@ -62,7 +62,7 @@ #include "r_plane.h" #include "r_segs.h" #include "v_palette.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "r_data/colormaps.h" #include "voxels.h" diff --git a/src/r_draw.cpp b/src/r_draw.cpp index ae8e93a107..080407886c 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -36,7 +36,7 @@ #include "a_hexenglobal.h" #include "g_game.h" #include "g_level.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "v_palette.h" #include "r_data/colormaps.h" diff --git a/src/r_jpeg.h b/src/r_jpeg.h deleted file mode 100644 index 0df98ddd31..0000000000 --- a/src/r_jpeg.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __R_JPEG_H -#define __R_JPEG_H - -extern "C" -{ -#include -} - -class FileReader; - - -struct FLumpSourceMgr : public jpeg_source_mgr -{ - FileReader *Lump; - JOCTET Buffer[4096]; - bool StartOfFile; - - FLumpSourceMgr (FileReader *lump, j_decompress_ptr cinfo); - static void InitSource (j_decompress_ptr cinfo); - static boolean FillInputBuffer (j_decompress_ptr cinfo); - static void SkipInputData (j_decompress_ptr cinfo, long num_bytes); - static void TermSource (j_decompress_ptr cinfo); -}; - - -void JPEG_ErrorExit (j_common_ptr cinfo); -void JPEG_OutputMessage (j_common_ptr cinfo); - - -#endif diff --git a/src/r_main.cpp b/src/r_main.cpp index a5d58c2217..69abfb6bfd 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -44,9 +44,9 @@ #include "i_video.h" #include "i_system.h" #include "a_sharedglobal.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "p_3dmidtex.h" -#include "r_interpolate.h" +#include "r_data/r_interpolate.h" #include "r_bsp.h" #include "r_plane.h" #include "r_3dfloors.h" diff --git a/src/r_things.cpp b/src/r_things.cpp index a069b6be13..0517779060 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -58,7 +58,7 @@ #include "r_segs.h" #include "r_3dfloors.h" #include "v_palette.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "r_data/colormaps.h" #include "r_data/voxels.h" diff --git a/src/textures/bitmap.cpp b/src/textures/bitmap.cpp index 035474f7b5..4da12b9c35 100644 --- a/src/textures/bitmap.cpp +++ b/src/textures/bitmap.cpp @@ -34,7 +34,7 @@ #include "bitmap.h" #include "templates.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "v_palette.h" #include "r_data/colormaps.h" diff --git a/src/textures/jpegtexture.cpp b/src/textures/jpegtexture.cpp index f8e732d458..3a87f70af8 100644 --- a/src/textures/jpegtexture.cpp +++ b/src/textures/jpegtexture.cpp @@ -33,15 +33,35 @@ ** */ +#include +extern "C" +{ +#include +} + #include "doomtype.h" #include "files.h" -#include "r_jpeg.h" #include "w_wad.h" #include "v_text.h" #include "bitmap.h" #include "v_video.h" #include "textures/textures.h" + +struct FLumpSourceMgr : public jpeg_source_mgr +{ + FileReader *Lump; + JOCTET Buffer[4096]; + bool StartOfFile; + + FLumpSourceMgr (FileReader *lump, j_decompress_ptr cinfo); + static void InitSource (j_decompress_ptr cinfo); + static boolean FillInputBuffer (j_decompress_ptr cinfo); + static void SkipInputData (j_decompress_ptr cinfo, long num_bytes); + static void TermSource (j_decompress_ptr cinfo); +}; + + //========================================================================== // // diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index de56062d54..0bfb979a69 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -42,7 +42,7 @@ #include "st_start.h" #include "sc_man.h" #include "templates.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "bitmap.h" #include "colormatcher.h" #include "v_palette.h" diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index fa2c564dd6..093bf303b5 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -38,7 +38,7 @@ #include "w_wad.h" #include "templates.h" #include "i_system.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "bitmap.h" #include "colormatcher.h" #include "c_dispatch.h" diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index daf47e221a..3f6ee054e9 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -39,7 +39,7 @@ #include "w_wad.h" #include "templates.h" #include "i_system.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "c_dispatch.h" #include "v_text.h" #include "sc_man.h" diff --git a/src/thingdef/olddecorations.cpp b/src/thingdef/olddecorations.cpp index 7b4aa0bab4..aa0230d467 100644 --- a/src/thingdef/olddecorations.cpp +++ b/src/thingdef/olddecorations.cpp @@ -49,7 +49,7 @@ #include "decallib.h" #include "i_system.h" #include "thingdef.h" -#include "r_translate.h" +#include "r_data/r_translate.h" // TYPES ------------------------------------------------------------------- diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 542703c1ed..7e6aadbc25 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -64,7 +64,7 @@ #include "v_text.h" #include "thingdef.h" #include "a_sharedglobal.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "a_morph.h" #include "colormatcher.h" #include "teaminfo.h" diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 8d60e75624..6c5da30a1e 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -42,7 +42,7 @@ #include "r_draw.h" #include "r_main.h" #include "r_things.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "doomstat.h" #include "v_palette.h" #include "gi.h" diff --git a/src/v_font.cpp b/src/v_font.cpp index 410e6515a6..afe12b75b7 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -91,7 +91,7 @@ The FON2 header is followed by variable length data: #include "sc_man.h" #include "hu_stuff.h" #include "r_draw.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "colormatcher.h" #include "v_palette.h" diff --git a/src/v_video.cpp b/src/v_video.cpp index 96e1cee773..042f2ce6dc 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -56,7 +56,7 @@ #include "templates.h" #include "sbar.h" #include "hardware.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "f_wipe.h" #include "m_png.h" #include "colormatcher.h" diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index dbf8446a95..f0dbc5d81a 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -45,7 +45,7 @@ #include "sc_man.h" #include "v_text.h" #include "gi.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "templates.h" #include "gstrings.h" diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index c53b1ea09a..0c22f45123 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -64,7 +64,7 @@ #include "stats.h" #include "doomerrors.h" #include "r_main.h" -#include "r_translate.h" +#include "r_data/r_translate.h" #include "f_wipe.h" #include "st_stuff.h" #include "win32iface.h" diff --git a/zdoom.vcproj b/zdoom.vcproj index 3f86c8f462..f6be6009c4 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -2331,10 +2331,6 @@ RelativePath=".\src\r_drawt.cpp" > - - @@ -2359,10 +2355,6 @@ RelativePath=".\src\r_things.cpp" > - - - - - - @@ -2423,10 +2407,6 @@ RelativePath=".\src\r_things.h" > - - + + + + @@ -6648,6 +6636,14 @@ RelativePath=".\src\r_data\colormaps.cpp" > + + + +