Skip to content

Commit

Permalink
a few fixes
Browse files Browse the repository at this point in the history
i'm gonna solve the font thing in a bit
gonna make a custom font loading system or smth
  • Loading branch information
Joalor64GH authored Nov 27, 2024
1 parent bd73cd0 commit 4ffdc22
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 151 deletions.
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [X] Customizable Main Menu + Scripted States
* [X] Accuracy + Ranking
* [X] New Controls Menu
* [ ] Fix font for some language can't display correctly
* [ ] Fix font for some language can't display correctly (Will use a custom font system)
* [ ] Fix Controls settings (Also the controls will crash when enter ACCEPT or something)
* [ ] Make a better charting menu (optional)

Expand All @@ -18,4 +18,4 @@
* [ ] Improve Chart Editor
* [ ] Silly Visualizer Option
* [ ] Gameplay Modifiers
* [ ] Noteskins
* [ ] Noteskins
Binary file added assets/fonts/cherry-bomb.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/languages/languagesData.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
English (US):en
Español (España):es
Tiếng Việt(VN):vn
Tiếng Việt (VN):vn
3 changes: 2 additions & 1 deletion assets/languages/languagesList.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
en
es
es
vn
2 changes: 1 addition & 1 deletion assets/languages/vn.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@
"optionsTxt": "Cài đặt",
"sMenuTxt": "Song Menu",
"mMenuTxt": "Màn hình chính"
}
}
11 changes: 8 additions & 3 deletions source/debug/FPS.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package debug;

import openfl.text.*;
import openfl.events.Event;
import external.memory.Memory;

class FPS extends TextField {
public var borderSize:Int = 1;
Expand Down Expand Up @@ -30,15 +29,21 @@ class FPS extends TextField {
width = 1280;
height = 720;
selectable = false;
defaultTextFormat = new TextFormat(Paths.font(font ?? 'vcr.ttf'), 16, color);
defaultTextFormat = new TextFormat(Paths.font((font != null) ? font : 'vcr.ttf'), 16, color);

addEventListener(Event.ENTER_FRAME, (_) -> {
final now:Float = Timer.stamp() * 1000;
times.push(now);
while (times[0] < now - 1000)
times.shift();

text = (visible) ? 'FPS: ${times.length}\nMEM: ${FlxStringUtil.formatBytes(Memory.getCurrentUsage())} / ${FlxStringUtil.formatBytes(Memory.getPeakUsage())}' : '';
var mem:Float = System.totalMemory;
var memPeak:Float = 0;
if (mem > memPeak)
memPeak = mem;

text = (visible) ? 'FPS: ${times.length}\nMEM: ${FlxStringUtil.formatBytes(mem)} / ${FlxStringUtil.formatBytes(memPeak)}' : '';

textColor = (times.length < FlxG.drawFramerate * 0.5) ? 0xFFFF0000 : 0xFFFFFFFF;
});

Expand Down
21 changes: 0 additions & 21 deletions source/external/memory/Memory.hx

This file was deleted.

7 changes: 0 additions & 7 deletions source/external/memory/build.xml

This file was deleted.

114 changes: 0 additions & 114 deletions source/external/memory/include/memory.h

This file was deleted.

2 changes: 1 addition & 1 deletion source/states/SongSelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SongSelectState extends ExtendableState {
try {
newItem.loadGraphic(Paths.image('covers/' + Paths.formatToSongPath(songListData.songs[i].name)));
} catch (e:Dynamic) {
trace('Error getting credit icon: $e');
trace('Error getting song cover: $e');
newItem.loadGraphic(Paths.image('covers/placeholder'));
}
newItem.scale.set(0.6, 0.6);
Expand Down

0 comments on commit 4ffdc22

Please sign in to comment.