Skip to content

Commit

Permalink
2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiLko committed Nov 7, 2024
1 parent 90cad7c commit fdb4026
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 30 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.0.3

* Fixed render record audio desync i think xD.

# v2.0.2

* Added render audio record.
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"win": "2.206",
"android": "2.206"
},
"version": "v2.0.2",
"version": "v2.0.3",
"id": "zilko.xdbot",
"name": "xdBot",
"developer": "Zilko",
Expand Down
28 changes: 1 addition & 27 deletions src/keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,9 @@ class $modify(CCKeyboardDispatcher) {
}


if (key == enumKeyCodes::KEY_J && !isKeyRepeat && isKeyDown) {
// std::string str = ZipUtils::decompressString(PlayLayer::get()->m_level->m_levelString.c_str(), true, 0);
// auto strs = Utils::splitByChar(str, ';');

// auto start = std::chrono::high_resolution_clock::now();

// std::string lole = LayoutMode::mergeVector(strs, ";");

// auto endd = std::chrono::high_resolution_clock::now();

// std::chrono::duration<double, std::milli> elapsed = endd - start;

// log::debug("{}", str);

}

// MacroEditLayer::create()->show();

// if (key == enumKeyCodes::KEY_J && !isKeyRepeat && isKeyDown) {
// CCKeyboardDispatcher::get()->dispatchKeyboardMSG(enumKeyCodes::KEY_Space, true, false);
// CCKeyboardDispatcher::get()->dispatchKeyboardMSG(enumKeyCodes::KEY_Space, false, false);
// auto layer = static_cast<EndLevelLayer*>(PlayLayer::get()->getChildByID("EndLevelLayer"));
// layer->onReplay(static_cast<CCObject*>(layer->m_mainLayer->getChildByID("button-menu")->getChildByID("retry-button")));


// }
/*if (key == enumKeyCodes::KEY_L && !isKeyRepeat && isKeyDown) {
}*/


return CCKeyboardDispatcher::dispatchKeyboardMSG(key, isKeyDown, isKeyRepeat);
}
Expand Down
2 changes: 1 addition & 1 deletion src/macro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const std::vector<float> safeValues = {
1.0f / 5, 1.0f / 4, 1.0f / 3, 1.0f / 2
};

const std::string xdBotVersion = "v2.0.2";
const std::string xdBotVersion = "v2.0.3";

enum state {
none,
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void Renderer::start() {
std::string fadeInString = (fadeIn && audioMode == AudioMode::Song) ? ", afade=t=in:d=2" : "";
std::string fadeOutString = (fadeOut && audioMode == AudioMode::Song) ? fmt::format(", afade=t=out:d=2:st={}", totalTime - stopAfter - 3.5f) : "";
std::string file = audioMode == AudioMode::Song ? songFile : tempPathAudio;
float offset = audioMode == AudioMode::Song ? songOffset : 0.28f;
float offset = audioMode == AudioMode::Song ? songOffset : (isPlatformer ? 0.28f : 0.f);

if (!extraAudioArgs.empty()) extraAudioArgs += " ";

Expand Down Expand Up @@ -451,6 +451,7 @@ void Renderer::handleRecording(PlayLayer* pl, int frame) {
#ifdef GEODE_IS_WINDOWS

if (!pl) stop();
isPlatformer = pl->m_levelSettings->m_platformerMode;
if (dontRender || pl->m_player1->m_isDead) return;

auto& g = Global::get();
Expand Down
1 change: 1 addition & 0 deletions src/renderer/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Renderer {
bool dontRecordAudio = false;
bool recordingAudio = false;
bool startedAudio = false;
bool isPlatformer = false;
int finishFrame = 0;
int levelStartFrame = 0;

Expand Down

0 comments on commit fdb4026

Please sign in to comment.