Skip to content

Commit

Permalink
v1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Jul 12, 2024
1 parent 799de70 commit 1ff4398
Show file tree
Hide file tree
Showing 46 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(DemonsInBetween VERSION 1.1.3)
project(DemonsInBetween VERSION 1.1.4)

add_library(${PROJECT_NAME} SHARED
src/DemonsInBetween.cpp
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Demons In Between Changelog
## v1.1.4 (2024-07-11)
- Added some compatibility with the mod "GodlikeFaces" by adyagmd

## v1.1.3 (2024-07-01)
- The last update actually didn't fix the main menu crash lmfaooooo
- Updated to use the GDDL spreadsheet, so that the mod doesn't crash the API like it did before
Expand Down
10 changes: 8 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"geode": "3.1.1",
"geode": "3.2.0",
"gd": {
"android": "2.206",
"win": "2.206",
"mac": "2.206"
},
"version": "v1.1.3",
"version": "v1.1.4",
"id": "hiimjustin000.demons_in_between",
"name": "Demons In Between",
"developer": "hiimjustin000",
Expand All @@ -25,6 +25,12 @@
],
"DIB_ShortSheet": [
"resources/ShortSheet/*.png"
],
"DIB_LegendaryLongSheet": [
"resources/LegendaryLongSheet/*.png"
],
"DIB_LegendaryShortSheet": [
"resources/LegendaryShortSheet/*.png"
]
},
"sprites": [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions src/DemonsInBetween.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,20 @@ LadderDemon const& DemonsInBetween::demonForLevel(GJGameLevel* level) {
return demon == GDDL.end() ? defaultDemon : *demon;
}

CCSprite* DemonsInBetween::spriteForDifficulty(GJDifficultySprite* difficultySprite, int difficulty, GJDifficultyName name) {
CCSprite* DemonsInBetween::spriteForDifficulty(GJDifficultySprite* difficultySprite, int difficulty, GJDifficultyName name, GJFeatureState state) {
auto glow = state == GJFeatureState::Legendary ? "_4" : "";
auto sprite = CCSprite::createWithSpriteFrameName((name == GJDifficultyName::Long ?
fmt::format("DIB_{:02d}_btn2_001.png"_spr, difficulty) : fmt::format("DIB_{:02d}_btn_001.png"_spr, difficulty)).c_str());
fmt::format("DIB_{:02d}{}_btn2_001.png"_spr, difficulty, glow) : fmt::format("DIB_{:02d}{}_btn_001.png"_spr, difficulty, glow)).c_str());
sprite->setPosition(difficultySprite->getPosition() + (name == GJDifficultyName::Long ?
LONG_OFFSETS[(size_t)difficulty - 1] : SHORT_OFFSETS[(size_t)difficulty - 1]));
sprite->setID("between-difficulty-sprite"_spr);
return sprite;
}

GJFeatureState DemonsInBetween::stateForLevel(GJGameLevel* level) {
return Loader::get()->isModLoaded("adyagd.godlikefaces") ? level->m_featured ? (GJFeatureState)(level->m_isEpic + 1) : GJFeatureState::None : GJFeatureState::None;
}

GJSearchObject* DemonsInBetween::searchObjectForPage(int page) {
SEARCH_RESULTS.clear();

Expand Down
3 changes: 2 additions & 1 deletion src/DemonsInBetween.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class DemonsInBetween {
static void initGDDL(matjson::Array const&, bool saveCache = false);
static matjson::Array const& parseGDDL(std::string const&);
static LadderDemon const& demonForLevel(GJGameLevel*);
static CCSprite* spriteForDifficulty(GJDifficultySprite*, int, GJDifficultyName);
static CCSprite* spriteForDifficulty(GJDifficultySprite*, int, GJDifficultyName, GJFeatureState);
static GJFeatureState stateForLevel(GJGameLevel*);
static GJSearchObject* searchObjectForPage(int);
};
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class $modify(DIBLevelInfoLayer, LevelInfoLayer) {
auto& demon = DemonsInBetween::demonForLevel(level);
if (demon.id == 0) return true;

addChild(DemonsInBetween::spriteForDifficulty(m_difficultySprite, demon.difficulty, GJDifficultyName::Long), 3);
addChild(DemonsInBetween::spriteForDifficulty(m_difficultySprite, demon.difficulty,
GJDifficultyName::Long, DemonsInBetween::stateForLevel(level)), 3);
m_difficultySprite->setOpacity(0);

return true;
Expand All @@ -75,7 +76,8 @@ class $modify(DIBLevelCell, LevelCell) {
if (difficultyContainer->getChildByID("grd-difficulty") || difficultyContainer->getChildByID("gddp-difficulty")) return;

auto difficultySprite = static_cast<GJDifficultySprite*>(difficultyContainer->getChildByID("difficulty-sprite"));
difficultyContainer->addChild(DemonsInBetween::spriteForDifficulty(difficultySprite, demon.difficulty, GJDifficultyName::Short), 3);
difficultyContainer->addChild(DemonsInBetween::spriteForDifficulty(difficultySprite,
demon.difficulty, GJDifficultyName::Short, DemonsInBetween::stateForLevel(level)), 3);
difficultySprite->setOpacity(0);
}
}
Expand Down

0 comments on commit 1ff4398

Please sign in to comment.