-
Notifications
You must be signed in to change notification settings - Fork 1
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 b5749b3
Showing
12 changed files
with
409 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,53 @@ | ||
name: Build Geode Mod | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: Windows | ||
os: windows-latest | ||
|
||
- name: macOS | ||
os: macos-latest | ||
|
||
- 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@v4 | ||
|
||
- name: Build the mod | ||
uses: geode-sdk/build-geode-mod@main | ||
with: | ||
combine: true | ||
target: ${{ matrix.config.target }} | ||
|
||
package: | ||
name: Package builds | ||
runs-on: ubuntu-latest | ||
needs: ['build'] | ||
|
||
steps: | ||
- uses: geode-sdk/build-geode-mod/combine@main | ||
id: build | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build Output | ||
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,58 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Macos be like | ||
**/.DS_Store | ||
|
||
# Cache files for Sublime Text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
|
||
# Ignore build folders | ||
**/build | ||
# Ignore platform specific build folders | ||
build-*/ | ||
|
||
# Workspace files are user-specific | ||
*.sublime-workspace | ||
|
||
# ILY vscode | ||
**/.vscode | ||
.idea/ | ||
|
||
# clangd | ||
.cache/ | ||
|
||
# Visual Studio | ||
.vs/ |
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,27 @@ | ||
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) | ||
set(CMAKE_CXX_COMPILER_LAUNCHER "sccache") | ||
set(CMAKE_C_COMPILER_LAUNCHER "sccache") | ||
|
||
project(gay-wave-trail VERSION 1.0.0) | ||
|
||
file(GLOB_RECURSE SOURCES | ||
src/*.cpp | ||
) | ||
|
||
add_library(${PROJECT_NAME} SHARED ${SOURCES} | ||
src/rainbow_trail.hpp | ||
src/rainbow_trail.cpp) | ||
|
||
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) | ||
|
||
setup_geode_mod(${PROJECT_NAME}) |
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 @@ | ||
./about.md |
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,4 @@ | ||
Transform your wave trail into a | ||
# _***R A G I N G H O M O S E X U A L***_ | ||
|
||
thanks to shadowforce78 for the hsv_to_rgb logic :D |
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,62 @@ | ||
{ | ||
"geode": "2.0.0-beta.25", | ||
"gd": { | ||
"win": "2.204", | ||
"mac": "2.200", | ||
"android": "2.205" | ||
}, | ||
"version": "v1.0.13", | ||
"id": "the_bearodactyl.gay-wave-trail", | ||
"name": "Gay Wave Trail", | ||
"developer": "The Bearodactyl", | ||
"description": "make your wave trail a raging homosexual >:3", | ||
"settings": { | ||
"enable": { | ||
"name": "Enable the G A E", | ||
"type": "bool", | ||
"description": "uwu", | ||
"default": true | ||
}, | ||
"speed": { | ||
"name": "Sonic says: you've gotta be fast when\nyou're trying to pick up a femboy twink", | ||
"type": "float", | ||
"default": 10, | ||
"min": 1, | ||
"max": 100, | ||
"control": { | ||
"slider-step": 1 | ||
}, | ||
"description": "\n\nMy personal record for getting\na date with a buff furry dude\nis 0.8 seconds (real)" | ||
}, | ||
"saturation": { | ||
"name": "HOW GAY ARE YOU???????", | ||
"type": "float", | ||
"default": 100, | ||
"min": 0, | ||
"max": 100, | ||
"control": { | ||
"slider-step": 1 | ||
}, | ||
"description": "You think you're more fruity than me? wrong." | ||
}, | ||
"mirror-players": { | ||
"name": "You're fruity? OMG SAME", | ||
"description": "It's like looking in a Bat-Mirror\n- Batman", | ||
"type": "bool", | ||
"default": true | ||
}, | ||
"no-reg-trail": { | ||
"name": "Don't be a coward. Be yourself without a disguise :)", | ||
"description": "in other words: don't be dream.", | ||
"type": "bool", | ||
"default": true | ||
}, | ||
"solid-wave-trail": { | ||
"name": "Come out of the closet already,\nstop trying to blend in!", | ||
"description": "\nfood processors are better than blenders anyways", | ||
"type": "bool", | ||
"default": true | ||
} | ||
}, | ||
"repository": "https://gitlab.com/TheBearodactyl/gay-wave-trail.git" | ||
} |
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,53 @@ | ||
#include <Geode/Geode.hpp> | ||
#include <Geode/cocos/include/ccTypes.h> | ||
#include <Geode/loader/Mod.hpp> | ||
#include <Geode/modify/CCMotionStreak.hpp> | ||
#include <Geode/modify/PlayLayer.hpp> | ||
#include <Geode/modify/PlayerObject.hpp> | ||
#include "rainbow_trail.hpp" | ||
|
||
using namespace geode::prelude; | ||
|
||
class $modify(PlayerObject) { | ||
void flashPlayer(float p0, float p1, cocos2d::ccColor3B mainColor, cocos2d::ccColor3B secondColor) {} | ||
}; | ||
|
||
class $modify(PlayLayer) { | ||
void postUpdate(float p0) { | ||
PlayLayer::postUpdate(p0); | ||
|
||
float speed = Mod::get()->getSettingValue<double>("speed"); | ||
float saturation = Mod::get()->getSettingValue<double>("saturation"); | ||
bool mirror_players = Mod::get()->getSettingValue<bool>("mirror-players"); | ||
|
||
if (RainbowTrail::g >= 360) { | ||
RainbowTrail::g = 0; | ||
} else { | ||
RainbowTrail::g += speed / 10; | ||
} | ||
|
||
_ccColor3B rainbowColor = RainbowTrail::get_rainbow(0, saturation); | ||
_ccColor3B rainbowColor2 = RainbowTrail::get_rainbow(180, saturation); | ||
_ccColor3B rainbowColor3 = RainbowTrail::get_rainbow(90, saturation); | ||
bool enable = Mod::get()->getSettingValue<bool>("enable"); | ||
bool noRegularTrail = Mod::get()->getSettingValue<bool>("no-reg-trail"); | ||
|
||
if (m_player1->m_isDart && noRegularTrail) { | ||
m_player1->m_regularTrail->setVisible(false); | ||
} | ||
|
||
if (m_player2->m_isDart && noRegularTrail) { | ||
m_player2->m_regularTrail->setVisible(false); | ||
} | ||
|
||
if (enable) { | ||
if (m_player1->m_waveTrail) { | ||
m_player1->m_waveTrail->setColor(rainbowColor); | ||
} | ||
|
||
if (m_player2->m_waveTrail) { | ||
m_player2->m_waveTrail->setColor(!mirror_players ? rainbowColor2 : rainbowColor); | ||
} | ||
} | ||
} | ||
}; |
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,38 @@ | ||
#include <Geode/Geode.hpp> | ||
#include <Geode/modify/Modify.hpp> | ||
#include <Geode/modify/PauseLayer.hpp> | ||
#include <Geode/ui/GeodeUI.hpp> | ||
|
||
using namespace geode::prelude; | ||
|
||
struct GayPauseLayer : Modify<GayPauseLayer, PauseLayer> { | ||
void onGaySettings(CCObject *object) { | ||
geode::openSettingsPopup(Mod::get()); | ||
} | ||
|
||
void customSetup() { | ||
PauseLayer::customSetup(); | ||
|
||
auto winSize = CCDirector::sharedDirector()->getWinSize(); | ||
auto ccmenu = CCMenu::create(); | ||
|
||
ccmenu->setPosition(CCPoint{0, 0}); | ||
ccmenu->setID("gay-settings-button-menu"_spr); | ||
|
||
auto *settingsButtonSprite = CCSprite::create("logo.png"_spr); | ||
|
||
settingsButtonSprite->setScale(0.25f); | ||
|
||
auto settingsBtn = CCMenuItemSpriteExtra::create( | ||
settingsButtonSprite, | ||
this, | ||
menu_selector(GayPauseLayer::onGaySettings) | ||
); | ||
|
||
settingsBtn->setID("gay-settings-button"_spr); | ||
settingsBtn->setPosition(CCPoint{ 40, 40 }); | ||
ccmenu->addChild(settingsBtn); | ||
|
||
this->addChild(ccmenu); | ||
} | ||
}; |
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,72 @@ | ||
#include "rainbow_trail.hpp" | ||
|
||
#include <cmath> | ||
|
||
void RainbowTrail::hsv_to_rgb(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV) { | ||
float fC = fV * fS; // Chroma | ||
float fHPrime = fmod(fH / 60.0, 6); | ||
float fX = fC * (1 - fabs(fmod(fHPrime, 2) - 1)); | ||
float fM = fV - fC; | ||
|
||
int hue_segment = static_cast<int>(fHPrime); | ||
switch (hue_segment) { | ||
case 0: | ||
fR = fC; | ||
fG = fX; | ||
fB = 0; | ||
break; | ||
case 1: | ||
fR = fX; | ||
fG = fC; | ||
fB = 0; | ||
break; | ||
case 2: | ||
fR = 0; | ||
fG = fC; | ||
fB = fX; | ||
break; | ||
case 3: | ||
fR = 0; | ||
fG = fX; | ||
fB = fC; | ||
break; | ||
case 4: | ||
fR = fX; | ||
fG = 0; | ||
fB = fC; | ||
break; | ||
case 5: | ||
fR = fC; | ||
fG = 0; | ||
fB = fX; | ||
break; | ||
default: | ||
fR = 0; | ||
fG = 0; | ||
fB = 0; | ||
break; | ||
} | ||
|
||
fR += fM; | ||
fG += fM; | ||
fB += fM; | ||
} | ||
|
||
float RainbowTrail::g = 0; | ||
|
||
cocos2d::_ccColor3B RainbowTrail::get_rainbow(float offset, float saturation) { | ||
float R; | ||
float G; | ||
float B; | ||
|
||
float hue = fmod(g + offset, 360); | ||
float sat = saturation / 100.0; | ||
float vc = 1; | ||
hsv_to_rgb(R, G, B, hue, sat, vc); | ||
|
||
cocos2d::_ccColor3B out; | ||
out.r = R * 255; | ||
out.g = G * 255; | ||
out.b = B * 255; | ||
return out; | ||
} |
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 @@ | ||
#pragma once | ||
|
||
#include <Geode/cocos/include/ccTypes.h> | ||
|
||
class RainbowTrail { | ||
public: | ||
static void hsv_to_rgb(float &fR, float &fG, float &fB, float &fH, float &fS, float &fV); | ||
static cocos2d::_ccColor3B get_rainbow(float offset, float saturation); | ||
static float g; | ||
}; |
Oops, something went wrong.