Skip to content

Commit

Permalink
fix broken hitwindows
Browse files Browse the repository at this point in the history
  • Loading branch information
UNSTOP4BLE committed Apr 4, 2024
1 parent f710e18 commit 5f43b9f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
7 changes: 4 additions & 3 deletions build_all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
cmake -S . -B ./build -DCMAKE_TOOLCHAIN_FILE="${PSPDEV}/psp/share/pspdev.cmake"
#!/bin/bash
cmake -S ./cht2bin -B ./cht2bin/build
cmake --build ./cht2bin/build
cmake --preset "psp-release"
cmake --build ./build
./build_chart.sh
1 change: 1 addition & 0 deletions build_chart.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
cht2bin/build/cht2bin assets/songs/bopeebo/bopeebo.json build/assets/songs/bopeebo/bopeebo.bin
cht2bin/build/cht2bin assets/songs/fresh/fresh.json build/assets/songs/fresh/fresh.bin
cht2bin/build/cht2bin assets/songs/frostbite/frostbite.json build/assets/songs/frostbite/frostbite.bin
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ int main()
auto last = std::chrono::high_resolution_clock::now();

GFX::clear(app->screenCol);
#ifndef PSP
SDL_PumpEvents();
#endif
/*
if (Input::windowClosed()) {
// all this should probably be moved to app->quit() or a similar function
Expand Down
12 changes: 6 additions & 6 deletions src/playstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ void PlayStateScreen::initscr(std::string song) {
notePos.opponent[3] = {147, 14};

//set up ratings and timings (kinda stolen off of psych engine lmao)
//setRating(Rating &rating, std::string name, int score, bool splash, float ratingmod, int hitwindow)
ratingData.emplace_back("sick", 350, true, 1, 45);
ratingData.emplace_back("good", 200, false, 0.7, 90);
ratingData.emplace_back("bad", 100, false, 0.4, 135);
ratingData.emplace_back("shit", 50, false, 0, 165);
//Rating(std::string name, int hitwindow, float ratingmod, int score, bool splash);
ratingData.emplace_back("sick", 45, 1, 350, true);
ratingData.emplace_back("good", 90, 0.7, 200, false);
ratingData.emplace_back("bad", 135, 0.4, 100, false);
ratingData.emplace_back("shit", 165, 0, 50, false);

app->parser.chartdata.speed /= 5;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ void PlayStateScreen::update(void)
}
else
{
app->parser.songTime += app->timer.elapsedS()*1000;
app->parser.songTime += app->timer.elapsedS();

//song start
if (app->parser.curStep <= 0)
Expand Down
4 changes: 2 additions & 2 deletions src/psp/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace Input {

#ifdef PSP
static const uint32_t pspMapping[NUM_BUTTONS]{
PSP_CTRL_UP | PSP_CTRL_TRIANGLE, // GAME_UP
PSP_CTRL_DOWN | PSP_CTRL_CROSS, // GAME_DOWN
PSP_CTRL_UP | PSP_CTRL_TRIANGLE | PSP_CTRL_RTRIGGER, // GAME_UP
PSP_CTRL_DOWN | PSP_CTRL_CROSS | PSP_CTRL_LTRIGGER, // GAME_DOWN
PSP_CTRL_LEFT | PSP_CTRL_SQUARE, // GAME_LEFT
PSP_CTRL_RIGHT | PSP_CTRL_CIRCLE, // GAME_RIGHT
PSP_CTRL_START, // GAME_PAUSE
Expand Down

0 comments on commit 5f43b9f

Please sign in to comment.