diff --git a/data/cdata/scripts/ending/credits.gsc b/data/cdata/scripts/ending/credits.gsc new file mode 100644 index 00000000..deaeff7a --- /dev/null +++ b/data/cdata/scripts/ending/credits.gsc @@ -0,0 +1,29 @@ +main() +{ + replacefunc(maps\_credit_h2_autogen::_id_B775, ::initiwcredits); +} + +initcredits_h2mod() +{ + maps\_credits::addcenterimage("LOGO_H2MOD", 256, 64, 2); + maps\_credits::addspace(); + maps\_credits::addcenterheading(&"CREDIT_H2MOD_DEVELOPERS"); + maps\_credits::addgap(); + maps\_credits::addcenternamedouble(&"CREDIT_H2MOD_FED", &"CREDIT_H2MOD_VLAD"); + maps\_credits::addcenternamedouble(&"CREDIT_H2MOD_FUTURE", &"CREDIT_H2MOD_NETADR"); + maps\_credits::addgap(); + maps\_credits::addcenterheading(&"CREDIT_H2MOD_SPECIAL_THANKS"); + maps\_credits::addgap(); + maps\_credits::addcenternamedouble(&"CREDIT_H2MOD_SNAKE", &"CREDIT_H2MOD_QUAK"); + maps\_credits::addcenternamedouble(&"CREDIT_H2MOD_XENSIK", &"CREDIT_H2MOD_JARIK"); +} + +initiwcredits() +{ + initcredits_h2mod(); + maps\_credit_h2_autogen::initiwcredits_iw(); + maps\_credit_h2_autogen::initiwcredits_beenox(); + maps\_credit_h2_autogen::initiwcredits_ca(); + maps\_credit_h2_autogen::initiwcredits_nerve(); + maps\_credit_h2_autogen::initiwcredits_irongalaxy(); +} diff --git a/data/cdata/ui_scripts/branding/credits.lua b/data/cdata/ui_scripts/branding/credits.lua index 6e11c3a8..352e91d9 100644 --- a/data/cdata/ui_scripts/branding/credits.lua +++ b/data/cdata/ui_scripts/branding/credits.lua @@ -227,6 +227,8 @@ LUI.MenuBuilder.registerType("credits_menu", function(f6_arg0, f6_arg1) skipAnim = f6_local2 }) + PersistentBackground.ChangeBackground(nil, CoD.Background.CampaignRegular) + menu:AddButton("MENU_SP_CREDITS_CAPS", creditsmap, nil, true, nil, { desc_text = Engine.Localize("@LUA_MENU_CREDITS_DESC") }) diff --git a/data/zone_source/h2_mod_patch_ending.csv b/data/zone_source/h2_mod_patch_ending.csv new file mode 100644 index 00000000..ff17e8f1 --- /dev/null +++ b/data/zone_source/h2_mod_patch_ending.csv @@ -0,0 +1,2 @@ +material,logo_h2mod +localize,english diff --git a/data/zonetool/h2_mod_patch_ending/images/logo_h2mod.dds b/data/zonetool/h2_mod_patch_ending/images/logo_h2mod.dds new file mode 100644 index 00000000..927f574b Binary files /dev/null and b/data/zonetool/h2_mod_patch_ending/images/logo_h2mod.dds differ diff --git a/data/zonetool/h2_mod_patch_ending/localizedstrings/english.json b/data/zonetool/h2_mod_patch_ending/localizedstrings/english.json new file mode 100644 index 00000000..0ee0c206 --- /dev/null +++ b/data/zonetool/h2_mod_patch_ending/localizedstrings/english.json @@ -0,0 +1,12 @@ +{ + "CREDIT_H2MOD_DEVELOPERS": "DEVELOPERS", + "CREDIT_H2MOD_SPECIAL_THANKS": "SPECIAL THANKS", + "CREDIT_H2MOD_FED": "fed", + "CREDIT_H2MOD_VLAD": "Vlad", + "CREDIT_H2MOD_FUTURE": "Future", + "CREDIT_H2MOD_JARIK": "JariKCoding", + "CREDIT_H2MOD_NETADR": "netadr", + "CREDIT_H2MOD_QUAK": "quaK", + "CREDIT_H2MOD_SNAKE": "momo5502", + "CREDIT_H2MOD_XENSIK": "xensik" +} \ No newline at end of file diff --git a/data/zonetool/h2_mod_patch_ending/materials/logo_h2mod.json b/data/zonetool/h2_mod_patch_ending/materials/logo_h2mod.json new file mode 100644 index 00000000..6c3d664d --- /dev/null +++ b/data/zonetool/h2_mod_patch_ending/materials/logo_h2mod.json @@ -0,0 +1,26 @@ +{ + "name": "logo_h2mod", + "techniqueSet->name": "2d", + "gameFlags": 4, + "sortKey": 61, + "renderFlags": 0, + "textureAtlasRowCount": 1, + "textureAtlasColumnCount": 1, + "textureAtlasFrameBlend": 0, + "textureAtlasAsArray": 0, + "surfaceTypeBits": 0, + "cameraRegion": 14, + "materialType": 0, + "assetFlags": 0, + "constantTable": null, + "textureTable": [ + { + "image": "logo_h2mod", + "semantic": 0, + "samplerState": 19, + "lastCharacter": 112, + "firstCharacter": 99, + "typeHash": 2695565377 + } + ] +} \ No newline at end of file diff --git a/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbi b/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbi new file mode 100644 index 00000000..ee9e1be1 --- /dev/null +++ b/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbi @@ -0,0 +1 @@ +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbt b/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbt new file mode 100644 index 00000000..8d7d13ce Binary files /dev/null and b/data/zonetool/h2_mod_patch_ending/techsets/constantbuffer/2d.cbt differ diff --git a/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebits b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebits new file mode 100644 index 00000000..5fd5d938 Binary files /dev/null and b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebits differ diff --git a/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebitsmap b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebitsmap new file mode 100644 index 00000000..88fb7e89 --- /dev/null +++ b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.statebitsmap @@ -0,0 +1,31 @@ +[ + { + "loadBits": [ + 10, + 3759013900, + 65535, + 251732325, + 0, + 0 + ], + "depthStencilStateBits": [ + 9938018369548, + 17664666632780, + 4418985394188, + 2211374301773, + 19872279822925, + 9938018369549, + 17664666632781, + 281474443903821, + 281474443903809, + 281474440757260, + 9938018369548 + ], + "blendStateBits": [ + 251732325, + 0, + 0 + ], + "rasterizerState": 33 + } +] \ No newline at end of file diff --git a/data/zonetool/h2_mod_patch_ending/techsets/state/2d.stateinfo b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.stateinfo new file mode 100644 index 00000000..d80dd9e1 --- /dev/null +++ b/data/zonetool/h2_mod_patch_ending/techsets/state/2d.stateinfo @@ -0,0 +1,3 @@ +{ + "stateFlags": 0 +} \ No newline at end of file diff --git a/src/client/component/gsc.cpp b/src/client/component/gsc.cpp index 15878fad..3f1234f3 100644 --- a/src/client/component/gsc.cpp +++ b/src/client/component/gsc.cpp @@ -209,9 +209,9 @@ namespace gsc } } - void load_scripts(const std::filesystem::path& root_dir) + void load_scripts(const std::filesystem::path& root_dir, const std::string& subfolder) { - std::filesystem::path script_dir = root_dir / "scripts"; + std::filesystem::path script_dir = root_dir / subfolder; if (!utils::io::directory_exists(script_dir.generic_string())) { return; @@ -248,9 +248,11 @@ namespace gsc } }, true); + const auto mapname = game::Dvar_FindVar("mapname"); for (const auto& path : filesystem::get_search_paths()) { - load_scripts(path); + load_scripts(path, "scripts"); + load_scripts(path, "scripts/"s + mapname->current.string); } }