Merge branch 'new-editors-conductor'

This commit is contained in:
Ralty
2025-07-20 00:33:06 +07:00
258 changed files with 14765 additions and 2369 deletions
+1
View File
@@ -8,6 +8,7 @@ latest/*
pages/
docs/doc.xml
mods/*
addons/*
!mods/readme.txt
addons/*
!addons/readme.txt
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character x="-50" y="330" isGF="false" flipX="true" isPlayer="true" antialiasing="true" sprite="bf-holding-gf-dead" color="#31B0D1">
<character x="-50" y="330" flipX="true" isPlayer="true" antialiasing="true" sprite="bf-holding-gf-dead" color="#31B0D1">
<anim x="0" loop="false" y="0" fps="24" anim="BF Dies with GF" name="firstDeath"/>
<anim x="0" loop="false" y="-17" fps="24" anim="BF Dead with GF Loop" name="deathLoop"/>
<anim x="0" loop="false" y="14" fps="24" anim="RETRY confirm holding gf" name="deathConfirm"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character icon="bf-pixel-dead" x="200" y="570" isGF="false" scale="6" flipX="true" isPlayer="true" antialiasing="false" sprite="bf-pixel-dead" color="#7BD6F6">
<character icon="bf-pixel-dead" x="200" y="570" scale="6" flipX="true" isPlayer="true" antialiasing="false" sprite="bf-pixel-dead" color="#7BD6F6">
<anim x="0" loop="false" y="0" fps="24" anim="BF Dies pixel" name="firstDeath"/>
<anim x="-5" loop="true" y="-2" fps="24" anim="Retry Loop" name="deathLoop"/>
<anim x="-5" loop="false" y="-2" fps="24" anim="RETRY CONFIRM" name="deathConfirm"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character isPlayer="false" flipX="false" isGF="true" x="75" y="335" icon="gf" color="#A5004D">
<character isPlayer="false" flipX="false" x="75" y="335" icon="gf" color="#A5004D">
<anim name="danceLeft" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="0" indices="0..15" />
<anim name="danceRight" anim="GF Dancing Beat Hair blowing CAR" fps="24" loop="false" x="0" y="0" indices="16..30" />
</character>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character x="115" y="325" sprite="gf-christmas" icon="gf" color="#A5004D" isGF="true">
<character x="115" y="325" sprite="gf-christmas" icon="gf" color="#A5004D">
<anim name="danceLeft" anim="GF Dancing Beat" x="0" y="-9" fps="24" loop="false" indices="0..14"/>
<anim name="danceRight" anim="GF Dancing Beat" x="0" y="-9" fps="24" loop="false" indices="15..30"/>
<anim name="singUP" anim="GF Up Note" x="0" y="-9" fps="24" loop="false"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character sprite="gf-tankmen" icon="gf" color="#A5004D" isGF="true">
<character sprite="gf-tankmen" icon="gf" color="#A5004D">
<anim name="danceLeft" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="false" indices="0..14"/>
<anim name="danceRight" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="false" indices="15..30"/>
<anim name="dance-cutscene" anim="GF Dancing at Gunpoint" x="0" y="0" fps="24" loop="true"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character x="100" y="275" sprite="gf" icon="gf" color="#A5004D" isGF="true">
<character x="100" y="275" sprite="gf" icon="gf" color="#A5004D">
<anim name="cheer" anim="GF Cheer" x="0" y="0" fps="24" loop="false"/>
<anim name="singUP" anim="GF Up Note" x="0" y="0" fps="24" loop="false"/>
<anim name="singLEFT" anim="GF left note" x="0" y="0" fps="24" loop="false"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character x="150" y="360" sprite="senpai" scale="6" antialiasing="false" camx="100" camy="87" icon="senpai" color="#FFAA6F" isGF="false">
<character x="150" y="360" sprite="senpai" scale="6" antialiasing="false" camx="100" camy="87" icon="senpai" color="#FFAA6F">
<anim name="idle" anim="Angry Senpai Idle" x="0" y="0" fps="24" loop="false"/>
<anim name="singLEFT" anim="Angry Senpai LEFT NOTE" x="3" y="0" fps="24" loop="false"/>
<anim name="singDOWN" anim="Angry Senpai DOWN NOTE" x="-1" y="0" fps="24" loop="false"/>
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE codename-engine-character>
<character y="180" sprite="tankman" flipX="true" isPlayer="true" icon="tankman" color="#FFFFFF" isGF="false">
<character y="180" sprite="tankman" flipX="true" isPlayer="true" icon="tankman" color="#FFFFFF">
<anim name="idle" anim="Tankman Idle Dance instance 100" x="0" y="0" fps="24" loop="false"/>
<anim name="singRIGHT" anim="Tankman Right Note instance 1000" x="-24" y="-13" fps="24" loop="false"/>
<anim name="singDOWN" anim="Tankman DOWN note instance 1000" x="75" y="-105" fps="24" loop="false"/>
+5 -5
View File
@@ -8,7 +8,7 @@ function onDiscordPresenceUpdate(e) {
var data = e.presence;
if(data.button1Label == null)
data.button1Label = "Codename Engine Discord";
data.button1Label = "meow"; // "Codename Engine Discord"
if(data.button1Url == null)
data.button1Url = "https://discord.gg/2NTCdsQvx4";
}
@@ -33,8 +33,8 @@ function onEditorTreeLoaded(name:String) {
DiscordUtil.changePresenceSince("Choosing a Character", null);
case "Chart Editor":
DiscordUtil.changePresenceSince("Choosing a Chart", null);
case "Stage Editor":
DiscordUtil.changePresenceSince("Choosing a Stage", null);
//case "Stage Editor": // secret for now
// DiscordUtil.changePresenceSince("Choosing a Stage", null);
}
}
@@ -44,7 +44,7 @@ function onEditorLoaded(name:String, editingThing:String) {
DiscordUtil.changePresenceSince("Editing a Character", editingThing);
case "Chart Editor":
DiscordUtil.changePresenceSince("Editing a Chart", editingThing);
case "Stage Editor":
DiscordUtil.changePresenceSince("Editing a Stage", editingThing);
//case "Stage Editor":
// DiscordUtil.changePresenceSince("Editing a Stage", editingThing);
}
}
@@ -0,0 +1,126 @@
<window width="550" height="570" title="Editing Character ${button.getName()}">
<set name="XOFFSET" value="30" />
<set name="YOFFSET" value="40" />
<set name="TO" value="64" />
<exec>
function col(c:Int) {
return 20 + (150 + XOFFSET) * c;
}
previewSprite = null;
if(char.animateAtlas == null) {
previewSprite = new FunkinSprite(0, 0);
previewSprite.frame = char.frame;
self.add(previewSprite);
}
</exec>
<title name="title" x="20" y="30 + 16" text="Character Data" />
<section>
<set name="curY" value="title.y + TO" />
<stepper name="xStepper" label="X" value="char.x" x="col(0)" y="curY" step="1" width="100" />
<stepper name="yStepper" label="Y" value="char.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" />
<stepper name="scrollXStepper" label="Scroll X" value="char.scrollFactor.x" x="col(1)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scrollYStepper" label="Scroll Y" value="char.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scaleXStepper" label="Scale X" value="char.scale.x / charScale" x="col(2)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scaleYStepper" label="Scale Y" value="char.scale.y / charScale" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
</section>
<section>
<set name="curY" value="xStepper.y + xStepper.bHeight + YOFFSET" />
<stepper name="camxStepper" label="Cam X" value="getEx('camX')" x="col(0)" y="curY" step="1" width="100" />
<stepper name="camyStepper" label="Cam Y" value="getEx('camY')" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" />
<label name="spacingLabel" text="Spacing (X, Y)" x="col(1)" y="curY" size="15" />
<stepper name="spacingXStepper" value="getEx('spacingX')" x="col(1)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="spacingYStepper" value="getEx('spacingY')" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
<stepper name="skewXStepper" label="Skew X" value="char.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="skewYStepper" label="Skew Y" value="char.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
</section>
<section>
<set name="curY" value="camxStepper.y + camxStepper.bHeight + YOFFSET" />
<stepper name="alphaStepper" label="Alpha" value="char.alpha / 0.75" x="col(0)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="angleStepper" label="Angle" value="char.angle" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
<stepper name="zoomFactorStepper" label="Zoom Factor" value="char.zoomFactor" x="col(1)" y="curY" precision="2" step="0.01" width="100" />
<section if="!StringTools.startsWith(char.name, 'NO_DELETE_')">
<textbox name="charName" label="Position Name" value="char.name" x="col(2)" y="curY" width="100"/>
</section>
</section>
<section>
<set name="curY" value="alphaStepper.y + alphaStepper.bHeight + YOFFSET - 20" />
<checkbox name="flipXCheckbox" text="Flip X" value="char.isPlayer" x="col(0)" y="curY" />
<radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="getEx('highMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" />
<radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="getEx('lowMemory')" x="last.field.x + last.field.width + XOFFSET * 2" y="curY" />
</section>
<section if="previewSprite != null">
<title name="previewTitle" x="20" y="self.winHeight - 220" text="Preview Transform:" size="15" />
</section>
<section if="previewSprite == null">
<exec>
self.windowSpr.bHeight -= 170;
</exec>
</section>
<exec>
function onUpdate() {
if(previewSprite == null) return;
previewSprite.skew.x = skewXStepper.value;
previewSprite.skew.y = skewYStepper.value;
previewSprite.angle = angleStepper.value;
previewSprite.antialiasing = char.antialiasing;
var ratio = char.frameWidth / char.frameHeight;
previewSprite.setGraphicSize(145 * scaleXStepper.value * ratio, 145 * scaleYStepper.value);
previewSprite.updateHitbox();
if(flipXCheckbox.checked != char.playerOffsets)
previewSprite.scale.x *= -1;
previewSprite.x = 30;
previewSprite.y = self.winHeight - previewSprite.height - 30;
}
function onSave() {
setEx("highMemory", highMemoryRadio.checked);
setEx("lowMemory", lowMemoryRadio.checked);
if (!StringTools.startsWith(char.name, 'NO_DELETE_'))
char.name = charName.field.text;
char.x = xStepper.value;
char.y = yStepper.value;
char.scrollFactor.set(scrollXStepper.value, scrollYStepper.value);
char.scale.set(scaleXStepper.value * charScale, scaleYStepper.value * charScale);
char.cameraOffset.x -= getEx("camX");
char.cameraOffset.x += camxStepper.value;
setEx("camX", camxStepper.value);
char.cameraOffset.y -= getEx("camY");
char.cameraOffset.y += camyStepper.value;
setEx("camY", camyStepper.value);
char.skew.x = skewXStepper.value;
char.skew.y = skewYStepper.value;
char.alpha = alphaStepper.value * 0.75;
setEx("spacingX", spacingXStepper.value);
setEx("spacingY", spacingYStepper.value);
if (flipXCheckbox.checked != char.isPlayer) {
char.isPlayer = flipXCheckbox.checked;
char.swapLeftRightAnimations();
}
char.zoomFactor = zoomFactorStepper.value;
char.angle = angleStepper.value;
}
</exec>
</window>
@@ -0,0 +1,185 @@
<window width="1056" height="520" title="Editing Sprite ${button.getName()}">
<set name="MARGIN" value="20" />
<set name="XOFFSET" value="50" />
<set name="YOFFSET" value="40" />
<set name="TO" value="64" />
<exec>
function col(c:Int) {
return 20 + (200 + XOFFSET) * c;
}
if(sprite.animateAtlas == null) {
previewSprite = new FunkinSprite(50, self.winHeight - 100);
previewSprite.frame = sprite.frame;
self.add(previewSprite);
}
</exec>
<title name="title" x="20" y="30 + 16" text="Sprite Data" />
<section> <!-- ROW 1 -->
<set name="curY" value="title.y + TO" />
<textbox name="nameTextBox" label="Name Identifier" value="button.getName()" x="col(0)" y="curY" width="200" height="32" />
<textbox name="spriteTextBox" value="getEx('imageFile')" x="last.x + last.bWidth + XOFFSET" y="curY" width="200" height="32" />
<stepper name="alphaStepper" label="Alpha" value="sprite.alpha" x="spriteTextBox.x + spriteTextBox.bWidth + XOFFSET" y="curY" precision="2" step="0.01" width="100" />
<label name="imageFile" text="Image File (WIP: needs reload)&#10;In (${stage.spritesParentFolder})" x="spriteTextBox.x" y="spriteTextBox.y - 14" size="15" />
</section>
<section> <!-- ROW 2 -->
<set name="curY" value="nameTextBox.y + nameTextBox.bHeight + YOFFSET" />
<stepper name="xStepper" label="X" value="sprite.x" x="col(0)" y="curY" step="1" width="100" />
<stepper name="yStepper" label="Y" value="sprite.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" step="1" width="100" />
<stepper name="scrollXStepper" label="Scroll X" value="sprite.scrollFactor.x" x="spriteTextBox.x" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scrollYStepper" label="Scroll Y" value="sprite.scrollFactor.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scaleXStepper" label="Scale X" value="sprite.scale.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="scaleYStepper" label="Scale Y" value="sprite.scale.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
</section>
<section> <!-- ROW 3 -->
<set name="curY" value="xStepper.y + xStepper.bHeight + YOFFSET" />
<stepper name="angleStepper" label="Angle" value="sprite.angle" x="col(0)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="zoomFactorStepper" label="Zoom Factor" value="sprite.zoomFactor" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
<!-- TODO: Simplify this -->
<dropdown name="animType" label="Animation Type" value="sprite.spriteAnimType" x="col(1)" y="curY" width="150" height="32">
<item label="NONE" value="0" />
<item label="BEAT" value="1" />
<item label="LOOP" value="2" />
</dropdown>
<stepper name="skewXStepper" label="Skew X" value="sprite.skew.x" x="col(2)" y="curY" precision="2" step="0.01" width="100" />
<stepper name="skewYStepper" label="Skew Y" value="sprite.skew.y" x="last.x + last.bWidth + XOFFSET - 20" y="curY" precision="2" step="0.01" width="100" />
</section>
<section> <!-- ROW 4 -->
<set name="curY" value="angleStepper.y + angleStepper.bHeight + YOFFSET" />
<checkbox name="antialiasingCheckbox" text="Antialiasing" value="sprite.antialiasing" x="col(0)" y="curY" />
<radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="getEx('highMemory')" x="col(1)" y="curY" />
<radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="getEx('lowMemory')" x="col(2)" y="curY" />
<!-- TODO: Animation list -->
</section>
<section> <!-- RIGHT SIDE -->
<set name="curY" value="title.y + TO" />
<set name="listWidth" value="250" />
<buttonlist name="animations" label="Animations (TODO)" x="col(3)" y="curY" width="listWidth" height="330" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5">
<texture path="editors/ui/inputbox" />
<camSpacing value="0" />
<code>
buttonlist.addButton.exists = false;
</code>
<!-- <code>
import funkin.editors.extra.PropertyButton;
var buttonList = buttonlist; // important for now, since it gets reset after the code is run
var width = buttonList.buttonSize.x;
var height = buttonList.buttonSize.y;
buttonList.addButton.callback = function() {
buttonList.add(new PropertyButton("newProperty", "valueHere", buttonList, width, height, 150, 220, 25));
}
//var defaultAttribs = Stage.DEFAULT_ATTRIBUTES;
//for (i in stage.stageXML.attributes()) {
// trace(i, defaultAttribs);
// if (!defaultAttribs.contains(i))
// buttonList.add(new PropertyButton(i, stage.stageXML.get(i), buttonList, width, height, 150, 220, 25));
//}
for(key =&gt; val in stage.extra)
buttonList.add(new PropertyButton(key, val, buttonList, width, height, 150, 220, 25));
</code> -->
</buttonlist>
<text text="Tip: To access custom properties,&#10;hold shift when clicking edit" x="col(2) - 60" y="self.winHeight - 50" size="15" />
</section>
<!-- Preview Transform -->
<section if="previewSprite != null">
<title name="previewTitle" x="20" y="self.winHeight - 150" text="Preview Transform:" size="15" />
</section>
<exec>
function onUpdate() {
if(previewSprite == null) return;
previewSprite.color = 0xFFFFFFFF; // TODO: Color Wheel
previewSprite.skew.x = skewXStepper.value;
previewSprite.skew.y = skewYStepper.value;
previewSprite.angle = angleStepper.value;
previewSprite.alpha = alphaStepper.value;
previewSprite.antialiasing = antialiasingCheckbox.checked;
var ratio = sprite.width / sprite.height;
previewSprite.setGraphicSize(50 * scaleXStepper.value * ratio, 50 * scaleYStepper.value);
previewSprite.updateHitbox();
}
function onSave() {
sprite.name = nameTextBox.label.text;
setEx("imageFile", spriteTextBox.label.text);
setEx("highMemory", highMemoryRadio.checked);
setEx("lowMemory", lowMemoryRadio.checked);
//sprite.x = xStepper.value;
//sprite.y = yStepper.value;
//sprite.zoomFactor = zoomFactorStepper.value;
//sprite.antialiasing = antialiasingCheckbox.checked;
//sprite.color = colorWheel.color;
//sprite.spriteAnimType = animType.value;
sprite.angle = angleStepper.value;
sprite.alpha = alphaStepper.value;
function saveXY(obj:Dynamic, name:String, x:UINumericStepper, y:UINumericStepper) {
button.xml.remove(name + "");
button.xml.remove(name + "x");
button.xml.remove(name + "y");
obj.x = x.value;
obj.y = y.value;
if(x.value == y.value)
button.xml.set(name, x.value);
else {
button.xml.set(name + "x", x.value);
button.xml.set(name + "y", y.value);
}
}
function save(name:String, value:Dynamic) {
button.xml.remove(name);
button.xml.set(name, value);
}
// TODO: remove old attributes to prevent possible errors
// button.xml.remove();
button.xml.set("name", nameTextBox.label.text);
button.xml.set("sprite", spriteTextBox.label.text);
button.xml.set("x", xStepper.value);
button.xml.set("y", yStepper.value);
button.xml.set("zoom", zoomFactorStepper.value);
button.xml.set("type", animType.key);
button.xml.set("antialiasing", antialiasingCheckbox.checked);
button.xml.set("angle", angleStepper.value);
button.xml.set("alpha", alphaStepper.value);
saveXY(sprite.scrollFactor, "scroll", scrollXStepper, scrollYStepper);
saveXY(sprite.scale, "scale", scaleXStepper, scaleYStepper);
saveXY(sprite.skew, "skew", skewXStepper, skewYStepper);
XMLUtil.loadSpriteFromXML(sprite, button.xml, stage.spritesParentFolder);
}
</exec>
</window>
@@ -0,0 +1,110 @@
<window width="470" height="620" title="Editing Stage Info '${stage.stageName}'">
<set name="MARGIN" value="20" />
<set name="XOFFSET" value="50" />
<set name="YOFFSET" value="40" />
<set name="TO" value="64" />
<set name="storedProps" value="[]" />
<exec>
import haxe.ds.StringMap;
var oldInfo = {
name: stage.stageName,
folder: stage.spritesParentFolder,
startCamX: stage.startCam.x,
startCamY: stage.startCam.y,
zoom: stage.defaultZoom,
attrib: new StringMap()
};
function col(c:Int) {
return MARGIN + (170 + XOFFSET) * c;
}
for(prop =&gt; val in stage.extra) {
if(!StringTools.startsWith(prop, "stageEditor.")) {
storedProps.push(prop);
oldInfo.attrib.set(prop, val);
}
}
</exec>
<title name="title" x="MARGIN" y="30 + 16" text="Stage Info" />
<section> <!-- ROW 1 -->
<set name="curY" value="title.y + TO" />
<textbox name="nameTextBox" label="Stage Name" value="stage.stageName" x="col(0)" y="curY" width="200" height="32" />
<textbox name="spritePathTextBox" value="stage.spritesParentFolder" x="col(1)" y="curY" width="200" height="32" />
<label text="Sprite Path&#10;(Needs Refresh)" x="spritePathTextBox.x" y="spritePathTextBox.y - 14" size="15" />
</section>
<section> <!-- ROW 2 -->
<set name="curY" value="nameTextBox.y + nameTextBox.bHeight + YOFFSET" />
<label text="Start Cam Pos (X, Y)" x="col(0)" y="curY" />
<stepper name="camxStepper" value="stage.startCam.x" x="col(0)" y="curY" step="1" width="120" />
<stepper name="camyStepper" value="stage.startCam.y" x="last.x + last.bWidth + XOFFSET - 30" y="curY" step="1" width="120" />
<stepper name="zoomStepper" label="Zoom" value="stage.defaultZoom" x="col(1)" y="curY" precision="2" step="0.01" width="100" />
</section>
<section>
<set name="curY" value="camxStepper.y + camxStepper.bHeight + YOFFSET" />
<set name="listWidth" value="self.winWidth - MARGIN * 2" />
<buttonlist name="attributesList" label="Custom Attributes" x="col(0)" y="curY" width="listWidth" height="290" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5">
<texture path="editors/ui/inputbox" />
<camSpacing value="0" />
<code>
import funkin.editors.extra.PropertyButton;
var buttonList = buttonlist; // important for now, since it gets reset after the code is run
var width = buttonList.buttonSize.x;
var height = buttonList.buttonSize.y;
buttonList.addButton.callback = function() {
buttonList.add(new PropertyButton("newProperty", "valueHere", buttonList, width, height, 150, 220, 25));
}
//var defaultAttribs = Stage.DEFAULT_ATTRIBUTES;
//for (i in stage.stageXML.attributes()) {
// trace(i, defaultAttribs);
// if (!defaultAttribs.contains(i))
// buttonList.add(new PropertyButton(i, stage.stageXML.get(i), buttonList, width, height, 150, 220, 25));
//}
for(key =&gt; val in stage.extra)
buttonList.add(new PropertyButton(key, val, buttonList, width, height, 150, 220, 25));
</code>
</buttonlist>
</section>
<exec>
function onSave() {
stage.startCam.x = camxStepper.value;
stage.startCam.y = camyStepper.value;
stage.defaultZoom = zoomStepper.value;
stage.stageName = nameTextBox.label.text;
stage.spritesParentFolder = spritePathTextBox.label.text;
for(prop in storedProps)
stage.extra.remove(prop);
var newInfo = {
name: stage.stageName,
folder: stage.spritesParentFolder,
startCamX: stage.startCam.x,
startCamY: stage.startCam.y,
zoom: stage.defaultZoom,
attrib: new StringMap()
};
for(prop in attributesList.buttons.members) {
stage.extra.set(prop.propertyText.label.text, prop.valueText.label.text);
newInfo.attrib.set(prop.propertyText.label.text, prop.valueText.label.text);
}
FlxG.state.undos.addToUndo(CEditInfo(oldInfo, newInfo));
}
</exec>
</window>
@@ -0,0 +1,66 @@
<window width="350" height="570" title="Editing XML <${button.getName()} />">
<set name="MARGIN" value="20" />
<set name="XOFFSET" value="30" />
<set name="YOFFSET" value="40" />
<set name="TO" value="64" />
<exec>
function col(c:Int) {
return MARGIN + (150 + XOFFSET) * c;
}
</exec>
<title name="title" x="MARGIN" y="30 + 16" text="Xml Data" />
<section>
<set name="curY" value="title.y + TO" />
<textbox name="nodeNameTextBox" label="Element Name" value="button.getName()" x="col(0)" y="curY" width="280" height="32" />
</section>
<section>
<set name="curY" value="nodeNameTextBox.y + nodeNameTextBox.bHeight + YOFFSET - 30" />
<radio for="memoryCheck" name="highMemoryRadio" text="High Memory Only" value="button.highMemory" x="col(0)" y="curY" />
<radio for="memoryCheck" name="lowMemoryRadio" text="Low Memory Only" value="button.lowMemory" x="col(0)" y="last.y + last.check.height + YOFFSET - 30" />
</section>
<section>
<set name="curY" value="lowMemoryRadio.y + lowMemoryRadio.check.height + YOFFSET" />
<set name="listWidth" value="self.winWidth - MARGIN * 2" />
<buttonlist name="attributesList" label="Attributes" x="col(0)" y="curY" width="listWidth" height="260" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5">
<texture path="editors/ui/inputbox" />
<camSpacing value="0" />
<code>
import funkin.editors.extra.PropertyButton;
var buttonList = buttonlist; // important for now, since it gets reset after the code is run
var width = buttonList.buttonSize.x;
var height = buttonList.buttonSize.y;
buttonList.addButton.callback = function() {
buttonList.add(new PropertyButton("newProperty", "valueHere", buttonList, width, height, 110, 145, 25));
}
for (i in xml.attributes())
buttonList.add(new PropertyButton(i, xml.get(i), buttonList, width, height, 110, 145, 25));
</code>
</buttonlist>
</section>
<exec>
function onSave() {
button.xml.nodeName = nodeNameTextBox.label.text;
button.highMemory = highMemoryRadio.checked;
button.lowMemory = lowMemoryRadio.checked;
for (i in xml.attributes())
xml.remove(i);
for (val in attributesList.buttons.members)
xml.set(val.propertyText.label.text, val.valueText.label.text);
}
</exec>
</window>
@@ -0,0 +1,51 @@
<window width="450" height="570" title="Editing XML ${type}">
<!-- BASED ON unknownEditScreen.xml -->
<set name="MARGIN" value="20" />
<set name="XOFFSET" value="30" />
<set name="YOFFSET" value="40" />
<set name="TO" value="64" />
<exec>
function col(c:Int) {
return MARGIN + (150 + XOFFSET) * c;
}
</exec>
<title name="title" x="MARGIN" y="30 + 16" text="Xml Data" />
<section>
<set name="curY" value="title.y + TO" />
<set name="listWidth" value="self.winWidth - MARGIN * 2" />
<buttonlist name="attributesList" label="Attributes" x="col(0)" y="curY" width="listWidth" height="400" buttonSizeX="listWidth-10" buttonSizeY="35" buttonSpacing="5">
<texture path="editors/ui/inputbox" />
<camSpacing value="0" />
<code>
import funkin.editors.extra.PropertyButton;
var buttonList = buttonlist; // important for now, since it gets reset after the code is run
var width = buttonList.buttonSize.x;
var height = buttonList.buttonSize.y;
buttonList.addButton.callback = function() {
buttonList.add(new PropertyButton("newProperty", "valueHere", buttonList, width, height, 160, 195, 25));
}
for (i in xml.attributes())
buttonList.add(new PropertyButton(i, xml.get(i), buttonList, width, height, 160, 195, 25));
</code>
</buttonlist>
</section>
<exec>
function onSave() {
for (i in xml.attributes())
xml.remove(i);
for (val in attributesList.buttons.members)
xml.set(val.propertyText.label.text, val.valueText.label.text);
}
</exec>
</window>
+16 -8
View File
@@ -22,15 +22,19 @@ function onNoteCreation(event) {
event.cancel();
var note = event.note;
var strumID = event.strumID;
if (event.note.isSustainNote) {
note.loadGraphic(Paths.image('stages/school/ui/arrowEnds'), true, 7, 6);
note.animation.add("hold", [event.strumID]);
note.animation.add("holdend", [4 + event.strumID]);
var maxCol = Math.floor(note.graphic.width / 7);
note.animation.add("hold", [strumID%maxCol]);
note.animation.add("holdend", [maxCol + strumID%maxCol]);
} else {
note.loadGraphic(Paths.image('stages/school/ui/arrows-pixels'), true, 17, 17);
note.animation.add("scroll", [4 + event.strumID]);
var maxCol = Math.floor(note.graphic.width / 17);
note.animation.add("scroll", [maxCol + strumID%maxCol]);
}
note.scale.set(daPixelZoom, daPixelZoom);
var strumScale = event.note.strumLine.strumScale;
note.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
note.updateHitbox();
note.antialiasing = false;
}
@@ -44,11 +48,15 @@ function onStrumCreation(event) {
var strum = event.strum;
strum.loadGraphic(Paths.image('stages/school/ui/arrows-pixels'), true, 17, 17);
strum.animation.add("static", [event.strumID]);
strum.animation.add("pressed", [4 + event.strumID, 8 + event.strumID], 12, false);
strum.animation.add("confirm", [12 + event.strumID, 16 + event.strumID], 24, false);
var maxCol = Math.floor(strum.graphic.width / 17);
var strumID = event.strumID % maxCol;
strum.scale.set(daPixelZoom, daPixelZoom);
strum.animation.add("static", [strumID]);
strum.animation.add("pressed", [maxCol + strumID, (maxCol*2) + strumID], 12, false);
strum.animation.add("confirm", [(maxCol*3) + strumID, (maxCol*4) + strumID], 24, false);
var strumScale = strumLines.members[event.player].strumScale;
strum.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
strum.updateHitbox();
strum.antialiasing = false;
}
+12
View File
@@ -0,0 +1,12 @@
<!-- praying to god we remove this file later on -->
<stage zoom="0.9" name="stage" folder="stages/default/" startCamPosY="600" startCamPosX="1000" example="value">
<sprite name="normBG" sprite="stagefront" x="-500" y="100" scale="0.75" updateHitbox="true" />
<sprite name="noUpdateHitbox" sprite="stagefront" x="-500" y="300" scale="0.75" />
<sprite name="ro-tat-ay" sprite="stagefront" x="-500" y="700" scale="0.75" updateHitbox="true" angle="37" />
<box name="box" x="0" y="0" width="200" height="200" color="0xFF0000" />
<solid name="box2" x="0" y="300" width="200" height="200" color="0x00FF00" />
<unknown-sprite />
<unknown-sprite-1-attr name="test" />
</stage>
+328
View File
@@ -0,0 +1,328 @@
/**
* THIS FILE IS TEMPORARY UNTIL TRANSFORMS ARE AT A USEABLE STATE.
* TODO:
* - !!!! MOVE BACK TO SOURCE !!!!
* - Rotation
* - Skewing
* - Angle + Scale (like already at a angle)
*/
import funkin.editors.stage.StageEditor;
import funkin.editors.ui.UIWarningSubstate;
import funkin.backend.utils.WindowUtils;
import funkin.backend.utils.MatrixUtil;
import flixel.math.FlxAngle;
import openfl.Lib;
var exID = StageEditor.exID;
function tryUpdateHitbox(sprite) {
var spriteNode = sprite.extra.get(exID("node"));
if (spriteNode.exists("updateHitbox") && spriteNode.get("updateHitbox") == "true") {
sprite.updateHitbox();
return true;
}
if (!FlxG.keys.pressed.ALT) {
sprite.x = storedPos.x - (sprite.frameWidth * (storedScale.x - sprite.scale.x) * 0.5);
sprite.y = storedPos.y - (sprite.frameHeight * (storedScale.y - sprite.scale.y) * 0.5);
}
return false;
}
var allowClose = false;
function create() {
WindowUtils.preventClosing = true;
WindowUtils.resetClosing();
WindowUtils.onClosing = function() {
if(!allowClose)
Lib.application.window.onClose.cancel();
var substate;
substate = new UIWarningSubstate("nuh uh", "you dont need to close goofus doofus", [
{
label: "Actually Exit",
onClick: function(t) {
allowClose = true;
Lib.application.window.close();
}
},
{
label: "Reload State",
onClick: function(t) {
FlxG.switchState(new StageEditor(StageEditor.__stage));
}
},
{
label: "oh whoops",
onClick: function(t) {
substate.close();
}
}
]);
openSubState(substate);
}
}
function destroy() {
WindowUtils.preventClosing = false;
WindowUtils.resetClosing();
WindowUtils.onClosing = null;
}
function update() {
if (FlxG.mouse.justPressed)
lastRelative.set();
if(FlxG.keys.justPressed.R) {
trace("reloading");
FlxG.switchState(new StageEditor(StageEditor.__stage));
}
}
function genericScale(sprite, relative, doX, doY) {
var relativeMult = 1 / (FlxMath.lerp(1, stageCamera.zoom, sprite.zoomFactor) / stageCamera.zoom) * (FlxG.keys.pressed.ALT ? 2 : 1);
relative.x *= relativeMult;
relative.y *= relativeMult;
var width = sprite.frameWidth * storedScale.x;
var height = sprite.frameHeight * storedScale.y;
if(doX) width -= relative.x;
if(doY) height -= relative.y;
CoolUtil.setGraphicSizeFloat(sprite, width, height);
if(FlxG.keys.pressed.SHIFT) {
var nscale = Math.max(sprite.scale.x, sprite.scale.y);
sprite.scale.set(nscale, nscale);
}
var updatedHitbox = tryUpdateHitbox(sprite);
if (FlxG.keys.pressed.ALT) {
sprite.x = storedPos.x;
sprite.y = storedPos.y;
if(updatedHitbox) {
sprite.x += (sprite.frameWidth * (storedScale.x - sprite.scale.x) * 0.5);
sprite.y += (sprite.frameHeight * (storedScale.y - sprite.scale.y) * 0.5);
}
return true;
}
return !updatedHitbox;
}
function genericOppositeScale(sprite, relative, scaleX, scaleY, repositionX, repositionY) {
if(repositionX) relative.x *= -1;
if(repositionY) relative.y *= -1;
var repositioned = genericScale(sprite, relative, scaleX, scaleY);
if (!repositioned) {
if(repositionX) sprite.x = storedPos.x + (sprite.frameWidth * (storedScale.x - sprite.scale.x));
if(repositionY) sprite.y = storedPos.y + (sprite.frameHeight * (storedScale.y - sprite.scale.y));
} else if (!FlxG.keys.pressed.ALT) {
if(repositionX) sprite.x += (sprite.frameWidth * (storedScale.x - sprite.scale.x));
if(repositionY) sprite.y += (sprite.frameHeight * (storedScale.y - sprite.scale.y));
}
}
var oldSpritePos = FlxPoint.get();
function SCALE_BOTTOM_RIGHT(sprite, relative) {
preRotBullshit(sprite, relative);
genericScale(sprite, relative, true, true);
postRotBullshit(sprite, relative);
}
/**
ROTATION
**/
function preRotBullshit(sprite, relative) {
if (sprite.angle != 0)
relative = rotateByDegrees(relative, -sprite.angle);
if (FlxG.mouse.justPressed) {
oldSpritePos.x = sprite.x;
oldSpritePos.y = sprite.y;
}
}
function postRotBullshit(sprite, relative) {
if (sprite.angle != 0) {
var p = rotateAround(FlxPoint.get(sprite.x, sprite.y), oldSpritePos, sprite.angle);
sprite.x = p.x;
sprite.y = p.y;
}
}
function rotateAround(p, origin, angle) {
var rel = FlxPoint.get(p.x - origin.x, p.y - origin.y);
rotateByDegrees(rel, angle);
p.x = origin.x + rel.x;
p.y = origin.y + rel.y;
rel.put();
return p;
}
function rotateByDegrees(p, angle) {
var rads = angle * FlxAngle.TO_RAD;
var s:Float = Math.sin(rads);
var c:Float = Math.cos(rads);
var tempX:Float = p.x;
p.x = tempX * c - p.y * s;
p.y = tempX * s + p.y * c;
}
/**
END OF ROTATION
**/
function SCALE_TOP_RIGHT(sprite, relative) {
preRotBullshit(sprite, relative);
genericOppositeScale(sprite, relative, true, true, false, true);
postRotBullshit(sprite, relative);
}
function MOVE_CENTER(sprite, relative) {
sprite.x = storedPos.x-relative.x;
sprite.y = storedPos.y-relative.y;
}
function SCALE_TOP_LEFT(sprite, relative) {
preRotBullshit(sprite, relative);
genericOppositeScale(sprite, relative, true, true, true, true);
postRotBullshit(sprite, relative);
}
function SCALE_BOTTOM_LEFT(sprite, relative) {
preRotBullshit(sprite, relative);
genericOppositeScale(sprite, relative, true, true, true, false);
postRotBullshit(sprite, relative);
}
function SCALE_LEFT(sprite, relative) {
preRotBullshit(sprite, relative);
genericOppositeScale(sprite, relative, true, false, true, false);
postRotBullshit(sprite, relative);
}
function SCALE_RIGHT(sprite, relative) {
preRotBullshit(sprite, relative);
genericScale(sprite, relative, true, false);
postRotBullshit(sprite, relative);
}
function SCALE_TOP(sprite, relative) {
preRotBullshit(sprite, relative);
genericOppositeScale(sprite, relative, false, true, false, true);
postRotBullshit(sprite, relative);
}
function SCALE_BOTTOM(sprite, relative) {
preRotBullshit(sprite, relative);
genericScale(sprite, relative, false, true);
postRotBullshit(sprite, relative);
}
var lastRelative = FlxPoint.get();
var skewPoint1 = FlxPoint.get();
var skewPoint2 = FlxPoint.get();
function SKEW_LEFT(sprite, relative) {
preRotBullshit(sprite, relative);
if (!FlxG.keys.pressed.SHIFT) {
genericOppositeScale(sprite, relative, true, false, true, false);
postRotBullshit(sprite, relative);
}
skewPoint1.set(0, 0);
skewPoint2.set(1, 0);
gimmeSkewCorners(sprite, 0, 1);
sprite.y = storedPos.y - relative.y * 0.5;
sprite.skew.y += ((relative.y - lastRelative.y) * 0.02);
lastRelative.set((FlxG.keys.pressed.SHIFT ? lastRelative.x : relative.x), relative.y);
}
function SKEW_BOTTOM(sprite, relative) {
preRotBullshit(sprite, relative);
if (!FlxG.keys.pressed.SHIFT) {
genericScale(sprite, relative, false, true);
postRotBullshit(sprite, relative);
}
skewPoint1.set(0, 0);
skewPoint2.set(0, 1);
gimmeSkewCorners(sprite, 0, 2);
sprite.x = storedPos.x - relative.x * 0.4;
sprite.skew.x -= ((relative.x - lastRelative.x) * 0.03);
lastRelative.set(relative.x, (FlxG.keys.pressed.SHIFT ? lastRelative.y : relative.y));
}
function SKEW_TOP(sprite, relative) {
preRotBullshit(sprite, relative);
if (!FlxG.keys.pressed.SHIFT) {
genericOppositeScale(sprite, relative, false, true, false, true);
postRotBullshit(sprite, relative);
}
skewPoint1.set(0, 0);
skewPoint2.set(0, 1);
gimmeSkewCorners(sprite, 0, 2);
sprite.x = storedPos.x - relative.x * 0.4;
sprite.skew.x += ((relative.x - lastRelative.x) * 0.03);
lastRelative.set(relative.x, (FlxG.keys.pressed.SHIFT ? lastRelative.y : relative.y));
}
function SKEW_RIGHT(sprite, relative) {
preRotBullshit(sprite, relative);
if (!FlxG.keys.pressed.SHIFT) {
genericScale(sprite, relative, true, false);
postRotBullshit(sprite, relative);
}
skewPoint1.set(0, 0);
skewPoint2.set(1, 0);
gimmeSkewCorners(sprite, 0, 1);
sprite.y = storedPos.y - relative.y * 0.5;
sprite.skew.y -= ((relative.y - lastRelative.y) * 0.02);
lastRelative.set((FlxG.keys.pressed.SHIFT ? lastRelative.x : relative.x), relative.y);
}
function ROTATE(sprite, relative) {
var buttonBoxes:Array<FlxPoint> = sprite.extra.get(exID("buttonBoxes"));
var p:FlxPoint = buttonBoxes[8];
FlxG.mouse.getWorldPosition(stageCamera, _point);
var dx:Float = _point.x - p.x;
var dy:Float = _point.y - p.y;
var angle = FlxAngle.angleFromOrigin(dx, dy, true) + angleOffset;
if(FlxG.keys.pressed.SHIFT) angle = Std.int(angle / 45) * 45;
sprite.angle = angle;
}
/*function postDraw() {
if(storedCenter.x != 0 || storedCenter.y != 0) {
drawLine(storedCenter, storedRelative, 0.3);
}
}*/
function gimmeSkewCorners(sprite, index1, index2) {
if (sprite.angle == 0) {
var corners = sprite.extra.get(exID("buttonBoxes"));
skewPoint1.set(corners[index1].x, corners[index1].y);
skewPoint2.set(corners[index2].x, corners[index2].y);
return;
}
var ogAngle = sprite.angle;
sprite.angle = 0;
MatrixUtil.getMatrixPosition(sprite, [skewPoint1, skewPoint2], sprite.camera, sprite.frameWidth, sprite.frameHeight);
sprite.angle = ogAngle;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="arrow-down.png">
<SubTexture name="tail" x="0" y="0" width="8" height="3"/>
<SubTexture name="segment" x="0" y="3" width="8" height="1"/>
<SubTexture name="arrow" x="0" y="6" width="8" height="6"/>
</TextureAtlas>
Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="button.png">
<!-- Created without animate lol i wrote this-->
<SubTexture name="normal-topleft" x="0" y="0" width="2" height="2"/>
<SubTexture name="normal-top" x="2" y="0" width="6" height="2"/>
<SubTexture name="normal-topright" x="8" y="0" width="2" height="2"/>
<SubTexture name="normal-middleleft" x="0" y="2" width="2" height="7.5"/>
<SubTexture name="normal-middle" x="2" y="2" width="6" height="7.5"/>
<SubTexture name="normal-middleright" x="8" y="2" width="2" height="7.5"/>
<SubTexture name="normal-bottomleft" x="0" y="9.5" width="2" height="2"/>
<SubTexture name="normal-bottom" x="2" y="9.5" width="6" height="2"/>
<SubTexture name="normal-bottomright" x="8" y="9.5" width="2" height="2"/>
<SubTexture name="hover-topleft" x="10" y="0" width="2" height="2"/>
<SubTexture name="hover-top" x="12" y="0" width="6" height="2"/>
<SubTexture name="hover-topright" x="18" y="0" width="2" height="2"/>
<SubTexture name="hover-middleleft" x="10" y="2" width="2" height="7.5"/>
<SubTexture name="hover-middle" x="12" y="2" width="6" height="7.5"/>
<SubTexture name="hover-middleright" x="18" y="2" width="2" height="7.5"/>
<SubTexture name="hover-bottomleft" x="10" y="9.5" width="2" height="2"/>
<SubTexture name="hover-bottom" x="12" y="9.5" width="6" height="2"/>
<SubTexture name="hover-bottomright" x="18" y="9.5" width="2" height="2"/>
<SubTexture name="pressed-topleft" x="20" y="0" width="2" height="2"/>
<SubTexture name="pressed-top" x="22" y="0" width="6" height="2"/>
<SubTexture name="pressed-topright" x="28" y="0" width="2" height="2"/>
<SubTexture name="pressed-middleleft" x="20" y="2" width="2" height="7.5"/>
<SubTexture name="pressed-middle" x="22" y="2" width="6" height="7.5"/>
<SubTexture name="pressed-middleright" x="28" y="2" width="2" height="7.5"/>
<SubTexture name="pressed-bottomleft" x="20" y="9.5" width="2" height="2"/>
<SubTexture name="pressed-bottom" x="22" y="9.5" width="6" height="2"/>
<SubTexture name="pressed-bottomright" x="28" y="9.5" width="2" height="2"/>
</TextureAtlas>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="context-bg.png">
<!-- Created without animate lol i wrote this-->
<SubTexture name="topleft" x="0" y="0" width="10" height="10"/>
<SubTexture name="top" x="10" y="0" width="44" height="10"/>
<SubTexture name="topright" x="54" y="0" width="10" height="10"/>
<SubTexture name="middleleft" x="0" y="10" width="10" height="44"/>
<SubTexture name="middle" x="10" y="10" width="44" height="44"/>
<SubTexture name="middleright" x="54" y="10" width="10" height="44"/>
<SubTexture name="bottomleft" x="0" y="54" width="10" height="10"/>
<SubTexture name="bottom" x="10" y="54" width="44" height="10"/>
<SubTexture name="bottomright" x="54" y="54" width="10" height="10"/>
</TextureAtlas>
Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="button.png">
<!-- Created without animate lol i wrote this-->
<!-- Thanks yosh, and i wrote this script incase anyone ever needs to resize these xmls -->
<!-- Here you guys go :D https://try.haxe.org/#7C373001 -lunar -->
<SubTexture name="normal-topleft" x="0" y="0" width="4" height="4"/>
<SubTexture name="normal-top" x="4" y="0" width="8" height="4"/>
<SubTexture name="normal-topright" x="12" y="0" width="4" height="4"/>
<SubTexture name="normal-middleleft" x="0" y="4" width="4" height="8"/>
<SubTexture name="normal-middle" x="4" y="4" width="8" height="8"/>
<SubTexture name="normal-middleright" x="12" y="4" width="4" height="8"/>
<SubTexture name="normal-bottomleft" x="0" y="12" width="4" height="4"/>
<SubTexture name="normal-bottom" x="4" y="12" width="8" height="4"/>
<SubTexture name="normal-bottomright" x="12" y="12" width="4" height="4"/>
<SubTexture name="hover-topleft" x="16" y="0" width="4" height="4"/>
<SubTexture name="hover-top" x="20" y="0" width="8" height="4"/>
<SubTexture name="hover-topright" x="28" y="0" width="4" height="4"/>
<SubTexture name="hover-middleleft" x="16" y="4" width="4" height="8"/>
<SubTexture name="hover-middle" x="20" y="4" width="8" height="8"/>
<SubTexture name="hover-middleright" x="28" y="4" width="4" height="8"/>
<SubTexture name="hover-bottomleft" x="16" y="12" width="4" height="4"/>
<SubTexture name="hover-bottom" x="20" y="12" width="8" height="4"/>
<SubTexture name="hover-bottomright" x="28" y="12" width="4" height="4"/>
<SubTexture name="pressed-topleft" x="32" y="0" width="4" height="4"/>
<SubTexture name="pressed-top" x="36" y="0" width="8" height="4"/>
<SubTexture name="pressed-topright" x="44" y="0" width="4" height="4"/>
<SubTexture name="pressed-middleleft" x="32" y="4" width="4" height="8"/>
<SubTexture name="pressed-middle" x="36" y="4" width="8" height="8"/>
<SubTexture name="pressed-middleright" x="44" y="4" width="4" height="8"/>
<SubTexture name="pressed-bottomleft" x="32" y="12" width="4" height="4"/>
<SubTexture name="pressed-bottom" x="36" y="12" width="8" height="4"/>
<SubTexture name="pressed-bottomright" x="44" y="12" width="4" height="4"/>
</TextureAtlas>
Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+35
View File
@@ -0,0 +1,35 @@
#pragma header
#define GRID_SIZE 40.0
#define GRID_HEIGHT 4.0
uniform int segments;
vec4 colorA = vec4(0.329, 0.329, 0.329, 1.0);
vec4 colorB = vec4(0.153, 0.153, 0.153, 1.0);
vec4 colorOutline = vec4(0.867, 0.867, 0.867, 1.0);
void main()
{
vec2 pixelSize = (1.0 / openfl_TextureSize) / (GRID_SIZE * float(segments));
vec2 uv = openfl_TextureCoordv.xy;
vec2 pixelUV = vec2(uv.x * GRID_SIZE * float(segments), uv.y * GRID_SIZE * GRID_HEIGHT);
if (uv.x < pixelSize.x || uv.x > 1.0 - pixelSize.x) { //edges
gl_FragColor = colorOutline;
return;
}
vec4 col = colorA;
bool flip = false;
//horizontal
if (mod(pixelUV.x, GRID_SIZE * 2.0) < GRID_SIZE)
flip = !flip;
//vertical
if (mod(pixelUV.y, GRID_SIZE * 2.0) < GRID_SIZE)
flip = !flip;
if (flip)
col = colorB;
gl_FragColor = col * flixel_texture2D(bitmap, uv);
}
+3 -2
View File
@@ -21,8 +21,9 @@ uniform bool lowDetail;
float getAmplitude(vec2 pixel) {
float pixelID = floor((pixel.y+pixelOffset)/3.0);
// TODO: INVESTIGATE THE 1.+ AND WHY IT WORKS (SERIOUSLY I GOT NO CLUE) -lunar
vec2 wavePixel = vec2(mod(pixelID, waveformSize.x), 1.0+floor(pixelID/waveformSize.x));
// TODO: INVESTIGATE THE 1.+ AND WHY IT WORKS (SRSLY I GOT NO CLUE) -lunar
// Somehow using 0.999 instead of 1.0 fixes weird glitches on some systems -Ne_Eo
vec2 wavePixel = vec2(mod(pixelID, waveformSize.x), 0.999+floor(pixelID/waveformSize.x));
vec4 waveData = texture2D(waveformTexture, wavePixel / waveformSize);
int id = int(mod(wavePixel.x, 3.0));
@@ -0,0 +1,88 @@
#pragma header
// Used in charter by waveforms
#define HEIGHT 0.05 // Height of the Bar
#define BACKLIGHT 0.6 // Backlight
#define BRIGHTNESS 0.33 // overall Brightness
#define GLOW 1.25 // Glow intensity of the Bar
const vec3 gradient1 = vec3(114.0/255.0, 81.0/255.0, 135.0/255.0);
const vec3 gradient2 = vec3(144.0/255.0, 80.0/255.0, 186.0/255.0);
const vec4 outlinecolor = vec4(0.1);
const vec3 lowdetailcol = vec3(0.0, 0.0, 1.0);
uniform vec2 textureRes;
uniform float pixelOffset;
uniform float playerPosition;
uniform sampler2D waveformTexture;
uniform ivec2 waveformSize;
uniform bool lowDetail;
uniform float time;
float getAmplitude(vec2 pixel) {
float pixelID = floor((pixel.y+pixelOffset)/3.0);
// TODO: INVESTIGATE THE 1.+ AND WHY IT WORKS (SRSLY I GOT NO CLUE) -lunar
vec2 wavePixel = vec2(mod(pixelID,waveformSize.x), 1.0+floor(pixelID/waveformSize.x));
vec4 waveData = texture2D(waveformTexture, wavePixel / waveformSize);
int id = int(mod(wavePixel.x, 3.0));
if(id == 0) return waveData.r;
if(id == 1) return waveData.g;
if(id == 2) return waveData.b;
return 0.0;
}
float getAmpWidth(float amplitude) {
return (1.0-amplitude) * textureRes.x;
}
bool inWaveForm(vec2 pixel, float width) {
float widthdiv2 = width/2.0;
return pixel.x > widthdiv2 && pixel.x < textureRes.x-widthdiv2;
}
float getHightlight(float ampwidth) {
float remapCoord = (ampwidth/textureRes.x)/2.0;
float mappedCoord = map(openfl_TextureCoordv.x, remapCoord, 1.0-remapCoord, 0.0, 1.0);
return 1.0-(abs(mappedCoord-0.5)*2.0);
}
void outlineWaveform(vec2 pixel, vec2 offset) {
float amplitude = getAmplitude(pixel - offset);
float ampwidth = (1.0-amplitude) * textureRes.x;
if (!inWaveForm(pixel, ampwidth))
gl_FragColor = vec4(vec3(0.), 1.);
}
void main()
{
vec2 pixel = openfl_TextureCoordv * textureRes;
float amplitude = getAmplitude(pixel);
float ampwidth = getAmpWidth(amplitude);
gl_FragColor = vec4(vec3(0.0), .1);
vec2 uv = openfl_TextureCoordv.xy - 0.5;
float c = BACKLIGHT;
float a = abs(uv.x);
float s = 1.0 - smoothstep(0.0, ampwidth/textureRes.x, a);
c *= 1.33 - smoothstep(0.0, 0.5, a);
c*=c*c;
c += s*.5;
if (inWaveForm(pixel, ampwidth))
c += s;
gl_FragColor = vec4((cos(6.283 * (uv.y + time + vec3(0.0,.33,0.66)))*map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0)) + GLOW, 1.0) * c * BRIGHTNESS;
gl_FragColor.xyz *= map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0);
gl_FragColor.xyz *= pixel.y+pixelOffset>playerPosition ? 0.6 : 1.0;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"events":[{"params":[1,"hey",true],"time":4200,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":9000},{"params":[1,"hey",true],"time":13800,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":18600},{"params":[1,"hey",true],"time":23400,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":28200},{"params":[1,"hey",true],"time":28500,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":33000},{"params":[1,"hey",true],"time":37800,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":42600},{"params":[1,"hey",true],"time":47400,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":52200},{"params":[1,"hey",true],"time":57000,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":61800},{"params":[1,"hey",true],"time":66600,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":66900},{"params":[1,"hey",true],"time":71400,"name":"Play Animation"},{"params":[1,"hey",true],"name":"Play Animation","time":76200}]}
-4
View File
@@ -1,4 +0,0 @@
function beatHit(curBeat) {
if (curBeat != 79 && curBeat % 8 == 7)
boyfriend.playAnim("hey");
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"events":[{"params":[true,false,0],"time":19200,"name":"Alt Animation Toggle"},{"params":[false,false,0],"time":38400,"name":"Alt Animation Toggle"},{"params":[true,false,0],"time":57600,"name":"Alt Animation Toggle"},{"params":[false,false,0],"time":76800,"name":"Alt Animation Toggle"},{"params":[true,false,0],"time":86400,"name":"Alt Animation Toggle"}]}
-4
View File
@@ -1,4 +0,0 @@
function onNoteCreation(event) {
if (event.mustHit)
event.animSuffix = "";
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"events":[{"params":[true,false,0],"time":16000,"name":"Alt Animation Toggle"},{"params":[false,false,0],"time":28800,"name":"Alt Animation Toggle"},{"params":[true,false,0],"time":41600,"name":"Alt Animation Toggle"},{"params":[false,false,0],"time":48000,"name":"Alt Animation Toggle"},{"params":[true,false,0],"time":60800,"name":"Alt Animation Toggle"},{"params":[false,false,0],"time":73600,"name":"Alt Animation Toggle"},{"params":[true,false,0],"time":86400,"name":"Alt Animation Toggle"}]}
-4
View File
@@ -1,4 +0,0 @@
function onNoteCreation(event) {
if (event.mustHit)
event.animSuffix = "";
}
+1
View File
@@ -0,0 +1 @@
{"events":[{"params":[1,1],"time":56000,"name":"Camera Modulo Change"},{"params":[4,1],"time":66666.6666666667,"name":"Camera Modulo Change"}]}
-8
View File
@@ -1,8 +0,0 @@
function beatHit(curBeat:Int) {
switch(curBeat) {
case 168:
camZoomingInterval = 1;
case 200:
camZoomingInterval = 4;
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"events":[{"params":[0,"good!",true],"time":62022.4719101124,"name":"Play Animation"}]}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"events":[{"params":[1],"time":5052.63157894737,"name":"Camera Movement"},{"params":[0],"time":10105.2631578947,"name":"Camera Movement"},{"params":[1],"time":15157.8947368421,"name":"Camera Movement"},{"params":[0],"time":20210.5263157895,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":20210.5263157895,"name":"HScript Call"},{"params":[1],"time":25263.1578947368,"name":"Camera Movement"},{"params":[0],"time":30315.7894736842,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":30315.7894736842,"name":"HScript Call"},{"params":[1],"time":35368.4210526316,"name":"Camera Movement"},{"params":[0],"time":40421.0526315789,"name":"Camera Movement"},{"params":[1],"time":45473.6842105263,"name":"Camera Movement"},{"params":[0],"time":50526.3157894737,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":50526.3157894737,"name":"HScript Call"},{"params":[1],"time":55578.947368421,"name":"Camera Movement"},{"params":[0],"time":60631.5789473684,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":60631.5789473684,"name":"HScript Call"},{"params":[1],"time":65684.2105263157,"name":"Camera Movement"},{"params":[0],"time":70736.8421052631,"name":"Camera Movement"},{"params":[1],"time":75789.4736842105,"name":"Camera Movement"},{"params":[0],"time":80842.1052631578,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":80842.1052631578,"name":"HScript Call"},{"params":[1],"time":85894.7368421052,"name":"Camera Movement"},{"params":[0],"time":90947.3684210525,"name":"Camera Movement"},{"params":["aberrationCoolThing",""],"time":90947.3684210525,"name":"HScript Call"},{"params":[1],"time":95999.9999999999,"name":"Camera Movement"}]}
{"events":[{"params":["aberrationCoolThing",""],"time":20210.5263157895,"name":"HScript Call"},{"params":["aberrationCoolThing",""],"name":"HScript Call","time":30315.7894736842},{"params":["aberrationCoolThing",""],"time":50526.3157894737,"name":"HScript Call"},{"params":["aberrationCoolThing",""],"time":60631.5789473684,"name":"HScript Call"},{"params":["aberrationCoolThing",""],"time":80842.1052631578,"name":"HScript Call"},{"params":["aberrationCoolThing",""],"time":90947.3684210525,"name":"HScript Call"}]}
+1 -1
View File
@@ -1 +1 @@
{"codenameChart":true,"strumLines":[{"position":"girlfriend","notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"visible":true,"type":0,"characters":["gf"]},{"position":"boyfriend","notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0}],"visible":true,"type":1,"characters":["bf"]}],"scrollSpeed":1,"noteTypes":[]}
{"events":[{"params":[1],"name":"Camera Movement","time":0},{"params":[0],"name":"Camera Movement","time":9600},{"params":[1],"name":"Camera Movement","time":14400},{"params":[0],"name":"Camera Movement","time":19200},{"params":[1],"name":"Camera Movement","time":24000},{"params":[0],"name":"Camera Movement","time":28800},{"params":[1],"name":"Camera Movement","time":33600},{"params":[0],"name":"Camera Movement","time":38400},{"params":[1],"name":"Camera Movement","time":43200},{"params":[0],"name":"Camera Movement","time":48000},{"params":[1],"name":"Camera Movement","time":50400}],"codenameChart":true,"strumLines":[{"position":"girlfriend","notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"visible":true,"type":0,"characters":["gf"]},{"position":"boyfriend","notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0}],"visible":true,"type":1,"characters":["bf"]}],"scrollSpeed":1,"noteTypes":[]}
+1 -1
View File
@@ -1 +1 @@
{"codenameChart":true,"strumLines":[{"position":"girlfriend","notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"visible":true,"type":0,"characters":["gf"]},{"position":"boyfriend","notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0},{"id":0,"sLen":0,"time":62400,"type":0},{"id":1,"sLen":0,"time":62550,"type":0},{"id":2,"sLen":0,"time":62700,"type":0},{"id":3,"sLen":0,"time":62850,"type":0},{"id":2,"sLen":0,"time":63000,"type":0},{"id":1,"sLen":0,"time":63150,"type":0},{"id":0,"sLen":0,"time":63300,"type":0},{"id":1,"sLen":0,"time":63450,"type":0},{"id":2,"sLen":0,"time":63600,"type":0},{"id":3,"sLen":0,"time":63750,"type":0},{"id":2,"sLen":0,"time":63900,"type":0},{"id":3,"sLen":0,"time":64050,"type":0},{"id":2,"sLen":0,"time":64200,"type":0},{"id":3,"sLen":0,"time":64350,"type":0},{"id":1,"sLen":0,"time":64500,"type":0},{"id":0,"sLen":0,"time":64650,"type":0}],"visible":true,"type":1,"characters":["bf"]}],"scrollSpeed":1,"noteTypes":[]}
{"events":[{"params":[1],"name":"Camera Movement","time":0},{"params":[0],"name":"Camera Movement","time":9600},{"params":[1],"name":"Camera Movement","time":14400},{"params":[0],"name":"Camera Movement","time":19200},{"params":[1],"name":"Camera Movement","time":24000},{"params":[0],"name":"Camera Movement","time":28800},{"params":[1],"name":"Camera Movement","time":33600},{"params":[0],"name":"Camera Movement","time":38400},{"params":[1],"name":"Camera Movement","time":43200},{"params":[0],"name":"Camera Movement","time":48000},{"params":[1],"name":"Camera Movement","time":50400}],"codenameChart":true,"scrollSpeed":1,"strumLines":[{"keyCount":4,"notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"position":"girlfriend","characters":["gf"],"visible":true,"type":0},{"keyCount":4,"notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0},{"id":0,"sLen":0,"time":62400,"type":0},{"id":1,"sLen":0,"time":62550,"type":0},{"id":2,"sLen":0,"time":62700,"type":0},{"id":3,"sLen":0,"time":62850,"type":0},{"id":2,"sLen":0,"time":63000,"type":0},{"id":1,"sLen":0,"time":63150,"type":0},{"id":0,"sLen":0,"time":63300,"type":0},{"id":1,"sLen":0,"time":63450,"type":0},{"id":2,"sLen":0,"time":63600,"type":0},{"id":3,"sLen":0,"time":63750,"type":0},{"id":2,"sLen":0,"time":63900,"type":0},{"id":3,"sLen":0,"time":64050,"type":0},{"id":2,"sLen":0,"time":64200,"type":0},{"id":3,"sLen":0,"time":64350,"type":0},{"id":1,"sLen":0,"time":64500,"type":0},{"id":0,"sLen":0,"time":64650,"type":0}],"position":"boyfriend","characters":["bf"],"visible":true,"type":1}],"chartVersion":"1.6.0","noteTypes":[]}
+1 -1
View File
@@ -1 +1 @@
{"codenameChart":true,"strumLines":[{"position":"girlfriend","notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"visible":true,"type":0,"characters":["gf"]},{"position":"boyfriend","notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0}],"visible":true,"type":1,"characters":["bf"]}],"scrollSpeed":1,"noteTypes":[]}
{"events":[{"params":[1],"name":"Camera Movement","time":0},{"params":[0],"name":"Camera Movement","time":9600},{"params":[1],"name":"Camera Movement","time":14400},{"params":[0],"name":"Camera Movement","time":19200},{"params":[1],"name":"Camera Movement","time":24000},{"params":[0],"name":"Camera Movement","time":28800},{"params":[1],"name":"Camera Movement","time":33600},{"params":[0],"name":"Camera Movement","time":38400},{"params":[1],"name":"Camera Movement","time":43200},{"params":[0],"name":"Camera Movement","time":48000},{"params":[1],"name":"Camera Movement","time":50400}],"codenameChart":true,"strumLines":[{"position":"girlfriend","notes":[{"id":0,"sLen":0,"time":9600,"type":0},{"id":3,"sLen":0,"time":10800,"type":0},{"id":0,"sLen":0,"time":12000,"type":0},{"id":3,"sLen":0,"time":13200,"type":0},{"id":2,"sLen":0,"time":19200,"type":0},{"id":1,"sLen":0,"time":20400,"type":0},{"id":2,"sLen":0,"time":21600,"type":0},{"id":1,"sLen":0,"time":22800,"type":0},{"id":0,"sLen":0,"time":28800,"type":0},{"id":2,"sLen":0,"time":30000,"type":0},{"id":1,"sLen":0,"time":31200,"type":0},{"id":3,"sLen":0,"time":32400,"type":0},{"id":1,"sLen":0,"time":38400,"type":0},{"id":1,"sLen":0,"time":39000,"type":0},{"id":2,"sLen":0,"time":39600,"type":0},{"id":1,"sLen":0,"time":40800,"type":0},{"id":1,"sLen":0,"time":41400,"type":0},{"id":3,"sLen":0,"time":42000,"type":0},{"id":1,"sLen":0,"time":48000,"type":0},{"id":2,"sLen":0,"time":48300,"type":0},{"id":3,"sLen":0,"time":48600,"type":0},{"id":2,"sLen":0,"time":48900,"type":0},{"id":3,"sLen":0,"time":49800,"type":0}],"visible":true,"type":0,"characters":["gf"]},{"position":"boyfriend","notes":[{"id":0,"sLen":0,"time":14400,"type":0},{"id":3,"sLen":0,"time":15600,"type":0},{"id":0,"sLen":0,"time":16800,"type":0},{"id":3,"sLen":0,"time":18000,"type":0},{"id":2,"sLen":0,"time":24000,"type":0},{"id":1,"sLen":0,"time":25200,"type":0},{"id":2,"sLen":0,"time":26400,"type":0},{"id":1,"sLen":0,"time":27600,"type":0},{"id":0,"sLen":0,"time":33600,"type":0},{"id":2,"sLen":0,"time":34800,"type":0},{"id":1,"sLen":0,"time":36000,"type":0},{"id":3,"sLen":0,"time":37200,"type":0},{"id":1,"sLen":0,"time":43200,"type":0},{"id":1,"sLen":0,"time":43800,"type":0},{"id":2,"sLen":0,"time":44400,"type":0},{"id":1,"sLen":0,"time":45600,"type":0},{"id":1,"sLen":0,"time":46200,"type":0},{"id":3,"sLen":0,"time":46800,"type":0},{"id":1,"sLen":0,"time":50400,"type":0},{"id":2,"sLen":0,"time":50700,"type":0},{"id":3,"sLen":0,"time":51000,"type":0},{"id":2,"sLen":0,"time":51300,"type":0},{"id":3,"sLen":0,"time":52200,"type":0},{"id":3,"sLen":0,"time":52800,"type":0},{"id":1,"sLen":0,"time":53400,"type":0},{"id":0,"sLen":0,"time":54000,"type":0},{"id":1,"sLen":0,"time":54600,"type":0},{"id":2,"sLen":0,"time":55200,"type":0},{"id":3,"sLen":0,"time":55800,"type":0},{"id":0,"sLen":0,"time":56400,"type":0},{"id":2,"sLen":0,"time":57000,"type":0},{"id":1,"sLen":750,"time":57600,"type":0}],"visible":true,"type":1,"characters":["bf"]}],"scrollSpeed":1,"noteTypes":[]}
+1 -1
View File
@@ -1 +1 @@
{"events":[{"params":[1],"name":"Camera Movement","time":0},{"params":[0],"name":"Camera Movement","time":9600},{"params":[1],"name":"Camera Movement","time":14400},{"params":[0,"cheer"],"name":"Play Animation","time":18000},{"params":[1,"hey"],"name":"Play Animation","time":18600},{"params":[0],"name":"Camera Movement","time":19200},{"params":[1],"name":"Camera Movement","time":24000},{"params":[0,"cheer"],"time":27600,"name":"Play Animation"},{"params":[1,"hey"],"time":28200,"name":"Play Animation"},{"params":[0],"name":"Camera Movement","time":28800},{"params":[1],"name":"Camera Movement","time":33600},{"params":[0],"name":"Camera Movement","time":38400},{"params":[1],"name":"Camera Movement","time":43200},{"params":[0],"name":"Camera Movement","time":48000},{"params":[1],"name":"Camera Movement","time":50400}]}
{"events":[{"params":[0,"cheer"],"name":"Play Animation","time":18000},{"params":[1,"hey"],"name":"Play Animation","time":18600},{"params":[0,"cheer"],"time":27600,"name":"Play Animation"},{"params":[1,"hey"],"time":28200,"name":"Play Animation"}]}
+54
View File
@@ -0,0 +1,54 @@
List of SFX to-do for editors,
maybe some other menus will need them in the future,
but for now just editors!
Putting this txt in here so others can edit and commit this to suggest or add missing sfx!
- Cass (GlitchDotSmh)
[] = Not done
[!] = Priority/In progress
[x] = Done
# Editor SFX
## Global:
- Opening/Closing Context/Dropdown Menus []
- Opening/Closing Pop-up Windows []
- Mouse Click [x]
- UI Button being clicked []
- Focusing/Unfocusing a text field []
- Typing in a text field []
- Saving []
- Auto-Saving []
- Copying []
- Pasting []
- Undoing []
- Redoing []
- Deleting []
## Chart Editor:
- Placing Notes []
- Deleting Notes []
- Subtracting Sustain []
- Adding Sustain []
- Picking Up Notes []
- Moving Notes []
- Dropping Notes []
- Selecting Notes (via `CTRL + Drag` or `CTRL + A`) []
- Hitsounds []
- Metronome []
- Creating an Event []
- Pulling up Event Editing menu []
- Scrolling Up/Down (via `Scroll Wheel` or `W/S`) []
- Note Snapping Change []
- Locking Strums []
- Unlocking Strums []
- Creating Strum []
## Character/Stage Editor
- Selecting a Stage asset []
- Switching Stage []
- Changing Offset (via `Arrows`, `WASD`, or `Mouse Drag`) []
- Enabling/Disabling Ghost Animation []
+5 -5
View File
@@ -17,18 +17,18 @@ class ArgParser {
this.args = args;
this.options = new Map();
var copy = args.copy();
final copy = args.copy();
var i = 0;
while(copy.length > 0) {
var arg = copy.shift();
// this parses the -NAME=VALUE
if (arg.startsWith("-")) {
var key = arg.substr(1);
var isLongKey = key.startsWith("-");
final isLongKey = key.startsWith("-");
if (isLongKey) {
key = key.substr(1);
}
var split = key.split("=");
final split = key.split("=");
var longName = split.shift();
if(!isLongKey) {
// Allow -ABC to be parsed as -A -B -C
@@ -43,8 +43,8 @@ class ArgParser {
// Parse the last option with value support
}
var name = rename(longName);
var value = (split.length > 0) ? split.join("=") : null;
final name = rename(longName);
final value = (split.length > 0) ? split.join("=") : null;
options.set(name, value);
args.splice(i, 1);
+23 -5
View File
@@ -49,7 +49,8 @@ class Main {
"If you want a full build which contains all assets, run \"cne release\" or \"cne test-release\"",
"Additional arguments will be sent to the lime compiler.",
"",
"-debug : Builds a debug build."
"-debug : Builds a debug build.",
"-clean : Compiled files will be deleted before compiling."
].join("\n")
},
{
@@ -67,7 +68,20 @@ class Main {
"If you want a full build which contains all assets, run \"cne release\" or \"cne test-release\"",
"Additional arguments will be sent to the lime compiler.",
"",
"-debug : Builds a debug build."
"-debug : Builds a debug build.",
"-clean : Compiled files will be deleted before compiling."
].join("\n")
},
{
names: ["run"],
doc: "Runs the last build that was created.",
func: Compiler.run,
dDoc: [
"Usage: run <optional arguments>",
"",
"This will run the last build that was created.",
"If the last build was a debug build, you need to pass the -debug argument to run it.",
"Additional arguments will be sent to the lime compiler."
].join("\n")
},
{
@@ -79,7 +93,9 @@ class Main {
"",
"This will create and run a final ready-for-release build,",
"which means this build will be able to be release on websites such as GameBanana without worrying about source-dependant stuff.",
"Additional arguments will be sent to the lime compiler."
"Additional arguments will be sent to the lime compiler.",
"",
"-clean : Compiled files will be deleted before compiling."
].join("\n")
},
{
@@ -91,7 +107,9 @@ class Main {
"",
"This will create and run a final ready-for-release build,",
"which means this build will be able to be release on websites such as GameBanana without worrying about source-dependant stuff.",
"Additional arguments will be sent to the lime compiler."
"Additional arguments will be sent to the lime compiler.",
"",
"-clean : Compiled files will be deleted before compiling."
].join("\n")
},
{
@@ -113,7 +131,7 @@ class Main {
public static function main() {
initCommands();
var args = Sys.args();
final args = Sys.args();
var commandName = args.shift();
if (commandName != null)
commandName = commandName.toLowerCase();
+5 -5
View File
@@ -17,11 +17,11 @@ class Utils {
condition = condition.replace('&&', '&').replace('||', '|').replace(" ", "");
var stack:Array<Dynamic> = [];
final stack:Array<Dynamic> = [];
var i = 0;
while (i < condition.length) {
var char = condition.charAt(i);
final char = condition.charAt(i);
switch (char) {
case '(':
@@ -32,7 +32,7 @@ class Utils {
if (condition.charAt(j) == '(') balance++;
if (condition.charAt(j) == ')') balance--;
}
var subExpr = condition.substr(i + 1, j - i - 1);
final subExpr = condition.substr(i + 1, j - i - 1);
stack.push(evaluateArgsCondition(subExpr, args));
i = j;
case '&', '|':
@@ -55,8 +55,8 @@ class Utils {
public static function evaluate(stack:Array<Dynamic>):Bool {
var result = stack.shift();
while (stack.length > 0) {
var op = stack.shift();
var next = stack.shift();
final op = stack.shift();
final next = stack.shift();
switch(op) {
case '&':
result = result && next;
+12 -7
View File
@@ -2,21 +2,26 @@ package commands;
class Compiler {
public static function test(args:Array<String>) {
__build(args, ["test", getBuildTarget(), "-DTEST_BUILD"]);
__runLime(args, ["test", getBuildTarget(), "-DTEST_BUILD"]);
}
public static function build(args:Array<String>) {
__build(args, ["build", getBuildTarget(), "-DTEST_BUILD"]);
__runLime(args, ["build", getBuildTarget(), "-DTEST_BUILD"]);
}
public static function release(args:Array<String>) {
__build(args, ["build", getBuildTarget()]);
__runLime(args, ["build", getBuildTarget()]);
}
public static function testRelease(args:Array<String>) {
__build(args, ["test", getBuildTarget()]);
__runLime(args, ["test", getBuildTarget()]);
}
public static function run(args:Array<String>) {
__runLime(args, ["run", getBuildTarget()]);
}
private static function __build(args:Array<String>, arg:Array<String>) {
for (a in args) arg.push(a);
arg = ['run', 'lime'].concat(arg);
private static function __runLime(args:Array<String>, arg:Array<String>) {
arg.insert(0, "lime");
arg.insert(0, "run");
for(a in args)
arg.push(a);
Sys.command("haxelib", arg);
}
+4 -4
View File
@@ -4,17 +4,17 @@ import sys.io.File;
class Optimizer {
public static function main(args:Array<String>) {
var args = ArgParser.parse(args);
var saveOld = args.existsOption("no-old");
final args = ArgParser.parse(args);
final saveOld = !args.existsOption("no-old");
if(args.length == 0) {
Sys.println(Main.curCommand.dDoc);
return;
}
var filename = args.get(0);
final filename = args.get(0);
var data = File.getContent(filename);
final data = File.getContent(filename);
var json = null;
try {
json = haxe.Json.parse(data);
+36 -34
View File
@@ -44,6 +44,7 @@ class Setup {
var REINSTALL_ALL = args.existsOption("reinstall");
var SILENT = args.existsOption("silent-progress");
var FAST = args.existsOption("fast");
// TODO: add only install missing libs
// to prevent messing with currently installed libs
if (!FileSystem.exists('.haxelib'))
@@ -67,13 +68,13 @@ class Setup {
return;
}
var events:Array<Event> = [];
var libsXML:Access = new Access(Xml.parse(File.getContent(libFile)).firstElement());
final events:Array<Event> = [];
final libsXML:Access = new Access(Xml.parse(File.getContent(libFile)).firstElement());
function handleLib(libNode:Access) {
switch(libNode.name) {
case "lib" | "git":
var lib:Library = {
final lib:Library = {
name: libNode.att.name,
type: libNode.name,
skipDeps: libNode.has.skipDeps ? libNode.att.skipDeps == "true" : false,
@@ -122,15 +123,16 @@ class Setup {
}
}
var platform = switch(Sys.systemName()) {
final platform = switch(Sys.systemName()) {
case "Windows": "windows";
case "Mac": "mac";
case "Linux": "linux";
case def: def.toLowerCase();
}
var defines = args.args.copy();
final defines = args.args.copy();
defines.push(platform);
defines.push("true");
if(args.args.length == 0) defines.push("all");
function parse(libNode:Access) {
@@ -148,6 +150,8 @@ class Setup {
}
}
final shouldCheckHaxeVersion = !libsXML.has.checkVersion || Utils.evaluateArgsCondition(libsXML.att.checkVersion, defines);
for (libNode in libsXML.elements) {
parse(libNode);
}
@@ -199,10 +203,10 @@ class Setup {
}
var oldCwd = Sys.getCwd();
if(lib != null) {
var libPrefix = '.haxelib/$lib';
final libPrefix = '.haxelib/$lib';
if(FileSystem.exists(libPrefix)) {
if(FileSystem.exists(libPrefix + '/.dev')) { // haxelib dev
var devPath = File.getContent(libPrefix + '/.dev');
final devPath = File.getContent(libPrefix + '/.dev');
if(!FileSystem.exists(devPath)) {
Sys.println('Cannot find dev path $devPath for $lib');
Sys.setCwd(oldCwd);
@@ -210,7 +214,7 @@ class Setup {
}
Sys.setCwd(devPath + dir);
} else if(FileSystem.exists(libPrefix + '/.current')) {
var version = StringTools.replace(File.getContent(libPrefix + '/.current'), ".", ",");
final version = StringTools.replace(File.getContent(libPrefix + '/.current'), ".", ",");
if(!FileSystem.exists(libPrefix + '/$version')) {
Sys.println('Cannot find version $version of $lib');
Sys.setCwd(oldCwd);
@@ -225,13 +229,13 @@ class Setup {
}
}
for(line in cmd.lines) {
var line = StringTools.replace(line, "$PLATFORM", platform);
final line = StringTools.replace(line, "$PLATFORM", platform);
//Sys.println(line);
command(line);
}
Sys.setCwd(oldCwd);
case PRINT:
var data:PrintData = event.data;
final data:PrintData = event.data;
if(data.pretty)
prettyPrint(data.text);
else
@@ -239,30 +243,28 @@ class Setup {
}
}
/*var proc = new Process('haxe --version');
proc.exitCode(true);
var haxeVer = proc.stdout.readLine();
if (haxeVer != "4.2.5") {
if(shouldCheckHaxeVersion) {
final proc = new Process('haxe --version');
proc.exitCode(true);
final haxeVer = proc.stdout.readLine();
// check for outdated haxe
var curHaxeVer = [for(v in haxeVer.split(".")) Std.parseInt(v)];
var requiredHaxeVer = [4, 2, 5];
for(i in 0...requiredHaxeVer.length) {
if (curHaxeVer[i] < requiredHaxeVer[i]) {
prettyPrint("!! WARNING !!");
Sys.println("Your current Haxe version is outdated.");
Sys.println('You\'re using ${haxeVer}, while the required version is 4.2.5.');
Sys.println('The engine may not compile with your current version of Haxe.');
Sys.println('We recommend upgrading to 4.2.5');
break;
} else if (curHaxeVer[i] > requiredHaxeVer[i]) {
prettyPrint("!! WARNING !!"
+ "\nUsing Haxe 4.3.0 and above is currently not recommended due to lack of testing.");
Sys.println('');
Sys.println('We recommend downgrading back to 4.2.5.');
final curHaxeVer = [for(v in haxeVer.split(".")) Std.parseInt(v)];
final minumumVersion = [4, 2, 5];
for(i in 0...minumumVersion.length) {
if (curHaxeVer[i] > minumumVersion[i]) break;
if (curHaxeVer[i] < minumumVersion[i]) {
prettyPrint([
"!! WARNING !!",
"Your current Haxe version is outdated.",
'You\'re using ${haxeVer}, whilst the required version is 4.2.5 or newer.',
'The engine may not compile with your current version of Haxe.',
'We recommend upgrading to 4.2.5 or newer'
].join("\n"));
break;
}
}
}*/
}
// vswhere.exe its used to find any visual studio related installations on the system, including full visual studio ide installations, visual studio build tools installations, and other related components - Nex
if (CHECK_VSTUDIO && Compiler.getBuildTarget().toLowerCase() == "windows" && new Process('"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe" -property catalog_productDisplayVersion').exitCode(true) == 1) {
@@ -280,7 +282,7 @@ class Setup {
}
public static function prettyPrint(text:String) {
var lines = text.split("\n");
final lines = text.split("\n");
var length = -1;
for(line in lines)
if(line.length > length)
@@ -298,9 +300,9 @@ class Setup {
public static function centerText(text:String, width:Int):String {
var centerOffset = (width - text.length) / 2;
var left = repeat(' ', Math.floor(centerOffset));
var right = repeat(' ', Math.ceil(centerOffset));
final centerOffset = (width - text.length) / 2;
final left = repeat(' ', Math.floor(centerOffset));
final right = repeat(' ', Math.ceil(centerOffset));
return left + text + right;
}
+3 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<libraries>
<libraries checkVersion="update || all">
<if cond="update || all">
<print pretty="true">Preparing installation...</print>
@@ -16,6 +16,7 @@
<git name="hscript-improved" url="https://github.com/CodenameCrew/hscript-improved" ref="codename-dev" />
<git name="flxanimate" url="https://github.com/CodenameCrew/cne-flxanimate" />
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" skipDeps="true" />
<git name="funkin-modchart" url="https://github.com/TheoDevelops/FunkinModchart" skipDeps="true" />
<lib name="hxvlc" version="1.9.3" skipDeps="true" />
<!-- Documentation and other features -->
@@ -24,6 +25,7 @@
<git name="grig.audio" url="https://gitlab.com/haxe-grig/grig.audio.git" ref="57f5d47f2533fd0c3dcd025a86cb86c0dfa0b6d2" />
<!-- <lib name="dox" /> -->
<lib name="markdown" />
<lib name="hxcpp-debug-server" />
<lib name="nape-haxe4" />
+25 -9
View File
@@ -28,7 +28,7 @@
<!-- ____________________________ Window Settings ___________________________ -->
<!--These window settings apply to all targets-->
<window width="1280" height="720" fps="" background="#000000" hardware="true" vsync="false" />
<window width="1280" height="720" background="#000000" hardware="true" vsync="false" />
<!--HTML5-specific-->
<window if="html5" resizable="true" />
@@ -109,19 +109,25 @@
<!-- Comment this out to disable Discord RPC !-->
<section if="cpp">
<define name="DISCORD_RPC" if="desktop"/>
<!-- <define name="DISCORD_RPC" if="desktop"/> -->
</section>
<!-- Uncomment this to achive faster compile times, will strip extraneous and commonly unused features. -->
<define name="STRIPPED_COMPILE" unless="debug"/>
<!-- Comment this out to disable modcharting features -->
<define name="MODCHARTING_FEATURES" unless="STRIPPED_COMPILE" />
<!-- Comment this out to disable GitHub API integration !-->
<define name="GITHUB_API" unless="web || hl"/>
<!-- Comment this out to prevent unused classes from being compiled.
Reduces compilation time at the cost of limited HScript flexibility. !-->
<define name="COMPILE_ALL_CLASSES" />
<define name="COMPILE_ALL_CLASSES" unless="STRIPPED_COMPILE" />
<!-- Comment this out to prevent extending classes in hscript.
Reduces compilation time at the cost of limited HScript flexibility. !-->
<define name="CUSTOM_CLASSES" />
<define name="CUSTOM_CLASSES" unless="STRIPPED_COMPILE" />
<!-- Comment this out to disable multithreading !-->
<haxedef name="ALLOW_MULTITHREADING" unless="web || flash" />
@@ -142,13 +148,13 @@
<haxedef name="NDLLS_SUPPORTED" unless="web || iphonesim || hl" />
<!-- Comment this out to disable support for Away3D Flixel Integration (reduces compile times) !-->
<define name="THREE_D_SUPPORT" />
<define name="THREE_D_SUPPORT" unless="STRIPPED_COMPILE" />
<!-- Comment this out to disable support for Funkin Audio Visualizer (reduces compile times) !-->
<define name="AUDIO_VIS_SUPPORT" />
<define name="AUDIO_VIS_SUPPORT" unless="STRIPPED_COMPILE" />
<!-- Comment this out to disable support for Nape integration (flixel.addons.nape) (reduces compile times) !-->
<define name="NAPE_ENABLED" />
<define name="NAPE_ENABLED" unless="STRIPPED_COMPILE" />
<!-- Comment this out to disable video cutscene support, in case of compilation errors. !-->
<section if="cpp">
@@ -173,8 +179,6 @@
<haxedef name="SOFTCODED_CLASSES" if="SOFTCODED_CLASSES" />
<haxedef name="openfl_dpi_aware" if="openfl_dpi_aware" />
<haxedef name="EXPERIMENTAL_FLXGRAPHIC_DESTROY_FIX" />
<!-- _______________________________ Libraries ______________________________ -->
<!-- KEEP BOTH OF THESE AS THERE ARE SOME PARTICULAR CASES! -->
@@ -198,9 +202,18 @@
<haxelib name="hscript-improved" />
<haxelib name="hxdiscord_rpc" if="DISCORD_RPC"/>
<haxelib name="markdown" />
<haxelib name="hxcpp-debug-server" if="TEST_BUILD debug" />
<!-- _________________________________ Additional stuff _______________________________ -->
<section if="MODCHARTING_FEATURES">
<haxedef name="FM_ENGINE" value="CODENAME"/>
<haxedef name="FM_ENGINE_VERSION" value="1.0"/>
<haxelib name="funkin-modchart" />
<haxeflag name="--macro" value="modchart.backend.macros.Macro.includeFiles()"/>
</section>
<section if="COMPILE_ALL_CLASSES">
<haxeflag name="-dce" value="no" />
<haxeflag name="--macro" value="funkin.backend.system.macros.Macros.addAdditionalClasses()" />
@@ -217,4 +230,7 @@
<haxedef name="HXCPP_CATCH_SEGV" />
<haxedef name="hscriptPos" /> <!-- for logging -->
<!-- EXPERMENTAL FEATURES -->
<haxedef name="EXPERIMENTAL_FLXGRAPHIC_DESTROY_FIX" />
</project>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<libraries>
<libraries checkVersion="false">
<if cond="time-fix">
<print pretty="true">Switching to branch 'time-fix'...</print>
<!-- <cmd inLib="lime" cmd="git checkout time-fix" /> -->
+16 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<libraries>
<libraries checkVersion="false">
<print pretty="true">Setting up dev libs...</print>
<cmd>
@@ -94,5 +94,20 @@
</cmd>
</if>
<if cond="ne_eo">
<!-- Ignore this its only for Ne_Eo -->
<cmd>
<line>haxelib dev lime ../../lime</line>
<line>haxelib dev openfl ../../openfl</line>
<line>haxelib dev flixel ../../flixel</line>
<line>haxelib dev flixel-addons ../../flixel-addons</line>
<line>haxelib dev hscript-improved ../../hscript-improved</line>
<line>haxelib dev flxanimate ../../flxanimate</line>
<!-- <line>haxelib dev hxdiscord_rpc ../../hxdiscord_rpc</line> -->
<line>haxelib dev away3d ../../away3d</line>
<line>haxelib dev hxcpp ../../../hxcpp</line>
</cmd>
</if>
<print pretty="true">Setup for dev libs complete!</print>
</libraries>
+12
View File
@@ -0,0 +1,12 @@
package external;
#if (mac && cpp)
@:build(external.LinkerMacro.xml('external_code.xml'))
@:include('Mac.h')
@:native('ExternalMac')
extern class ExternalMac
{
@:native('ExternalMac::setCursorIcon')
public static function setCursorIcon(icon:Int, customCursor:cpp.ConstCharStar, customX:Single, customY:Single):Bool;
}
#end
+40
View File
@@ -0,0 +1,40 @@
package external;
import haxe.io.Path;
import haxe.macro.Expr;
import haxe.macro.Context;
import haxe.xml.Printer;
import sys.FileSystem;
class LinkerMacro
{
public static macro function xml(filename:String = 'Build.xml'):Array<Field>
{
var pos:Position = Context.currentPos();
var sourcePath:String = Path.directory(Context.getPosInfos(pos).file);
if (!Path.isAbsolute(sourcePath))
sourcePath = FileSystem.absolutePath(sourcePath);
sourcePath = Path.removeTrailingSlashes(Path.normalize(sourcePath));
var includeElement:Xml = Xml.createElement('include');
includeElement.set('name', Path.join([sourcePath, filename]));
@:privateAccess
{
var printer:Printer = new Printer(true);
printer.writeNode(includeElement, '\n');
Context.getLocalClass().get().meta.add(':buildXml', [{
expr: EConst(CString(printer.output.toString())),
pos: pos
}], pos);
}
return Context.getBuildFields();
}
}
+32
View File
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<pragma once="true" />
<files id="haxe">
<compilerflag value="-I${this_dir}/include/mac" if="macos" />
</files>
<files id="__main__">
<compilerflag value="-I${this_dir}/include/mac" if="macos" />
</files>
<files id="external-code">
<section if="macos">
<compilerflag value="-I${this_dir}/include/mac" />
<file name="${this_dir}/src/mac/CursorHelper.mm" />
<file name="${this_dir}/src/mac/Mac.mm" />
</section>
</files>
<target id="haxe">
<section if="macos">
<vflag name="-framework" value="IOKit" />
<vflag name="-framework" value="AppKit" />
<vflag name="-framework" value="Cocoa" />
<vflag name="-framework" value="Foundation" />
</section>
<files id="external-code" />
</target>
</xml>
+7
View File
@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
@interface CursorHelper : NSObject
+ (NSCursor *)getCursorForSelector:(SEL)selector defaultCursor:(NSCursor *)defaultCursor;
@end
+13
View File
@@ -0,0 +1,13 @@
#ifndef MAC_H
#define MAC_H
#if defined(__APPLE__)
namespace ExternalMac
{
bool setCursorIcon(int icon, const char *customCursor, float customX, float customY);
}
#endif
#endif
+24
View File
@@ -0,0 +1,24 @@
#import <Cocoa/Cocoa.h>
#import "CursorHelper.h"
@implementation CursorHelper
+ (NSCursor *)getCursorForSelector:(SEL)selector defaultCursor:(NSCursor *)defaultCursor
{
NSCursor *cursor = nil;
if ([NSCursor respondsToSelector:selector])
{
cursor = [NSCursor performSelector:selector];
}
else
{
NSLog(@"CursorHelper: selector %@ not found", NSStringFromSelector(selector));
cursor = defaultCursor;
}
return cursor;
}
@end

Some files were not shown because too many files have changed in this diff Show More