Skip to content

Commit 54a5e0b

Browse files
committed
Initial commit.
0 parents  commit 54a5e0b

File tree

13 files changed

+505
-0
lines changed

13 files changed

+505
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Geode Mod
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "**"
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- name: Windows
16+
os: windows-latest
17+
18+
- name: macOS
19+
os: macos-latest
20+
21+
- name: iOS
22+
os: macos-latest
23+
target: iOS
24+
25+
- name: Android32
26+
os: ubuntu-latest
27+
target: Android32
28+
29+
- name: Android64
30+
os: ubuntu-latest
31+
target: Android64
32+
33+
name: ${{ matrix.config.name }}
34+
runs-on: ${{ matrix.config.os }}
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Build the mod
40+
uses: geode-sdk/build-geode-mod@main
41+
with:
42+
combine: true
43+
target: ${{ matrix.config.target }}
44+
45+
package:
46+
name: Package builds
47+
runs-on: ubuntu-latest
48+
needs: ['build']
49+
50+
steps:
51+
- uses: geode-sdk/build-geode-mod/combine@main
52+
id: build
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: Build Output
57+
path: ${{ steps.build.outputs.build-output }}

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Macos be like
35+
**/.DS_Store
36+
37+
# Cache files for Sublime Text
38+
*.tmlanguage.cache
39+
*.tmPreferences.cache
40+
*.stTheme.cache
41+
42+
# Ignore build folders
43+
**/build
44+
# Ignore platform specific build folders
45+
build-*/
46+
47+
# Workspace files are user-specific
48+
*.sublime-workspace
49+
50+
# ILY vscode
51+
**/.vscode
52+
53+
# Local History for Visual Studio Code
54+
.history/
55+
56+
# clangd
57+
.cache/
58+
59+
# Visual Studio
60+
.vs/
61+
62+
# CLion
63+
.idea/
64+
/cmake-build-*/

CMakeLists.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
cmake_minimum_required(VERSION 3.21)
2+
set(CMAKE_CXX_STANDARD 20)
3+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4+
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
5+
set(CMAKE_OSX_ARCHITECTURES "arm64")
6+
else()
7+
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
8+
endif()
9+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
10+
11+
project(gd-splash-text VERSION 1.0.0)
12+
13+
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.cpp)
14+
add_library(${PROJECT_NAME} SHARED ${SOURCES})
15+
16+
if (NOT DEFINED ENV{GEODE_SDK})
17+
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode")
18+
else()
19+
message(STATUS "Found Geode: $ENV{GEODE_SDK}")
20+
endif()
21+
22+
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
23+
24+
setup_geode_mod(${PROJECT_NAME})

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 AlphiiGD
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

about.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## Overview
2+
Add some splash text to the GD main menu!

logo.png

68.6 KB
Loading

mod.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"geode": "4.5.0",
3+
"gd": {
4+
"win": "2.2074",
5+
"android": "2.2074",
6+
"mac": "2.2074",
7+
"ios": "2.2074"
8+
},
9+
"id": "alphii.gd-splash-text",
10+
"name": "gd-splash-text",
11+
"version": "v0.0.0",
12+
"developer": "Alphii",
13+
"description": "",
14+
"resources": {
15+
"files": [
16+
"resources/*.splash"
17+
]
18+
}
19+
}

resources/splash.splash

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Made by RobTop!
2+
Mod by Alphii!
3+
Also try The Impossible Game!
4+
What's your hardest?
5+
Over 9000 Stars!
6+
This splash text message is very long and at line 6 in the file!
7+
rust sucks
8+
Look! Creator points!
9+
As seen on YouTube!
10+
Uses OpenGL!
11+
Yaaay!
12+
you are fuck map
13+
Closed source!
14+
Open source!
15+
4,294,967,296 colors!
16+
Han shot first!
17+
It's a game!
18+
Create!
19+
Complete!
20+
Extreme Demon!
21+
All inclusive!
22+
Try the daily level!
23+
Guess what?
24+
Chicken butt!
25+
Music by Forever Bound!
26+
Music by Step!
27+
Music by DJVI!
28+
Music by Waterflame!
29+
Music by dj-Nate!
30+
Music by F-777!
31+
Music by MDK!
32+
Beat the weekly!
33+
Gotta Beat 'Em All!
34+
RobTop Powah!
35+
I love GD Cologne!
36+
Geometry Dash!
37+
Don't call me Shirley.
38+
Now on Steam!
39+
It's a Dashmas miracle!
40+
Robtop is Sexy!
41+
Prepare ship for Ludicrous Speed!
42+
Wave Wave!
43+
At least 10 years old!
44+
2.3 Soon!
45+
Hola Espana! # No ñ because gd font :(
46+
Hallo Deutschland!
47+
Legal in netterlands!
48+
No memories to be made!
49+
https://youtu.be/dQw4w9WgXcQ
50+
When can I see you again?
51+
MrSpaghetti is a long name!
52+
Are you ready for the Bloodbath?
53+
Sus!
54+
Apple sucks!
55+
You Manix-ed the mom level!
56+
No geometry! Only Dash!
57+
She's in love with the concept
58+
10 PRINT "ROBTOP IS LOVE"
59+
20 GOTO 10
60+
Straightfly master!
61+
Grandpa Demon!
62+
I miss 2.1!
63+
Gordon! Get away from the beam!
64+
Show me the money
65+
IDDQDSPISPOPD
66+
CCMenuItemSpriteExtra!
67+
Jump up, jump up, and get down!
68+
IDDQD
69+
impulse 101
70+
swpreme
71+
Good luck Doggie!

src/MenuLayer.cpp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#include <Geode/Geode.hpp>
2+
#include <Geode/modify/MenuLayer.hpp>
3+
#include "ScalingLabel.hpp"
4+
#include "SplashRead.hpp"
5+
6+
using namespace geode::prelude;
7+
8+
class $modify(ST_MenuLayer, MenuLayer)
9+
{
10+
struct Fields
11+
{
12+
std::string m_SplashStr;
13+
SplashRead* m_SplashRead;
14+
ScalingLabel* m_SplashText = nullptr;
15+
};
16+
17+
bool init()
18+
{
19+
if (!MenuLayer::init())
20+
{
21+
return false;
22+
}
23+
24+
m_fields->m_SplashRead = new SplashRead("splash.splash");
25+
m_fields->m_SplashStr = m_fields->m_SplashRead->getRandomLine();
26+
auto mainTitle = getChildByID("main-title");
27+
28+
m_fields->m_SplashText = ScalingLabel::create(m_fields->m_SplashStr.c_str(), "goldFont.fnt");
29+
m_fields->m_SplashText->setScale(0.5f / (1.0f + 0.05f * strlen(m_fields->m_SplashText->getLabel()->getString())));
30+
m_fields->m_SplashText->setPosition(mainTitle->getContentSize().width - 10.f, mainTitle->getContentSize().height * 0.5f);
31+
m_fields->m_SplashText->setRotation(20.0f);
32+
mainTitle->addChild(m_fields->m_SplashText);
33+
34+
return true;
35+
}
36+
37+
void onEnter()
38+
{
39+
MenuLayer::onEnter();
40+
m_fields->m_SplashText->getLabel()->setString(m_fields->m_SplashStr.c_str());
41+
m_fields->m_SplashText->setScale(0.5f / (1.0f + 0.05f * strlen(m_fields->m_SplashText->getLabel()->getString())));
42+
}
43+
44+
void onExit()
45+
{
46+
MenuLayer::onExit();
47+
m_fields->m_SplashStr = m_fields->m_SplashRead->getRandomLine();
48+
}
49+
};

src/ScalingLabel.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#include "ScalingLabel.hpp"
2+
3+
using namespace geode::prelude;
4+
5+
ScalingLabel::ScalingLabel(std::string text, std::string fntFile, float scalingFactor)
6+
: m_Text(text), m_FntFile(fntFile), m_ScalingFactor(scalingFactor)
7+
{
8+
}
9+
10+
bool ScalingLabel::init()
11+
{
12+
if (!CCNode::init())
13+
{
14+
return false;
15+
}
16+
17+
m_Label = CCLabelBMFont::create(m_Text.c_str(), m_FntFile.c_str());
18+
addChild(m_Label);
19+
scheduleUpdate();
20+
return true;
21+
}
22+
23+
void ScalingLabel::update(float dt)
24+
{
25+
if (m_ShouldShrink)
26+
{
27+
m_Label->setScale(m_Label->getScale() - m_ScalingFactor * dt);
28+
if (m_Label->getScale() <= 0.7f)
29+
{
30+
m_ShouldShrink = false;
31+
}
32+
}
33+
else
34+
{
35+
m_Label->setScale(m_Label->getScale() + m_ScalingFactor * dt);
36+
if (m_Label->getScale() >= 1.3f)
37+
{
38+
m_ShouldShrink = true;
39+
}
40+
}
41+
}
42+
43+
ScalingLabel* ScalingLabel::create(std::string text, std::string fntFile, float scalingFactor)
44+
{
45+
auto ret = new ScalingLabel(text, fntFile, scalingFactor);
46+
if (ret->init())
47+
{
48+
ret->autorelease();
49+
return ret;
50+
}
51+
52+
delete ret;
53+
return nullptr;
54+
}

0 commit comments

Comments
 (0)