-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5feaeb3
Showing
11 changed files
with
820 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build Geode Mod | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: Windows | ||
os: windows-latest | ||
target: Win32 | ||
- name: Android32 | ||
os: ubuntu-latest | ||
target: Android32 | ||
- name: Android64 | ||
os: ubuntu-latest | ||
target: Android64 | ||
|
||
|
||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Build the mod | ||
uses: geode-sdk/build-geode-mod@main | ||
with: | ||
sdk: nightly | ||
#build-config: 'RelWithDebInfo' | ||
combine: true | ||
target: ${{ matrix.config.target }} | ||
|
||
package: | ||
name: Package builds | ||
runs-on: ubuntu-latest | ||
needs: ['build'] | ||
steps: | ||
- uses: geode-sdk/build-geode-mod@combine | ||
id: build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Wave Trail Drag Fix | ||
path: ${{ steps.build.outputs.build-output }} |
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 @@ | ||
**/build |
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,24 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_OSX_ARCHITECTURES "x86_64") | ||
set(CMAKE_CXX_VISIBILITY_PRESET hidden) | ||
|
||
project(WaveTrailDragFix VERSION 1.0.0) | ||
|
||
# Set up the mod binary | ||
add_library(${PROJECT_NAME} SHARED | ||
src/main.cpp | ||
# Add your cpp files here | ||
) | ||
|
||
if (NOT DEFINED ENV{GEODE_SDK}) | ||
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode") | ||
else() | ||
message(STATUS "Found Geode: $ENV{GEODE_SDK}") | ||
endif() | ||
|
||
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode) | ||
|
||
# Set up dependencies, resources, link Geode | ||
setup_geode_mod(${PROJECT_NAME}) |
Large diffs are not rendered by default.
Oops, something went wrong.
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,3 @@ | ||
# Wave Trail Drag Fix | ||
|
||
Fix the wave trail being buggy on D blocks. |
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,10 @@ | ||
# Wave Trail Drag Fix | ||
Fixes the wave trail when interacting with D-blocks. | ||
|
||
![without](nytelyte.wave_trail_drag_fix/without.png) | ||
|
||
Without the mod | ||
|
||
![with](nytelyte.wave_trail_drag_fix/with.png) | ||
|
||
With the mod |
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,18 @@ | ||
{ | ||
"geode": "2.0.0-beta.19", | ||
"gd": { | ||
"android": "2.205", | ||
"win": "2.204" | ||
}, | ||
"version": "v1.0.0", | ||
"id": "nytelyte.wave_trail_drag_fix", | ||
"name": "Wave Trail Drag Fix", | ||
"developer": "NyteLyte", | ||
"description": "Fix the wave trail being buggy on D blocks.", | ||
"resources": { | ||
"sprites": [ | ||
"resources/with.png", | ||
"resources/without.png" | ||
] | ||
} | ||
} |
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.
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,37 @@ | ||
#include <Geode/Geode.hpp> | ||
#include <Geode/modify/PlayerObject.hpp> | ||
using namespace geode::prelude; | ||
|
||
cocos2d::CCPoint prev_position(0, 0); | ||
bool dont_add_point = true; | ||
float prev_yVelocity = -3001; | ||
|
||
class $modify(PlayerObject) { | ||
void update(float p0) { | ||
if (m_isDart) { | ||
// exiting a straight area, put the point on the previous | ||
// frame's position (where the wave was while it was still on | ||
// the straight area) | ||
if (m_yVelocity != 0 && prev_yVelocity == 0) { | ||
if (dont_add_point) dont_add_point = false; | ||
else m_waveTrail->addPoint(prev_position); | ||
prev_yVelocity = m_yVelocity; | ||
} | ||
// entering a straight area, put the point on the current | ||
// frame's position (the wave just landed on the straight area) | ||
else if (m_yVelocity == 0 && prev_yVelocity != 0) { | ||
if (dont_add_point) dont_add_point = false; | ||
else m_waveTrail->addPoint(m_position); | ||
prev_yVelocity = m_yVelocity; | ||
} | ||
prev_position = m_position; | ||
|
||
// result: straight line on straight area | ||
} | ||
PlayerObject::update(p0); | ||
} | ||
void resetStreak() { | ||
dont_add_point = true; | ||
PlayerObject::resetStreak(); | ||
} | ||
}; |