Skip to content

Commit

Permalink
0.8.0e Patch
Browse files Browse the repository at this point in the history
Hopefully last patch
so many crashes...
  • Loading branch information
UmbratheUmbreon committed Mar 13, 2023
1 parent 2aa1034 commit 83d6f59
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion assets/preload/update/tracking/GitVer.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0d
0.8.0e
34 changes: 19 additions & 15 deletions source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -678,23 +678,27 @@ class Character extends FlxSprite

public function getAnimationsFromXml():Array<String>
{
Paths.setModsDirectoryFromType(CHARACTER, curCharacter, false);
var arr:Array<String> = [];
switch (_spriteType) {
case 'sparrow':
var data:Access = new Access(Xml.parse(Paths.getTextFromFile('images/$imageFile.xml')).firstElement());
for (texture in data.nodes.SubTexture) arr.push(texture.att.name.substr(0, texture.att.name.length - 3));
//? do i need substr here? i cant really check since no one uses these
/*case 'packer':
var data = Paths.getTextFromFile('images/$imageFile.xml').trim().split('\n');
for (i in 0...data.length)
{
var currImageData = data[i].split("=");
arr.push(currImageData[0].trim());
}
case 'texpack':
var xml = Xml.parse(Paths.getTextFromFile('images/$imageFile.xml'));
for (sprite in xml.firstElement().elements()) arr.push(sprite.get("n"));*/
if (Paths.fileExists('images/$imageFile.xml', TEXT)) {
switch (_spriteType) {
case 'sparrow':
var data:Access = new Access(Xml.parse(Paths.getTextFromFile('images/$imageFile.xml')).firstElement());
for (texture in data.nodes.SubTexture) arr.push(texture.att.name.substr(0, texture.att.name.length - 3));
//? do i need substr here? i cant really check since no one uses these
/*case 'packer':
var data = Paths.getTextFromFile('images/$imageFile.xml').trim().split('\n');
for (i in 0...data.length)
{
var currImageData = data[i].split("=");
arr.push(currImageData[0].trim());
}
case 'texpack':
var xml = Xml.parse(Paths.getTextFromFile('images/$imageFile.xml'));
for (sprite in xml.firstElement().elements()) arr.push(sprite.get("n"));*/
}
}
Paths.setModsDirectoryFromType(NONE, '', true);
return CoolUtil.removeDuplicates(arr);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Main extends Sprite
*
* Use `debugVersion` to get the version with build date.
*/
public static final denpaEngineVersion:GameVersion = new GameVersion(0, 8, 0, 'd');
public static final denpaEngineVersion:GameVersion = new GameVersion(0, 8, 0, 'e');

public static var fpsCounter:FramerateDisplay;
public static var ramCount:DebugDisplay;
Expand Down
12 changes: 7 additions & 5 deletions source/SoundTestState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ class SoundTestState extends MusicBeatState
}
#if MODS_ALLOWED
path = Paths.modFolders("data/albums");
for (file in FileSystem.readDirectory(path)) {
if (file.endsWith(".json")) {
albums.push(Json.parse(Paths.getTextFromFile("data/albums" + '/' + file)));
}
}
if (FileSystem.exists(path)) {
for (file in FileSystem.readDirectory(path)) {
if (file.endsWith(".json")) {
albums.push(Json.parse(Paths.getTextFromFile("data/albums" + '/' + file)));
}
}
}
#end
totalDisks = albums.length-1;

Expand Down
2 changes: 1 addition & 1 deletion source/editors/CharacterEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ class CharacterEditorState extends MusicBeatState

switch(event.type) {
case MouseEvent.MOUSE_DOWN | MouseEvent.RIGHT_MOUSE_DOWN:
if (char == null || char.iconProperties == null || char.animationsArray == null) return;
if (char == null || char.iconProperties == null || char.animationsArray == null || editOffsetsCheckbox == null || char.animationsArray[curAnim] == null) return;
initialXY = editOffsetsCheckbox.checked ? [Std.int(char.iconProperties.offsets[0]), Std.int(char.iconProperties.offsets[1])] : char.animationsArray[curAnim].offsets;
camXY = [char.cameraPosition.x, char.cameraPosition.y];
mouseXY = [FlxG.mouse.x, FlxG.mouse.y];
Expand Down

0 comments on commit 83d6f59

Please sign in to comment.