1 Commits
Author SHA1 Message Date
bloogoop 313370ed7f Meow README.md
meow it loud and clear what this project meows for
2026-08-22 11:18:07 +00:00
4 changed files with 6 additions and 41 deletions
+2
View File
@@ -1,5 +1,7 @@
# OpenRoller # OpenRoller
meow
OpenRoller is an experimental rhythm-game runtime for desktop Linux and Sony OpenRoller is an experimental rhythm-game runtime for desktop Linux and Sony
PSP. It reconstructs compatible playback from independently researched stage PSP. It reconstructs compatible playback from independently researched stage
formats and user-provided data. formats and user-provided data.
@@ -1,10 +0,0 @@
#pragma once
#include "vectorail/core/gl_loader.hpp"
inline void ActivateTexture(GLenum texture) {
using ActiveTextureProc = void(APIENTRY *)(GLenum);
static const auto activeTexture = reinterpret_cast<ActiveTextureProc>(
SDL_GL_GetProcAddress("glActiveTexture"));
if (activeTexture) activeTexture(texture);
}
+1 -2
View File
@@ -1,7 +1,6 @@
#include "openroller/desktop/ServiceMenu.hpp" #include "openroller/desktop/ServiceMenu.hpp"
#include "openroller/desktop/CabinetBackend.hpp" #include "openroller/desktop/CabinetBackend.hpp"
#include "openroller/desktop/GlCompat.hpp"
#include "vectorail/core/Shader.hpp" #include "vectorail/core/Shader.hpp"
#include "vectorail/core/gl_loader.hpp" #include "vectorail/core/gl_loader.hpp"
@@ -110,7 +109,7 @@ public:
shader_.setBool("uUseTexture", true); shader_.setBool("uUseTexture", true);
shader_.setBool("uUseGradient", false); shader_.setBool("uUseGradient", false);
shader_.setVec4("uColor", color); shader_.setVec4("uColor", color);
ActivateTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, activeTexture); glBindTexture(GL_TEXTURE_2D, activeTexture);
glBindVertexArray(vao_); glBindVertexArray(vao_);
glBindBuffer(GL_ARRAY_BUFFER, vbo_); glBindBuffer(GL_ARRAY_BUFFER, vbo_);
+3 -29
View File
@@ -14,13 +14,8 @@
#include <filesystem> #include <filesystem>
#include <limits> #include <limits>
#include <string_view> #include <string_view>
#ifdef _WIN32
#include <windows.h>
#include <process.h>
#else
#include <limits.h> #include <limits.h>
#include <unistd.h> #include <unistd.h>
#endif
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp> #include <glm/gtc/quaternion.hpp>
@@ -28,7 +23,6 @@
#include "vectorail/core/Shader.hpp" #include "vectorail/core/Shader.hpp"
#include "openroller/desktop/LevelLoader.hpp" #include "openroller/desktop/LevelLoader.hpp"
#include "openroller/desktop/AudioManager.hpp" #include "openroller/desktop/AudioManager.hpp"
#include "openroller/desktop/GlCompat.hpp"
#include "vectorail/core/DdsTexture.hpp" #include "vectorail/core/DdsTexture.hpp"
#include "gc/GcTargetEffect.hpp" #include "gc/GcTargetEffect.hpp"
#include "vectorail/core/PngTexture.hpp" #include "vectorail/core/PngTexture.hpp"
@@ -2083,7 +2077,7 @@ int main(int argc, char* argv[]) {
noteShader.use(); noteShader.use();
noteShader.setMat4("uProjection", proj); noteShader.setMat4("uProjection", proj);
noteShader.setInt("uTexture", 0); noteShader.setInt("uTexture", 0);
ActivateTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindVertexArray(noteSpriteVAO); glBindVertexArray(noteSpriteVAO);
for (const MarkerDraw& marker : markerDraws) { for (const MarkerDraw& marker : markerDraws) {
if (marker.effectId <= 0 || marker.uvRecordBase < 0) continue; if (marker.effectId <= 0 || marker.uvRecordBase < 0) continue;
@@ -2175,7 +2169,7 @@ int main(int argc, char* argv[]) {
noteShader.use(); noteShader.use();
noteShader.setMat4("uProjection", proj); noteShader.setMat4("uProjection", proj);
noteShader.setInt("uTexture", 0); noteShader.setInt("uTexture", 0);
ActivateTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindVertexArray(noteSpriteVAO); glBindVertexArray(noteSpriteVAO);
glDepthMask(GL_FALSE); glDepthMask(GL_FALSE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE); glBlendFunc(GL_SRC_ALPHA, GL_ONE);
@@ -2256,7 +2250,7 @@ int main(int argc, char* argv[]) {
glm::ortho(0.0f, static_cast<float>(kGameWidth), glm::ortho(0.0f, static_cast<float>(kGameWidth),
static_cast<float>(kGameHeight), 0.0f, -1.0f, 1.0f)); static_cast<float>(kGameHeight), 0.0f, -1.0f, 1.0f));
noteShader.setInt("uTexture", 0); noteShader.setInt("uTexture", 0);
ActivateTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, helperAtlas.id); glBindTexture(GL_TEXTURE_2D, helperAtlas.id);
glBindVertexArray(noteSpriteVAO); glBindVertexArray(noteSpriteVAO);
const glm::mat4 helperRoot = glm::scale( const glm::mat4 helperRoot = glm::scale(
@@ -2334,25 +2328,6 @@ int main(int argc, char* argv[]) {
} }
for (SDL_Gamepad* gamepad : gamepads) SDL_CloseGamepad(gamepad); for (SDL_Gamepad* gamepad : gamepads) SDL_CloseGamepad(gamepad);
if (chartCompleted && !gcRoot.empty()) { if (chartCompleted && !gcRoot.empty()) {
#ifdef _WIN32
char executable[MAX_PATH]{};
const DWORD length = GetModuleFileNameA(nullptr, executable, sizeof(executable));
if (length > 0 && length < sizeof(executable)) {
const std::string root = gcRoot.string();
if (gameplayItem == GcGameplayItem::Mirror) {
_execl(executable, executable, "--item", "mirror",
"--menu", root.c_str(), static_cast<char*>(nullptr));
} else if (gameplayItem == GcGameplayItem::Reverse) {
_execl(executable, executable, "--item", "reverse",
"--menu", root.c_str(), static_cast<char*>(nullptr));
} else {
_execl(executable, executable, "--menu", root.c_str(),
static_cast<char*>(nullptr));
}
std::cerr << "Could not return to song menu: "
<< std::strerror(errno) << std::endl;
}
#else
char executable[PATH_MAX]{}; char executable[PATH_MAX]{};
const ssize_t length = readlink( const ssize_t length = readlink(
"/proc/self/exe", executable, sizeof(executable) - 1); "/proc/self/exe", executable, sizeof(executable) - 1);
@@ -2372,7 +2347,6 @@ int main(int argc, char* argv[]) {
std::cerr << "Could not return to song menu: " std::cerr << "Could not return to song menu: "
<< std::strerror(errno) << std::endl; << std::strerror(errno) << std::endl;
} }
#endif
} }
return 0; return 0;
} }