Skip to content

Commit

Permalink
how will the ci do
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Nov 16, 2024
1 parent 90aea69 commit 7e7d040
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
fail-fast: false
matrix:
config:
- name: Windows
os: windows-latest

- name: macOS
os: macos-latest

Expand Down
9 changes: 4 additions & 5 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"geode": "3.6.1",
"geode": "4.0.0-beta.1",
"gd": {
"mac": "2.206",
"win": "2.206",
"android": "2.206"
"mac": "2.2074",
"android": "2.2074"
},
"version": "v1.2.0-beta.1",
"version": "v1.3.0",
"early-load": true,
"tags": [
"gameplay", "performance", "enhancement"
Expand Down
18 changes: 11 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,22 @@ void CustomGJBaseGameLayer::queueButton(int btnType, bool push, bool secondPlaye
void CustomGJBaseGameLayer::resetLevelVariables() {
GJBaseGameLayer::resetLevelVariables();

m_fields->m_timeBeginMs = 0;
m_fields->m_timeOffset = 0.0;
m_fields->m_timedCommands = {};
auto& fields = m_fields;
fields->m_timeBeginMs = 0;
fields->m_timeOffset = 0.0;
fields->m_timedCommands = {};
}

void CustomGJBaseGameLayer::processTimedInputs() {
// if you calculated steps upfront, you could also just rewrite processQueuedButtons to stop after it handles the current step
// not done here as processQueuedButtons is inlined on macos :(

// calculate the current time offset (in ms) that we stop handling inputs at
auto timeMs = static_cast<std::uint64_t>(m_fields->m_timeOffset * 1000.0);
auto& fields = m_fields;

auto& commands = this->m_fields->m_timedCommands;
auto timeMs = static_cast<std::uint64_t>(fields->m_timeOffset * 1000.0);

auto& commands = fields->m_timedCommands;
if (!commands.empty()) {
auto nextTime = commands.front().m_step;

Expand Down Expand Up @@ -144,8 +147,9 @@ void CustomGJBaseGameLayer::dumpInputQueue() {
}

void CustomGJBaseGameLayer::update(float dt) {
m_fields->m_timeBeginMs = platform_get_time();
m_fields->m_timeOffset = 0.0;
auto& fields = m_fields;
fields->m_timeBeginMs = platform_get_time();
fields->m_timeOffset = 0.0;

GJBaseGameLayer::update(dt);

Expand Down

0 comments on commit 7e7d040

Please sign in to comment.