-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from mir-diablo-ii-tools/feature/disable-scrol…
…l-of-inifuss-rect Disable rectangle draw in Scroll of Inifuss screen
- Loading branch information
Showing
7 changed files
with
476 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
...ent_disable_scroll_of_inifuss_rect_patch/d2client_disable_scroll_of_inifuss_rect_patch.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/** | ||
* SlashGaming Diablo II Free Resolution | ||
* Copyright (C) 2019-2022 Mir Drualga | ||
* | ||
* This file is part of SlashGaming Diablo II Free Resolution. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Additional permissions under GNU Affero General Public License version 3 | ||
* section 7 | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with Diablo II (or a modified version of that game and its | ||
* libraries), containing parts covered by the terms of Blizzard End User | ||
* License Agreement, the licensors of this Program grant you additional | ||
* permission to convey the resulting work. This additional permission is | ||
* also extended to any combination of expansions, mods, and remasters of | ||
* the game. | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with any Graphics Device Interface (GDI), DirectDraw, Direct3D, | ||
* Glide, OpenGL, or Rave wrapper (or modified versions of those | ||
* libraries), containing parts not covered by a compatible license, the | ||
* licensors of this Program grant you additional permission to convey the | ||
* resulting work. | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with any library (or a modified version of that library) that links | ||
* to Diablo II (or a modified version of that game and its libraries), | ||
* containing parts not covered by a compatible license, the licensors of | ||
* this Program grant you additional permission to convey the resulting | ||
* work. | ||
*/ | ||
|
||
#include "d2client_disable_scroll_of_inifuss_rect_patch.hpp" | ||
|
||
#include <stddef.h> | ||
|
||
#include <sgd2mapi.hpp> | ||
#include "d2client_disable_scroll_of_inifuss_rect_patch_1_07.hpp" | ||
|
||
namespace sgd2fr { | ||
namespace d2client { | ||
|
||
DisableScrollOfInifussRectPatch::DisableScrollOfInifussRectPatch() | ||
: AbstractMultiversionPatch(IsApplicable(), InitPatch()) { | ||
} | ||
|
||
bool DisableScrollOfInifussRectPatch::IsApplicable() { | ||
return true; | ||
} | ||
|
||
AbstractVersionPatch* DisableScrollOfInifussRectPatch::InitPatch() { | ||
if (!IsApplicable()) { | ||
return NULL; | ||
} | ||
|
||
::d2::GameVersion running_game_version = ::d2::game_version::GetRunning(); | ||
|
||
switch (running_game_version) { | ||
case ::d2::GameVersion::k1_07Beta: | ||
case ::d2::GameVersion::k1_07: | ||
case ::d2::GameVersion::k1_08: | ||
case ::d2::GameVersion::k1_09: | ||
case ::d2::GameVersion::k1_09B: | ||
case ::d2::GameVersion::k1_09D: | ||
case ::d2::GameVersion::k1_10Beta: | ||
case ::d2::GameVersion::k1_10SBeta: | ||
case ::d2::GameVersion::k1_10: | ||
case ::d2::GameVersion::k1_11: | ||
case ::d2::GameVersion::k1_11B: | ||
case ::d2::GameVersion::k1_12A: | ||
case ::d2::GameVersion::k1_13ABeta: | ||
case ::d2::GameVersion::k1_13C: | ||
case ::d2::GameVersion::k1_13D: | ||
case ::d2::GameVersion::kClassic1_14A: | ||
case ::d2::GameVersion::kLod1_14A: | ||
case ::d2::GameVersion::kClassic1_14B: | ||
case ::d2::GameVersion::kLod1_14B: | ||
case ::d2::GameVersion::kClassic1_14C: | ||
case ::d2::GameVersion::kLod1_14C: | ||
case ::d2::GameVersion::kClassic1_14D: | ||
case ::d2::GameVersion::kLod1_14D: { | ||
return new DisableScrollOfInifussRectPatch_1_07(); | ||
} | ||
} | ||
} | ||
|
||
} // namespace d2client | ||
} // namespace sgd2fr |
68 changes: 68 additions & 0 deletions
68
...nt_disable_scroll_of_inifuss_rect_patch/d2client_disable_scroll_of_inifuss_rect_patch.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* SlashGaming Diablo II Free Resolution | ||
* Copyright (C) 2019-2022 Mir Drualga | ||
* | ||
* This file is part of SlashGaming Diablo II Free Resolution. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Additional permissions under GNU Affero General Public License version 3 | ||
* section 7 | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with Diablo II (or a modified version of that game and its | ||
* libraries), containing parts covered by the terms of Blizzard End User | ||
* License Agreement, the licensors of this Program grant you additional | ||
* permission to convey the resulting work. This additional permission is | ||
* also extended to any combination of expansions, mods, and remasters of | ||
* the game. | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with any Graphics Device Interface (GDI), DirectDraw, Direct3D, | ||
* Glide, OpenGL, or Rave wrapper (or modified versions of those | ||
* libraries), containing parts not covered by a compatible license, the | ||
* licensors of this Program grant you additional permission to convey the | ||
* resulting work. | ||
* | ||
* If you modify this Program, or any covered work, by linking or combining | ||
* it with any library (or a modified version of that library) that links | ||
* to Diablo II (or a modified version of that game and its libraries), | ||
* containing parts not covered by a compatible license, the licensors of | ||
* this Program grant you additional permission to convey the resulting | ||
* work. | ||
*/ | ||
|
||
#ifndef SGD2FR_PATCHES_DRAW_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_PATCH_HPP_ | ||
#define SGD2FR_PATCHES_DRAW_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_PATCH_HPP_ | ||
|
||
#include "../../../helper/abstract_multiversion_patch.hpp" | ||
#include "../../../helper/abstract_version_patch.hpp" | ||
|
||
namespace sgd2fr { | ||
namespace d2client { | ||
|
||
class DisableScrollOfInifussRectPatch | ||
: public AbstractMultiversionPatch { | ||
public: | ||
DisableScrollOfInifussRectPatch(); | ||
|
||
private: | ||
static bool IsApplicable(); | ||
static AbstractVersionPatch* InitPatch(); | ||
}; | ||
|
||
} // namespace d2client | ||
} // namespace sgd2fr | ||
|
||
#endif // SGD2FR_PATCHES_DRAW_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_D2CLIENT_DISABLE_SCROLL_OF_INIFUSS_RECT_PATCH_HPP_ |
Oops, something went wrong.