Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Added locodeco, the location-maker-and-fixer-thinger
Browse files Browse the repository at this point in the history
  • Loading branch information
alirayl committed Jan 22, 2014
1 parent 028c6d1 commit 2ad533a
Show file tree
Hide file tree
Showing 72 changed files with 10,307 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -68,7 +68,9 @@ of their source files. Those projects, and their locations in this repository, a
* SWF deconstruction by Paul Sivtsov (`org/igorcosta`)
* Ronda Seven font by Yusuke Kamiyamane (`TSEngineAssets/src/assets/fonts`)
* Prisencolinensinainciusol by Adriano Celentano (`TSEngineAssets/src/assets/sounds`)

* GrahamScan by Schell Scivally (`locodeco/lib/src/locodeco/util/GrahamScan.as`)
* Convex Hull by Christopher Salvarani (`locodeco/lib/src/locodeco/util/GrahamScan2.as`)
* Apache's Flex (`locodeco/swf/libs`)

Some files from the original repo have been removed due to their restrictive licensing:

Expand Down
60 changes: 60 additions & 0 deletions locodeco/lib/.actionScriptProperties
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="LocoDeco.as" projectUUID="cbac3278-39b7-4f86-8294-7bcc34a38379" version="10">
<compiler
additionalCompilerArguments="-locale en_US&#10;-incremental"
autoRSLOrdering="true"
copyDependentFiles="false"
flexSDK="Flex 4.5.1"
fteInMXComponents="false"
generateAccessible="false"
htmlExpressInstall="true"
htmlGenerate="false"
htmlHistoryManagement="false"
htmlPlayerVersionCheck="true"
includeNetmonSwc="false"
outputFolderPath="bin"
removeUnusedRSL="true"
sourceFolderPath="src"
strict="true"
targetPlayerVersion="0.0.0"
useApolloConfig="false"
useDebugRSLSwfs="true"
verifyDigests="true"
warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
<libraryPathEntry applicationDomain="default" forceLoad="false" index="4" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/sparkskins.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/sparkskins_4.1.0.16076.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="sparkskins_4.1.0.16076.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry applicationDomain="default" forceLoad="false" index="5" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/rpc_4.1.0.16076.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="rpc_4.1.0.16076.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" useDefaultLinkType="false"/>
<libraryPathEntry applicationDomain="default" forceLoad="false" index="2" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/osmf.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/osmf_flex.4.0.0.13495.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="osmf_flex.4.0.0.13495.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flash-integration.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/utilities.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
<libraryPathEntry kind="1" linkType="1" path="lib"/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications/>
<modules/>
<buildCSSFiles/>
<flashCatalyst validateFlashCatalystCompatibility="false"/>
</actionScriptProperties>
33 changes: 33 additions & 0 deletions locodeco/lib/.flexLibProperties
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexLibProperties includeAllClasses="true" useMultiPlatformConfig="false" version="3">
<includeClasses>
<classEntry path="locodeco.models.ColorModel"/>
<classEntry path="locodeco.MiscPanel"/>
<classEntry path="locodeco.LayerPanel"/>
<classEntry path="locodeco.DecoPanel"/>
<classEntry path="locodeco.models.LayerModel"/>
<classEntry path="locodeco.util.TSIDGen"/>
<classEntry path="locodeco.components.EditableLabel"/>
<classEntry path="locodeco.components.LabeledHSlider"/>
<classEntry path="locodeco.components.LocoDecoList"/>
<classEntry path="locodeco.renderers.LayerItemRenderer"/>
<classEntry path="locodeco.skins.NoLabelCheckboxSkin"/>
<classEntry path="locodeco.skins.LabeledSliderSkin"/>
<classEntry path="locodeco.skins.ListSkin"/>
<classEntry path="locodeco.skins.PanelSkin"/>
<classEntry path="unused.ResettableArrayList"/>
<classEntry path="locodeco.components.LocoDecoScroller"/>
<classEntry path="locodeco.skins.MaintainAspectRatioSkin"/>
<classEntry path="locodeco.util.GrahamScan"/>
<classEntry path="locodeco.util.FramerateTracker"/>
<classEntry path="locodeco.models.DoorModel"/>
<classEntry path="locodeco.models.PlatformModel"/>
<classEntry path="locodeco.models.WallModel"/>
<classEntry path="locodeco.models.BoxModel"/>
<classEntry path="locodeco.models.LadderModel"/>
<classEntry path="locodeco.models.SignPostModel"/>
<classEntry path="locodeco.models.DecoModelTypes"/>
</includeClasses>
<includeResources/>
<namespaceManifests/>
</flexLibProperties>
18 changes: 18 additions & 0 deletions locodeco/lib/.project
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>LocoDeco</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.adobe.flexbuilder.project.flexbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.adobe.flexbuilder.project.flexlibnature</nature>
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
</natures>
</projectDescription>
3 changes: 3 additions & 0 deletions locodeco/lib/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
#Tue Aug 31 20:37:08 PDT 2010
eclipse.preferences.version=1
encoding/<project>=utf-8
Binary file added locodeco/lib/assets/add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/link.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/link.psd
Binary file not shown.
Binary file added locodeco/lib/assets/link_disabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/link_selected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/link_selected_disabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/remove.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/remove_disabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added locodeco/lib/assets/zero.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions locodeco/lib/src/locodeco/DecoPanel.mxml
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:components="locodeco.components.*"
width="100%" height="100%"
tabChildren="false" tabEnabled="false"
creationComplete="creationComplete(event)">

<fx:Script>
<![CDATA[
import locodeco.models.DecoModel;
import locodeco.models.LayerModel;
import mx.events.FlexEvent;
import mx.events.PropertyChangeEvent;
import spark.events.IndexChangeEvent;
[Bindable] public var layerModels:LayerModel;
protected function resetDecoModelState(event:IndexChangeEvent):void {
// don't allow selection of hidden DecoModels
if ((event.newIndex != -1) && !DecoModel(decoList.dataProvider.getItemAt(event.newIndex)).visible) {
event.preventDefault();
}
}
protected function removeDeco(event:MouseEvent):void {
const dm:DecoModel = DecoModel(decoList.selectedItem);
layerModels.decos.removeItemAt(layerModels.decos.getItemIndex(dm));
}
private function selectedDecoMaybeChanged(pce:PropertyChangeEvent):void {
if (pce.property == 'selectedDeco') {
decoList.selectedItem = pce.newValue;
}
}
private function creationComplete(event:FlexEvent):void {
LocoDecoGlobals.instance.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, selectedDecoMaybeChanged);
}
]]>
</fx:Script>

<s:Panel title="Decos"
width="100%" height="100%"
dropShadowVisible="false"
skinClass="locodeco.skins.PanelSkin">

<!-- HACK: the valueCommit handler runs after the selection has changed programmatically.
It uses callLater; it RTEs without it. C'est la vie. -->
<components:LocoDecoList id="decoList"
dataProvider="{layerModels.decos}"
change="{LocoDecoGlobals.instance.selectedDeco = decoList.selectedItem;}"
valueCommit="{callLater(decoList.scrollToSelectedIndex)}"
changing="resetDecoModelState(event)"
width="100%" height="100%"
dragEnabled="true"
dropEnabled="true"
dragMoveEnabled="true"
focusEnabled="false"
borderVisible="false"
itemRenderer="locodeco.renderers.DecoItemRenderer"
skinClass="locodeco.skins.ListSkin"/>

</s:Panel>

<s:VGroup x="4" bottom="5" tabChildren="false">
<mx:Button
click="removeDeco(event)"
toolTip="Remove Deco"
enabled="{decoList.selectedItem}"
skin="@Embed('../../assets/remove.png')"
disabledSkin="@Embed('../../assets/remove_disabled.png')"
useHandCursor="true" buttonMode="true"/>

</s:VGroup>
</s:Group>

0 comments on commit 2ad533a

Please sign in to comment.