diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9305435 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +bin/*.app + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + + diff --git a/DroidSansMono.ttf b/DroidSansMono.ttf new file mode 100755 index 0000000..d604425 Binary files /dev/null and b/DroidSansMono.ttf differ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6421c90 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,22 @@ +**openFrameworks** is distributed under the [MIT License](https://en.wikipedia.org/wiki/MIT_License). This gives everyone the freedoms to use openFrameworks in any context: commercial or non-commercial, public or private, open or closed source. + +--- + +Copyright (c) 2004 - openFrameworks Community + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +openFrameworks also ships with a mix of the following [libraries](docs/libraries.md), depending on your platform, which may have different licenses. + +* [OpenGL](http://www.opengl.org/), [GLEW](http://glew.sourceforge.net/), [GLUT](http://www.opengl.org/resources/libraries/glut/), [libtess2](https://code.google.com/p/libtess2/) and [cairo](http://cairographics.org/) for graphics +* [rtAudio](http://www.music.mcgill.ca/~gary/rtaudio/), [PortAudio](http://www.portaudio.com/) or [FMOD](http://www.fmod.org/) and [Kiss FFT](http://kissfft.sourceforge.net/) for audio input, output and analysis +* [FreeType](http://freetype.sourceforge.net/index2.html) for fonts +* [FreeImage](http://freeimage.sourceforge.net/) for image saving and loading +* [Quicktime](http://developer.apple.com/quicktime/), [Unicap](http://unicap-imaging.org/), [GStreamer](http://gstreamer.freedesktop.org/) and [videoInput](https://github.com/ofTheo/videoInput) for video playback and grabbing +* [Poco](http://pocoproject.org/) for a variety of utilities \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7a7fe8b --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=../../.. +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/Project.xcconfig b/Project.xcconfig new file mode 100644 index 0000000..c90f7b1 --- /dev/null +++ b/Project.xcconfig @@ -0,0 +1,17 @@ +//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. +//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED +OF_PATH = ../../.. + +//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE +#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" + +//ICONS - NEW IN 0072 +ICON_NAME_DEBUG = icon-debug.icns +ICON_NAME_RELEASE = icon.icns +ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ + +//IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: +//ICON_FILE_PATH = bin/data/ + +OTHER_LDFLAGS = $(OF_CORE_LIBS) +HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) diff --git a/README.md b/README.md new file mode 100644 index 0000000..7909a09 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Cyril - Live Coding + +The Cyril programming language is designed for fast prototyping of visualisations and live coding visuals. + +Full information on the website: + + * http://cyrilcode.com + +## Requirements + +Cyril is built against version 0.8.0 of openFrameworks + + * http://www.openframeworks.cc/download/ + +It also depends on two (non-core) ofx Addons: + + * https://github.com/darrenmothersele/ofxBeat + * https://github.com/darrenmothersele/ofxEditor + diff --git a/addons.make b/addons.make new file mode 100644 index 0000000..7dc5f6a --- /dev/null +++ b/addons.make @@ -0,0 +1,5 @@ +ofxGui +ofxOsc +ofxXmlSettings +ofxBeat +ofxEditor diff --git a/bin/data/.gitkeep b/bin/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config.make b/config.make new file mode 100644 index 0000000..df10f64 --- /dev/null +++ b/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +# OF_ROOT = ../../.. + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/cyril-logo.icns b/cyril-logo.icns new file mode 100644 index 0000000..ccde065 Binary files /dev/null and b/cyril-logo.icns differ diff --git a/cyril.xcodeproj/project.pbxproj b/cyril.xcodeproj/project.pbxproj new file mode 100644 index 0000000..081605e --- /dev/null +++ b/cyril.xcodeproj/project.pbxproj @@ -0,0 +1,1347 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0546D1A38E13BD319CC9755B /* OscReceivedElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BF3AA0D4FAA89D0F8A0E545 /* OscReceivedElements.cpp */; }; + 1CD33E884D9E3358252E82A1 /* ofxToggle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 907C5B5E104864A2D3A25745 /* ofxToggle.cpp */; }; + 28090DEB5109115003E8F1C5 /* UdpSocketWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5928AA323F5C2690B06C837D /* UdpSocketWin.cpp */; }; + 483908258D00B98B4BE69F07 /* ofxLabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78D67A00EB899FAC09430597 /* ofxLabel.cpp */; }; + 4ADB88E2FB52E76A471065DE /* ofxOscParameterSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0AED834CE4DEC5260AF302A2 /* ofxOscParameterSync.cpp */; }; + 4D55A1D856671CE3DBA02837 /* EditorBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF888D896F884FDE4A208960 /* EditorBuffer.cpp */; }; + 510CAFE035E576A4E1502D52 /* UdpSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E6DEF695B88BA5FAACEAA937 /* UdpSocket.cpp */; }; + 5864AD82E20F15536D054EA3 /* ofxOscMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF49D76C45D5DB505A234880 /* ofxOscMessage.cpp */; }; + 5A4349E9754D6FA14C0F2A3A /* tinyxmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FC5DA1C87211D4F6377DA719 /* tinyxmlparser.cpp */; }; + 5CBB2AB3A60F65431D7B555D /* ofxButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C88333E71C9457E441C33474 /* ofxButton.cpp */; }; + 62545D179C94265CA1389D4A /* OscOutboundPacketStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63A47AC60FFAFC3BF093EC0F /* OscOutboundPacketStream.cpp */; }; + 63B57AC5BF4EF088491E0317 /* ofxXmlSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50DF87D612C5AAE17AAFA6C0 /* ofxXmlSettings.cpp */; }; + 640279EE111671BD026CB013 /* ofxOscReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2FAC65C491D4231379F3298 /* ofxOscReceiver.cpp */; }; + 67FE4C7B15C2F0478C8126C2 /* NetworkingUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B361208CD4107E479F04E7B /* NetworkingUtils.cpp */; }; + 72A929D3561B8232A182ABFC /* ofxOscBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65EEFA3DA3526E9CDD9C21F9 /* ofxOscBundle.cpp */; }; + 837220E80EB56CD44AD27F2A /* ofxSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15F2C6477A769C03A56D1401 /* ofxSlider.cpp */; }; + 856AA354D08AB4B323081444 /* ofxBaseGui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9604B925D32EE39065747725 /* ofxBaseGui.cpp */; }; + 879A251454401BC0B6E4F238 /* OscTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9BFFBBF4CC43DEE890B3C3E /* OscTypes.cpp */; }; + 8F5205AEF8861EF234F0651A /* ofxOscSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81967292BFC87A0144BD32C6 /* ofxOscSender.cpp */; }; + 933A2227713C720CEFF80FD9 /* tinyxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B40EDA85BEB63E46785BC29 /* tinyxml.cpp */; }; + 9512D4B9183D1F110078256D /* Cyril.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D43F183D1F100078256D /* Cyril.cpp */; }; + 9512D4BA183D1F110078256D /* cyril.lpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D441183D1F100078256D /* cyril.lpp */; }; + 9512D4BB183D1F110078256D /* cyril.ypp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D442183D1F100078256D /* cyril.ypp */; }; + 9512D4BC183D1F110078256D /* CyrilOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D443183D1F100078256D /* CyrilOp.cpp */; }; + 9512D4BD183D1F110078256D /* CyrilParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D445183D1F100078256D /* CyrilParser.cpp */; }; + 9512D4BE183D1F110078256D /* CyrilState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D447183D1F100078256D /* CyrilState.cpp */; }; + 9512D4BF183D1F110078256D /* CyrilCosFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D44A183D1F100078256D /* CyrilCosFun.cpp */; }; + 9512D4C0183D1F110078256D /* CyrilFftFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D44C183D1F100078256D /* CyrilFftFun.cpp */; }; + 9512D4C1183D1F110078256D /* CyrilFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D44E183D1F100078256D /* CyrilFun.cpp */; }; + 9512D4C2183D1F110078256D /* CyrilHsbFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D450183D1F100078256D /* CyrilHsbFun.cpp */; }; + 9512D4C3183D1F110078256D /* CyrilLerpFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D452183D1F100078256D /* CyrilLerpFun.cpp */; }; + 9512D4C4183D1F110078256D /* CyrilMapFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D454183D1F100078256D /* CyrilMapFun.cpp */; }; + 9512D4C5183D1F110078256D /* CyrilNoiseFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D456183D1F100078256D /* CyrilNoiseFun.cpp */; }; + 9512D4C6183D1F110078256D /* CyrilPaletteFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D458183D1F100078256D /* CyrilPaletteFun.cpp */; }; + 9512D4C7183D1F110078256D /* CyrilRandFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D45A183D1F100078256D /* CyrilRandFun.cpp */; }; + 9512D4C8183D1F110078256D /* CyrilSinFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D45C183D1F100078256D /* CyrilSinFun.cpp */; }; + 9512D4C9183D1F110078256D /* CyrilTanFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D45E183D1F100078256D /* CyrilTanFun.cpp */; }; + 9512D4CA183D1F110078256D /* CyrilWaveFun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D460183D1F100078256D /* CyrilWaveFun.cpp */; }; + 9512D4CB183D1F110078256D /* CyrilColorLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D464183D1F100078256D /* CyrilColorLoad.cpp */; }; + 9512D4CC183D1F110078256D /* CyrilDebugOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D466183D1F100078256D /* CyrilDebugOp.cpp */; }; + 9512D4CD183D1F110078256D /* CyrilAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D473183D1F100078256D /* CyrilAnimation.cpp */; }; + 9512D4CE183D1F110078256D /* CyrilAnimStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D475183D1F100078256D /* CyrilAnimStep.cpp */; }; + 9512D4CF183D1F110078256D /* CyrilBackgroundOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D477183D1F100078256D /* CyrilBackgroundOp.cpp */; }; + 9512D4D0183D1F110078256D /* CyrilBallDetailOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D479183D1F100078256D /* CyrilBallDetailOp.cpp */; }; + 9512D4D1183D1F110078256D /* CyrilBallOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D47B183D1F100078256D /* CyrilBallOp.cpp */; }; + 9512D4D2183D1F110078256D /* CyrilBlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D47E183D1F100078256D /* CyrilBlink.cpp */; }; + 9512D4D3183D1F110078256D /* CyrilBoxOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D480183D1F100078256D /* CyrilBoxOp.cpp */; }; + 9512D4D4183D1F110078256D /* CyrilColorOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D482183D1F100078256D /* CyrilColorOp.cpp */; }; + 9512D4D5183D1F110078256D /* CyrilConeOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D484183D1F100078256D /* CyrilConeOp.cpp */; }; + 9512D4D6183D1F110078256D /* CyrilFillOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D486183D1F100078256D /* CyrilFillOp.cpp */; }; + 9512D4D7183D1F110078256D /* CyrilGridOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D488183D1F100078256D /* CyrilGridOp.cpp */; }; + 9512D4D8183D1F110078256D /* CyrilImgOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D48A183D1F100078256D /* CyrilImgOp.cpp */; }; + 9512D4D9183D1F110078256D /* CyrilInitOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D48C183D1F100078256D /* CyrilInitOp.cpp */; }; + 9512D4DA183D1F110078256D /* CyrilLightOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D48E183D1F100078256D /* CyrilLightOp.cpp */; }; + 9512D4DB183D1F110078256D /* CyrilLineOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D490183D1F100078256D /* CyrilLineOp.cpp */; }; + 9512D4DC183D1F110078256D /* CyrilMoveOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D492183D1F100078256D /* CyrilMoveOp.cpp */; }; + 9512D4DD183D1F110078256D /* CyrilNoFillOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D494183D1F100078256D /* CyrilNoFillOp.cpp */; }; + 9512D4DE183D1F110078256D /* CyrilPalette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D496183D1F100078256D /* CyrilPalette.cpp */; }; + 9512D4DF183D1F110078256D /* CyrilPaletteItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D498183D1F100078256D /* CyrilPaletteItem.cpp */; }; + 9512D4E0183D1F110078256D /* CyrilParticle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D49A183D1F100078256D /* CyrilParticle.cpp */; }; + 9512D4E1183D1F110078256D /* CyrilPegOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D49C183D1F100078256D /* CyrilPegOp.cpp */; }; + 9512D4E2183D1F110078256D /* CyrilPopMatrixOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D49E183D1F100078256D /* CyrilPopMatrixOp.cpp */; }; + 9512D4E3183D1F110078256D /* CyrilPushMatrixOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4A0183D1F100078256D /* CyrilPushMatrixOp.cpp */; }; + 9512D4E4183D1F110078256D /* CyrilRectOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4A2183D1F100078256D /* CyrilRectOp.cpp */; }; + 9512D4E5183D1F110078256D /* CyrilRotateOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4A4183D1F100078256D /* CyrilRotateOp.cpp */; }; + 9512D4E6183D1F110078256D /* CyrilScaleOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4A6183D1F100078256D /* CyrilScaleOp.cpp */; }; + 9512D4E7183D1F110078256D /* CyrilShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4A8183D1F100078256D /* CyrilShape.cpp */; }; + 9512D4E8183D1F110078256D /* CyrilShapeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4AA183D1F100078256D /* CyrilShapeList.cpp */; }; + 9512D4E9183D1F110078256D /* CyrilSphereDetailOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4AC183D1F100078256D /* CyrilSphereDetailOp.cpp */; }; + 9512D4EA183D1F110078256D /* CyrilSphereOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4AE183D1F100078256D /* CyrilSphereOp.cpp */; }; + 9512D4EB183D1F110078256D /* CyrilTile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4B0183D1F110078256D /* CyrilTile.cpp */; }; + 9512D4EC183D1F110078256D /* cyrilApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4B2183D1F110078256D /* cyrilApp.cpp */; }; + 9512D4ED183D1F110078256D /* Palette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4B5183D1F110078256D /* Palette.cpp */; }; + 9512D4EE183D1F110078256D /* Particle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9512D4B7183D1F110078256D /* Particle.cpp */; }; + 9512D4F3183D23CA0078256D /* cyril-logo.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9512D4EF183D227A0078256D /* cyril-logo.icns */; }; + 9512D4F5183D23F70078256D /* DroidSansMono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9512D4F4183D23F70078256D /* DroidSansMono.ttf */; }; + 9D44DC88EF9E7991B4A09951 /* tinyxmlerror.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 832BDC407620CDBA568B713D /* tinyxmlerror.cpp */; }; + A29D8C96AE042ECEAA1BD4F3 /* NetworkingUtilsWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A5B1FAD3F30C8065C396ACB /* NetworkingUtilsWin.cpp */; }; + A86D7323CE1A9450906A91DD /* fft.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B85440CFD1540D81C05B85CB /* fft.cpp */; }; + ADE367465D2A8EBAD4C7A8D9 /* IpEndpointName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADD194746185E2DA11468377 /* IpEndpointName.cpp */; }; + B266578FC55D23BFEBC042E7 /* ofxGuiGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECF8674C7975F1063C5E30CA /* ofxGuiGroup.cpp */; }; + B56FE57CC35806596D38118C /* ofxSliderGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 802251BAF1B35B1D67B32FD0 /* ofxSliderGroup.cpp */; }; + BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; + C098DBE008A1B5C6D12ABFFD /* ofxBeat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6684F2AB3BF96EE746EF6DA /* ofxBeat.cpp */; }; + C4782ECC372420ACE0615B74 /* OscPrintReceivedElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8881B3C8C0A1C45F042E7A /* OscPrintReceivedElements.cpp */; }; + E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; + E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; + E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */; }; + E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E715D3B6510020DFD4 /* QTKit.framework */; }; + E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F985F515E0DE99003869B5 /* Accelerate.framework */; }; + EBE93261A021BCE7741047C3 /* ClipBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4D1B8F8AB0FA8340FD9FEA4 /* ClipBoard.cpp */; }; + F285EB3169F1566CA3D93C20 /* ofxPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E112B3AEBEA2C091BF2B40AE /* ofxPanel.cpp */; }; + F4862D2A81633EF0F84109F3 /* ofxEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15506D31F838751547E6C172 /* ofxEditor.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E4B27C1510CBEB8E00536013; + remoteInfo = openFrameworks; + }; + E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E4B27C1410CBEB8E00536013; + remoteInfo = openFrameworks; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E4C2427710CC5ABF004149E2 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 00D6D32B84B099226431108C /* ofxOsc.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOsc.h; path = ../../../addons/ofxOsc/src/ofxOsc.h; sourceTree = SOURCE_ROOT; }; + 01DCC0911400F9ACF5B65578 /* ofxXmlSettings.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxXmlSettings.h; path = ../../../addons/ofxXmlSettings/src/ofxXmlSettings.h; sourceTree = SOURCE_ROOT; }; + 029684CF678F70F6D3537A29 /* OscOutboundPacketStream.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscOutboundPacketStream.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscOutboundPacketStream.h; sourceTree = SOURCE_ROOT; }; + 07F5BBC6984E3865A3989DF0 /* ClipBoard.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ClipBoard.h; path = ../../../addons/ofxEditor/src/ClipBoard.h; sourceTree = SOURCE_ROOT; }; + 0A1DAC09F322AE313A40706D /* ofxToggle.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxToggle.h; path = ../../../addons/ofxGui/src/ofxToggle.h; sourceTree = SOURCE_ROOT; }; + 0AED834CE4DEC5260AF302A2 /* ofxOscParameterSync.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxOscParameterSync.cpp; path = ../../../addons/ofxOsc/src/ofxOscParameterSync.cpp; sourceTree = SOURCE_ROOT; }; + 15506D31F838751547E6C172 /* ofxEditor.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxEditor.cpp; path = ../../../addons/ofxEditor/src/ofxEditor.cpp; sourceTree = SOURCE_ROOT; }; + 15F2C6477A769C03A56D1401 /* ofxSlider.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxSlider.cpp; path = ../../../addons/ofxGui/src/ofxSlider.cpp; sourceTree = SOURCE_ROOT; }; + 17E65988300FBD9AAA2CD0CA /* ofxGui.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxGui.h; path = ../../../addons/ofxGui/src/ofxGui.h; sourceTree = SOURCE_ROOT; }; + 1C0DA2561397A7DE0246858B /* ofxGuiGroup.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxGuiGroup.h; path = ../../../addons/ofxGui/src/ofxGuiGroup.h; sourceTree = SOURCE_ROOT; }; + 20F35AFADAF0068B067E713F /* OscReceivedElements.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscReceivedElements.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscReceivedElements.h; sourceTree = SOURCE_ROOT; }; + 23640F57DF6C4BB6BFC5DA4C /* PacketListener.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = PacketListener.h; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/PacketListener.h; sourceTree = SOURCE_ROOT; }; + 270DBEB1F97702E1AB23CD28 /* ofxEditor.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxEditor.h; path = ../../../addons/ofxEditor/src/ofxEditor.h; sourceTree = SOURCE_ROOT; }; + 2834D88A62CD23F3DE2C47D1 /* ofxButton.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxButton.h; path = ../../../addons/ofxGui/src/ofxButton.h; sourceTree = SOURCE_ROOT; }; + 2A5B1FAD3F30C8065C396ACB /* NetworkingUtilsWin.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = NetworkingUtilsWin.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/win32/NetworkingUtilsWin.cpp; sourceTree = SOURCE_ROOT; }; + 2B40EDA85BEB63E46785BC29 /* tinyxml.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = tinyxml.cpp; path = ../../../addons/ofxXmlSettings/libs/tinyxml.cpp; sourceTree = SOURCE_ROOT; }; + 2FD4B0329909D3527F003494 /* UdpSocket.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = UdpSocket.h; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/UdpSocket.h; sourceTree = SOURCE_ROOT; }; + 3B361208CD4107E479F04E7B /* NetworkingUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = NetworkingUtils.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/posix/NetworkingUtils.cpp; sourceTree = SOURCE_ROOT; }; + 444657A12E59D0ED86981498 /* TimerListener.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = TimerListener.h; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/TimerListener.h; sourceTree = SOURCE_ROOT; }; + 48974F980F51769171D0B2F5 /* IpEndpointName.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = IpEndpointName.h; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/IpEndpointName.h; sourceTree = SOURCE_ROOT; }; + 4E95FB446A9C9C6F0DE12D75 /* OscPrintReceivedElements.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscPrintReceivedElements.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPrintReceivedElements.h; sourceTree = SOURCE_ROOT; }; + 4FA7C66BC39A49BCFA509386 /* fft.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = fft.h; path = ../../../addons/ofxBeat/src/fft.h; sourceTree = SOURCE_ROOT; }; + 50DF87D612C5AAE17AAFA6C0 /* ofxXmlSettings.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxXmlSettings.cpp; path = ../../../addons/ofxXmlSettings/src/ofxXmlSettings.cpp; sourceTree = SOURCE_ROOT; }; + 52AFA1F08C420992CAAAE648 /* ofxSlider.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxSlider.h; path = ../../../addons/ofxGui/src/ofxSlider.h; sourceTree = SOURCE_ROOT; }; + 5928AA323F5C2690B06C837D /* UdpSocketWin.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = UdpSocketWin.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/win32/UdpSocketWin.cpp; sourceTree = SOURCE_ROOT; }; + 63A47AC60FFAFC3BF093EC0F /* OscOutboundPacketStream.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = OscOutboundPacketStream.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscOutboundPacketStream.cpp; sourceTree = SOURCE_ROOT; }; + 65EEFA3DA3526E9CDD9C21F9 /* ofxOscBundle.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxOscBundle.cpp; path = ../../../addons/ofxOsc/src/ofxOscBundle.cpp; sourceTree = SOURCE_ROOT; }; + 6B65E6930994CC4B2D2B8B33 /* OscPacketListener.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscPacketListener.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPacketListener.h; sourceTree = SOURCE_ROOT; }; + 7689F8A0F3D0B7635A8C3104 /* ofxOscArg.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscArg.h; path = ../../../addons/ofxOsc/src/ofxOscArg.h; sourceTree = SOURCE_ROOT; }; + 78D67A00EB899FAC09430597 /* ofxLabel.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxLabel.cpp; path = ../../../addons/ofxGui/src/ofxLabel.cpp; sourceTree = SOURCE_ROOT; }; + 802251BAF1B35B1D67B32FD0 /* ofxSliderGroup.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxSliderGroup.cpp; path = ../../../addons/ofxGui/src/ofxSliderGroup.cpp; sourceTree = SOURCE_ROOT; }; + 81967292BFC87A0144BD32C6 /* ofxOscSender.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxOscSender.cpp; path = ../../../addons/ofxOsc/src/ofxOscSender.cpp; sourceTree = SOURCE_ROOT; }; + 832BDC407620CDBA568B713D /* tinyxmlerror.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = tinyxmlerror.cpp; path = ../../../addons/ofxXmlSettings/libs/tinyxmlerror.cpp; sourceTree = SOURCE_ROOT; }; + 87F26B4B24CBD428AD9EEBAA /* ofxBaseGui.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxBaseGui.h; path = ../../../addons/ofxGui/src/ofxBaseGui.h; sourceTree = SOURCE_ROOT; }; + 89449E3044D456F7DE7BEA14 /* ofxPanel.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxPanel.h; path = ../../../addons/ofxGui/src/ofxPanel.h; sourceTree = SOURCE_ROOT; }; + 8B30E93FD3D3475EED522A0E /* ofxOscBundle.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscBundle.h; path = ../../../addons/ofxOsc/src/ofxOscBundle.h; sourceTree = SOURCE_ROOT; }; + 8C75AFC8774A62495DD53464 /* ofxOscReceiver.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscReceiver.h; path = ../../../addons/ofxOsc/src/ofxOscReceiver.h; sourceTree = SOURCE_ROOT; }; + 8FD00523D49FCA9F566F320B /* EditorBuffer.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = EditorBuffer.h; path = ../../../addons/ofxEditor/src/EditorBuffer.h; sourceTree = SOURCE_ROOT; }; + 907C5B5E104864A2D3A25745 /* ofxToggle.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxToggle.cpp; path = ../../../addons/ofxGui/src/ofxToggle.cpp; sourceTree = SOURCE_ROOT; }; + 9512D43D183D1F100078256D /* cmds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cmds.h; sourceTree = ""; }; + 9512D43F183D1F100078256D /* Cyril.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cyril.cpp; sourceTree = ""; }; + 9512D440183D1F100078256D /* Cyril.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cyril.h; sourceTree = ""; }; + 9512D441183D1F100078256D /* cyril.lpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = cyril.lpp; sourceTree = ""; }; + 9512D442183D1F100078256D /* cyril.ypp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = cyril.ypp; sourceTree = ""; }; + 9512D443183D1F100078256D /* CyrilOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilOp.cpp; sourceTree = ""; }; + 9512D444183D1F100078256D /* CyrilOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilOp.h; sourceTree = ""; }; + 9512D445183D1F100078256D /* CyrilParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilParser.cpp; sourceTree = ""; }; + 9512D446183D1F100078256D /* CyrilParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilParser.h; sourceTree = ""; }; + 9512D447183D1F100078256D /* CyrilState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilState.cpp; sourceTree = ""; }; + 9512D448183D1F100078256D /* CyrilState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilState.h; sourceTree = ""; }; + 9512D44A183D1F100078256D /* CyrilCosFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilCosFun.cpp; sourceTree = ""; }; + 9512D44B183D1F100078256D /* CyrilCosFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilCosFun.h; sourceTree = ""; }; + 9512D44C183D1F100078256D /* CyrilFftFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilFftFun.cpp; sourceTree = ""; }; + 9512D44D183D1F100078256D /* CyrilFftFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilFftFun.h; sourceTree = ""; }; + 9512D44E183D1F100078256D /* CyrilFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilFun.cpp; sourceTree = ""; }; + 9512D44F183D1F100078256D /* CyrilFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilFun.h; sourceTree = ""; }; + 9512D450183D1F100078256D /* CyrilHsbFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilHsbFun.cpp; sourceTree = ""; }; + 9512D451183D1F100078256D /* CyrilHsbFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilHsbFun.h; sourceTree = ""; }; + 9512D452183D1F100078256D /* CyrilLerpFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilLerpFun.cpp; sourceTree = ""; }; + 9512D453183D1F100078256D /* CyrilLerpFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilLerpFun.h; sourceTree = ""; }; + 9512D454183D1F100078256D /* CyrilMapFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilMapFun.cpp; sourceTree = ""; }; + 9512D455183D1F100078256D /* CyrilMapFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilMapFun.h; sourceTree = ""; }; + 9512D456183D1F100078256D /* CyrilNoiseFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilNoiseFun.cpp; sourceTree = ""; }; + 9512D457183D1F100078256D /* CyrilNoiseFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilNoiseFun.h; sourceTree = ""; }; + 9512D458183D1F100078256D /* CyrilPaletteFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPaletteFun.cpp; sourceTree = ""; }; + 9512D459183D1F100078256D /* CyrilPaletteFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPaletteFun.h; sourceTree = ""; }; + 9512D45A183D1F100078256D /* CyrilRandFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilRandFun.cpp; sourceTree = ""; }; + 9512D45B183D1F100078256D /* CyrilRandFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilRandFun.h; sourceTree = ""; }; + 9512D45C183D1F100078256D /* CyrilSinFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilSinFun.cpp; sourceTree = ""; }; + 9512D45D183D1F100078256D /* CyrilSinFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilSinFun.h; sourceTree = ""; }; + 9512D45E183D1F100078256D /* CyrilTanFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilTanFun.cpp; sourceTree = ""; }; + 9512D45F183D1F100078256D /* CyrilTanFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilTanFun.h; sourceTree = ""; }; + 9512D460183D1F100078256D /* CyrilWaveFun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilWaveFun.cpp; sourceTree = ""; }; + 9512D461183D1F100078256D /* CyrilWaveFun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilWaveFun.h; sourceTree = ""; }; + 9512D463183D1F100078256D /* CyrilAssign.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilAssign.h; sourceTree = ""; }; + 9512D464183D1F100078256D /* CyrilColorLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilColorLoad.cpp; sourceTree = ""; }; + 9512D465183D1F100078256D /* CyrilColorLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilColorLoad.h; sourceTree = ""; }; + 9512D466183D1F100078256D /* CyrilDebugOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilDebugOp.cpp; sourceTree = ""; }; + 9512D467183D1F100078256D /* CyrilDebugOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilDebugOp.h; sourceTree = ""; }; + 9512D468183D1F100078256D /* CyrilDo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilDo.h; sourceTree = ""; }; + 9512D469183D1F100078256D /* CyrilFor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilFor.h; sourceTree = ""; }; + 9512D46A183D1F100078256D /* CyrilHexColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilHexColor.h; sourceTree = ""; }; + 9512D46B183D1F100078256D /* CyrilIf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilIf.h; sourceTree = ""; }; + 9512D46C183D1F100078256D /* CyrilList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilList.h; sourceTree = ""; }; + 9512D46D183D1F100078256D /* CyrilLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilLoad.h; sourceTree = ""; }; + 9512D46E183D1F100078256D /* CyrilNamedColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilNamedColor.h; sourceTree = ""; }; + 9512D46F183D1F100078256D /* CyrilPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPush.h; sourceTree = ""; }; + 9512D470183D1F100078256D /* CyrilUnaryOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilUnaryOp.h; sourceTree = ""; }; + 9512D471183D1F100078256D /* CyrilWhile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilWhile.h; sourceTree = ""; }; + 9512D473183D1F100078256D /* CyrilAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilAnimation.cpp; sourceTree = ""; }; + 9512D474183D1F100078256D /* CyrilAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilAnimation.h; sourceTree = ""; }; + 9512D475183D1F100078256D /* CyrilAnimStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilAnimStep.cpp; sourceTree = ""; }; + 9512D476183D1F100078256D /* CyrilAnimStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilAnimStep.h; sourceTree = ""; }; + 9512D477183D1F100078256D /* CyrilBackgroundOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilBackgroundOp.cpp; sourceTree = ""; }; + 9512D478183D1F100078256D /* CyrilBackgroundOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBackgroundOp.h; sourceTree = ""; }; + 9512D479183D1F100078256D /* CyrilBallDetailOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilBallDetailOp.cpp; sourceTree = ""; }; + 9512D47A183D1F100078256D /* CyrilBallDetailOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBallDetailOp.h; sourceTree = ""; }; + 9512D47B183D1F100078256D /* CyrilBallOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilBallOp.cpp; sourceTree = ""; }; + 9512D47C183D1F100078256D /* CyrilBallOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBallOp.h; sourceTree = ""; }; + 9512D47D183D1F100078256D /* CyrilBinaryOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBinaryOp.h; sourceTree = ""; }; + 9512D47E183D1F100078256D /* CyrilBlink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilBlink.cpp; sourceTree = ""; }; + 9512D47F183D1F100078256D /* CyrilBlink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBlink.h; sourceTree = ""; }; + 9512D480183D1F100078256D /* CyrilBoxOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilBoxOp.cpp; sourceTree = ""; }; + 9512D481183D1F100078256D /* CyrilBoxOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilBoxOp.h; sourceTree = ""; }; + 9512D482183D1F100078256D /* CyrilColorOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilColorOp.cpp; sourceTree = ""; }; + 9512D483183D1F100078256D /* CyrilColorOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilColorOp.h; sourceTree = ""; }; + 9512D484183D1F100078256D /* CyrilConeOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilConeOp.cpp; sourceTree = ""; }; + 9512D485183D1F100078256D /* CyrilConeOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilConeOp.h; sourceTree = ""; }; + 9512D486183D1F100078256D /* CyrilFillOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilFillOp.cpp; sourceTree = ""; }; + 9512D487183D1F100078256D /* CyrilFillOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilFillOp.h; sourceTree = ""; }; + 9512D488183D1F100078256D /* CyrilGridOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilGridOp.cpp; sourceTree = ""; }; + 9512D489183D1F100078256D /* CyrilGridOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilGridOp.h; sourceTree = ""; }; + 9512D48A183D1F100078256D /* CyrilImgOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilImgOp.cpp; sourceTree = ""; }; + 9512D48B183D1F100078256D /* CyrilImgOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilImgOp.h; sourceTree = ""; }; + 9512D48C183D1F100078256D /* CyrilInitOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilInitOp.cpp; sourceTree = ""; }; + 9512D48D183D1F100078256D /* CyrilInitOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilInitOp.h; sourceTree = ""; }; + 9512D48E183D1F100078256D /* CyrilLightOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilLightOp.cpp; sourceTree = ""; }; + 9512D48F183D1F100078256D /* CyrilLightOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilLightOp.h; sourceTree = ""; }; + 9512D490183D1F100078256D /* CyrilLineOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilLineOp.cpp; sourceTree = ""; }; + 9512D491183D1F100078256D /* CyrilLineOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilLineOp.h; sourceTree = ""; }; + 9512D492183D1F100078256D /* CyrilMoveOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilMoveOp.cpp; sourceTree = ""; }; + 9512D493183D1F100078256D /* CyrilMoveOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilMoveOp.h; sourceTree = ""; }; + 9512D494183D1F100078256D /* CyrilNoFillOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilNoFillOp.cpp; sourceTree = ""; }; + 9512D495183D1F100078256D /* CyrilNoFillOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilNoFillOp.h; sourceTree = ""; }; + 9512D496183D1F100078256D /* CyrilPalette.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPalette.cpp; sourceTree = ""; }; + 9512D497183D1F100078256D /* CyrilPalette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPalette.h; sourceTree = ""; }; + 9512D498183D1F100078256D /* CyrilPaletteItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPaletteItem.cpp; sourceTree = ""; }; + 9512D499183D1F100078256D /* CyrilPaletteItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPaletteItem.h; sourceTree = ""; }; + 9512D49A183D1F100078256D /* CyrilParticle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilParticle.cpp; sourceTree = ""; }; + 9512D49B183D1F100078256D /* CyrilParticle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilParticle.h; sourceTree = ""; }; + 9512D49C183D1F100078256D /* CyrilPegOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPegOp.cpp; sourceTree = ""; }; + 9512D49D183D1F100078256D /* CyrilPegOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPegOp.h; sourceTree = ""; }; + 9512D49E183D1F100078256D /* CyrilPopMatrixOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPopMatrixOp.cpp; sourceTree = ""; }; + 9512D49F183D1F100078256D /* CyrilPopMatrixOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPopMatrixOp.h; sourceTree = ""; }; + 9512D4A0183D1F100078256D /* CyrilPushMatrixOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilPushMatrixOp.cpp; sourceTree = ""; }; + 9512D4A1183D1F100078256D /* CyrilPushMatrixOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilPushMatrixOp.h; sourceTree = ""; }; + 9512D4A2183D1F100078256D /* CyrilRectOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilRectOp.cpp; sourceTree = ""; }; + 9512D4A3183D1F100078256D /* CyrilRectOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilRectOp.h; sourceTree = ""; }; + 9512D4A4183D1F100078256D /* CyrilRotateOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilRotateOp.cpp; sourceTree = ""; }; + 9512D4A5183D1F100078256D /* CyrilRotateOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilRotateOp.h; sourceTree = ""; }; + 9512D4A6183D1F100078256D /* CyrilScaleOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilScaleOp.cpp; sourceTree = ""; }; + 9512D4A7183D1F100078256D /* CyrilScaleOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilScaleOp.h; sourceTree = ""; }; + 9512D4A8183D1F100078256D /* CyrilShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilShape.cpp; sourceTree = ""; }; + 9512D4A9183D1F100078256D /* CyrilShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilShape.h; sourceTree = ""; }; + 9512D4AA183D1F100078256D /* CyrilShapeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilShapeList.cpp; sourceTree = ""; }; + 9512D4AB183D1F100078256D /* CyrilShapeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilShapeList.h; sourceTree = ""; }; + 9512D4AC183D1F100078256D /* CyrilSphereDetailOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilSphereDetailOp.cpp; sourceTree = ""; }; + 9512D4AD183D1F100078256D /* CyrilSphereDetailOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilSphereDetailOp.h; sourceTree = ""; }; + 9512D4AE183D1F100078256D /* CyrilSphereOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilSphereOp.cpp; sourceTree = ""; }; + 9512D4AF183D1F100078256D /* CyrilSphereOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilSphereOp.h; sourceTree = ""; }; + 9512D4B0183D1F110078256D /* CyrilTile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CyrilTile.cpp; sourceTree = ""; }; + 9512D4B1183D1F110078256D /* CyrilTile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CyrilTile.h; sourceTree = ""; }; + 9512D4B2183D1F110078256D /* cyrilApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cyrilApp.cpp; sourceTree = ""; }; + 9512D4B3183D1F110078256D /* cyrilApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cyrilApp.h; sourceTree = ""; }; + 9512D4B5183D1F110078256D /* Palette.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Palette.cpp; sourceTree = ""; }; + 9512D4B6183D1F110078256D /* Palette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Palette.h; sourceTree = ""; }; + 9512D4B7183D1F110078256D /* Particle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Particle.cpp; sourceTree = ""; }; + 9512D4B8183D1F110078256D /* Particle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Particle.h; sourceTree = ""; }; + 9512D4EF183D227A0078256D /* cyril-logo.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "cyril-logo.icns"; sourceTree = ""; }; + 9512D4F4183D23F70078256D /* DroidSansMono.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = DroidSansMono.ttf; sourceTree = ""; }; + 9604B925D32EE39065747725 /* ofxBaseGui.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxBaseGui.cpp; path = ../../../addons/ofxGui/src/ofxBaseGui.cpp; sourceTree = SOURCE_ROOT; }; + 9BF3AA0D4FAA89D0F8A0E545 /* OscReceivedElements.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = OscReceivedElements.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscReceivedElements.cpp; sourceTree = SOURCE_ROOT; }; + 9F7986DC4EB05E75FCE2C777 /* ofxOscSender.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscSender.h; path = ../../../addons/ofxOsc/src/ofxOscSender.h; sourceTree = SOURCE_ROOT; }; + A2AAA8CA403479E6FCDF920E /* OscHostEndianness.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscHostEndianness.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscHostEndianness.h; sourceTree = SOURCE_ROOT; }; + ADD194746185E2DA11468377 /* IpEndpointName.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = IpEndpointName.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/IpEndpointName.cpp; sourceTree = SOURCE_ROOT; }; + AE335EB4709BFD4671EEAC84 /* MessageMappingOscPacketListener.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = MessageMappingOscPacketListener.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/MessageMappingOscPacketListener.h; sourceTree = SOURCE_ROOT; }; + B21E7E5F548EEA92F368040B /* tinyxml.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = tinyxml.h; path = ../../../addons/ofxXmlSettings/libs/tinyxml.h; sourceTree = SOURCE_ROOT; }; + B31C608870ECEB2490A93736 /* ofxOscParameterSync.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscParameterSync.h; path = ../../../addons/ofxOsc/src/ofxOscParameterSync.h; sourceTree = SOURCE_ROOT; }; + B85440CFD1540D81C05B85CB /* fft.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = fft.cpp; path = ../../../addons/ofxBeat/src/fft.cpp; sourceTree = SOURCE_ROOT; }; + B87C60311EC1FE841C1ECD89 /* ofxLabel.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxLabel.h; path = ../../../addons/ofxGui/src/ofxLabel.h; sourceTree = SOURCE_ROOT; }; + BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = ""; }; + BC8881B3C8C0A1C45F042E7A /* OscPrintReceivedElements.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = OscPrintReceivedElements.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscPrintReceivedElements.cpp; sourceTree = SOURCE_ROOT; }; + C2FAC65C491D4231379F3298 /* ofxOscReceiver.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxOscReceiver.cpp; path = ../../../addons/ofxOsc/src/ofxOscReceiver.cpp; sourceTree = SOURCE_ROOT; }; + C58862C6D212C8E8A83810F4 /* ofxOscMessage.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxOscMessage.h; path = ../../../addons/ofxOsc/src/ofxOscMessage.h; sourceTree = SOURCE_ROOT; }; + C6684F2AB3BF96EE746EF6DA /* ofxBeat.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxBeat.cpp; path = ../../../addons/ofxBeat/src/ofxBeat.cpp; sourceTree = SOURCE_ROOT; }; + C6937888E126BADC8777423B /* OscTypes.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscTypes.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscTypes.h; sourceTree = SOURCE_ROOT; }; + C70D8946940288799E82131E /* ofxSliderGroup.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxSliderGroup.h; path = ../../../addons/ofxGui/src/ofxSliderGroup.h; sourceTree = SOURCE_ROOT; }; + C88333E71C9457E441C33474 /* ofxButton.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxButton.cpp; path = ../../../addons/ofxGui/src/ofxButton.cpp; sourceTree = SOURCE_ROOT; }; + D4D1B8F8AB0FA8340FD9FEA4 /* ClipBoard.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ClipBoard.cpp; path = ../../../addons/ofxEditor/src/ClipBoard.cpp; sourceTree = SOURCE_ROOT; }; + D9BFFBBF4CC43DEE890B3C3E /* OscTypes.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = OscTypes.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscTypes.cpp; sourceTree = SOURCE_ROOT; }; + DF49D76C45D5DB505A234880 /* ofxOscMessage.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxOscMessage.cpp; path = ../../../addons/ofxOsc/src/ofxOscMessage.cpp; sourceTree = SOURCE_ROOT; }; + DF888D896F884FDE4A208960 /* EditorBuffer.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = EditorBuffer.cpp; path = ../../../addons/ofxEditor/src/EditorBuffer.cpp; sourceTree = SOURCE_ROOT; }; + E112B3AEBEA2C091BF2B40AE /* ofxPanel.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxPanel.cpp; path = ../../../addons/ofxGui/src/ofxPanel.cpp; sourceTree = SOURCE_ROOT; }; + E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; + E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; + E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; + E4B69B5B0A3A1756003C02F2 /* cyrilDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = cyrilDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; + E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; + E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; + E6DEF695B88BA5FAACEAA937 /* UdpSocket.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = UdpSocket.cpp; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp; sourceTree = SOURCE_ROOT; }; + E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; + E7E077E715D3B6510020DFD4 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; + E7F985F515E0DE99003869B5 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = ""; }; + ECF8674C7975F1063C5E30CA /* ofxGuiGroup.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxGuiGroup.cpp; path = ../../../addons/ofxGui/src/ofxGuiGroup.cpp; sourceTree = SOURCE_ROOT; }; + F21017D5316CB2B55CD68641 /* ofxBeat.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxBeat.h; path = ../../../addons/ofxBeat/src/ofxBeat.h; sourceTree = SOURCE_ROOT; }; + F4F5B6B8BA2BD52C646ED908 /* OscException.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = OscException.h; path = ../../../addons/ofxOsc/libs/oscpack/src/osc/OscException.h; sourceTree = SOURCE_ROOT; }; + F7FBC56859535E597B24BB91 /* NetworkingUtils.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = NetworkingUtils.h; path = ../../../addons/ofxOsc/libs/oscpack/src/ip/NetworkingUtils.h; sourceTree = SOURCE_ROOT; }; + FC5DA1C87211D4F6377DA719 /* tinyxmlparser.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = tinyxmlparser.cpp; path = ../../../addons/ofxXmlSettings/libs/tinyxmlparser.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E4B69B590A3A1756003C02F2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */, + E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */, + E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */, + E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */, + E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, + E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, + E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, + E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, + E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, + E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, + E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, + E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, + E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, + E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, + E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, + E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, + E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1F4FB5C423662B96ADFDCC0B /* ofxXmlSettings */ = { + isa = PBXGroup; + children = ( + 6ECEF0D76BC33727823EADFF /* src */, + 6E54289412D2D94F45A05113 /* libs */, + ); + name = ofxXmlSettings; + sourceTree = ""; + }; + 2593B7743D30DF6DEB591433 /* src */ = { + isa = PBXGroup; + children = ( + B85440CFD1540D81C05B85CB /* fft.cpp */, + 4FA7C66BC39A49BCFA509386 /* fft.h */, + C6684F2AB3BF96EE746EF6DA /* ofxBeat.cpp */, + F21017D5316CB2B55CD68641 /* ofxBeat.h */, + ); + name = src; + sourceTree = ""; + }; + 30CB364908817057B430D528 /* osc */ = { + isa = PBXGroup; + children = ( + AE335EB4709BFD4671EEAC84 /* MessageMappingOscPacketListener.h */, + F4F5B6B8BA2BD52C646ED908 /* OscException.h */, + A2AAA8CA403479E6FCDF920E /* OscHostEndianness.h */, + 63A47AC60FFAFC3BF093EC0F /* OscOutboundPacketStream.cpp */, + 029684CF678F70F6D3537A29 /* OscOutboundPacketStream.h */, + 6B65E6930994CC4B2D2B8B33 /* OscPacketListener.h */, + BC8881B3C8C0A1C45F042E7A /* OscPrintReceivedElements.cpp */, + 4E95FB446A9C9C6F0DE12D75 /* OscPrintReceivedElements.h */, + 9BF3AA0D4FAA89D0F8A0E545 /* OscReceivedElements.cpp */, + 20F35AFADAF0068B067E713F /* OscReceivedElements.h */, + D9BFFBBF4CC43DEE890B3C3E /* OscTypes.cpp */, + C6937888E126BADC8777423B /* OscTypes.h */, + ); + name = osc; + sourceTree = ""; + }; + 38871A5825686AE018EC2BF0 /* libs */ = { + isa = PBXGroup; + children = ( + 86D2677079A3AF4A5A88E29A /* oscpack */, + ); + name = libs; + sourceTree = ""; + }; + 480A780D8D0308AE4A368801 /* ofxGui */ = { + isa = PBXGroup; + children = ( + A763ED608B35AE3310251DEE /* src */, + ); + name = ofxGui; + sourceTree = ""; + }; + 5B3BFE89BB3B98E8FC2F783F /* ofxBeat */ = { + isa = PBXGroup; + children = ( + 2593B7743D30DF6DEB591433 /* src */, + ); + name = ofxBeat; + sourceTree = ""; + }; + 641362CA659FAFEE4E81001B /* posix */ = { + isa = PBXGroup; + children = ( + 3B361208CD4107E479F04E7B /* NetworkingUtils.cpp */, + E6DEF695B88BA5FAACEAA937 /* UdpSocket.cpp */, + ); + name = posix; + sourceTree = ""; + }; + 65F22A83F37ADFACD17F2C64 /* src */ = { + isa = PBXGroup; + children = ( + D4D1B8F8AB0FA8340FD9FEA4 /* ClipBoard.cpp */, + 07F5BBC6984E3865A3989DF0 /* ClipBoard.h */, + DF888D896F884FDE4A208960 /* EditorBuffer.cpp */, + 8FD00523D49FCA9F566F320B /* EditorBuffer.h */, + 15506D31F838751547E6C172 /* ofxEditor.cpp */, + 270DBEB1F97702E1AB23CD28 /* ofxEditor.h */, + ); + name = src; + sourceTree = ""; + }; + 6E54289412D2D94F45A05113 /* libs */ = { + isa = PBXGroup; + children = ( + 2B40EDA85BEB63E46785BC29 /* tinyxml.cpp */, + B21E7E5F548EEA92F368040B /* tinyxml.h */, + 832BDC407620CDBA568B713D /* tinyxmlerror.cpp */, + FC5DA1C87211D4F6377DA719 /* tinyxmlparser.cpp */, + ); + name = libs; + sourceTree = ""; + }; + 6ECEF0D76BC33727823EADFF /* src */ = { + isa = PBXGroup; + children = ( + 50DF87D612C5AAE17AAFA6C0 /* ofxXmlSettings.cpp */, + 01DCC0911400F9ACF5B65578 /* ofxXmlSettings.h */, + ); + name = src; + sourceTree = ""; + }; + 7BAB0180DD1CCBF5B4ACD466 /* ofxEditor */ = { + isa = PBXGroup; + children = ( + 65F22A83F37ADFACD17F2C64 /* src */, + ); + name = ofxEditor; + sourceTree = ""; + }; + 86D2677079A3AF4A5A88E29A /* oscpack */ = { + isa = PBXGroup; + children = ( + D27B2221A225CA523C019676 /* src */, + ); + name = oscpack; + sourceTree = ""; + }; + 9512D43E183D1F100078256D /* Cyril */ = { + isa = PBXGroup; + children = ( + 9512D43F183D1F100078256D /* Cyril.cpp */, + 9512D440183D1F100078256D /* Cyril.h */, + 9512D441183D1F100078256D /* cyril.lpp */, + 9512D442183D1F100078256D /* cyril.ypp */, + 9512D443183D1F100078256D /* CyrilOp.cpp */, + 9512D444183D1F100078256D /* CyrilOp.h */, + 9512D445183D1F100078256D /* CyrilParser.cpp */, + 9512D446183D1F100078256D /* CyrilParser.h */, + 9512D447183D1F100078256D /* CyrilState.cpp */, + 9512D448183D1F100078256D /* CyrilState.h */, + 9512D449183D1F100078256D /* Funs */, + 9512D462183D1F100078256D /* Lang */, + 9512D472183D1F100078256D /* Ops */, + ); + path = Cyril; + sourceTree = ""; + }; + 9512D449183D1F100078256D /* Funs */ = { + isa = PBXGroup; + children = ( + 9512D44A183D1F100078256D /* CyrilCosFun.cpp */, + 9512D44B183D1F100078256D /* CyrilCosFun.h */, + 9512D44C183D1F100078256D /* CyrilFftFun.cpp */, + 9512D44D183D1F100078256D /* CyrilFftFun.h */, + 9512D44E183D1F100078256D /* CyrilFun.cpp */, + 9512D44F183D1F100078256D /* CyrilFun.h */, + 9512D450183D1F100078256D /* CyrilHsbFun.cpp */, + 9512D451183D1F100078256D /* CyrilHsbFun.h */, + 9512D452183D1F100078256D /* CyrilLerpFun.cpp */, + 9512D453183D1F100078256D /* CyrilLerpFun.h */, + 9512D454183D1F100078256D /* CyrilMapFun.cpp */, + 9512D455183D1F100078256D /* CyrilMapFun.h */, + 9512D456183D1F100078256D /* CyrilNoiseFun.cpp */, + 9512D457183D1F100078256D /* CyrilNoiseFun.h */, + 9512D458183D1F100078256D /* CyrilPaletteFun.cpp */, + 9512D459183D1F100078256D /* CyrilPaletteFun.h */, + 9512D45A183D1F100078256D /* CyrilRandFun.cpp */, + 9512D45B183D1F100078256D /* CyrilRandFun.h */, + 9512D45C183D1F100078256D /* CyrilSinFun.cpp */, + 9512D45D183D1F100078256D /* CyrilSinFun.h */, + 9512D45E183D1F100078256D /* CyrilTanFun.cpp */, + 9512D45F183D1F100078256D /* CyrilTanFun.h */, + 9512D460183D1F100078256D /* CyrilWaveFun.cpp */, + 9512D461183D1F100078256D /* CyrilWaveFun.h */, + ); + path = Funs; + sourceTree = ""; + }; + 9512D462183D1F100078256D /* Lang */ = { + isa = PBXGroup; + children = ( + 9512D463183D1F100078256D /* CyrilAssign.h */, + 9512D464183D1F100078256D /* CyrilColorLoad.cpp */, + 9512D465183D1F100078256D /* CyrilColorLoad.h */, + 9512D466183D1F100078256D /* CyrilDebugOp.cpp */, + 9512D467183D1F100078256D /* CyrilDebugOp.h */, + 9512D468183D1F100078256D /* CyrilDo.h */, + 9512D469183D1F100078256D /* CyrilFor.h */, + 9512D46A183D1F100078256D /* CyrilHexColor.h */, + 9512D46B183D1F100078256D /* CyrilIf.h */, + 9512D46C183D1F100078256D /* CyrilList.h */, + 9512D46D183D1F100078256D /* CyrilLoad.h */, + 9512D46E183D1F100078256D /* CyrilNamedColor.h */, + 9512D46F183D1F100078256D /* CyrilPush.h */, + 9512D470183D1F100078256D /* CyrilUnaryOp.h */, + 9512D471183D1F100078256D /* CyrilWhile.h */, + ); + path = Lang; + sourceTree = ""; + }; + 9512D472183D1F100078256D /* Ops */ = { + isa = PBXGroup; + children = ( + 9512D473183D1F100078256D /* CyrilAnimation.cpp */, + 9512D474183D1F100078256D /* CyrilAnimation.h */, + 9512D475183D1F100078256D /* CyrilAnimStep.cpp */, + 9512D476183D1F100078256D /* CyrilAnimStep.h */, + 9512D477183D1F100078256D /* CyrilBackgroundOp.cpp */, + 9512D478183D1F100078256D /* CyrilBackgroundOp.h */, + 9512D479183D1F100078256D /* CyrilBallDetailOp.cpp */, + 9512D47A183D1F100078256D /* CyrilBallDetailOp.h */, + 9512D47B183D1F100078256D /* CyrilBallOp.cpp */, + 9512D47C183D1F100078256D /* CyrilBallOp.h */, + 9512D47D183D1F100078256D /* CyrilBinaryOp.h */, + 9512D47E183D1F100078256D /* CyrilBlink.cpp */, + 9512D47F183D1F100078256D /* CyrilBlink.h */, + 9512D480183D1F100078256D /* CyrilBoxOp.cpp */, + 9512D481183D1F100078256D /* CyrilBoxOp.h */, + 9512D482183D1F100078256D /* CyrilColorOp.cpp */, + 9512D483183D1F100078256D /* CyrilColorOp.h */, + 9512D484183D1F100078256D /* CyrilConeOp.cpp */, + 9512D485183D1F100078256D /* CyrilConeOp.h */, + 9512D486183D1F100078256D /* CyrilFillOp.cpp */, + 9512D487183D1F100078256D /* CyrilFillOp.h */, + 9512D488183D1F100078256D /* CyrilGridOp.cpp */, + 9512D489183D1F100078256D /* CyrilGridOp.h */, + 9512D48A183D1F100078256D /* CyrilImgOp.cpp */, + 9512D48B183D1F100078256D /* CyrilImgOp.h */, + 9512D48C183D1F100078256D /* CyrilInitOp.cpp */, + 9512D48D183D1F100078256D /* CyrilInitOp.h */, + 9512D48E183D1F100078256D /* CyrilLightOp.cpp */, + 9512D48F183D1F100078256D /* CyrilLightOp.h */, + 9512D490183D1F100078256D /* CyrilLineOp.cpp */, + 9512D491183D1F100078256D /* CyrilLineOp.h */, + 9512D492183D1F100078256D /* CyrilMoveOp.cpp */, + 9512D493183D1F100078256D /* CyrilMoveOp.h */, + 9512D494183D1F100078256D /* CyrilNoFillOp.cpp */, + 9512D495183D1F100078256D /* CyrilNoFillOp.h */, + 9512D496183D1F100078256D /* CyrilPalette.cpp */, + 9512D497183D1F100078256D /* CyrilPalette.h */, + 9512D498183D1F100078256D /* CyrilPaletteItem.cpp */, + 9512D499183D1F100078256D /* CyrilPaletteItem.h */, + 9512D49A183D1F100078256D /* CyrilParticle.cpp */, + 9512D49B183D1F100078256D /* CyrilParticle.h */, + 9512D49C183D1F100078256D /* CyrilPegOp.cpp */, + 9512D49D183D1F100078256D /* CyrilPegOp.h */, + 9512D49E183D1F100078256D /* CyrilPopMatrixOp.cpp */, + 9512D49F183D1F100078256D /* CyrilPopMatrixOp.h */, + 9512D4A0183D1F100078256D /* CyrilPushMatrixOp.cpp */, + 9512D4A1183D1F100078256D /* CyrilPushMatrixOp.h */, + 9512D4A2183D1F100078256D /* CyrilRectOp.cpp */, + 9512D4A3183D1F100078256D /* CyrilRectOp.h */, + 9512D4A4183D1F100078256D /* CyrilRotateOp.cpp */, + 9512D4A5183D1F100078256D /* CyrilRotateOp.h */, + 9512D4A6183D1F100078256D /* CyrilScaleOp.cpp */, + 9512D4A7183D1F100078256D /* CyrilScaleOp.h */, + 9512D4A8183D1F100078256D /* CyrilShape.cpp */, + 9512D4A9183D1F100078256D /* CyrilShape.h */, + 9512D4AA183D1F100078256D /* CyrilShapeList.cpp */, + 9512D4AB183D1F100078256D /* CyrilShapeList.h */, + 9512D4AC183D1F100078256D /* CyrilSphereDetailOp.cpp */, + 9512D4AD183D1F100078256D /* CyrilSphereDetailOp.h */, + 9512D4AE183D1F100078256D /* CyrilSphereOp.cpp */, + 9512D4AF183D1F100078256D /* CyrilSphereOp.h */, + 9512D4B0183D1F110078256D /* CyrilTile.cpp */, + 9512D4B1183D1F110078256D /* CyrilTile.h */, + ); + path = Ops; + sourceTree = ""; + }; + 9512D4B4183D1F110078256D /* Engine */ = { + isa = PBXGroup; + children = ( + 9512D4B5183D1F110078256D /* Palette.cpp */, + 9512D4B6183D1F110078256D /* Palette.h */, + 9512D4B7183D1F110078256D /* Particle.cpp */, + 9512D4B8183D1F110078256D /* Particle.h */, + ); + path = Engine; + sourceTree = ""; + }; + 9512D4F1183D23160078256D /* Resources */ = { + isa = PBXGroup; + children = ( + 9512D4F4183D23F70078256D /* DroidSansMono.ttf */, + 9512D4EF183D227A0078256D /* cyril-logo.icns */, + ); + name = Resources; + sourceTree = ""; + }; + A763ED608B35AE3310251DEE /* src */ = { + isa = PBXGroup; + children = ( + 9604B925D32EE39065747725 /* ofxBaseGui.cpp */, + 87F26B4B24CBD428AD9EEBAA /* ofxBaseGui.h */, + C88333E71C9457E441C33474 /* ofxButton.cpp */, + 2834D88A62CD23F3DE2C47D1 /* ofxButton.h */, + 17E65988300FBD9AAA2CD0CA /* ofxGui.h */, + ECF8674C7975F1063C5E30CA /* ofxGuiGroup.cpp */, + 1C0DA2561397A7DE0246858B /* ofxGuiGroup.h */, + 78D67A00EB899FAC09430597 /* ofxLabel.cpp */, + B87C60311EC1FE841C1ECD89 /* ofxLabel.h */, + E112B3AEBEA2C091BF2B40AE /* ofxPanel.cpp */, + 89449E3044D456F7DE7BEA14 /* ofxPanel.h */, + 15F2C6477A769C03A56D1401 /* ofxSlider.cpp */, + 52AFA1F08C420992CAAAE648 /* ofxSlider.h */, + 802251BAF1B35B1D67B32FD0 /* ofxSliderGroup.cpp */, + C70D8946940288799E82131E /* ofxSliderGroup.h */, + 907C5B5E104864A2D3A25745 /* ofxToggle.cpp */, + 0A1DAC09F322AE313A40706D /* ofxToggle.h */, + ); + name = src; + sourceTree = ""; + }; + BA6760AC87647DD61A92BD41 /* win32 */ = { + isa = PBXGroup; + children = ( + 2A5B1FAD3F30C8065C396ACB /* NetworkingUtilsWin.cpp */, + 5928AA323F5C2690B06C837D /* UdpSocketWin.cpp */, + ); + name = win32; + sourceTree = ""; + }; + BB4B014C10F69532006C3DED /* addons */ = { + isa = PBXGroup; + children = ( + 480A780D8D0308AE4A368801 /* ofxGui */, + E6053AB7FEC63D5F83825B88 /* ofxOsc */, + 1F4FB5C423662B96ADFDCC0B /* ofxXmlSettings */, + 5B3BFE89BB3B98E8FC2F783F /* ofxBeat */, + 7BAB0180DD1CCBF5B4ACD466 /* ofxEditor */, + ); + name = addons; + sourceTree = ""; + }; + BBAB23C913894ECA00AA2426 /* system frameworks */ = { + isa = PBXGroup; + children = ( + E7F985F515E0DE99003869B5 /* Accelerate.framework */, + E4C2424410CC5A17004149E2 /* AppKit.framework */, + E4C2424510CC5A17004149E2 /* Cocoa.framework */, + E4C2424610CC5A17004149E2 /* IOKit.framework */, + E45BE9710E8CC7DD009D7055 /* AGL.framework */, + E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, + E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, + E45BE9740E8CC7DD009D7055 /* Carbon.framework */, + E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, + E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, + E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, + E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, + E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, + E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */, + E7E077E715D3B6510020DFD4 /* QTKit.framework */, + ); + name = "system frameworks"; + sourceTree = ""; + }; + BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = { + isa = PBXGroup; + children = ( + BBAB23BE13894E4700AA2426 /* GLUT.framework */, + ); + name = "3rd party frameworks"; + sourceTree = ""; + }; + BD2F1A9F8D0C05EDB29122D0 /* src */ = { + isa = PBXGroup; + children = ( + 00D6D32B84B099226431108C /* ofxOsc.h */, + 7689F8A0F3D0B7635A8C3104 /* ofxOscArg.h */, + 65EEFA3DA3526E9CDD9C21F9 /* ofxOscBundle.cpp */, + 8B30E93FD3D3475EED522A0E /* ofxOscBundle.h */, + DF49D76C45D5DB505A234880 /* ofxOscMessage.cpp */, + C58862C6D212C8E8A83810F4 /* ofxOscMessage.h */, + 0AED834CE4DEC5260AF302A2 /* ofxOscParameterSync.cpp */, + B31C608870ECEB2490A93736 /* ofxOscParameterSync.h */, + C2FAC65C491D4231379F3298 /* ofxOscReceiver.cpp */, + 8C75AFC8774A62495DD53464 /* ofxOscReceiver.h */, + 81967292BFC87A0144BD32C6 /* ofxOscSender.cpp */, + 9F7986DC4EB05E75FCE2C777 /* ofxOscSender.h */, + ); + name = src; + sourceTree = ""; + }; + D27B2221A225CA523C019676 /* src */ = { + isa = PBXGroup; + children = ( + FF8CDF57858E9B94E3237115 /* ip */, + 30CB364908817057B430D528 /* osc */, + ); + name = src; + sourceTree = ""; + }; + E4328144138ABC890047C5CB /* Products */ = { + isa = PBXGroup; + children = ( + E4328148138ABC890047C5CB /* openFrameworksDebug.a */, + ); + name = Products; + sourceTree = ""; + }; + E45BE5980E8CC70C009D7055 /* frameworks */ = { + isa = PBXGroup; + children = ( + BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */, + BBAB23C913894ECA00AA2426 /* system frameworks */, + ); + name = frameworks; + sourceTree = ""; + }; + E4B69B4A0A3A1720003C02F2 = { + isa = PBXGroup; + children = ( + 9512D4F1183D23160078256D /* Resources */, + E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, + E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, + E4B69E1C0A3A1BDC003C02F2 /* src */, + E4EEC9E9138DF44700A80321 /* openFrameworks */, + BB4B014C10F69532006C3DED /* addons */, + E45BE5980E8CC70C009D7055 /* frameworks */, + E4B69B5B0A3A1756003C02F2 /* cyrilDebug.app */, + ); + sourceTree = ""; + }; + E4B69E1C0A3A1BDC003C02F2 /* src */ = { + isa = PBXGroup; + children = ( + 9512D43D183D1F100078256D /* cmds.h */, + 9512D43E183D1F100078256D /* Cyril */, + 9512D4B2183D1F110078256D /* cyrilApp.cpp */, + 9512D4B3183D1F110078256D /* cyrilApp.h */, + 9512D4B4183D1F110078256D /* Engine */, + E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; + E4EEC9E9138DF44700A80321 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, + E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, + ); + name = openFrameworks; + sourceTree = ""; + }; + E6053AB7FEC63D5F83825B88 /* ofxOsc */ = { + isa = PBXGroup; + children = ( + BD2F1A9F8D0C05EDB29122D0 /* src */, + 38871A5825686AE018EC2BF0 /* libs */, + ); + name = ofxOsc; + sourceTree = ""; + }; + FF8CDF57858E9B94E3237115 /* ip */ = { + isa = PBXGroup; + children = ( + ADD194746185E2DA11468377 /* IpEndpointName.cpp */, + 48974F980F51769171D0B2F5 /* IpEndpointName.h */, + F7FBC56859535E597B24BB91 /* NetworkingUtils.h */, + 23640F57DF6C4BB6BFC5DA4C /* PacketListener.h */, + 641362CA659FAFEE4E81001B /* posix */, + 444657A12E59D0ED86981498 /* TimerListener.h */, + 2FD4B0329909D3527F003494 /* UdpSocket.h */, + BA6760AC87647DD61A92BD41 /* win32 */, + ); + name = ip; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E4B69B5A0A3A1756003C02F2 /* cyril */ = { + isa = PBXNativeTarget; + buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "cyril" */; + buildPhases = ( + E4B69B580A3A1756003C02F2 /* Sources */, + E4B69B590A3A1756003C02F2 /* Frameworks */, + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, + E4C2427710CC5ABF004149E2 /* CopyFiles */, + 9512D4F2183D23BE0078256D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, + ); + name = cyril; + productName = myOFApp; + productReference = E4B69B5B0A3A1756003C02F2 /* cyrilDebug.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E4B69B4C0A3A1720003C02F2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0460; + }; + buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "cyril" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = E4B69B4A0A3A1720003C02F2; + productRefGroup = E4B69B4A0A3A1720003C02F2; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = E4328144138ABC890047C5CB /* Products */; + ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + E4B69B5A0A3A1756003C02F2 /* cyril */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = openFrameworksDebug.a; + remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 9512D4F2183D23BE0078256D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9512D4F3183D23CA0078256D /* cyril-logo.icns in Resources */, + 9512D4F5183D23F70078256D /* DroidSansMono.ttf in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\nmkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\ncp -f \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E4B69B580A3A1756003C02F2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, + 9512D4E0183D1F110078256D /* CyrilParticle.cpp in Sources */, + 856AA354D08AB4B323081444 /* ofxBaseGui.cpp in Sources */, + 9512D4CE183D1F110078256D /* CyrilAnimStep.cpp in Sources */, + 5CBB2AB3A60F65431D7B555D /* ofxButton.cpp in Sources */, + 9512D4ED183D1F110078256D /* Palette.cpp in Sources */, + 9512D4DB183D1F110078256D /* CyrilLineOp.cpp in Sources */, + 9512D4C7183D1F110078256D /* CyrilRandFun.cpp in Sources */, + B266578FC55D23BFEBC042E7 /* ofxGuiGroup.cpp in Sources */, + 9512D4BA183D1F110078256D /* cyril.lpp in Sources */, + 483908258D00B98B4BE69F07 /* ofxLabel.cpp in Sources */, + F285EB3169F1566CA3D93C20 /* ofxPanel.cpp in Sources */, + 9512D4EA183D1F110078256D /* CyrilSphereOp.cpp in Sources */, + 837220E80EB56CD44AD27F2A /* ofxSlider.cpp in Sources */, + 9512D4C9183D1F110078256D /* CyrilTanFun.cpp in Sources */, + 9512D4D7183D1F110078256D /* CyrilGridOp.cpp in Sources */, + 9512D4CC183D1F110078256D /* CyrilDebugOp.cpp in Sources */, + 9512D4CA183D1F110078256D /* CyrilWaveFun.cpp in Sources */, + B56FE57CC35806596D38118C /* ofxSliderGroup.cpp in Sources */, + 9512D4E6183D1F110078256D /* CyrilScaleOp.cpp in Sources */, + 1CD33E884D9E3358252E82A1 /* ofxToggle.cpp in Sources */, + 9512D4D9183D1F110078256D /* CyrilInitOp.cpp in Sources */, + 9512D4E3183D1F110078256D /* CyrilPushMatrixOp.cpp in Sources */, + 9512D4DD183D1F110078256D /* CyrilNoFillOp.cpp in Sources */, + 9512D4BF183D1F110078256D /* CyrilCosFun.cpp in Sources */, + 72A929D3561B8232A182ABFC /* ofxOscBundle.cpp in Sources */, + 9512D4B9183D1F110078256D /* Cyril.cpp in Sources */, + 9512D4D2183D1F110078256D /* CyrilBlink.cpp in Sources */, + 5864AD82E20F15536D054EA3 /* ofxOscMessage.cpp in Sources */, + 9512D4E9183D1F110078256D /* CyrilSphereDetailOp.cpp in Sources */, + 4ADB88E2FB52E76A471065DE /* ofxOscParameterSync.cpp in Sources */, + 640279EE111671BD026CB013 /* ofxOscReceiver.cpp in Sources */, + 8F5205AEF8861EF234F0651A /* ofxOscSender.cpp in Sources */, + 9512D4E5183D1F110078256D /* CyrilRotateOp.cpp in Sources */, + 9512D4D6183D1F110078256D /* CyrilFillOp.cpp in Sources */, + 9512D4C3183D1F110078256D /* CyrilLerpFun.cpp in Sources */, + 9512D4C1183D1F110078256D /* CyrilFun.cpp in Sources */, + 9512D4C6183D1F110078256D /* CyrilPaletteFun.cpp in Sources */, + 9512D4DF183D1F110078256D /* CyrilPaletteItem.cpp in Sources */, + 9512D4D1183D1F110078256D /* CyrilBallOp.cpp in Sources */, + ADE367465D2A8EBAD4C7A8D9 /* IpEndpointName.cpp in Sources */, + 9512D4D8183D1F110078256D /* CyrilImgOp.cpp in Sources */, + 9512D4CD183D1F110078256D /* CyrilAnimation.cpp in Sources */, + 9512D4C8183D1F110078256D /* CyrilSinFun.cpp in Sources */, + 9512D4D3183D1F110078256D /* CyrilBoxOp.cpp in Sources */, + 9512D4EB183D1F110078256D /* CyrilTile.cpp in Sources */, + 9512D4CF183D1F110078256D /* CyrilBackgroundOp.cpp in Sources */, + 9512D4DC183D1F110078256D /* CyrilMoveOp.cpp in Sources */, + 9512D4C2183D1F110078256D /* CyrilHsbFun.cpp in Sources */, + 9512D4D0183D1F110078256D /* CyrilBallDetailOp.cpp in Sources */, + 9512D4D4183D1F110078256D /* CyrilColorOp.cpp in Sources */, + 67FE4C7B15C2F0478C8126C2 /* NetworkingUtils.cpp in Sources */, + 510CAFE035E576A4E1502D52 /* UdpSocket.cpp in Sources */, + A29D8C96AE042ECEAA1BD4F3 /* NetworkingUtilsWin.cpp in Sources */, + 28090DEB5109115003E8F1C5 /* UdpSocketWin.cpp in Sources */, + 9512D4E8183D1F110078256D /* CyrilShapeList.cpp in Sources */, + 9512D4E1183D1F110078256D /* CyrilPegOp.cpp in Sources */, + 9512D4E7183D1F110078256D /* CyrilShape.cpp in Sources */, + 9512D4EC183D1F110078256D /* cyrilApp.cpp in Sources */, + 62545D179C94265CA1389D4A /* OscOutboundPacketStream.cpp in Sources */, + 9512D4C4183D1F110078256D /* CyrilMapFun.cpp in Sources */, + 9512D4E4183D1F110078256D /* CyrilRectOp.cpp in Sources */, + 9512D4BC183D1F110078256D /* CyrilOp.cpp in Sources */, + C4782ECC372420ACE0615B74 /* OscPrintReceivedElements.cpp in Sources */, + 0546D1A38E13BD319CC9755B /* OscReceivedElements.cpp in Sources */, + 879A251454401BC0B6E4F238 /* OscTypes.cpp in Sources */, + 63B57AC5BF4EF088491E0317 /* ofxXmlSettings.cpp in Sources */, + 933A2227713C720CEFF80FD9 /* tinyxml.cpp in Sources */, + 9512D4D5183D1F110078256D /* CyrilConeOp.cpp in Sources */, + 9512D4CB183D1F110078256D /* CyrilColorLoad.cpp in Sources */, + 9D44DC88EF9E7991B4A09951 /* tinyxmlerror.cpp in Sources */, + 9512D4BD183D1F110078256D /* CyrilParser.cpp in Sources */, + 5A4349E9754D6FA14C0F2A3A /* tinyxmlparser.cpp in Sources */, + 9512D4DE183D1F110078256D /* CyrilPalette.cpp in Sources */, + A86D7323CE1A9450906A91DD /* fft.cpp in Sources */, + 9512D4EE183D1F110078256D /* Particle.cpp in Sources */, + C098DBE008A1B5C6D12ABFFD /* ofxBeat.cpp in Sources */, + 9512D4BE183D1F110078256D /* CyrilState.cpp in Sources */, + 9512D4BB183D1F110078256D /* cyril.ypp in Sources */, + 9512D4C0183D1F110078256D /* CyrilFftFun.cpp in Sources */, + EBE93261A021BCE7741047C3 /* ClipBoard.cpp in Sources */, + 9512D4E2183D1F110078256D /* CyrilPopMatrixOp.cpp in Sources */, + 4D55A1D856671CE3DBA02837 /* EditorBuffer.cpp in Sources */, + 9512D4DA183D1F110078256D /* CyrilLightOp.cpp in Sources */, + F4862D2A81633EF0F84109F3 /* ofxEditor.cpp in Sources */, + 9512D4C5183D1F110078256D /* CyrilNoiseFun.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = openFrameworks; + targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E4B69B4E0A3A1720003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + GCC_AUTO_VECTORIZATION = YES; + GCC_ENABLE_SSE3_EXTENSIONS = YES; + GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; + GCC_WARN_UNINITIALIZED_AUTOS = NO; + GCC_WARN_UNUSED_VALUE = NO; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ( + "$(OF_CORE_HEADERS)", + ../../../addons/ofxGui/libs, + ../../../addons/ofxGui/src, + ../../../addons/ofxOsc/libs, + ../../../addons/ofxOsc/libs/oscpack, + ../../../addons/ofxOsc/libs/oscpack/src, + ../../../addons/ofxOsc/libs/oscpack/src/ip, + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix, + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32, + ../../../addons/ofxOsc/libs/oscpack/src/osc, + ../../../addons/ofxOsc/src, + ../../../addons/ofxXmlSettings/libs, + ../../../addons/ofxXmlSettings/src, + ../../../addons/ofxBeat/libs, + ../../../addons/ofxBeat/src, + ../../../addons/ofxEditor/libs, + ../../../addons/ofxEditor/src, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + "-mtune=native", + ); + SDKROOT = macosx; + }; + name = Debug; + }; + E4B69B4F0A3A1720003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; + buildSettings = { + ARCHS = "$(NATIVE_ARCH)"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_AUTO_VECTORIZATION = YES; + GCC_ENABLE_SSE3_EXTENSIONS = YES; + GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_UNROLL_LOOPS = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; + GCC_WARN_UNINITIALIZED_AUTOS = NO; + GCC_WARN_UNUSED_VALUE = NO; + GCC_WARN_UNUSED_VARIABLE = NO; + HEADER_SEARCH_PATHS = ( + "$(OF_CORE_HEADERS)", + ../../../addons/ofxGui/libs, + ../../../addons/ofxGui/src, + ../../../addons/ofxOsc/libs, + ../../../addons/ofxOsc/libs/oscpack, + ../../../addons/ofxOsc/libs/oscpack/src, + ../../../addons/ofxOsc/libs/oscpack/src/ip, + ../../../addons/ofxOsc/libs/oscpack/src/ip/posix, + ../../../addons/ofxOsc/libs/oscpack/src/ip/win32, + ../../../addons/ofxOsc/libs/oscpack/src/osc, + ../../../addons/ofxOsc/src, + ../../../addons/ofxXmlSettings/libs, + ../../../addons/ofxXmlSettings/src, + ../../../addons/ofxBeat/libs, + ../../../addons/ofxBeat/src, + ../../../addons/ofxEditor/libs, + ../../../addons/ofxEditor/src, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + OTHER_CPLUSPLUSFLAGS = ( + "-D__MACOSX_CORE__", + "-lpthread", + "-mtune=native", + ); + SDKROOT = macosx; + }; + name = Release; + }; + E4B69B600A3A1757003C02F2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = NONE; + ICON = "$(ICON_NAME_DEBUG)"; + ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)", + ); + PRODUCT_NAME = "$(TARGET_NAME)Debug"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + E4B69B610A3A1757003C02F2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = NONE; + ICON = "$(ICON_NAME_RELEASE)"; + ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; + INFOPLIST_FILE = "openFrameworks-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "cyril" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B4E0A3A1720003C02F2 /* Debug */, + E4B69B4F0A3A1720003C02F2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "cyril" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4B69B600A3A1757003C02F2 /* Debug */, + E4B69B610A3A1757003C02F2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; +} diff --git a/cyril.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cyril.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4ac5d63 --- /dev/null +++ b/cyril.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/cyril.xcodeproj/project.xcworkspace/xcuserdata/darren.xcuserdatad/UserInterfaceState.xcuserstate b/cyril.xcodeproj/project.xcworkspace/xcuserdata/darren.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..eb18a23 Binary files /dev/null and b/cyril.xcodeproj/project.xcworkspace/xcuserdata/darren.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/cyril.xcodeproj/xcshareddata/xcschemes/cyril Debug.xcscheme b/cyril.xcodeproj/xcshareddata/xcschemes/cyril Debug.xcscheme new file mode 100644 index 0000000..2b2e615 --- /dev/null +++ b/cyril.xcodeproj/xcshareddata/xcschemes/cyril Debug.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cyril.xcodeproj/xcshareddata/xcschemes/cyril Release.xcscheme b/cyril.xcodeproj/xcshareddata/xcschemes/cyril Release.xcscheme new file mode 100644 index 0000000..bbddff1 --- /dev/null +++ b/cyril.xcodeproj/xcshareddata/xcschemes/cyril Release.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cyril.xcodeproj/xcuserdata/darren.xcuserdatad/xcschemes/xcschememanagement.plist b/cyril.xcodeproj/xcuserdata/darren.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..13dfb6e --- /dev/null +++ b/cyril.xcodeproj/xcuserdata/darren.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SuppressBuildableAutocreation + + E4B69B5A0A3A1756003C02F2 + + primary + + + + + diff --git a/cyril/Images.xcassets/AppIcon.appiconset/Contents.json b/cyril/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..cc45bc8 --- /dev/null +++ b/cyril/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "cyril-logo16x16.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "cyril-logo32x32.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "cyril-logo128x128.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "cyril-logo256x256.png", + "scale" : "1x" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo128x128.png b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo128x128.png new file mode 100644 index 0000000..326871a Binary files /dev/null and b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo128x128.png differ diff --git a/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo16x16.png b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo16x16.png new file mode 100644 index 0000000..d295a6b Binary files /dev/null and b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo16x16.png differ diff --git a/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo256x256.png b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo256x256.png new file mode 100644 index 0000000..7914132 Binary files /dev/null and b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo256x256.png differ diff --git a/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo32x32.png b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo32x32.png new file mode 100644 index 0000000..d046b69 Binary files /dev/null and b/cyril/Images.xcassets/AppIcon.appiconset/cyril-logo32x32.png differ diff --git a/openFrameworks-Info.plist b/openFrameworks-Info.plist new file mode 100644 index 0000000..d8d9e15 --- /dev/null +++ b/openFrameworks-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + cyril-logo + CFBundleIdentifier + com.cyrilcode.cyril + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + beta + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/src/Cyril/Cyril.cpp b/src/Cyril/Cyril.cpp new file mode 100644 index 0000000..718b9db --- /dev/null +++ b/src/Cyril/Cyril.cpp @@ -0,0 +1,26 @@ +// +// Cyril.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "Cyril.h" + +Cyril* Cyril::clone () { + return new Cyril (*this); +} + +Cyril::Cyril (const Cyril &other) { + valid = other.valid; +} + +// How many items are left on the stack after eval? +int Cyril::size() { + return 0; +} + +void Cyril::eval(CyrilState &) { + // Do nothing! +} \ No newline at end of file diff --git a/src/Cyril/Cyril.h b/src/Cyril/Cyril.h new file mode 100644 index 0000000..e23b5fe --- /dev/null +++ b/src/Cyril/Cyril.h @@ -0,0 +1,34 @@ +// +// Cyril.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_Cyril_h +#define cyril2_Cyril_h + +#include "ofMain.h" +#include "cmds.h" +#include "CyrilState.h" + +class Particle; + +void yyerror(const char *); + +class Cyril { +public: + bool valid; + Cyril() { valid = true; } + virtual ~Cyril () {} + Cyril (const Cyril &other); + virtual Cyril *clone (); + virtual void print() { }; + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop() { return 0; } +}; + +#endif + diff --git a/src/Cyril/CyrilOp.cpp b/src/Cyril/CyrilOp.cpp new file mode 100644 index 0000000..8cbb3ac --- /dev/null +++ b/src/Cyril/CyrilOp.cpp @@ -0,0 +1,31 @@ +// +// CyrilOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilOp.h" + +CyrilOp::CyrilOp (Cyril* _c) : c(_c) { + +} + +CyrilOp::CyrilOp (const CyrilOp &other) { + c = other.c->clone (); +} +CyrilOp::~CyrilOp () +{ + delete c; +} +void CyrilOp::print() { + c->print(); + cout << "No Op" << endl; +} +Cyril * CyrilOp::clone () { return new CyrilOp (*this); } +int CyrilOp::size() { return 0; } +void CyrilOp::eval(CyrilState &_s) { + +} + diff --git a/src/Cyril/CyrilOp.h b/src/Cyril/CyrilOp.h new file mode 100644 index 0000000..3784768 --- /dev/null +++ b/src/Cyril/CyrilOp.h @@ -0,0 +1,30 @@ +// +// CyrilOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilOp_h +#define cyril2_CyrilOp_h + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" + +class CyrilOp : public Cyril { +protected: + Cyril* c; +public: + + CyrilOp(Cyril* _c = NULL); + CyrilOp(const CyrilOp &other); + virtual ~CyrilOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif diff --git a/src/Cyril/CyrilParser.cpp b/src/Cyril/CyrilParser.cpp new file mode 100644 index 0000000..c2ca59d --- /dev/null +++ b/src/Cyril/CyrilParser.cpp @@ -0,0 +1,60 @@ +// +// CyrilParser.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilParser.h" +#include "y.tab.h" +extern void scannerRestart(); + +Cyril* CyrilParser::parseString(string progStr) { + //const char *str = progStr.c_str(); + int res = 0; + progStr.append(1, '\n'); + res = yycyrilParseString(progStr.c_str()); + if (res == 0) { +#ifdef DEBUG_PRINT + cout << "Compile OK" << endl; +#endif + if (pRoot->matchPushPop() != 0) { + cout << "Unmatched push and pop matrix" << endl; + pRoot->valid = false; + } + } + else { + pRoot = new Cyril(); + pRoot->valid = false; + } + return pRoot; + return new Cyril(); +} + +Cyril* CyrilParser::parseFile(string fileName) { + //Cyril * pAST; + int res = 0; + FILE *fp=fopen(ofToDataPath(fileName).c_str(),"r"); + if(!fp) { +#ifdef DEBUG_PRINT + cout << "Error opening file" << fileName << endl; +#endif + } + else { +#ifdef DEBUG_PRINT + cout << "parsing file " << fileName << endl; +#endif + scannerRestart(); + line_no = 0; + yyin = fp; + res = yyparse(); + fclose(fp); + if (res == 0) { +#ifdef DEBUG_PRINT + cout << "Compile OK" << endl; +#endif + } + } + return pRoot; +} \ No newline at end of file diff --git a/src/Cyril/CyrilParser.h b/src/Cyril/CyrilParser.h new file mode 100644 index 0000000..62a6865 --- /dev/null +++ b/src/Cyril/CyrilParser.h @@ -0,0 +1,42 @@ +// +// CyrilParser.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilParser_h +#define cyril2_CyrilParser_h + +#include "ofMain.h" +#include "Cyril.h" +#include "CyrilList.h" +#include "CyrilOp.h" +#include "CyrilAssign.h" +#include "CyrilPush.h" +#include "CyrilDo.h" +#include "CyrilFor.h" +#include "CyrilIf.h" +#include "CyrilWhile.h" +#include "CyrilHexColor.h" +#include "CyrilFun.h" +#include "CyrilBinaryOp.h" +#include "CyrilLoad.h" +#include "CyrilUnaryOp.h" +#include "CyrilParticle.h" + +extern "C" int yyparse(); +extern FILE *yyin; +extern "C" int line_no; +extern Cyril * pRoot; +extern int yycyrilParseString(const char *str); + +class CyrilParser { +public: + static Cyril* parseString(string progStr); + static Cyril* parseFile(string fileName); +}; + +#endif + diff --git a/src/Cyril/CyrilState.cpp b/src/Cyril/CyrilState.cpp new file mode 100644 index 0000000..55f06bf --- /dev/null +++ b/src/Cyril/CyrilState.cpp @@ -0,0 +1,49 @@ +// +// CyrilState.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilState.h" + +CyrilState::CyrilState(map * _t, + stack * _s, ofMatrixStack * _m, vector * _p, map * _c, + map * _i, CyrilState * _pr) +: sym(_t), stk(_s), ms(_m), ps(_p), cs(_c), img(_i), parent(_pr) +{ + +} + +CyrilState::CyrilState() { + +} + +CyrilState::~CyrilState () { + delete sym; + delete stk; + delete ms; + while(!ps->empty()) delete ps->back(), ps->pop_back(); + delete ps; + for(map::iterator it = cs->begin(); it != cs->end(); ++it){ + delete (*it).second; + } + delete cs; + for(map::iterator it = img->begin(); it != img->end(); ++it){ + delete (*it).second; + } + delete img; + /* + if (light != NULL) + delete light; + */ +} +/* +CyrilState::CyrilState (const CyrilState &other) { + +} +CyrilState::CyrilState *clone () { + +} +*/ \ No newline at end of file diff --git a/src/Cyril/CyrilState.h b/src/Cyril/CyrilState.h new file mode 100644 index 0000000..d0321bf --- /dev/null +++ b/src/Cyril/CyrilState.h @@ -0,0 +1,38 @@ +// +// CyrilState.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilState__ +#define __cyril2__CyrilState__ + +#include "ofMain.h" + +class Particle; +class Palette; + +class CyrilState { +public: + map * sym; + stack * stk; + ofMatrixStack * ms; + vector * ps; + map * cs; + map * img; + CyrilState * parent; + ofLight * light; + + CyrilState(map * _t, + stack * _s, ofMatrixStack * _m, vector * _p, + map * _c, map * _i, CyrilState *); + CyrilState(); + ~CyrilState (); + //CyrilState (const CyrilState &other); + //CyrilState *clone (); + +}; + +#endif /* defined(__cyril2__CyrilState__) */ diff --git a/src/Cyril/Funs/CyrilCosFun.cpp b/src/Cyril/Funs/CyrilCosFun.cpp new file mode 100644 index 0000000..8717913 --- /dev/null +++ b/src/Cyril/Funs/CyrilCosFun.cpp @@ -0,0 +1,41 @@ +// +// CyrilCosFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilCosFun.h" + +CyrilCosFun::CyrilCosFun(Cyril* _c) : CyrilFun(_c) { + int s = c->size(); + if (!(s == 1)) { + yyerror("Cos function 1 argument"); + valid = false; + } +} + +CyrilCosFun::CyrilCosFun(const CyrilCosFun &other) { + c = other.c->clone (); +} +CyrilCosFun::~CyrilCosFun () { + delete c; +} +void CyrilCosFun::print() { + c->print(); + cout << "Cos" << endl; +} +Cyril * CyrilCosFun::clone () { + return new CyrilCosFun (*this); +} +int CyrilCosFun::size() { + return 1; +} +void CyrilCosFun::eval(CyrilState &_s) { + c->eval(_s); + float result = cos(_s.stk->top()); + _s.stk->pop(); + _s.stk->push(result); +} + diff --git a/src/Cyril/Funs/CyrilCosFun.h b/src/Cyril/Funs/CyrilCosFun.h new file mode 100644 index 0000000..ce9ef76 --- /dev/null +++ b/src/Cyril/Funs/CyrilCosFun.h @@ -0,0 +1,27 @@ +// +// CyrilCosFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilCosFun__ +#define __cyril2__CyrilCosFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilCosFun : public CyrilFun { +public: + CyrilCosFun(Cyril* _c); + CyrilCosFun(const CyrilCosFun &other); + virtual ~CyrilCosFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilCosFun__) */ diff --git a/src/Cyril/Funs/CyrilFftFun.cpp b/src/Cyril/Funs/CyrilFftFun.cpp new file mode 100644 index 0000000..55b643e --- /dev/null +++ b/src/Cyril/Funs/CyrilFftFun.cpp @@ -0,0 +1,45 @@ +// +// CyrilFftFun.cpp +// Cyril +// +// Created by Darren Mothersele on 15/11/2013. +// +// + +#include "CyrilFftFun.h" + +CyrilFftFun::CyrilFftFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 1)) { + yyerror("FFT function has 1 argument"); + valid = false; + } +} + +CyrilFftFun::CyrilFftFun(const CyrilFftFun &other) { + c = other.c->clone (); +} +CyrilFftFun::~CyrilFftFun () { + delete c; +} +void CyrilFftFun::print() { + c->print(); + cout << "Palette" << endl; +} +Cyril * CyrilFftFun::clone () { + return new CyrilFftFun (*this); +} +int CyrilFftFun::size() { + return 1; +} +void CyrilFftFun::eval(CyrilState &_s) { + c->eval(_s); + int d = _s.stk->top(); _s.stk->pop(); + //cout << "FFT of " << (d % 32) << endl; + //float f = fftSubbands[d % 32]; + + _s.stk->push((*_s.sym)[REG_BEAT_FFT_START + (d % 32)]); +} + + + diff --git a/src/Cyril/Funs/CyrilFftFun.h b/src/Cyril/Funs/CyrilFftFun.h new file mode 100644 index 0000000..424db01 --- /dev/null +++ b/src/Cyril/Funs/CyrilFftFun.h @@ -0,0 +1,30 @@ +// +// CyrilFftFun.h +// Cyril +// +// Created by Darren Mothersele on 15/11/2013. +// +// + +#ifndef __Cyril__CyrilFftFun__ +#define __Cyril__CyrilFftFun__ + +#include "ofMain.h" +#include "CyrilFun.h" +#include "Palette.h" + +extern float fftSubbands[32]; + +class CyrilFftFun : public CyrilFun { +public: + CyrilFftFun(Cyril* _c); + CyrilFftFun(const CyrilFftFun &other); + virtual ~CyrilFftFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__Cyril__CyrilFftFun__) */ diff --git a/src/Cyril/Funs/CyrilFun.cpp b/src/Cyril/Funs/CyrilFun.cpp new file mode 100644 index 0000000..9cf927e --- /dev/null +++ b/src/Cyril/Funs/CyrilFun.cpp @@ -0,0 +1,35 @@ +// +// CyrilFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilFun.h" + +CyrilFun::CyrilFun(Cyril* _c) : c(_c) { +} + +CyrilFun::CyrilFun (const CyrilFun &other) { + c = other.c->clone (); +} +CyrilFun::~CyrilFun () { + delete c; +} +void CyrilFun::print() { + c->print(); + cout << "No Fun" << endl; +} +Cyril * CyrilFun::clone () { + return new CyrilFun (*this); +} +int CyrilFun::size() { + return 1; +} +void CyrilFun::eval(CyrilState &_state) { + _state.stk->push(0); +} + + + diff --git a/src/Cyril/Funs/CyrilFun.h b/src/Cyril/Funs/CyrilFun.h new file mode 100644 index 0000000..14e0489 --- /dev/null +++ b/src/Cyril/Funs/CyrilFun.h @@ -0,0 +1,30 @@ +// +// CyrilFun.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilFun_h +#define cyril2_CyrilFun_h + +#include "ofMain.h" +#include "Cyril.h" +#include "cmds.h" + +class CyrilFun : public Cyril { +protected: + Cyril* c; +public: + CyrilFun(Cyril* _c = NULL); + CyrilFun(const CyrilFun &other); + virtual ~CyrilFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif diff --git a/src/Cyril/Funs/CyrilHsbFun.cpp b/src/Cyril/Funs/CyrilHsbFun.cpp new file mode 100644 index 0000000..fdb0615 --- /dev/null +++ b/src/Cyril/Funs/CyrilHsbFun.cpp @@ -0,0 +1,62 @@ +// +// CyrilHsbFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilHsbFun.h" + +CyrilHsbFun::CyrilHsbFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 1 || s == 2 || s == 3)) { + yyerror("HSB function has 1, 2 or 3 arguments"); + valid = false; + } +} + +CyrilHsbFun::CyrilHsbFun(const CyrilHsbFun &other) { + c = other.c->clone (); +} +CyrilHsbFun::~CyrilHsbFun () { + delete c; +} +void CyrilHsbFun::print() { + c->print(); + cout << "HSB" << endl; +} +Cyril * CyrilHsbFun::clone () { + return new CyrilHsbFun (*this); +} +int CyrilHsbFun::size() { + return 3; +} +void CyrilHsbFun::eval(CyrilState &_s) { + c->eval(_s); + float h, s, b; + switch (c->size()) { + case 1: + b = 255; + s = 255; + h = _s.stk->top(); _s.stk->pop(); + break; + case 2: + b = _s.stk->top(); _s.stk->pop(); + s = 255; + h = _s.stk->top(); _s.stk->pop(); + break; + case 3: + b = _s.stk->top(); _s.stk->pop(); + s = _s.stk->top(); _s.stk->pop(); + h = _s.stk->top(); _s.stk->pop(); + break; + } + ofColor col; + col.setHsb(h, s, b); + //col = ofColor(col.r, col.g, col.b); + _s.stk->push(float(col.r)); + _s.stk->push(float(col.g)); + _s.stk->push(float(col.b)); +} + diff --git a/src/Cyril/Funs/CyrilHsbFun.h b/src/Cyril/Funs/CyrilHsbFun.h new file mode 100644 index 0000000..1079ecb --- /dev/null +++ b/src/Cyril/Funs/CyrilHsbFun.h @@ -0,0 +1,26 @@ +// +// CyrilHsbFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilHsbFun__ +#define __cyril2__CyrilHsbFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilHsbFun : public CyrilFun { +public: + CyrilHsbFun(Cyril* _c); + CyrilHsbFun(const CyrilHsbFun &other); + virtual ~CyrilHsbFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilHsbFun__) */ diff --git a/src/Cyril/Funs/CyrilLerpFun.cpp b/src/Cyril/Funs/CyrilLerpFun.cpp new file mode 100644 index 0000000..8f2adda --- /dev/null +++ b/src/Cyril/Funs/CyrilLerpFun.cpp @@ -0,0 +1,85 @@ +// +// CyrilLerpFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilLerpFun.h" + +CyrilLerpFun::CyrilLerpFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 2 || s == 3 || s == 7)) { + yyerror("Lerp function has 2 or 3 arguments (or 7 with colors)"); + valid = false; + } +} + +CyrilLerpFun::CyrilLerpFun(const CyrilLerpFun &other) { + c = other.c->clone (); +} +CyrilLerpFun::~CyrilLerpFun () { + delete c; +} +void CyrilLerpFun::print() { + c->print(); + cout << "Lerp" << endl; +} +Cyril * CyrilLerpFun::clone () { + return new CyrilLerpFun (*this); +} +int CyrilLerpFun::size() { + int sz = c->size(); + if (sz == 2 || sz == 7) { + return 3; + } + return 1; +} +void CyrilLerpFun::eval(CyrilState &_s) { + c->eval(_s); + float i, v1, v2, v3; + ofColor _c; + switch (c->size()) { + case 2: + i = _s.stk->top(); _s.stk->pop(); + v1 = _s.stk->top(); _s.stk->pop(); + if (_s.cs->count(v1)) { + _c = (*_s.cs)[v1]->lerp(i); + } + else if (_s.parent->cs->count(v1)) { + _c = (*_s.parent->cs)[v1]->lerp(i); + } + else { + //cout << "Error: can't find palette!" << endl; + _s.stk->push(255); + _s.stk->push(255); + _s.stk->push(255); + break; + } + _s.stk->push(_c.r); + _s.stk->push(_c.g); + _s.stk->push(_c.b); + break; + case 3: + i = _s.stk->top(); _s.stk->pop(); + v2 = _s.stk->top(); _s.stk->pop(); + v1 = _s.stk->top(); _s.stk->pop(); + _s.stk->push(ofLerp(v1, v2, i)); + break; + case 7: + i = _s.stk->top(); _s.stk->pop(); + v3 = _s.stk->top(); _s.stk->pop(); + v2 = _s.stk->top(); _s.stk->pop(); + v1 = _s.stk->top(); _s.stk->pop(); + ofColor source(v1, v2, v3); + v3 = _s.stk->top(); _s.stk->pop(); + v2 = _s.stk->top(); _s.stk->pop(); + v1 = _s.stk->top(); _s.stk->pop(); + ofColor result = ofColor(v1, v2, v3).lerp(source, i); + _s.stk->push(result.r); + _s.stk->push(result.g); + _s.stk->push(result.b); + } +} + diff --git a/src/Cyril/Funs/CyrilLerpFun.h b/src/Cyril/Funs/CyrilLerpFun.h new file mode 100644 index 0000000..3d1e8e5 --- /dev/null +++ b/src/Cyril/Funs/CyrilLerpFun.h @@ -0,0 +1,28 @@ +// +// CyrilLerpFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilLerpFun__ +#define __cyril2__CyrilLerpFun__ + +#include "ofMain.h" +#include "CyrilFun.h" +#include "Palette.h" + +class CyrilLerpFun : public CyrilFun { +public: + CyrilLerpFun(Cyril* _c); + CyrilLerpFun(const CyrilLerpFun &other); + virtual ~CyrilLerpFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilLerpFun__) */ diff --git a/src/Cyril/Funs/CyrilMapFun.cpp b/src/Cyril/Funs/CyrilMapFun.cpp new file mode 100644 index 0000000..fbd3d5c --- /dev/null +++ b/src/Cyril/Funs/CyrilMapFun.cpp @@ -0,0 +1,45 @@ +// +// CyrilMapFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilMapFun.h" + +CyrilMapFun::CyrilMapFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 5)) { + yyerror("Map function has 5 arguments"); + valid = false; + } +} + +CyrilMapFun::CyrilMapFun(const CyrilMapFun &other) { + c = other.c->clone (); +} +CyrilMapFun::~CyrilMapFun () { + delete c; +} +void CyrilMapFun::print() { + c->print(); + cout << "MAP" << endl; +} +Cyril * CyrilMapFun::clone () { + return new CyrilMapFun (*this); +} +int CyrilMapFun::size() { + return 1; +} +void CyrilMapFun::eval(CyrilState &_s) { + c->eval(_s); + float v, min1, max1, min2, max2; + max2 = _s.stk->top(); _s.stk->pop(); + min2 = _s.stk->top(); _s.stk->pop(); + max1 = _s.stk->top(); _s.stk->pop(); + min1 = _s.stk->top(); _s.stk->pop(); + v = _s.stk->top(); _s.stk->pop(); + _s.stk->push(ofMap(v, min1, max1, min2, max2)); +} + diff --git a/src/Cyril/Funs/CyrilMapFun.h b/src/Cyril/Funs/CyrilMapFun.h new file mode 100644 index 0000000..7d6cc93 --- /dev/null +++ b/src/Cyril/Funs/CyrilMapFun.h @@ -0,0 +1,26 @@ +// +// CyrilMapFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilMapFun__ +#define __cyril2__CyrilMapFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilMapFun : public CyrilFun { +public: + CyrilMapFun(Cyril* _c); + CyrilMapFun(const CyrilMapFun &other); + virtual ~CyrilMapFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilMapFun__) */ diff --git a/src/Cyril/Funs/CyrilNoiseFun.cpp b/src/Cyril/Funs/CyrilNoiseFun.cpp new file mode 100644 index 0000000..4d396d9 --- /dev/null +++ b/src/Cyril/Funs/CyrilNoiseFun.cpp @@ -0,0 +1,59 @@ +// +// CyrilNoiseFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilNoiseFun.h" + +CyrilNoiseFun::CyrilNoiseFun(Cyril* _c) : CyrilFun(_c) { + int s = c->size(); + if (!(s == 1 || s == 2 || s == 3)) { + yyerror("Noise function has 1, 2 or 3 arguments"); + valid = false; + } +} + +CyrilNoiseFun::CyrilNoiseFun(const CyrilNoiseFun &other) { + c = other.c->clone (); +} + +CyrilNoiseFun::~CyrilNoiseFun () { + delete c; +} + +void CyrilNoiseFun::print() { + c->print(); + cout << "Noise" << endl; +} +Cyril * CyrilNoiseFun::clone () { + return new CyrilNoiseFun (*this); +} +int CyrilNoiseFun::size() { + return 1; +} +void CyrilNoiseFun::eval(CyrilState &_s) { + c->eval(_s); + float r, x, y, z; + switch (c->size()) { + case 1: + x = _s.stk->top(); _s.stk->pop(); + r = ofNoise(x); + break; + case 2: + x = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + r = ofNoise(x, y); + break; + case 3: + x = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + z = _s.stk->top(); _s.stk->pop(); + r = ofNoise(x, y, z); + break; + } + _s.stk->push(r); +} + diff --git a/src/Cyril/Funs/CyrilNoiseFun.h b/src/Cyril/Funs/CyrilNoiseFun.h new file mode 100644 index 0000000..cd5d469 --- /dev/null +++ b/src/Cyril/Funs/CyrilNoiseFun.h @@ -0,0 +1,27 @@ +// +// CyrilNoiseFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilNoiseFun__ +#define __cyril2__CyrilNoiseFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilNoiseFun : public CyrilFun { +public: + CyrilNoiseFun(Cyril* _c); + CyrilNoiseFun(const CyrilNoiseFun &other); + virtual ~CyrilNoiseFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilNoiseFun__) */ diff --git a/src/Cyril/Funs/CyrilPaletteFun.cpp b/src/Cyril/Funs/CyrilPaletteFun.cpp new file mode 100644 index 0000000..cbcabd8 --- /dev/null +++ b/src/Cyril/Funs/CyrilPaletteFun.cpp @@ -0,0 +1,52 @@ +// +// CyrilPaletteFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilPaletteFun.h" + +CyrilPaletteFun::CyrilPaletteFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 1 || s == 2)) { + yyerror("Palette function has 1 or 2 arguments"); + valid = false; + } +} + +CyrilPaletteFun::CyrilPaletteFun(const CyrilPaletteFun &other) { + c = other.c->clone (); +} +CyrilPaletteFun::~CyrilPaletteFun () { + delete c; +} +void CyrilPaletteFun::print() { + c->print(); + cout << "Palette" << endl; +} +Cyril * CyrilPaletteFun::clone () { + return new CyrilPaletteFun (*this); +} +int CyrilPaletteFun::size() { + return 3; +} +void CyrilPaletteFun::eval(CyrilState &_s) { + c->eval(_s); + float p, d; + if (c->size() == 2) { + d = _s.stk->top(); _s.stk->pop(); + } + else { + d = ofRandomuf(); + } + p = _s.stk->top(); _s.stk->pop(); + ofColor _c = (*_s.cs)[p]->getColorAt(d); + _s.stk->push(_c.r); + _s.stk->push(_c.g); + _s.stk->push(_c.b); +} + + + diff --git a/src/Cyril/Funs/CyrilPaletteFun.h b/src/Cyril/Funs/CyrilPaletteFun.h new file mode 100644 index 0000000..cc9b381 --- /dev/null +++ b/src/Cyril/Funs/CyrilPaletteFun.h @@ -0,0 +1,27 @@ +// +// CyrilPaletteFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilPaletteFun__ +#define __cyril2__CyrilPaletteFun__ + +#include "ofMain.h" +#include "CyrilFun.h" +#include "Palette.h" + +class CyrilPaletteFun : public CyrilFun { +public: + CyrilPaletteFun(Cyril* _c); + CyrilPaletteFun(const CyrilPaletteFun &other); + virtual ~CyrilPaletteFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilPaletteFun__) */ diff --git a/src/Cyril/Funs/CyrilRandFun.cpp b/src/Cyril/Funs/CyrilRandFun.cpp new file mode 100644 index 0000000..5019252 --- /dev/null +++ b/src/Cyril/Funs/CyrilRandFun.cpp @@ -0,0 +1,54 @@ +// +// CyrilRandFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilRandFun.h" + +CyrilRandFun::CyrilRandFun(Cyril * _c) : CyrilFun(_c) { + int s = _c->size(); + if (!(s == 0 || s == 1 || s == 2)) { + yyerror("Rand function has 0, 1 or 2 arguments"); + valid = false; + } +} + +CyrilRandFun::CyrilRandFun(const CyrilRandFun &other) { + c = other.c->clone (); +} +CyrilRandFun::~CyrilRandFun () { + delete c; +} +void CyrilRandFun::print() { + c->print(); + cout << "Rand" << endl; +} +Cyril * CyrilRandFun::clone () { + return new CyrilRandFun (*this); +} +int CyrilRandFun::size() { + return 1; +} +void CyrilRandFun::eval(CyrilState &_s) { + c->eval(_s); + float r, x, y; + switch (c->size()) { + case 0: + r = ofRandomf(); + break; + case 1: + x = _s.stk->top(); _s.stk->pop(); + r = ofRandom(x); + break; + case 2: + x = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + r = ofRandom(x, y); + break; + } + _s.stk->push(r); +} + diff --git a/src/Cyril/Funs/CyrilRandFun.h b/src/Cyril/Funs/CyrilRandFun.h new file mode 100644 index 0000000..2720b88 --- /dev/null +++ b/src/Cyril/Funs/CyrilRandFun.h @@ -0,0 +1,27 @@ +// +// CyrilRandFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilRandFun__ +#define __cyril2__CyrilRandFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilRandFun : public CyrilFun { +public: + CyrilRandFun(Cyril* _c); + CyrilRandFun(const CyrilRandFun &other); + virtual ~CyrilRandFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilRandFun__) */ diff --git a/src/Cyril/Funs/CyrilSinFun.cpp b/src/Cyril/Funs/CyrilSinFun.cpp new file mode 100644 index 0000000..77b4d04 --- /dev/null +++ b/src/Cyril/Funs/CyrilSinFun.cpp @@ -0,0 +1,41 @@ +// +// CyrilSinFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilSinFun.h" + +CyrilSinFun::CyrilSinFun(Cyril* _c) : CyrilFun(_c) { + int s = c->size(); + if (!(s == 1)) { + yyerror("Sin function 1 argument"); + valid = false; + } +} + +CyrilSinFun::CyrilSinFun(const CyrilSinFun &other) { + c = other.c->clone (); +} +CyrilSinFun::~CyrilSinFun () { + delete c; +} +void CyrilSinFun::print() { + c->print(); + cout << "Sin" << endl; +} +Cyril * CyrilSinFun::clone () { + return new CyrilSinFun (*this); +} +int CyrilSinFun::size() { + return 1; +} +void CyrilSinFun::eval(CyrilState &_s) { + c->eval(_s); + float result = sin(_s.stk->top()); + _s.stk->pop(); + _s.stk->push(result); +} + diff --git a/src/Cyril/Funs/CyrilSinFun.h b/src/Cyril/Funs/CyrilSinFun.h new file mode 100644 index 0000000..f228057 --- /dev/null +++ b/src/Cyril/Funs/CyrilSinFun.h @@ -0,0 +1,28 @@ +// +// CyrilSinFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilSinFun__ +#define __cyril2__CyrilSinFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilSinFun : public CyrilFun { +public: + CyrilSinFun(Cyril* _c); + CyrilSinFun(const CyrilSinFun &other); + virtual ~CyrilSinFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + + +#endif /* defined(__cyril2__CyrilSinFun__) */ diff --git a/src/Cyril/Funs/CyrilTanFun.cpp b/src/Cyril/Funs/CyrilTanFun.cpp new file mode 100644 index 0000000..25f5761 --- /dev/null +++ b/src/Cyril/Funs/CyrilTanFun.cpp @@ -0,0 +1,40 @@ +// +// CyrilTanFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilTanFun.h" + +CyrilTanFun::CyrilTanFun(Cyril* _c) : CyrilFun(_c) { + int s = c->size(); + if (!(s == 1)) { + yyerror("Tan function 1 argument"); + valid = false; + } +} +CyrilTanFun::CyrilTanFun (const CyrilTanFun &other) { + c = other.c->clone (); +} +CyrilTanFun::~CyrilTanFun () { + delete c; +} +void CyrilTanFun::print() { + c->print(); + cout << "Tan" << endl; +} +Cyril * CyrilTanFun::clone () { + return new CyrilTanFun (*this); +} +int CyrilTanFun::size() { + return 1; +} +void CyrilTanFun::eval(CyrilState &_s) { + c->eval(_s); + float result = tan(_s.stk->top()); + _s.stk->pop(); + _s.stk->push(result); +} + diff --git a/src/Cyril/Funs/CyrilTanFun.h b/src/Cyril/Funs/CyrilTanFun.h new file mode 100644 index 0000000..d7eb348 --- /dev/null +++ b/src/Cyril/Funs/CyrilTanFun.h @@ -0,0 +1,27 @@ +// +// CyrilTanFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilTanFun__ +#define __cyril2__CyrilTanFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilTanFun : public CyrilFun { +public: + CyrilTanFun(Cyril* _c); + CyrilTanFun(const CyrilTanFun &other); + virtual ~CyrilTanFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilTanFun__) */ diff --git a/src/Cyril/Funs/CyrilWaveFun.cpp b/src/Cyril/Funs/CyrilWaveFun.cpp new file mode 100644 index 0000000..ac7b0d2 --- /dev/null +++ b/src/Cyril/Funs/CyrilWaveFun.cpp @@ -0,0 +1,41 @@ +// +// CyrilWaveFun.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilWaveFun.h" + +CyrilWaveFun::CyrilWaveFun(Cyril* _c) : CyrilFun(_c) { + int s = c->size(); + if (!(s == 1)) { + yyerror("Wave function 1 argument"); + valid = false; + } +} + +CyrilWaveFun::CyrilWaveFun(const CyrilWaveFun &other) { + c = other.c->clone (); +} +CyrilWaveFun::~CyrilWaveFun () { + delete c; +} +void CyrilWaveFun::print() { + c->print(); + cout << "Wave" << endl; +} +Cyril * CyrilWaveFun::clone () { + return new CyrilWaveFun (*this); +} +int CyrilWaveFun::size() { + return 1; +} +void CyrilWaveFun::eval(CyrilState &_s) { + c->eval(_s); + float result = (sin(((*_s.sym)[REG_TIME] / _s.stk->top())) * 0.5) + 0.5; + _s.stk->pop(); + _s.stk->push(result); +} + diff --git a/src/Cyril/Funs/CyrilWaveFun.h b/src/Cyril/Funs/CyrilWaveFun.h new file mode 100644 index 0000000..93596b5 --- /dev/null +++ b/src/Cyril/Funs/CyrilWaveFun.h @@ -0,0 +1,27 @@ +// +// CyrilWaveFun.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilWaveFun__ +#define __cyril2__CyrilWaveFun__ + +#include "ofMain.h" +#include "CyrilFun.h" + +class CyrilWaveFun : public CyrilFun { +public: + CyrilWaveFun(Cyril* _c); + CyrilWaveFun (const CyrilWaveFun &other); + virtual ~CyrilWaveFun (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilWaveFun__) */ diff --git a/src/Cyril/Lang/CyrilAssign.h b/src/Cyril/Lang/CyrilAssign.h new file mode 100644 index 0000000..6b200a7 --- /dev/null +++ b/src/Cyril/Lang/CyrilAssign.h @@ -0,0 +1,58 @@ +// +// CyrilAssign.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilAssign_h +#define cyril2_CyrilAssign_h + +#include "cmds.h" + +class CyrilAssign : public Cyril { + int loc; + Cyril* c; +public: + CyrilAssign(int _i, Cyril* _c) : loc(_i), c(_c) { + valid = c->valid; + int sz = _c->size(); + if (!(sz == 1 || sz == 3)) { + yyerror("Assignment requires 1 argument (or 3 for color)"); + valid = false; + } + } + CyrilAssign (const CyrilAssign &other) { + loc = other.loc; + c = other.c->clone (); + } + virtual ~CyrilAssign () + { + delete c; + } + void print() { + c->print(); + cout << "Assign: " << loc << endl; + } + virtual Cyril *clone () { return new CyrilAssign (*this); } + virtual int size() { return 0; } + virtual void eval(CyrilState &_s) { + c->eval(_s); + switch (c->size()) { + case 1: + (*_s.sym)[loc] = _s.stk->top(); + _s.stk->pop(); + break; + case 3: + float b = _s.stk->top(); _s.stk->pop(); + float g = _s.stk->top(); _s.stk->pop(); + float r = _s.stk->top(); _s.stk->pop(); + (*_s.sym)[loc] = ofColor(r, g, b).getHex(); + break; + } + } + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif diff --git a/src/Cyril/Lang/CyrilColorLoad.cpp b/src/Cyril/Lang/CyrilColorLoad.cpp new file mode 100644 index 0000000..004d62d --- /dev/null +++ b/src/Cyril/Lang/CyrilColorLoad.cpp @@ -0,0 +1,35 @@ +// +// CyrilColorLoad.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilColorLoad.h" + + +CyrilColorLoad::CyrilColorLoad(int _i) : loc(_i) { + valid = true; +} +CyrilColorLoad::CyrilColorLoad (const CyrilColorLoad &other) { + loc = other.loc; +} +CyrilColorLoad::~CyrilColorLoad () +{ +} +void CyrilColorLoad::print() { + cout << "Color Load: " << loc << endl; +} +Cyril * CyrilColorLoad::clone () { return new CyrilColorLoad (*this); } +int CyrilColorLoad::size() { + return 3; +} +void CyrilColorLoad::eval(CyrilState &_s) { + ofColor c = ofColor::fromHex((*_s.sym)[loc]); + //cout << "Load color: " << c << endl; + _s.stk->push(float(c.r)); + _s.stk->push(float(c.g)); + _s.stk->push(float(c.b)); +} + diff --git a/src/Cyril/Lang/CyrilColorLoad.h b/src/Cyril/Lang/CyrilColorLoad.h new file mode 100644 index 0000000..794aaee --- /dev/null +++ b/src/Cyril/Lang/CyrilColorLoad.h @@ -0,0 +1,29 @@ +// +// CyrilColorLoad.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilColorLoad__ +#define __cyril2__CyrilColorLoad__ + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" + +class CyrilColorLoad : public Cyril { + int loc; +public: + CyrilColorLoad(int _i); + CyrilColorLoad (const CyrilColorLoad &other) ; + virtual ~CyrilColorLoad (); + void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilColorLoad__) */ diff --git a/src/Cyril/Lang/CyrilDebugOp.cpp b/src/Cyril/Lang/CyrilDebugOp.cpp new file mode 100644 index 0000000..6a7c106 --- /dev/null +++ b/src/Cyril/Lang/CyrilDebugOp.cpp @@ -0,0 +1,42 @@ +// +// CyrilDebugOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilDebugOp.h" + +CyrilDebugOp::CyrilDebugOp (Cyril* _c) : CyrilOp(_c) { + +} + +CyrilDebugOp::CyrilDebugOp (const CyrilDebugOp &other) { + c = other.c->clone (); +} +CyrilDebugOp::~CyrilDebugOp () +{ + delete c; +} +void CyrilDebugOp::print() { + c->print(); + cout << "Debug" << endl; +} +Cyril * CyrilDebugOp::clone () { + return new CyrilDebugOp (*this); +} +int CyrilDebugOp::size() { + return 0; +} +void CyrilDebugOp::eval(CyrilState &_s) { + c->eval(_s); + cout << "DEBUG:"; + int sz = c->size(); + for (int i = 0; i < sz; i++) { + cout << " " << _s.stk->top(); + _s.stk->pop(); + } + cout << endl; +} + diff --git a/src/Cyril/Lang/CyrilDebugOp.h b/src/Cyril/Lang/CyrilDebugOp.h new file mode 100644 index 0000000..9c27bbb --- /dev/null +++ b/src/Cyril/Lang/CyrilDebugOp.h @@ -0,0 +1,25 @@ +// +// CyrilDebugOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilDebugOp__ +#define __cyril2__CyrilDebugOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilDebugOp : public CyrilOp { +public: + CyrilDebugOp(Cyril* _c); + CyrilDebugOp (const CyrilDebugOp &other); + virtual ~CyrilDebugOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; +#endif /* defined(__cyril2__CyrilDebugOp__) */ diff --git a/src/Cyril/Lang/CyrilDo.h b/src/Cyril/Lang/CyrilDo.h new file mode 100644 index 0000000..3f20fdc --- /dev/null +++ b/src/Cyril/Lang/CyrilDo.h @@ -0,0 +1,54 @@ +// +// CurilDo.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CurilDo_h +#define cyril2_CurilDo_h + +#include "cmds.h" + +class CyrilDo : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilDo(Cyril* _e, Cyril* _c) : e(_e), c(_c) { + valid = c->valid; + if (_e->size() != 1) { + yyerror("Incorrect size of expression in do loop"); + valid = false; + } + } + CyrilDo (const CyrilDo &other) { + e = other.e->clone (); + c = other.c->clone (); + } + virtual ~CyrilDo () + { + delete e; + delete c; + } + void print() { + c->print(); + e->print(); + cout << "Do: " << endl; + } + virtual Cyril *clone () { return new CyrilDo (*this); } + virtual int size() { return 0; } + virtual void eval(CyrilState &_s) { + e->eval(_s); + float val = _s.stk->top(); + _s.stk->pop(); + while (val > 0) { + c->eval(_s); + val--; + } + } + virtual int matchPushPop() { return c->matchPushPop(); } +}; + + +#endif diff --git a/src/Cyril/Lang/CyrilFor.h b/src/Cyril/Lang/CyrilFor.h new file mode 100644 index 0000000..b157a38 --- /dev/null +++ b/src/Cyril/Lang/CyrilFor.h @@ -0,0 +1,76 @@ +// +// CyrilFor.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilFor_h +#define cyril2_CyrilFor_h + +#include "cmds.h" + +class CyrilFor : public Cyril { + int loc; + Cyril* e1; + Cyril* e2; + Cyril* e3; + float step; + Cyril* c; +public: + CyrilFor(int _i, Cyril* _e1, Cyril* _e2, Cyril* _e3, Cyril* _c) + : loc(_i), e1(_e1), e2(_e2), e3(_e3), c(_c) { + valid = e1->valid && e2->valid && e3->valid && c->valid; + if (_e1->size() != 1 || _e2->size() != 1 || _e3->size() != 1) { + yyerror("Incorrect size of expression in for loop"); + valid = false; + } + CyrilPush *sC = dynamic_cast(e3); + if (sC == NULL) { + yyerror("Step of FOR loop must be a number"); + valid = false; + } + else { + step = sC->getValue(); + } + } + CyrilFor (const CyrilFor &other) { + loc = other.loc; + e1 = other.e1->clone (); + e2 = other.e2->clone (); + e3 = other.e3->clone (); + c = other.c->clone (); + } + virtual ~CyrilFor () + { + delete e1; + delete e2; + delete e3; + delete c; + } + void print() { + e1->print(); + e2->print(); + e3->print(); + c->print(); + cout << "For: " << loc << endl; + } + virtual Cyril *clone () { return new CyrilFor (*this); } + virtual int size() { return 0; } + virtual void eval(CyrilState &_s) { e1->eval(_s); + (*_s.sym)[loc] = _s.stk->top(); + _s.stk->pop(); + float limit; + e2->eval(_s); + limit = _s.stk->top(); + _s.stk->pop(); + while ((*_s.sym)[loc] < limit) { + c->eval(_s); + (*_s.sym)[loc] += step; + } + } + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif diff --git a/src/Cyril/Lang/CyrilHexColor.h b/src/Cyril/Lang/CyrilHexColor.h new file mode 100644 index 0000000..a207830 --- /dev/null +++ b/src/Cyril/Lang/CyrilHexColor.h @@ -0,0 +1,52 @@ +// +// CyrilHexColor.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilHexColor_h +#define cyril2_CyrilHexColor_h + + +#include "cmds.h" + + +class CyrilHexColor : public Cyril { + string s; + float r,g,b; +public: + CyrilHexColor(const char * _s) : s(_s) { + string converter(s); + stringstream sr(converter.substr(0,2)); + stringstream sg(converter.substr(2,2)); + stringstream sb(converter.substr(4,2)); + int ir, ig, ib; + sr >> hex >> ir; + sg >> hex >> ig; + sb >> hex >> ib; + r = ir; g = ig; b = ib; + //cout << "Debug color: " << r << "," << g << "," << b << endl; + valid = true; + } + CyrilHexColor (const CyrilHexColor &other) { + s = other.s; + } + virtual ~CyrilHexColor () + { + } + void print() { + cout << "Hex: " << s << endl; + } + virtual Cyril *clone () { return new CyrilHexColor (*this); } + virtual int size() { return 3; } + virtual void eval(CyrilState &_s) { + _s.stk->push(r); + _s.stk->push(g); + _s.stk->push(b); + } +}; + + +#endif diff --git a/src/Cyril/Lang/CyrilIf.h b/src/Cyril/Lang/CyrilIf.h new file mode 100644 index 0000000..9bac696 --- /dev/null +++ b/src/Cyril/Lang/CyrilIf.h @@ -0,0 +1,53 @@ +// +// CyrilIf.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilIf_h +#define cyril2_CyrilIf_h + +#include "cmds.h" + + +class CyrilIf : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilIf(Cyril* _e, Cyril* _c) : e(_e), c(_c) { + valid = e->valid && c->valid; + if (_e->size() != 1) { + yyerror("Incorrect size of expression in if condition"); + valid = false; + } + } + CyrilIf (const CyrilIf &other) { + e = other.e->clone (); + c = other.c->clone (); + } + virtual ~CyrilIf () + { + delete e; + delete c; + } + void print() { + c->print(); + e->print(); + cout << "If: " << endl; + } + virtual Cyril *clone () { return new CyrilIf (*this); } + virtual int size() { return 0; } + virtual void eval(CyrilState &_s) { + e->eval(_s); + float b = _s.stk->top(); + _s.stk->pop(); + if (b > 0) { + c->eval(_s); + } + } + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif diff --git a/src/Cyril/Lang/CyrilList.h b/src/Cyril/Lang/CyrilList.h new file mode 100644 index 0000000..9b50ff9 --- /dev/null +++ b/src/Cyril/Lang/CyrilList.h @@ -0,0 +1,46 @@ +// +// CyrilList.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilList_h +#define cyril2_CyrilList_h + +#include "cmds.h" + +class CyrilList : public Cyril { + Cyril* c1; + Cyril* c2; +public: + CyrilList(Cyril* _c1, Cyril* _c2) : c1(_c1), c2(_c2) { + valid = c1->valid && c2->valid; + } + CyrilList (const CyrilList &other) { + c1 = other.c1->clone (); + c2 = other.c2->clone (); + } + virtual ~CyrilList () + { + delete c1; + delete c2; + } + void print() { + c1->print(); + c2->print(); + } + virtual Cyril *clone () { return new CyrilList (*this); } + virtual int size() { return c1->size() + c2->size(); } + virtual void eval(CyrilState &_s) { + c1->eval(_s); + c2->eval(_s); + } + virtual int matchPushPop() { + return c1->matchPushPop() + c2->matchPushPop(); + } +}; + + +#endif diff --git a/src/Cyril/Lang/CyrilLoad.h b/src/Cyril/Lang/CyrilLoad.h new file mode 100644 index 0000000..00aeca6 --- /dev/null +++ b/src/Cyril/Lang/CyrilLoad.h @@ -0,0 +1,40 @@ +// +// CyrilLoad.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilLoad_h +#define cyril2_CyrilLoad_h + +#include "cmds.h" + + +class CyrilLoad : public Cyril { + int loc; +public: + CyrilLoad(int _i) : loc(_i) { + valid = true; + } + CyrilLoad (const CyrilLoad &other) { + loc = other.loc; + } + virtual ~CyrilLoad () + { + } + void print() { + cout << "Load: " << loc << endl; + } + virtual Cyril *clone () { return new CyrilLoad (*this); } + virtual int size() { return 1; } + virtual void eval(CyrilState &_s) { + //cout << "Load " << loc << ": " << (*_s.sym)[loc] << endl; + //cout << _s.sym->count(loc) << endl; + _s.stk->push((*_s.sym)[loc]); + } +}; + + +#endif diff --git a/src/Cyril/Lang/CyrilNamedColor.h b/src/Cyril/Lang/CyrilNamedColor.h new file mode 100644 index 0000000..50a796a --- /dev/null +++ b/src/Cyril/Lang/CyrilNamedColor.h @@ -0,0 +1,52 @@ +// +// CyrilNamedColor.h +// Cyril +// +// Created by Darren Mothersele on 18/11/2013. +// +// + +#ifndef Cyril_CyrilNamedColor_h +#define Cyril_CyrilNamedColor_h + + +#include "cmds.h" + +extern map < string, ofColor > colorNameMap; + + +class CyrilNamedColor : public Cyril { + string s; + float r,g,b; +public: + + CyrilNamedColor(const char * _s) : s(_s) { + + ofColor c = colorNameMap[s]; + + r = c.r; + g = c.g; + b = c.b; + //cout << "Debug color: " << r << "," << g << "," << b << endl; + valid = true; + } + CyrilNamedColor (const CyrilNamedColor &other) { + s = other.s; + } + virtual ~CyrilNamedColor () + { + } + void print() { + cout << "Named color: " << s << endl; + } + virtual Cyril *clone () { return new CyrilNamedColor (*this); } + virtual int size() { return 3; } + virtual void eval(CyrilState &_s) { + _s.stk->push(r); + _s.stk->push(g); + _s.stk->push(b); + } +}; + + +#endif diff --git a/src/Cyril/Lang/CyrilPush.h b/src/Cyril/Lang/CyrilPush.h new file mode 100644 index 0000000..e540c1a --- /dev/null +++ b/src/Cyril/Lang/CyrilPush.h @@ -0,0 +1,40 @@ +// +// CyrilPush.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilPush_h +#define cyril2_CyrilPush_h + + +#include "cmds.h" + +class CyrilPush : public Cyril { + float f; +public: + CyrilPush(float _f) : f(_f) { + valid = true; + } + CyrilPush (const CyrilPush &other) { + f = other.f; + } + virtual ~CyrilPush () + { + } + void print() { + cout << "Push: " << f << endl; + } + virtual Cyril *clone () { return new CyrilPush (*this); } + int size() { return 1; } + float getValue() { return f; } + virtual void eval(CyrilState &_s) { + _s.stk->push(f); + } +}; + + + +#endif diff --git a/src/Cyril/Lang/CyrilUnaryOp.h b/src/Cyril/Lang/CyrilUnaryOp.h new file mode 100644 index 0000000..5a6c53b --- /dev/null +++ b/src/Cyril/Lang/CyrilUnaryOp.h @@ -0,0 +1,68 @@ +// +// CyrilUnaryOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilUnaryOp_h +#define cyril2_CyrilUnaryOp_h + +#include "cmds.h" + + +class CyrilUnaryOp : public Cyril { + string o; + int op; + Cyril* e; +public: + CyrilUnaryOp(string _o, Cyril* _e) : o(_o), e(_e) { + valid = e->valid; + if ("!" == o) { + op = OP_NOT; + if (e->size() != 1) { + yyerror("Operand to ! should be 1 value"); + valid = false; + } + } + else { + yyerror("Unknown operation"); + valid = false; + } + } + CyrilUnaryOp (const CyrilUnaryOp &other) { + o = other.o; + e = other.e->clone (); + } + virtual ~CyrilUnaryOp () + { + delete e; + } + void print() { + e->print(); + cout << "Unary: " << o << endl; + } + virtual Cyril *clone () { return new CyrilUnaryOp (*this); } + virtual int size() { return 1; } + virtual void eval(CyrilState &_s) { + e->eval(_s); + float v1 = _s.stk->top(); + _s.stk->pop(); + switch (op) { + case OP_NOT: + if (v1 > 0) { + _s.stk->push(0); + } + else { + _s.stk->push(1); + } + break; + default: + _s.stk->push(0); + cout << "Warning unknown unary operator " << op << endl; + } + } +}; + +#endif diff --git a/src/Cyril/Lang/CyrilWhile.h b/src/Cyril/Lang/CyrilWhile.h new file mode 100644 index 0000000..e3bf469 --- /dev/null +++ b/src/Cyril/Lang/CyrilWhile.h @@ -0,0 +1,58 @@ +// +// CyrilWhile.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilWhile_h +#define cyril2_CyrilWhile_h + +#include "cmds.h" + +class CyrilWhile : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilWhile(Cyril* _e, Cyril* _c) : e(_e), c(_c) { + valid = e->valid && c->valid; + if (_e->size() != 1) { + yyerror("Incorrect size of expression in while loop"); + valid = false; + } + } + CyrilWhile (const CyrilWhile &other) { + e = other.e->clone (); + c = other.c->clone (); + } + virtual ~CyrilWhile () + { + delete e; + delete c; + } + void print() { + c->print(); + e->print(); + cout << "While: " << endl; + } + virtual Cyril *clone () { return new CyrilWhile (*this); } + virtual int size() { return 0; } + virtual void eval(CyrilState &_s) { + float test; + e->eval(_s); + test = _s.stk->top(); + _s.stk->pop(); + while (test > 0) { + c->eval(_s); + e->eval(_s); + test = _s.stk->top(); + _s.stk->pop(); + } + } + virtual int matchPushPop() { return c->matchPushPop(); } +}; + + + +#endif diff --git a/src/Cyril/Ops/CyrilAnimStep.cpp b/src/Cyril/Ops/CyrilAnimStep.cpp new file mode 100644 index 0000000..5ffefab --- /dev/null +++ b/src/Cyril/Ops/CyrilAnimStep.cpp @@ -0,0 +1,60 @@ +// +// CyrilAnimStep.cpp +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#include "CyrilAnimStep.h" + +CyrilAnimStep::CyrilAnimStep (float _n, Cyril* _e1, Cyril* _e2) : n(_n), e1(_e1), e2(_e2) { + +} + +CyrilAnimStep::CyrilAnimStep (const CyrilAnimStep &other) { + n = other.n; + e1 = other.e1->clone (); + e2 = other.e2->clone (); +} +CyrilAnimStep::~CyrilAnimStep () +{ + delete e1; + delete e2; +} +void CyrilAnimStep::print() { + e1->print(); + e2->print(); + cout << "AnimStep " << n << endl; +} +Cyril * CyrilAnimStep::clone () { + return new CyrilAnimStep (*this); +} +int CyrilAnimStep::size() { + if (!dynamic_cast(e2)) { + //cout << " " << n << " " << endl; + // we're last so just report to stack and we're done + return n; + } + //cout << " " << n + e2->size(); + return n + e2->size(); +} +void CyrilAnimStep::eval(CyrilState &_s) { + int step = _s.stk->top(); _s.stk->pop(); + int total = _s.stk->top(); _s.stk->pop(); + //cout << total << ":" << step << endl; + if ((total - n) < step) { + e1->eval(_s); + } + else { + _s.stk->push(total - n); + _s.stk->push(step); + e2->eval(_s); + } +} + + + + + + diff --git a/src/Cyril/Ops/CyrilAnimStep.h b/src/Cyril/Ops/CyrilAnimStep.h new file mode 100644 index 0000000..f899a3b --- /dev/null +++ b/src/Cyril/Ops/CyrilAnimStep.h @@ -0,0 +1,30 @@ +// +// CyrilAnimStep.h +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#ifndef __cyril2__CyrilAnimStep__ +#define __cyril2__CyrilAnimStep__ + +#include "ofMain.h" +#include "Cyril.h" + +class CyrilAnimStep : public Cyril { + float n; + Cyril* e1; + Cyril* e2; +public: + CyrilAnimStep(float _n, Cyril* _e1, Cyril* _e2); + CyrilAnimStep (const CyrilAnimStep &other); + virtual ~CyrilAnimStep (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilAnimStep__) */ diff --git a/src/Cyril/Ops/CyrilAnimation.cpp b/src/Cyril/Ops/CyrilAnimation.cpp new file mode 100644 index 0000000..9a646e1 --- /dev/null +++ b/src/Cyril/Ops/CyrilAnimation.cpp @@ -0,0 +1,40 @@ +// +// CyrilAnimation.cpp +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#include "CyrilAnimation.h" + +CyrilAnimation::CyrilAnimation (Cyril* _e) : e(_e) { + +} + +CyrilAnimation::CyrilAnimation (const CyrilAnimation &other) { + e = other.e->clone (); +} +CyrilAnimation::~CyrilAnimation () +{ + delete e; +} +void CyrilAnimation::print() { + e->print(); + cout << "Animation" << endl; +} +Cyril * CyrilAnimation::clone () { + return new CyrilAnimation (*this); +} +int CyrilAnimation::size() { + return 0; +} +void CyrilAnimation::eval(CyrilState &_s) { + //cout << endl << "Anim start" << endl; + int total = e->size(); + // Push the total step size and current step time + _s.stk->push(total); + _s.stk->push((ofGetElapsedTimeMillis() % total)); + e->eval(_s); +} + diff --git a/src/Cyril/Ops/CyrilAnimation.h b/src/Cyril/Ops/CyrilAnimation.h new file mode 100644 index 0000000..8f1f9f3 --- /dev/null +++ b/src/Cyril/Ops/CyrilAnimation.h @@ -0,0 +1,28 @@ +// +// CyrilAnimation.h +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#ifndef __cyril2__CyrilAnimation__ +#define __cyril2__CyrilAnimation__ + +#include "ofMain.h" +#include "Cyril.h" + +class CyrilAnimation : public Cyril { + Cyril* e; +public: + CyrilAnimation(Cyril* _e); + CyrilAnimation (const CyrilAnimation &other); + virtual ~CyrilAnimation (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilAnimation__) */ diff --git a/src/Cyril/Ops/CyrilBackgroundOp.cpp b/src/Cyril/Ops/CyrilBackgroundOp.cpp new file mode 100644 index 0000000..fec1a58 --- /dev/null +++ b/src/Cyril/Ops/CyrilBackgroundOp.cpp @@ -0,0 +1,63 @@ +// +// CyrilBackgroundOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilBackgroundOp.h" + +CyrilBackgroundOp::CyrilBackgroundOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 4 || s == 3 || s == 1)) { + yyerror("background command requires 1 (palette) or 3 arguments (r,g,b) or a hex color"); + valid = false; + } +} + +CyrilBackgroundOp::CyrilBackgroundOp (const CyrilBackgroundOp &other) { + c = other.c->clone (); +} +CyrilBackgroundOp::~CyrilBackgroundOp () +{ + delete c; +} +void CyrilBackgroundOp::print() { + c->print(); + cout << "Background" << endl; +} +Cyril * CyrilBackgroundOp::clone () { + return new CyrilBackgroundOp (*this); +} +int CyrilBackgroundOp::size() { + return 0; +} +void CyrilBackgroundOp::eval(CyrilState &_s) { + c->eval(_s); + float r, g, b; + float a = 255.0; + if (c->size() == 4) { + a = _s.stk->top(); _s.stk->pop(); + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + //ofBackground(r, g, b); + ofClear(r, g, b, a); + return; + } + if (c->size() == 3) { + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + //ofBackground(r, g, b); + ofClear(r, g, b, a); + return; + } + else { + b = _s.stk->top(); _s.stk->pop(); + // load palette from b + (*_s.cs)[b]->drawBackground(); + } +} + diff --git a/src/Cyril/Ops/CyrilBackgroundOp.h b/src/Cyril/Ops/CyrilBackgroundOp.h new file mode 100644 index 0000000..24eef0a --- /dev/null +++ b/src/Cyril/Ops/CyrilBackgroundOp.h @@ -0,0 +1,28 @@ +// +// CyrilBackgroundOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilBackgroundOp__ +#define __cyril2__CyrilBackgroundOp__ + +#include "ofMain.h" +#include "CyrilOp.h" +#include "Palette.h" + +class CyrilBackgroundOp : public CyrilOp { +public: + CyrilBackgroundOp(Cyril* _c); + CyrilBackgroundOp (const CyrilBackgroundOp &other); + virtual ~CyrilBackgroundOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilBackgroundOp__) */ diff --git a/src/Cyril/Ops/CyrilBallDetailOp.cpp b/src/Cyril/Ops/CyrilBallDetailOp.cpp new file mode 100644 index 0000000..ac1581c --- /dev/null +++ b/src/Cyril/Ops/CyrilBallDetailOp.cpp @@ -0,0 +1,42 @@ +// +// CyrilBallDetailOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilBallDetailOp.h" + +CyrilBallDetailOp::CyrilBallDetailOp (Cyril* _c) : CyrilOp(_c) { + if (_c->size() != 1) { + yyerror("BallDetail command requires 1 argument"); + valid = false; + } +} + +CyrilBallDetailOp::CyrilBallDetailOp (const CyrilBallDetailOp &other) { + c = other.c->clone (); +} +CyrilBallDetailOp::~CyrilBallDetailOp () +{ + delete c; +} +void CyrilBallDetailOp::print() { + c->print(); + cout << "BallDetail" << endl; +} +Cyril * CyrilBallDetailOp::clone () { + return new CyrilBallDetailOp (*this); +} +int CyrilBallDetailOp::size() { + return 0; +} +void CyrilBallDetailOp::eval(CyrilState &_s) { + c->eval(_s); + float d = _s.stk->top(); + _s.stk->pop(); + if (d > 5) d = 5; + ofSetIcoSphereResolution(d); +} + diff --git a/src/Cyril/Ops/CyrilBallDetailOp.h b/src/Cyril/Ops/CyrilBallDetailOp.h new file mode 100644 index 0000000..d264f0e --- /dev/null +++ b/src/Cyril/Ops/CyrilBallDetailOp.h @@ -0,0 +1,26 @@ +// +// CyrilBallDetailOp.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilBallDetailOp__ +#define __cyril2__CyrilBallDetailOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilBallDetailOp : public CyrilOp { +public: + CyrilBallDetailOp(Cyril* _c); + CyrilBallDetailOp (const CyrilBallDetailOp &other); + virtual ~CyrilBallDetailOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilBallDetailOp__) */ diff --git a/src/Cyril/Ops/CyrilBallOp.cpp b/src/Cyril/Ops/CyrilBallOp.cpp new file mode 100644 index 0000000..3c62c00 --- /dev/null +++ b/src/Cyril/Ops/CyrilBallOp.cpp @@ -0,0 +1,48 @@ +// +// CyrilBallOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilBallOp.h" + +CyrilBallOp::CyrilBallOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1)) { + yyerror("Ball command requires 0 or 1 argument"); + valid = false; + } +} + +CyrilBallOp::CyrilBallOp (const CyrilBallOp &other) { + c = other.c->clone (); +} +CyrilBallOp::~CyrilBallOp () +{ + delete c; +} +void CyrilBallOp::print() { + c->print(); + cout << "Ball" << endl; +} +Cyril * CyrilBallOp::clone () { + return new CyrilBallOp (*this); +} +int CyrilBallOp::size() { + return 0; +} +void CyrilBallOp::eval(CyrilState &_s) { + c->eval(_s); + float r; + if (c->size() == 1) { + r = _s.stk->top(); + _s.stk->pop(); + } + else { + r = 1; + } + ofDrawIcoSphere(r); +} + diff --git a/src/Cyril/Ops/CyrilBallOp.h b/src/Cyril/Ops/CyrilBallOp.h new file mode 100644 index 0000000..3dae76d --- /dev/null +++ b/src/Cyril/Ops/CyrilBallOp.h @@ -0,0 +1,25 @@ +// +// CyrilBallOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilBallOp__ +#define __cyril2__CyrilBallOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilBallOp : public CyrilOp { +public: + CyrilBallOp(Cyril* _c); + CyrilBallOp (const CyrilBallOp &other); + virtual ~CyrilBallOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; +#endif /* defined(__cyril2__CyrilBallOp__) */ diff --git a/src/Cyril/Ops/CyrilBinaryOp.h b/src/Cyril/Ops/CyrilBinaryOp.h new file mode 100644 index 0000000..e068f02 --- /dev/null +++ b/src/Cyril/Ops/CyrilBinaryOp.h @@ -0,0 +1,295 @@ +// +// CyrilBinaryOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilBinaryOp_h +#define cyril2_CyrilBinaryOp_h + +#include "cmds.h" + + +class CyrilBinaryOp : public Cyril { + string o; + int op; + Cyril* e1; + Cyril* e2; +public: + CyrilBinaryOp(string _o, Cyril* _e1, Cyril* _e2) : o(_o), e1(_e1), e2(_e2) { + valid = e1->valid && e2->valid; + if ("+" == o) { + op = OP_PLUS; + if (e1->size() != 1) { + yyerror("Left operand to + should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to + should be 1 value"); + valid = false; + } + } + else if ("-" == o) { + op = OP_MINUS; + if (e1->size() != 1) { + yyerror("Left operand to - should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to - should be 1 value"); + valid = false; + } + } + else if ("/" == o) { + op = OP_DIV; + if (e1->size() != 1) { + yyerror("Left operand to / should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to / should be 1 value"); + valid = false; + } + } + else if ("*" == o) { + op = OP_MULT; + if (e1->size() != 1) { + yyerror("Left operand to * should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to * should be 1 value"); + valid = false; + } + } + else if ("%" == o) { + op = OP_MOD; + if (e1->size() != 1) { + yyerror("Left operand to % should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to % should be 1 value"); + valid = false; + } + } + else if ("==" == o) { + op = OP_EQ; + if (e1->size() != 1) { + yyerror("Left operand to == should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to == should be 1 value"); + valid = false; + } + } + else if ("!=" == o) { + op = OP_NOTEQ; + if (e1->size() != 1) { + yyerror("Left operand to != should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to != should be 1 value"); + valid = false; + } + } + else if ("<" == o) { + op = OP_LESS; + if (e1->size() != 1) { + yyerror("Left operand to < should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to < should be 1 value"); + valid = false; + } + } + else if ("<=" == o) { + op = OP_LESSEQ; + if (e1->size() != 1) { + yyerror("Left operand to <= should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to <= should be 1 value"); + valid = false; + } + } + else if (">" == o) { + op = OP_GR; + if (e1->size() != 1) { + yyerror("Left operand to > should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to > should be 1 value"); + valid = false; + } + } + else if (">=" == o) { + op = OP_GREQ; + if (e1->size() != 1) { + yyerror("Left operand to >= should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to >= should be 1 value"); + valid = false; + } + } + else if ("&" == o) { + op = OP_AND; + if (e1->size() != 1) { + yyerror("Left operand to AND should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to AND should be 1 value"); + valid = false; + } + } + else if ("|" == o) { + op = OP_OR; + if (e1->size() != 1) { + yyerror("Left operand to OR should be 1 value"); + valid = false; + } + if (e2->size() != 1) { + yyerror("Right operand to OR should be 1 value"); + valid = false; + } + } + else { + yyerror("Unknown operation"); + valid = false; + } + } + CyrilBinaryOp (const CyrilBinaryOp &other) { + o = other.o; + e1 = other.e1->clone (); + e2 = other.e2->clone (); + } + virtual ~CyrilBinaryOp () + { + delete e1; + delete e2; + } + void print() { + e1->print(); + e2->print(); + cout << "Binary: " << o << endl; + } + virtual Cyril *clone () { return new CyrilBinaryOp (*this); } + virtual int size() { return 1; } + virtual void eval(CyrilState &_s) { + e1->eval(_s); + float v1 = _s.stk->top(); + _s.stk->pop(); + e2->eval(_s); + float v2 = _s.stk->top(); + _s.stk->pop(); + switch (op) { + case OP_MINUS: + _s.stk->push(v1 - v2); + break; + case OP_PLUS: + _s.stk->push(v1 + v2); + break; + case OP_MULT: + _s.stk->push(v1 * v2); + break; + case OP_DIV: + if (v2 == 0) { + cout << "Warning: divide by 0" << endl; + _s.stk->push(0); + } + else { + _s.stk->push(v1 / v2); + } + break; + case OP_MOD: + if (v2 == 0) { + cout << "Warning: divide(mod) by 0" << endl; + _s.stk->push(0); + } + else { + _s.stk->push(int(v1) % int(v2)); + } + break; + case OP_EQ: + if (v1 == v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_NOTEQ: + if (v1 != v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_LESS: + if (v1 < v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_LESSEQ: + if (v1 <= v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_GR: + if (v1 > v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_GREQ: + if (v1 >= v2) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_AND: + if (v1 > 0 && v2 > 0) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + case OP_OR: + if (v1 > 0 || v2 > 0) { + _s.stk->push(1); + } + else { + _s.stk->push(0); + } + break; + default: + _s.stk->push(0); + cout << "Warning unknown operator " << op << endl; + } + } +}; + + +#endif diff --git a/src/Cyril/Ops/CyrilBlink.cpp b/src/Cyril/Ops/CyrilBlink.cpp new file mode 100644 index 0000000..4505b31 --- /dev/null +++ b/src/Cyril/Ops/CyrilBlink.cpp @@ -0,0 +1,53 @@ +// +// CyrilBlink.cpp +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#include "CyrilBlink.h" + +CyrilBlink::CyrilBlink (Cyril* _e, Cyril* _c) : e(_e), c(_c) { + if (_e->size() != 2) { + yyerror("Blink command requires on and off times"); + valid = false; + } +} + +CyrilBlink::CyrilBlink (const CyrilBlink &other) { + e = other.e->clone (); + c = other.c->clone (); +} +CyrilBlink::~CyrilBlink () +{ + delete e; + delete c; +} +void CyrilBlink::print() { + e->print(); + c->print(); + cout << "Blink" << endl; +} +Cyril * CyrilBlink::clone () { + return new CyrilBlink (*this); +} +int CyrilBlink::size() { + return 0; +} +void CyrilBlink::eval(CyrilState &_s) { + e->eval(_s); + float v2 = _s.stk->top(); + _s.stk->pop(); + float v1 = _s.stk->top(); + _s.stk->pop(); + //float t = (ofGetElapsedTimeMillis() / 1000.0); + if ((v1 + v2) == 0) { + cout << "Mod by 0 error in blink" << endl; + return; + } + if ((ofGetElapsedTimeMillis() % int(v1 + v2)) < v1) { + c->eval(_s); + } +} + diff --git a/src/Cyril/Ops/CyrilBlink.h b/src/Cyril/Ops/CyrilBlink.h new file mode 100644 index 0000000..6b11e69 --- /dev/null +++ b/src/Cyril/Ops/CyrilBlink.h @@ -0,0 +1,29 @@ +// +// CyrilBlink.h +// cyril2 +// +// Created by Darren Mothersele on 07/11/2013. +// +// + +#ifndef __cyril2__CyrilBlink__ +#define __cyril2__CyrilBlink__ + +#include "ofMain.h" +#include "Cyril.h" + +class CyrilBlink : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilBlink(Cyril* _e, Cyril* _c); + CyrilBlink (const CyrilBlink &other); + virtual ~CyrilBlink (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif /* defined(__cyril2__CyrilBlink__) */ diff --git a/src/Cyril/Ops/CyrilBoxOp.cpp b/src/Cyril/Ops/CyrilBoxOp.cpp new file mode 100644 index 0000000..440f1f9 --- /dev/null +++ b/src/Cyril/Ops/CyrilBoxOp.cpp @@ -0,0 +1,57 @@ +// +// CyrilBoxOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilBoxOp.h" + +CyrilBoxOp::CyrilBoxOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 3)) { + yyerror("Box command requires 0, 1, or 3 arguments"); + valid = false; + } +} + +CyrilBoxOp::CyrilBoxOp (const CyrilBoxOp &other) { + c = other.c->clone (); +} +CyrilBoxOp::~CyrilBoxOp () +{ + delete c; +} +void CyrilBoxOp::print() { + c->print(); + cout << "Box" << endl; +} +Cyril * CyrilBoxOp::clone () { + return new CyrilBoxOp (*this); +} +int CyrilBoxOp::size() { + return 0; +} +void CyrilBoxOp::eval(CyrilState &_s) { + c->eval(_s); + float x, y, z, w, h, d; + switch (c->size()) { + case 3: + d = _s.stk->top(); _s.stk->pop(); + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + break; + case 1: + d = _s.stk->top(); _s.stk->pop(); + h = d; + w = d; + break; + default: + d = 1; + h = 1; + w = 1; + } + ofDrawBox(w, h, d); +} + diff --git a/src/Cyril/Ops/CyrilBoxOp.h b/src/Cyril/Ops/CyrilBoxOp.h new file mode 100644 index 0000000..354bd02 --- /dev/null +++ b/src/Cyril/Ops/CyrilBoxOp.h @@ -0,0 +1,27 @@ +// +// CyrilBoxOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilBoxOp__ +#define __cyril2__CyrilBoxOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilBoxOp : public CyrilOp { +public: + CyrilBoxOp(Cyril* _c); + CyrilBoxOp (const CyrilBoxOp &other); + virtual ~CyrilBoxOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilBoxOp__) */ diff --git a/src/Cyril/Ops/CyrilColorOp.cpp b/src/Cyril/Ops/CyrilColorOp.cpp new file mode 100644 index 0000000..873fbd0 --- /dev/null +++ b/src/Cyril/Ops/CyrilColorOp.cpp @@ -0,0 +1,67 @@ +// +// CyrilColorOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilColorOp.h" + +CyrilColorOp::CyrilColorOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 1 || s == 2 || s == 3 || s == 4)) { + yyerror("Color command needs 1, 2, 3 or 4 arguments"); + valid = false; + } +} + +CyrilColorOp::CyrilColorOp (const CyrilColorOp &other) { + c = other.c->clone (); +} +CyrilColorOp::~CyrilColorOp () +{ + delete c; +} +void CyrilColorOp::print() { + c->print(); + cout << "Color" << endl; +} +Cyril * CyrilColorOp::clone () { + return new CyrilColorOp (*this); +} +int CyrilColorOp::size() { + return 0; +} +void CyrilColorOp::eval(CyrilState &_s) { + c->eval(_s); + float r, g, b, a; + switch (c->size()) { + case 4: + a = _s.stk->top(); _s.stk->pop(); + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 3: + a = 255; + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 2: + a = _s.stk->top(); _s.stk->pop(); + b = _s.stk->top(); _s.stk->pop(); + g = b; + r = b; + break; + case 1: + a = 255; + b = _s.stk->top(); _s.stk->pop(); + g = b; + r = b; + break; + } + ofSetColor(r, g, b, a); +} + diff --git a/src/Cyril/Ops/CyrilColorOp.h b/src/Cyril/Ops/CyrilColorOp.h new file mode 100644 index 0000000..87df8b6 --- /dev/null +++ b/src/Cyril/Ops/CyrilColorOp.h @@ -0,0 +1,27 @@ +// +// CyrilColorOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilColorOp__ +#define __cyril2__CyrilColorOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilColorOp : public CyrilOp { +public: + CyrilColorOp(Cyril* _c); + CyrilColorOp (const CyrilColorOp &other); + virtual ~CyrilColorOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilColorOp__) */ diff --git a/src/Cyril/Ops/CyrilConeOp.cpp b/src/Cyril/Ops/CyrilConeOp.cpp new file mode 100644 index 0000000..abb9516 --- /dev/null +++ b/src/Cyril/Ops/CyrilConeOp.cpp @@ -0,0 +1,55 @@ +// +// CyrilConeOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilConeOp.h" + +CyrilConeOp::CyrilConeOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 2)) { + yyerror("Cone command requires 0, 1 or 2 arguments"); + valid = false; + } +} + +CyrilConeOp::CyrilConeOp (const CyrilConeOp &other) { + c = other.c->clone (); +} +CyrilConeOp::~CyrilConeOp () +{ + delete c; +} +void CyrilConeOp::print() { + c->print(); + cout << "Cone" << endl; +} +Cyril * CyrilConeOp::clone () { + return new CyrilConeOp (*this); +} +int CyrilConeOp::size() { + return 0; +} +void CyrilConeOp::eval(CyrilState &_s) { + c->eval(_s); + float r, h; + switch (c->size()) { + case 2: + h = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 1: + h = _s.stk->top(); _s.stk->pop(); + r = h; + break; + case 0: + h = 1; + r = 1; + break; + } + ofDrawCone(r, h); +} + diff --git a/src/Cyril/Ops/CyrilConeOp.h b/src/Cyril/Ops/CyrilConeOp.h new file mode 100644 index 0000000..1fce7bd --- /dev/null +++ b/src/Cyril/Ops/CyrilConeOp.h @@ -0,0 +1,26 @@ +// +// CyrilConeOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilConeOp__ +#define __cyril2__CyrilConeOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilConeOp : public CyrilOp { +public: + CyrilConeOp(Cyril* _c); + CyrilConeOp (const CyrilConeOp &other); + virtual ~CyrilConeOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilConeOp__) */ diff --git a/src/Cyril/Ops/CyrilFillOp.cpp b/src/Cyril/Ops/CyrilFillOp.cpp new file mode 100644 index 0000000..c366973 --- /dev/null +++ b/src/Cyril/Ops/CyrilFillOp.cpp @@ -0,0 +1,73 @@ +// +// CyrilFillOp.cpp +// Cyril +// +// Created by Darren Mothersele on 14/11/2013. +// +// + +#include "CyrilFillOp.h" + +CyrilFillOp::CyrilFillOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 2 || s == 3 || s == 4)) { + yyerror("Fill command takes 0 (standard) or 1, 2, 3, or 4 arguments (color)"); + valid = false; + } +} + +CyrilFillOp::CyrilFillOp (const CyrilFillOp &other) { + c = other.c->clone (); +} +CyrilFillOp::~CyrilFillOp () +{ + delete c; +} +void CyrilFillOp::print() { + c->print(); + cout << "Fill" << endl; +} +Cyril * CyrilFillOp::clone () { + return new CyrilFillOp (*this); +} +int CyrilFillOp::size() { + return 0; +} +void CyrilFillOp::eval(CyrilState &_s) { + int _size = c->size(); + if (_size == 0) { + ofFill(); + return; + } + c->eval(_s); + float r, g, b, a; + switch (_size) { + case 4: + a = _s.stk->top(); _s.stk->pop(); + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 3: + a = 255; + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 2: + a = _s.stk->top(); _s.stk->pop(); + b = _s.stk->top(); _s.stk->pop(); + g = b; + r = b; + break; + case 1: + a = 255; + b = _s.stk->top(); _s.stk->pop(); + g = b; + r = b; + break; + } + ofSetColor(r, g, b, a); + ofFill(); +} + diff --git a/src/Cyril/Ops/CyrilFillOp.h b/src/Cyril/Ops/CyrilFillOp.h new file mode 100644 index 0000000..d81d1fc --- /dev/null +++ b/src/Cyril/Ops/CyrilFillOp.h @@ -0,0 +1,27 @@ +// +// CyrilFillOp.h +// Cyril +// +// Created by Darren Mothersele on 14/11/2013. +// +// + +#ifndef __Cyril__CyrilFillOp__ +#define __Cyril__CyrilFillOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilFillOp : public CyrilOp { +public: + CyrilFillOp(Cyril* _c); + CyrilFillOp (const CyrilFillOp &other); + virtual ~CyrilFillOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__Cyril__CyrilFillOp__) */ diff --git a/src/Cyril/Ops/CyrilGridOp.cpp b/src/Cyril/Ops/CyrilGridOp.cpp new file mode 100644 index 0000000..56ca987 --- /dev/null +++ b/src/Cyril/Ops/CyrilGridOp.cpp @@ -0,0 +1,50 @@ +// +// CyrilGridOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilGridOp.h" + +CyrilGridOp::CyrilGridOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1)) { + yyerror("Grid command requires 0 or 1 argument"); + cout << _c->size() << endl; + valid = false; + } +} + +CyrilGridOp::CyrilGridOp (const CyrilGridOp &other) { + c = other.c->clone (); +} +CyrilGridOp::~CyrilGridOp () +{ + delete c; +} +void CyrilGridOp::print() { + c->print(); + cout << "Grid" << endl; +} +Cyril * CyrilGridOp::clone () { + return new CyrilGridOp (*this); +} +int CyrilGridOp::size() { + return 0; +} +void CyrilGridOp::eval(CyrilState &_s) { + c->eval(_s); + float s; + if (c->size() == 1) { + s = _s.stk->top(); _s.stk->pop(); + } + else { + s = 1; + } + if (s > 0) { + ofDrawGridPlane(s); + } +} + diff --git a/src/Cyril/Ops/CyrilGridOp.h b/src/Cyril/Ops/CyrilGridOp.h new file mode 100644 index 0000000..1798b27 --- /dev/null +++ b/src/Cyril/Ops/CyrilGridOp.h @@ -0,0 +1,26 @@ +// +// CyrilGridOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilGridOp__ +#define __cyril2__CyrilGridOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilGridOp : public CyrilOp { +public: + CyrilGridOp(Cyril* _c); + CyrilGridOp (const CyrilGridOp &other); + virtual ~CyrilGridOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilGridOp__) */ diff --git a/src/Cyril/Ops/CyrilImgOp.cpp b/src/Cyril/Ops/CyrilImgOp.cpp new file mode 100644 index 0000000..b16e731 --- /dev/null +++ b/src/Cyril/Ops/CyrilImgOp.cpp @@ -0,0 +1,51 @@ +// +// CyrilImgOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilImgOp.h" + +CyrilImgOp::CyrilImgOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 1)) { + yyerror("Image command requires 1 argument"); + valid = false; + } +} + +CyrilImgOp::CyrilImgOp (const CyrilImgOp &other) { + c = other.c->clone (); +} +CyrilImgOp::~CyrilImgOp () +{ + delete c; +} +void CyrilImgOp::print() { + c->print(); + cout << "Image" << endl; +} +Cyril * CyrilImgOp::clone () { + return new CyrilImgOp (*this); +} +int CyrilImgOp::size() { + return 0; +} +void CyrilImgOp::eval(CyrilState &_s) { + c->eval(_s); + float i; + i = _s.stk->top(); _s.stk->pop(); + ofScale(0.01, 0.01, 0.01); + if (_s.img->count(i)) { + _s.img->at(i)->draw(0, 0, 0); + } + // TODO: recurse up the parent tree + else if (_s.parent) { + if (_s.parent->img->count(i)) { + _s.parent->img->at(i)->draw(0, 0, 0); + } + } + ofScale(100, 100, 100); +} diff --git a/src/Cyril/Ops/CyrilImgOp.h b/src/Cyril/Ops/CyrilImgOp.h new file mode 100644 index 0000000..b4633ab --- /dev/null +++ b/src/Cyril/Ops/CyrilImgOp.h @@ -0,0 +1,27 @@ +// +// CyrilImgOp.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilImgOp__ +#define __cyril2__CyrilImgOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilImgOp : public CyrilOp { +public: + CyrilImgOp(Cyril* _c); + CyrilImgOp (const CyrilImgOp &other); + virtual ~CyrilImgOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilImgOp__) */ diff --git a/src/Cyril/Ops/CyrilInitOp.cpp b/src/Cyril/Ops/CyrilInitOp.cpp new file mode 100644 index 0000000..7da144f --- /dev/null +++ b/src/Cyril/Ops/CyrilInitOp.cpp @@ -0,0 +1,41 @@ +// +// CyrilInitOp.cpp +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#include "CyrilInitOp.h" + +CyrilInitOp::CyrilInitOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0)) { + yyerror("Init command takes 0 arguments"); + valid = false; + } +} + +CyrilInitOp::CyrilInitOp (const CyrilInitOp &other) { + c = other.c->clone (); +} +CyrilInitOp::~CyrilInitOp () +{ + delete c; +} +void CyrilInitOp::print() { + c->print(); + cout << "Init" << endl; +} +Cyril * CyrilInitOp::clone () { + return new CyrilInitOp (*this); +} +int CyrilInitOp::size() { + return 0; +} +void CyrilInitOp::eval(CyrilState &_s) { + if ((*_s.sym)[REG_FRAME] == 0) { + c->eval(_s); + } +} + diff --git a/src/Cyril/Ops/CyrilInitOp.h b/src/Cyril/Ops/CyrilInitOp.h new file mode 100644 index 0000000..cacdd52 --- /dev/null +++ b/src/Cyril/Ops/CyrilInitOp.h @@ -0,0 +1,27 @@ +// +// CyrilInitOp.h +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#ifndef __Cyril__CyrilInitOp__ +#define __Cyril__CyrilInitOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilInitOp : public CyrilOp { +public: + CyrilInitOp(Cyril* _c); + CyrilInitOp (const CyrilInitOp &other); + virtual ~CyrilInitOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__Cyril__CyrilInitOp__) */ diff --git a/src/Cyril/Ops/CyrilLightOp.cpp b/src/Cyril/Ops/CyrilLightOp.cpp new file mode 100644 index 0000000..78a6fc3 --- /dev/null +++ b/src/Cyril/Ops/CyrilLightOp.cpp @@ -0,0 +1,63 @@ +// +// CyrilLightOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilLightOp.h" + +CyrilLightOp::CyrilLightOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 3 || s == 6)) { + yyerror("Light command requires 3 or 6 arguments"); + valid = false; + } +} + +CyrilLightOp::CyrilLightOp (const CyrilLightOp &other) { + c = other.c->clone (); +} +CyrilLightOp::~CyrilLightOp () +{ + delete c; +} +void CyrilLightOp::print() { + c->print(); + cout << "Light" << endl; +} +Cyril * CyrilLightOp::clone () { + return new CyrilLightOp (*this); +} +int CyrilLightOp::size() { + return 0; +} +void CyrilLightOp::eval(CyrilState &_s) { + if (_s.light != NULL) { + c->eval(_s); + float x, y, z, a; + switch (c->size()) { + case 3: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + _s.light->setPosition(x, y, z); + break; + case 6: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + //_s.light->setAmbientColor(ofColor(x, y, z)); + _s.light->setDiffuseColor(ofColor(x, y, z)); + //_s.light->setAmbientColor(ofColor(x, y, z)); + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + //_s.light->setSpecularColor(ofColor(x, y, z)); + _s.light->setAmbientColor(ofColor(x, y, z)); + break; + } + } +} + diff --git a/src/Cyril/Ops/CyrilLightOp.h b/src/Cyril/Ops/CyrilLightOp.h new file mode 100644 index 0000000..5a0c9b7 --- /dev/null +++ b/src/Cyril/Ops/CyrilLightOp.h @@ -0,0 +1,26 @@ +// +// CyrilLightOp.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilLightOp__ +#define __cyril2__CyrilLightOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilLightOp : public CyrilOp { +public: + CyrilLightOp(Cyril* _c); + CyrilLightOp (const CyrilLightOp &other); + virtual ~CyrilLightOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilLightOp__) */ diff --git a/src/Cyril/Ops/CyrilLineOp.cpp b/src/Cyril/Ops/CyrilLineOp.cpp new file mode 100644 index 0000000..582ca00 --- /dev/null +++ b/src/Cyril/Ops/CyrilLineOp.cpp @@ -0,0 +1,55 @@ +// +// CyrilLineOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilLineOp.h" + +CyrilLineOp::CyrilLineOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 2 || s == 4)) { + yyerror("Line command requires 2 or 4 arguments"); + valid = false; + } +} + +CyrilLineOp::CyrilLineOp (const CyrilLineOp &other) { + c = other.c->clone (); +} +CyrilLineOp::~CyrilLineOp () +{ + delete c; +} +void CyrilLineOp::print() { + c->print(); + cout << "Line" << endl; +} +Cyril * CyrilLineOp::clone () { + return new CyrilLineOp (*this); +} +int CyrilLineOp::size() { + return 0; +} +void CyrilLineOp::eval(CyrilState &_s) { + c->eval(_s); + float x1, x2, y1, y2; + switch (c->size()) { + case 4: + y2 = _s.stk->top(); _s.stk->pop(); + x2 = _s.stk->top(); _s.stk->pop(); + y1 = _s.stk->top(); _s.stk->pop(); + x1 = _s.stk->top(); _s.stk->pop(); + break; + case 2: + y2 = _s.stk->top(); _s.stk->pop(); + x2 = _s.stk->top(); _s.stk->pop(); + y1 = 0; + x1 = 0; + break; + } + ofLine(x1, y1, x2, y2); +} + diff --git a/src/Cyril/Ops/CyrilLineOp.h b/src/Cyril/Ops/CyrilLineOp.h new file mode 100644 index 0000000..5467cc0 --- /dev/null +++ b/src/Cyril/Ops/CyrilLineOp.h @@ -0,0 +1,26 @@ +// +// CyrilLineOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilLineOp__ +#define __cyril2__CyrilLineOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilLineOp : public CyrilOp { +public: + CyrilLineOp(Cyril* _c); + CyrilLineOp (const CyrilLineOp &other); + virtual ~CyrilLineOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilLineOp__) */ diff --git a/src/Cyril/Ops/CyrilMoveOp.cpp b/src/Cyril/Ops/CyrilMoveOp.cpp new file mode 100644 index 0000000..13622ba --- /dev/null +++ b/src/Cyril/Ops/CyrilMoveOp.cpp @@ -0,0 +1,64 @@ +// +// CyrilMoveOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilMoveOp.h" + +CyrilMoveOp::CyrilMoveOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 2 || s == 3)) { + yyerror("Move command requires 1, 2 or 3 arguments"); + valid = false; + } +} + +CyrilMoveOp::CyrilMoveOp (const CyrilMoveOp &other) { + c = other.c->clone (); +} +CyrilMoveOp::~CyrilMoveOp () +{ + delete c; +} +void CyrilMoveOp::print() { + c->print(); + cout << "Move" << endl; +} +Cyril * CyrilMoveOp::clone () { + return new CyrilMoveOp (*this); +} +int CyrilMoveOp::size() { + return 0; +} +void CyrilMoveOp::eval(CyrilState &_s) { + c->eval(_s); + int s = c->size(); + float x,y,z; + switch (c->size()) { + case 3: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + break; + case 2: + z = 0; + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + break; + case 1: + z = 0; + y = 0; + x = _s.stk->top(); _s.stk->pop(); + break; + default: + z = 0; + y = 0; + x = sin((*_s.sym)[REG_TIME] / 1000); + } + ofTranslate(x, y, z); + _s.ms->translate(x, y, z); +} + diff --git a/src/Cyril/Ops/CyrilMoveOp.h b/src/Cyril/Ops/CyrilMoveOp.h new file mode 100644 index 0000000..7721469 --- /dev/null +++ b/src/Cyril/Ops/CyrilMoveOp.h @@ -0,0 +1,28 @@ +// +// CyrilMoveOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilMoveOp__ +#define __cyril2__CyrilMoveOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilMoveOp : public CyrilOp { +public: + CyrilMoveOp(Cyril* _c); + CyrilMoveOp (const CyrilMoveOp &other); + virtual ~CyrilMoveOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + + +#endif /* defined(__cyril2__CyrilMoveOp__) */ diff --git a/src/Cyril/Ops/CyrilNoFillOp.cpp b/src/Cyril/Ops/CyrilNoFillOp.cpp new file mode 100644 index 0000000..9ae1ab8 --- /dev/null +++ b/src/Cyril/Ops/CyrilNoFillOp.cpp @@ -0,0 +1,46 @@ +// +// CyrilNoNoFillOp.cpp +// Cyril +// +// Created by Darren Mothersele on 14/11/2013. +// +// + +#include "CyrilNoFillOp.h" + +CyrilNoFillOp::CyrilNoFillOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1)) { + yyerror("noFill command takes 0 or 1 arguments"); + valid = false; + } +} + +CyrilNoFillOp::CyrilNoFillOp (const CyrilNoFillOp &other) { + c = other.c->clone (); +} +CyrilNoFillOp::~CyrilNoFillOp () +{ + delete c; +} +void CyrilNoFillOp::print() { + c->print(); + cout << "Fill" << endl; +} +Cyril * CyrilNoFillOp::clone () { + return new CyrilNoFillOp (*this); +} +int CyrilNoFillOp::size() { + return 0; +} +void CyrilNoFillOp::eval(CyrilState &_s) { + int _size = c->size(); + if (_size == 1) { + c->eval(_s); + ofSetLineWidth(_s.stk->top()); + _s.stk->pop(); + ofFill(); + } + ofNoFill(); +} + diff --git a/src/Cyril/Ops/CyrilNoFillOp.h b/src/Cyril/Ops/CyrilNoFillOp.h new file mode 100644 index 0000000..4a9c4c9 --- /dev/null +++ b/src/Cyril/Ops/CyrilNoFillOp.h @@ -0,0 +1,26 @@ +// +// CyrilNoNoFillOp.h +// Cyril +// +// Created by Darren Mothersele on 14/11/2013. +// +// + +#ifndef __Cyril__CyrilNoNoFillOp__ +#define __Cyril__CyrilNoNoFillOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilNoFillOp : public CyrilOp { +public: + CyrilNoFillOp(Cyril* _c); + CyrilNoFillOp (const CyrilNoFillOp &other); + virtual ~CyrilNoFillOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__Cyril__CyrilNoNoFillOp__) */ diff --git a/src/Cyril/Ops/CyrilPalette.cpp b/src/Cyril/Ops/CyrilPalette.cpp new file mode 100644 index 0000000..80119e2 --- /dev/null +++ b/src/Cyril/Ops/CyrilPalette.cpp @@ -0,0 +1,69 @@ +// +// CyrilPalette.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilPalette.h" + +CyrilPalette::CyrilPalette(int _l, Cyril* _p) : loc(_l) { + int sz = _p->size(); + //cout << "Palette size " << sz << endl; + if (sz % 4 != 0) { + yyerror("Palette command formatted incorrectly"); + valid = false; + } + else if (!_p->valid) { + valid = false; + } + else { + palette = new Palette(); + CyrilState _state; + _state.stk = new stack; + _state.ms = new ofMatrixStack(*ofGetWindowPtr()); + _state.ps = new vector; + _state.sym = new map; + _state.cs = new map; + _state.img = new map; + _state.parent = NULL; + + _p->eval(_state); + float d, r, g, b; + while (!_state.stk->empty()) { + d = _state.stk->top(); _state.stk->pop(); + b = _state.stk->top(); _state.stk->pop(); + g = _state.stk->top(); _state.stk->pop(); + r = _state.stk->top(); _state.stk->pop(); + palette->addColor(d, r, g, b); + } + } +} + + +CyrilPalette::CyrilPalette (const CyrilPalette &other) { + loc = other.loc; + palette = other.palette->clone(); +} +CyrilPalette::~CyrilPalette () { + delete palette; +} + +void CyrilPalette::print() { + cout << "Palette" << endl; +} + +Cyril* CyrilPalette::clone () { + return new CyrilPalette (*this); +} + +int CyrilPalette::size() { + return 0; +} + +void CyrilPalette::eval(CyrilState &_s) { + (*_s.cs)[loc] = palette; +} + + diff --git a/src/Cyril/Ops/CyrilPalette.h b/src/Cyril/Ops/CyrilPalette.h new file mode 100644 index 0000000..ce0fa12 --- /dev/null +++ b/src/Cyril/Ops/CyrilPalette.h @@ -0,0 +1,29 @@ +// +// CyrilPalette.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilPalette__ +#define __cyril2__CyrilPalette__ + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" +#include "Palette.h" + +class CyrilPalette : public Cyril { + int loc; + Palette* palette; +public: + CyrilPalette(int _l, Cyril* _p); + CyrilPalette (const CyrilPalette &other) ; + virtual ~CyrilPalette (); + void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; +#endif /* defined(__cyril2__CyrilPalette__) */ diff --git a/src/Cyril/Ops/CyrilPaletteItem.cpp b/src/Cyril/Ops/CyrilPaletteItem.cpp new file mode 100644 index 0000000..9a4c545 --- /dev/null +++ b/src/Cyril/Ops/CyrilPaletteItem.cpp @@ -0,0 +1,68 @@ +// +// CyrilPaletteItem.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilPaletteItem.h" + +CyrilPaletteItem::CyrilPaletteItem(float _f, Cyril* _e) : d(_f), e(_e) { + /* + string converter(_s); + stringstream sr(converter.substr(0,2)); + stringstream sg(converter.substr(2,2)); + stringstream sb(converter.substr(4,2)); + int ir, ig, ib; + sr >> hex >> ir; + sg >> hex >> ig; + sb >> hex >> ib; + r = ir; g = ig; b = ib; + */ + + int sz = _e->size(); + if (!(sz == 3)) { + yyerror("Palette item requires 3 arguments"); + valid = false; + } + paletteCalc = false; +} + +CyrilPaletteItem::CyrilPaletteItem (const CyrilPaletteItem &other) { + d = other.d; + r = other.r; + g = other.g; + b = other.b; +} +CyrilPaletteItem::~CyrilPaletteItem () { + +} + +void CyrilPaletteItem::print() { + + cout << "PaletteItem" << endl; +} + + +Cyril * CyrilPaletteItem::clone () { + return new CyrilPaletteItem (*this); +} + +int CyrilPaletteItem::size() { + return 4; +} + +void CyrilPaletteItem::eval(CyrilState &_s) { + if (!paletteCalc) { + e->eval(_s); + b = _s.stk->top(); _s.stk->pop(); + g = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + paletteCalc = true; + } + _s.stk->push(r); + _s.stk->push(g); + _s.stk->push(b); + _s.stk->push(d); +} diff --git a/src/Cyril/Ops/CyrilPaletteItem.h b/src/Cyril/Ops/CyrilPaletteItem.h new file mode 100644 index 0000000..50143ac --- /dev/null +++ b/src/Cyril/Ops/CyrilPaletteItem.h @@ -0,0 +1,32 @@ +// +// CyrilPaletteItem.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilPaletteItem__ +#define __cyril2__CyrilPaletteItem__ + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" +#include "Palette.h" + +class CyrilPaletteItem : public Cyril { + Cyril* e; + bool paletteCalc; + float d,r,g,b; +public: + CyrilPaletteItem(float _f, Cyril* _e); + CyrilPaletteItem (const CyrilPaletteItem &other) ; + virtual ~CyrilPaletteItem (); + void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__cyril2__CyrilPaletteItem__) */ diff --git a/src/Cyril/Ops/CyrilParticle.cpp b/src/Cyril/Ops/CyrilParticle.cpp new file mode 100644 index 0000000..3feb194 --- /dev/null +++ b/src/Cyril/Ops/CyrilParticle.cpp @@ -0,0 +1,59 @@ +// +// CyrilParticle.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilParticle.h" + + +CyrilParticle::CyrilParticle (const CyrilParticle &other) { + e = other.e->clone(); + c = other.c->clone(); +} +CyrilParticle::~CyrilParticle () { + delete e; + delete c; +} + +void CyrilParticle::print() { + e->print(); + c->print(); + cout << "Particle" << endl; +} + +Cyril* CyrilParticle::clone () { + return new CyrilParticle (*this); +} + +int CyrilParticle::size() { + return 0; +} + +void CyrilParticle::eval(CyrilState &_s) { + e->eval(_s); + float x, y, z, w, h, d; + + switch (e->size()) { + case 1: + d = 0; + h = 0; + w = 0; + x = _s.stk->top(); _s.stk->pop(); + break; + case 4: + d = _s.stk->top(); _s.stk->pop(); + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + break; + } + //cout << "Release particle at " << x << ", " << y << ", " << z << endl; + //GLfloat matrix[16]; + //glGetFloatv (GL_MODELVIEW_MATRIX, matrix); + //ofMatrix4x4 m(matrix); + _s.ps->push_back(new Particle(_s.ms->getCurrentMatrix(), ofVec3f(x,0,0), ofVec3f(w,h,d), + (*_s.sym)[REG_PARTICLE_HEALTH], (*_s.sym)[REG_PARTICLE_DECAY], c)); +} diff --git a/src/Cyril/Ops/CyrilParticle.h b/src/Cyril/Ops/CyrilParticle.h new file mode 100644 index 0000000..de6fd21 --- /dev/null +++ b/src/Cyril/Ops/CyrilParticle.h @@ -0,0 +1,38 @@ +// +// CyrilParticle.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_CyrilParticle_h +#define cyril2_CyrilParticle_h + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" +#include "Particle.h" + +class CyrilParticle : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilParticle(Cyril* _e, Cyril* _c) : e(_e), c(_c) { + valid = e->valid && c->valid; + int s = e->size(); + if (!(s == 1 || s == 4)) { + yyerror("Particle command requires 1 or 4 arguments"); + valid = false; + } + } + CyrilParticle (const CyrilParticle &other); + virtual ~CyrilParticle (); + void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif diff --git a/src/Cyril/Ops/CyrilPegOp.cpp b/src/Cyril/Ops/CyrilPegOp.cpp new file mode 100644 index 0000000..2b4efb4 --- /dev/null +++ b/src/Cyril/Ops/CyrilPegOp.cpp @@ -0,0 +1,55 @@ +// +// CyrilPegOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilPegOp.h" + +CyrilPegOp::CyrilPegOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 2)) { + yyerror("Peg command requires 0, 1 or 2 arguments"); + valid = false; + } +} + +CyrilPegOp::CyrilPegOp (const CyrilPegOp &other) { + c = other.c->clone (); +} +CyrilPegOp::~CyrilPegOp () +{ + delete c; +} +void CyrilPegOp::print() { + c->print(); + cout << "Peg" << endl; +} +Cyril * CyrilPegOp::clone () { + return new CyrilPegOp (*this); +} +int CyrilPegOp::size() { + return 0; +} +void CyrilPegOp::eval(CyrilState &_s) { + c->eval(_s); + float r, h; + switch (c->size()) { + case 2: + h = _s.stk->top(); _s.stk->pop(); + r = _s.stk->top(); _s.stk->pop(); + break; + case 1: + h = _s.stk->top(); _s.stk->pop(); + r = h; + break; + case 0: + h = 1; + r = 1; + break; + } + ofDrawCylinder(r, h); +} + diff --git a/src/Cyril/Ops/CyrilPegOp.h b/src/Cyril/Ops/CyrilPegOp.h new file mode 100644 index 0000000..9d1cb2d --- /dev/null +++ b/src/Cyril/Ops/CyrilPegOp.h @@ -0,0 +1,26 @@ +// +// CyrilPegOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilPegOp__ +#define __cyril2__CyrilPegOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilPegOp : public CyrilOp { +public: + CyrilPegOp(Cyril* _c); + CyrilPegOp (const CyrilPegOp &other); + virtual ~CyrilPegOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilPegOp__) */ diff --git a/src/Cyril/Ops/CyrilPopMatrixOp.cpp b/src/Cyril/Ops/CyrilPopMatrixOp.cpp new file mode 100644 index 0000000..ac13f83 --- /dev/null +++ b/src/Cyril/Ops/CyrilPopMatrixOp.cpp @@ -0,0 +1,39 @@ +// +// CyrilPopMatrix.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilPopMatrixOp.h" + +CyrilPopMatrixOp::CyrilPopMatrixOp (Cyril* _c) : CyrilOp(_c) { + if (_c->size() != 0) { + yyerror("popMatrix command requires 0 arguments"); + valid = false; + } +} + +CyrilPopMatrixOp::CyrilPopMatrixOp (const CyrilPopMatrixOp &other) { + c = other.c->clone (); +} +CyrilPopMatrixOp::~CyrilPopMatrixOp () +{ + delete c; +} +void CyrilPopMatrixOp::print() { + c->print(); + cout << "PopMatrix" << endl; +} +Cyril * CyrilPopMatrixOp::clone () { + return new CyrilPopMatrixOp (*this); +} +int CyrilPopMatrixOp::size() { + return 0; +} +void CyrilPopMatrixOp::eval(CyrilState &_s) { + ofPopMatrix(); + _s.ms->popMatrix(); +} +int CyrilPopMatrixOp::matchPushPop() { return 1; } diff --git a/src/Cyril/Ops/CyrilPopMatrixOp.h b/src/Cyril/Ops/CyrilPopMatrixOp.h new file mode 100644 index 0000000..ef7a28a --- /dev/null +++ b/src/Cyril/Ops/CyrilPopMatrixOp.h @@ -0,0 +1,27 @@ +// +// CyrilPopMatrix.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilPopMatrix__ +#define __cyril2__CyrilPopMatrix__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilPopMatrixOp : public CyrilOp { +public: + CyrilPopMatrixOp(Cyril* _c); + CyrilPopMatrixOp (const CyrilPopMatrixOp &other); + virtual ~CyrilPopMatrixOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop(); +}; + +#endif /* defined(__cyril2__CyrilPopMatrix__) */ diff --git a/src/Cyril/Ops/CyrilPushMatrixOp.cpp b/src/Cyril/Ops/CyrilPushMatrixOp.cpp new file mode 100644 index 0000000..bd47829 --- /dev/null +++ b/src/Cyril/Ops/CyrilPushMatrixOp.cpp @@ -0,0 +1,42 @@ +// +// CyrilPushMatrixOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilPushMatrixOp.h" + +CyrilPushMatrixOp::CyrilPushMatrixOp (Cyril* _c) : CyrilOp(_c) { + if (_c->size() != 0) { + yyerror("pushMatrix command requires 0 arguments"); + valid = false; + } +} + +CyrilPushMatrixOp::CyrilPushMatrixOp (const CyrilPushMatrixOp &other) { + c = other.c->clone (); +} +CyrilPushMatrixOp::~CyrilPushMatrixOp () +{ + delete c; +} +void CyrilPushMatrixOp::print() { + c->print(); + cout << "PushMatrix" << endl; +} +Cyril * CyrilPushMatrixOp::clone () { + return new CyrilPushMatrixOp (*this); +} +int CyrilPushMatrixOp::size() { + return 0; +} +void CyrilPushMatrixOp::eval(CyrilState &_s) { + ofPushMatrix(); + _s.ms->pushMatrix(); +} + + +int CyrilPushMatrixOp::matchPushPop() { return -1; } + diff --git a/src/Cyril/Ops/CyrilPushMatrixOp.h b/src/Cyril/Ops/CyrilPushMatrixOp.h new file mode 100644 index 0000000..1719733 --- /dev/null +++ b/src/Cyril/Ops/CyrilPushMatrixOp.h @@ -0,0 +1,27 @@ +// +// CyrilPushMatrixOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilPushMatrixOp__ +#define __cyril2__CyrilPushMatrixOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilPushMatrixOp : public CyrilOp { +public: + CyrilPushMatrixOp(Cyril* _c); + CyrilPushMatrixOp (const CyrilPushMatrixOp &other); + virtual ~CyrilPushMatrixOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop(); +}; + +#endif /* defined(__cyril2__CyrilPushMatrixOp__) */ diff --git a/src/Cyril/Ops/CyrilRectOp.cpp b/src/Cyril/Ops/CyrilRectOp.cpp new file mode 100644 index 0000000..80fe2ef --- /dev/null +++ b/src/Cyril/Ops/CyrilRectOp.cpp @@ -0,0 +1,55 @@ +// +// CyrilRectOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilRectOp.h" + +CyrilRectOp::CyrilRectOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 2)) { + yyerror("Rect command requires 0, 1 or 2 arguments"); + valid = false; + } +} + +CyrilRectOp::CyrilRectOp (const CyrilRectOp &other) { + c = other.c->clone (); +} +CyrilRectOp::~CyrilRectOp () +{ + delete c; +} +void CyrilRectOp::print() { + c->print(); + cout << "Rect" << endl; +} +Cyril * CyrilRectOp::clone () { + return new CyrilRectOp (*this); +} +int CyrilRectOp::size() { + return 0; +} +void CyrilRectOp::eval(CyrilState &_s) { + c->eval(_s); + float w, h; + switch (c->size()) { + case 2: + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + break; + case 1: + h = _s.stk->top(); _s.stk->pop(); + w = h; + break; + case 0: + h = 1; + w = 1; + break; + } + ofDrawBox(w, h, 1); +} + diff --git a/src/Cyril/Ops/CyrilRectOp.h b/src/Cyril/Ops/CyrilRectOp.h new file mode 100644 index 0000000..962cb37 --- /dev/null +++ b/src/Cyril/Ops/CyrilRectOp.h @@ -0,0 +1,26 @@ +// +// CyrilRectOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilRectOp__ +#define __cyril2__CyrilRectOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilRectOp : public CyrilOp { +public: + CyrilRectOp(Cyril* _c); + CyrilRectOp (const CyrilRectOp &other); + virtual ~CyrilRectOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilRectOp__) */ diff --git a/src/Cyril/Ops/CyrilRotateOp.cpp b/src/Cyril/Ops/CyrilRotateOp.cpp new file mode 100644 index 0000000..405646c --- /dev/null +++ b/src/Cyril/Ops/CyrilRotateOp.cpp @@ -0,0 +1,74 @@ +// +// CyrilRotateOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilRotateOp.h" + +CyrilRotateOp::CyrilRotateOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1 || s == 3 || s == 4)) { + yyerror("Rotate command requires 4, 3, 1 or 0 arguments"); + valid = false; + } +} + +CyrilRotateOp::CyrilRotateOp (const CyrilRotateOp &other) { + c = other.c->clone (); +} +CyrilRotateOp::~CyrilRotateOp () +{ + delete c; +} +void CyrilRotateOp::print() { + c->print(); + cout << "Rotate" << endl; +} +Cyril * CyrilRotateOp::clone () { + return new CyrilRotateOp (*this); +} +int CyrilRotateOp::size() { + return 0; +} +void CyrilRotateOp::eval(CyrilState &_s) { + c->eval(_s); + float w, x, y, z; + switch (c->size()) { + case 4: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + ofRotate(w, x, y, z); + _s.ms->rotate(w, x, y, z); + break; + case 3: + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + ofRotateX(x); + ofRotateY(y); + ofRotateZ(z); + _s.ms->rotate(x, 1, 0, 0); + _s.ms->rotate(y, 0, 1, 0); + _s.ms->rotate(z, 0, 0, 1); + break; + case 1: + w = _s.stk->top(); _s.stk->pop(); + ofRotateZ(w); + _s.ms->rotate(w, 0, 0, 1); + break; + default: + w = (*_s.sym)[REG_TIME] / 36.0; + ofRotate(w, 0, 1, 0.5); + _s.ms->rotate(w, 0, 1, 0.5);/* + w = (*_s.sym)[REG_TIME] / 64.0; + ofRotate(w, 0, 0, 1); + _s.ms->rotate(w, 0, 0, 1);*/ + break; + } +} + diff --git a/src/Cyril/Ops/CyrilRotateOp.h b/src/Cyril/Ops/CyrilRotateOp.h new file mode 100644 index 0000000..220dbf6 --- /dev/null +++ b/src/Cyril/Ops/CyrilRotateOp.h @@ -0,0 +1,26 @@ +// +// CyrilRotateOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilRotateOp__ +#define __cyril2__CyrilRotateOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilRotateOp : public CyrilOp { +public: + CyrilRotateOp(Cyril* _c); + CyrilRotateOp (const CyrilRotateOp &other); + virtual ~CyrilRotateOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilRotateOp__) */ diff --git a/src/Cyril/Ops/CyrilScaleOp.cpp b/src/Cyril/Ops/CyrilScaleOp.cpp new file mode 100644 index 0000000..7d4d661 --- /dev/null +++ b/src/Cyril/Ops/CyrilScaleOp.cpp @@ -0,0 +1,54 @@ +// +// CyrilScaleOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilScaleOp.h" + +CyrilScaleOp::CyrilScaleOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 1 || s == 3)) { + yyerror("Scale command requires 1 or 3 arguments"); + valid = false; + } +} + +CyrilScaleOp::CyrilScaleOp (const CyrilScaleOp &other) { + c = other.c->clone (); +} +CyrilScaleOp::~CyrilScaleOp () +{ + delete c; +} +void CyrilScaleOp::print() { + c->print(); + cout << "Scale" << endl; +} +Cyril * CyrilScaleOp::clone () { + return new CyrilScaleOp (*this); +} +int CyrilScaleOp::size() { + return 0; +} +void CyrilScaleOp::eval(CyrilState &_s) { + c->eval(_s); + float x, y, z; + switch (c->size()) { + case 3: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + break; + case 1: + z = _s.stk->top(); _s.stk->pop(); + y = z; + x = z; + break; + } + ofScale(x, y, z); + _s.ms->scale(x, y, z); +} + diff --git a/src/Cyril/Ops/CyrilScaleOp.h b/src/Cyril/Ops/CyrilScaleOp.h new file mode 100644 index 0000000..1cc9472 --- /dev/null +++ b/src/Cyril/Ops/CyrilScaleOp.h @@ -0,0 +1,26 @@ +// +// CyrilScaleOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilScaleOp__ +#define __cyril2__CyrilScaleOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilScaleOp : public CyrilOp { +public: + CyrilScaleOp(Cyril* _c); + CyrilScaleOp (const CyrilScaleOp &other); + virtual ~CyrilScaleOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilScaleOp__) */ diff --git a/src/Cyril/Ops/CyrilShape.cpp b/src/Cyril/Ops/CyrilShape.cpp new file mode 100644 index 0000000..8be4e6c --- /dev/null +++ b/src/Cyril/Ops/CyrilShape.cpp @@ -0,0 +1,37 @@ +// +// CyrilShape.cpp +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#include "CyrilShape.h" + +CyrilShape::CyrilShape (Cyril* _e) : e(_e) { + +} + +CyrilShape::CyrilShape (const CyrilShape &other) { + e = other.e->clone (); +} +CyrilShape::~CyrilShape () +{ + delete e; +} +void CyrilShape::print() { + e->print(); + cout << "Shape" << endl; +} +Cyril * CyrilShape::clone () { + return new CyrilShape (*this); +} +int CyrilShape::size() { + return 0; +} +void CyrilShape::eval(CyrilState &_s) { + ofBeginShape(); + e->eval(_s); + ofEndShape(); +} + diff --git a/src/Cyril/Ops/CyrilShape.h b/src/Cyril/Ops/CyrilShape.h new file mode 100644 index 0000000..73b7838 --- /dev/null +++ b/src/Cyril/Ops/CyrilShape.h @@ -0,0 +1,30 @@ +// +// CyrilShape.h +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#ifndef __Cyril__CyrilShape__ +#define __Cyril__CyrilShape__ + +#include "ofMain.h" +#include "Cyril.h" + +class CyrilShape : public Cyril { + Cyril* e; +public: + CyrilShape(Cyril* _e); + CyrilShape (const CyrilShape &other); + virtual ~CyrilShape (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + + + +#endif /* defined(__Cyril__CyrilShape__) */ diff --git a/src/Cyril/Ops/CyrilShapeList.cpp b/src/Cyril/Ops/CyrilShapeList.cpp new file mode 100644 index 0000000..6082ceb --- /dev/null +++ b/src/Cyril/Ops/CyrilShapeList.cpp @@ -0,0 +1,53 @@ +// +// CyrilShapeList.cpp +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#include "CyrilShapeList.h" + +CyrilShapeList::CyrilShapeList (Cyril* _c) : c(_c) { + int sz = _c->size(); + if (!(sz == 2 || sz == 3)) { + yyerror("Shape list point requires 2 or 3 arguments"); + valid = false; + } +} + +CyrilShapeList::CyrilShapeList (const CyrilShapeList &other) { + c = other.c->clone (); +} +CyrilShapeList::~CyrilShapeList () +{ + delete c; +} +void CyrilShapeList::print() { + c->print(); + cout << "ShapeList point" << endl; +} +Cyril * CyrilShapeList::clone () { + return new CyrilShapeList (*this); +} +int CyrilShapeList::size() { + return 0; +} +void CyrilShapeList::eval(CyrilState &_s) { + c->eval(_s); + float x,y,z; + switch (c->size()) { + case 2: + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + ofVertex(x,y); + break; + case 3: + z = _s.stk->top(); _s.stk->pop(); + y = _s.stk->top(); _s.stk->pop(); + x = _s.stk->top(); _s.stk->pop(); + ofVertex(x,y,z); + break; + } +} + diff --git a/src/Cyril/Ops/CyrilShapeList.h b/src/Cyril/Ops/CyrilShapeList.h new file mode 100644 index 0000000..54e1bae --- /dev/null +++ b/src/Cyril/Ops/CyrilShapeList.h @@ -0,0 +1,29 @@ +// +// CyrilShapeList.h +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#ifndef __Cyril__CyrilShapeList__ +#define __Cyril__CyrilShapeList__ + +#include "ofMain.h" +#include "Cyril.h" + +class CyrilShapeList : public Cyril { + Cyril* e; + Cyril* c; +public: + CyrilShapeList(Cyril* _c); + CyrilShapeList (const CyrilShapeList &other); + virtual ~CyrilShapeList (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + + +#endif /* defined(__Cyril__CyrilShapeList__) */ diff --git a/src/Cyril/Ops/CyrilSphereDetailOp.cpp b/src/Cyril/Ops/CyrilSphereDetailOp.cpp new file mode 100644 index 0000000..7b761cc --- /dev/null +++ b/src/Cyril/Ops/CyrilSphereDetailOp.cpp @@ -0,0 +1,41 @@ +// +// CyrilSphereDetailOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "CyrilSphereDetailOp.h" + +CyrilSphereDetailOp::CyrilSphereDetailOp (Cyril* _c) : CyrilOp(_c) { + if (_c->size() != 1) { + yyerror("SphereDetail command requires 1 argument"); + valid = false; + } +} + +CyrilSphereDetailOp::CyrilSphereDetailOp (const CyrilSphereDetailOp &other) { + c = other.c->clone (); +} +CyrilSphereDetailOp::~CyrilSphereDetailOp () +{ + delete c; +} +void CyrilSphereDetailOp::print() { + c->print(); + cout << "SphereDetail" << endl; +} +Cyril * CyrilSphereDetailOp::clone () { + return new CyrilSphereDetailOp (*this); +} +int CyrilSphereDetailOp::size() { + return 0; +} +void CyrilSphereDetailOp::eval(CyrilState &_s) { + c->eval(_s); + float d = _s.stk->top(); + _s.stk->pop(); + ofSetSphereResolution(d); +} + diff --git a/src/Cyril/Ops/CyrilSphereDetailOp.h b/src/Cyril/Ops/CyrilSphereDetailOp.h new file mode 100644 index 0000000..040353f --- /dev/null +++ b/src/Cyril/Ops/CyrilSphereDetailOp.h @@ -0,0 +1,26 @@ +// +// CyrilSphereDetailOp.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__CyrilSphereDetailOp__ +#define __cyril2__CyrilSphereDetailOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilSphereDetailOp : public CyrilOp { +public: + CyrilSphereDetailOp(Cyril* _c); + CyrilSphereDetailOp (const CyrilSphereDetailOp &other); + virtual ~CyrilSphereDetailOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilSphereDetailOp__) */ diff --git a/src/Cyril/Ops/CyrilSphereOp.cpp b/src/Cyril/Ops/CyrilSphereOp.cpp new file mode 100644 index 0000000..dc71282 --- /dev/null +++ b/src/Cyril/Ops/CyrilSphereOp.cpp @@ -0,0 +1,48 @@ +// +// CyrilSphereOp.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "CyrilSphereOp.h" + +CyrilSphereOp::CyrilSphereOp (Cyril* _c) : CyrilOp(_c) { + int s = c->size(); + if (!(s == 0 || s == 1)) { + yyerror("Sphere command requires 0 or 1 argument"); + valid = false; + } +} + +CyrilSphereOp::CyrilSphereOp (const CyrilSphereOp &other) { + c = other.c->clone (); +} +CyrilSphereOp::~CyrilSphereOp () +{ + delete c; +} +void CyrilSphereOp::print() { + c->print(); + cout << "Sphere" << endl; +} +Cyril * CyrilSphereOp::clone () { + return new CyrilSphereOp (*this); +} +int CyrilSphereOp::size() { + return 0; +} +void CyrilSphereOp::eval(CyrilState &_s) { + c->eval(_s); + float r; + if (c->size() == 1) { + r = _s.stk->top(); + _s.stk->pop(); + } + else { + r = 1; + } + ofDrawSphere(r); +} + diff --git a/src/Cyril/Ops/CyrilSphereOp.h b/src/Cyril/Ops/CyrilSphereOp.h new file mode 100644 index 0000000..3035715 --- /dev/null +++ b/src/Cyril/Ops/CyrilSphereOp.h @@ -0,0 +1,26 @@ +// +// CyrilSphereOp.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef __cyril2__CyrilSphereOp__ +#define __cyril2__CyrilSphereOp__ + +#include "ofMain.h" +#include "CyrilOp.h" + +class CyrilSphereOp : public CyrilOp { +public: + CyrilSphereOp(Cyril* _c); + CyrilSphereOp (const CyrilSphereOp &other); + virtual ~CyrilSphereOp (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); +}; + +#endif /* defined(__cyril2__CyrilSphereOp__) */ diff --git a/src/Cyril/Ops/CyrilTile.cpp b/src/Cyril/Ops/CyrilTile.cpp new file mode 100644 index 0000000..65ba8f0 --- /dev/null +++ b/src/Cyril/Ops/CyrilTile.cpp @@ -0,0 +1,81 @@ +// +// CyrilTileOp.cpp +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#include "CyrilTile.h" + +CyrilTile::CyrilTile (Cyril* _e, Cyril* _c) : e(_e), c(_c) { + int s = e->size(); + if (!(s == 1 || s == 2 || s == 3)) { + yyerror("Tile command takes 1, 2, 3 or 4 arguments"); + valid = false; + } +} + +CyrilTile::CyrilTile (const CyrilTile &other) { + e = other.e->clone (); + c = other.c->clone (); +} +CyrilTile::~CyrilTile () +{ + delete c; +} +void CyrilTile::print() { + c->print(); + cout << "Tile" << endl; +} +Cyril * CyrilTile::clone () { + return new CyrilTile (*this); +} +int CyrilTile::size() { + return 0; +} +void CyrilTile::eval(CyrilState &_s) { + float w,h,d; + float step = 1; + e->eval(_s); + switch (e->size()) { + case 1: + d = 1; + h = 1; + w = _s.stk->top(); _s.stk->pop(); + break; + case 2: + d = 1; + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + break; + case 3: + d = _s.stk->top(); _s.stk->pop(); + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + break; + case 4: + step = _s.stk->top(); _s.stk->pop(); + d = _s.stk->top(); _s.stk->pop(); + h = _s.stk->top(); _s.stk->pop(); + w = _s.stk->top(); _s.stk->pop(); + break; + } + float xMin = (step - (w * step)) / 2.0; + float xMax = ((w * step) - step) / 2.0; + float yMin = (step - (h * step)) / 2.0; + float yMax = ((h * step) - step) / 2.0; + float zMin = (step - (d * step)) / 2.0; + float zMax = ((d * step) - step) / 2.0; + for (float x = xMin; x <= xMax; x += step) { + for (float y = yMin; y <= yMax; y += step) { + for (float z = zMin; z <= zMax; z += step) { + ofPushMatrix(); + ofTranslate(x, y, z); + c->eval(_s); + ofPopMatrix(); + } + } + } +} + diff --git a/src/Cyril/Ops/CyrilTile.h b/src/Cyril/Ops/CyrilTile.h new file mode 100644 index 0000000..3a72cd9 --- /dev/null +++ b/src/Cyril/Ops/CyrilTile.h @@ -0,0 +1,30 @@ +// +// CyrilTileOp.h +// Cyril +// +// Created by Darren Mothersele on 17/11/2013. +// +// + +#ifndef __Cyril__CyrilTileOp__ +#define __Cyril__CyrilTileOp__ + +#include "Cyril.h" + + +class CyrilTile : public Cyril { +protected: + Cyril* e; + Cyril* c; +public: + CyrilTile(Cyril* _e, Cyril* _c); + CyrilTile (const CyrilTile &other); + virtual ~CyrilTile (); + virtual void print(); + virtual Cyril *clone (); + virtual int size(); + virtual void eval(CyrilState &); + virtual int matchPushPop() { return c->matchPushPop(); } +}; + +#endif /* defined(__Cyril__CyrilTileOp__) */ diff --git a/src/Cyril/cyril.lpp b/src/Cyril/cyril.lpp new file mode 100644 index 0000000..18c3321 --- /dev/null +++ b/src/Cyril/cyril.lpp @@ -0,0 +1,100 @@ +%{ +#define YY_DECL extern "C" int yylex() +#include "y.tab.h" +extern "C" int line_no; +extern "C" int yyparse(); + +%} + +%option noyywrap +%% +[ \t] ; // Ignore whitespace +\/\/.*\n { line_no++;} // Ignore comments +\( { return LEFT; } +\) { return RIGHT; } +\* { return MULT; } +\/ { return DIV; } +\+ { return PLUS; } +\% { return MOD; } +\- { return MINUS; } +and|\&|\&\& { return AND; } +or|\||\|\| { return OR; } +\=|\=\= { return EQ; } +\!= { return NOTEQ; } +\< { return LESS; } +\<= { return LESSEQ; } +\> { return GR; } +\>= { return GREQ; } +\! { return NOT; } +shape { return SHAPE; } +tile { return TILE; } +anim { return ANIM; } +next { return NEXT; } +particle { return PARTICLE; } +palette { return PALETTE; } +blink { return BLINK; } +do { return DO; } +for { return FOR; } +to { return TO; } +step { return STEP; } +until { return UNTIL; } +times { return TIMES; } +if { return IF; } +init { return INIT; } +while { return WHILE; } +end { return END; } +(\#)([0-9A-Fa-f]{6}) { + yylval.sval = strdup(yytext + 1); + return HEX_COLOR; + } +(-)?[0-9]+(\.[0-9]+)? { + yylval.fval = atof(yytext); + return NUMBER; + } +fft|lerp|rgb|hsb|hsv|wave|sin|cos|tan|noise|rand|map|pal { yylval.sval = strdup(yytext); + return FUNCTION; +} +vert|img|box|ball|sphere|line|rect|cone|peg|grid|move { yylval.sval = strdup(yytext); + return KEYWORD; +} +debug|color|background|ballDetail|sphereDetail|light { yylval.sval = strdup(yytext); + return KEYWORD; +} +lightOn|lightOff|lightPosition|lightColor|lightHighlight { yylval.sval = strdup(yytext); + return KEYWORD; +} +rotate|fill|stroke|push|pushMatrix|pop|popMatrix|scale|fill|noFill { yylval.sval = strdup(yytext); + return KEYWORD; +} +white|gray|black|red|green|blue|cyan|magenta|yellow|aliceBlue|antiqueWhite|aqua|aquamarine|azure|beige|bisque|blanchedAlmond|blueViolet|brown|burlyWood|cadetBlue|chartreuse|chocolate|coral|cornflowerBlue|cornsilk|crimson|darkBlue|darkCyan|darkGoldenRod|darkGray|darkGrey|darkGreen|darkKhaki|darkMagenta|darkOliveGreen|darkorange|darkOrchid|darkRed|darkSalmon|darkSeaGreen|darkSlateBlue|darkSlateGray|darkSlateGrey|darkTurquoise|darkViolet|deepPink|deepSkyBlue|dimGray|dimGrey|dodgerBlue|fireBrick|floralWhite|forestGreen|fuchsia|gainsboro|ghostWhite|gold|goldenRod|grey|greenYellow|honeyDew|hotPink|indianRed|indigo|ivory|khaki|lavender|lavenderBlush|lawnGreen|lemonChiffon|lightBlue|lightCoral|lightCyan|lightGoldenRodYellow|lightGray|lightGrey|lightGreen|lightPink|lightSalmon|lightSeaGreen|lightSkyBlue|lightSlateGray|lightSlateGrey|lightSteelBlue|lightYellow|lime|limeGreen|linen|maroon|mediumAquaMarine|mediumBlue|mediumOrchid|mediumPurple|mediumSeaGreen|mediumSlateBlue|mediumSpringGreen|mediumTurquoise|mediumVioletRed|midnightBlue|mintCream|mistyRose|moccasin|navajoWhite|navy|oldLace|olive|oliveDrab|orange|orangeRed|orchid|paleGoldenRod|paleGreen|paleTurquoise|paleVioletRed|papayaWhip|peachPuff|peru|pink|plum|powderBlue|purple|rosyBrown|royalBlue|saddleBrown|salmon|sandyBrown|seaGreen|seaShell|sienna|silver|skyBlue|slateBlue|slateGray|slateGrey|snow|springGreen|steelBlue|blueSteel|tanC|teal|thistle|tomato|turquoise|violet|wheat|whiteSmoke|yellowGreen { yylval.sval = strdup(yytext); + return COLOR_NAME; +} +\$[a-zA-Z0-9_]+ { yylval.sval = strdup(yytext); +return PALETTE_NAME; +} +\#[a-zA-Z0-9_]+ { yylval.sval = strdup(yytext); +return COLOR_VAR; +} +[a-zA-Z0-9_]+ { yylval.sval = strdup(yytext); +return LABEL; +} +\n return ENDL; +\: return ASSIGN; +\, return COMMA; +%% + +void scannerRestart() { + YY_FLUSH_BUFFER; +} + +int yycyrilParseString(const char *str) { + line_no = 0; + yy_scan_string(str); + return yyparse(); + //printf(str); +} + + + + + diff --git a/src/Cyril/cyril.ypp b/src/Cyril/cyril.ypp new file mode 100644 index 0000000..2ef4db4 --- /dev/null +++ b/src/Cyril/cyril.ypp @@ -0,0 +1,431 @@ +%{ +#include +#include +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" +#include "CyrilList.h" +#include "CyrilAssign.h" +#include "CyrilPush.h" +#include "CyrilDo.h" +#include "CyrilFor.h" +#include "CyrilIf.h" +#include "CyrilWhile.h" +#include "CyrilHexColor.h" +#include "CyrilNamedColor.h" +#include "CyrilBinaryOp.h" +#include "CyrilLoad.h" +#include "CyrilColorLoad.h" +#include "CyrilUnaryOp.h" +#include "CyrilParticle.h" +#include "CyrilPalette.h" +#include "CyrilPaletteItem.h" +#include "CyrilBlink.h" +#include "CyrilTile.h" + +#include "CyrilOp.h" +#include "CyrilBoxOp.h" +#include "CyrilMoveOp.h" +#include "CyrilRotateOp.h" +#include "CyrilScaleOp.h" +#include "CyrilPushMatrixOp.h" +#include "CyrilPopMatrixOp.h" +#include "CyrilLineOp.h" +#include "CyrilBackgroundOp.h" +#include "CyrilColorOp.h" +#include "CyrilDebugOp.h" +#include "CyrilBallOp.h" +#include "CyrilSphereOp.h" +#include "CyrilPegOp.h" +#include "CyrilRectOp.h" +#include "CyrilConeOp.h" +#include "CyrilGridOp.h" +#include "CyrilBallDetailOp.h" +#include "CyrilSphereDetailOp.h" +#include "CyrilImgOp.h" +#include "CyrilLightOp.h" +#include "CyrilFillOp.h" +#include "CyrilNoFillOp.h" +#include "CyrilInitOp.h" + +#include "CyrilAnimation.h" +#include "CyrilAnimStep.h" +#include "CyrilShape.h" +#include "CyrilShapeList.h" + +#include "CyrilFun.h" +#include "CyrilWaveFun.h" +#include "CyrilSinFun.h" +#include "CyrilCosFun.h" +#include "CyrilTanFun.h" +#include "CyrilNoiseFun.h" +#include "CyrilRandFun.h" +#include "CyrilHsbFun.h" +#include "CyrilMapFun.h" +#include "CyrilLerpFun.h" +#include "CyrilPaletteFun.h" +#include "CyrilFftFun.h" + +using namespace std; + +extern "C" int yylex(); +extern "C" int yyparse(); +extern FILE *yyin; + +int line_no = 0; +Cyril * pRoot; + +void yyerror(const char *s); +map symTab; +map paletteTab; + +int paletteFind(string _s) { + if (paletteTab.find(_s) == paletteTab.end()) { + int loc = paletteTab.size(); + paletteTab[_s] = loc; + return loc; + } + return paletteTab[_s]; +} + +int regFind(string _s) { + if ("TIME" == _s) return REG_TIME; + if ("SECS" == _s) return REG_SECS; + if ("FAST" == _s) return REG_FAST; + if ("SLOW" == _s) return REG_SLOW; + if ("FRAME" == _s) return REG_FRAME; + if ("PI" == _s) return REG_PI; + if ("TWO_PI" == _s) return REG_TWO_PI; + if ("HEALTH" == _s) return REG_PARTICLE_HEALTH; + if ("DECAY" == _s) return REG_PARTICLE_DECAY; + if ("SIGNAL" == _s) return REG_MIND_SIGNAL; + if ("ATTENTION" == _s) return REG_MIND_ATTENTION; + if ("MEDITATION" == _s) return REG_MIND_MEDITATION; + if ("DELTA" == _s) return REG_MIND_DELTA; + if ("THETA" == _s) return REG_MIND_THETA; + if ("LOWALPHA" == _s) return REG_MIND_LOWALPHA; + if ("HIGHALPHA" == _s) return REG_MIND_HIGHALPHA; + if ("LOWBETA" == _s) return REG_MIND_LOWBETA; + if ("HIGHBETA" == _s) return REG_MIND_HIGHBETA; + if ("LOWGAMMA" == _s) return REG_MIND_LOWGAMMA; + if ("MIDGAMMA" == _s) return REG_MIND_MIDGAMMA; + if ("KICK" == _s) return REG_BEAT_KICK; + if ("SNARE" == _s) return REG_BEAT_SNARE; + if ("HIHAT" == _s) return REG_BEAT_HIHAT; + if ("VOL" == _s) return REG_BEAT_MAGNITUDE; + + if (symTab.find(_s) == symTab.end()) { + int loc = symTab.size() + REG_COUNT; + symTab[_s] = loc; + return loc; + } + return symTab[_s]; +} + +Cyril * cyrilOpFactory(const char * _s, Cyril * _c) { + if (strncmp("box", _s, 3) == 0) return new CyrilBoxOp(_c); + if (strncmp("move", _s, 4) == 0) return new CyrilMoveOp(_c); + if (strncmp("rotate", _s, 6) == 0) return new CyrilRotateOp(_c); + if (strncmp("scale", _s, 5) == 0) return new CyrilScaleOp(_c); + if (strncmp("pushMatrix", _s, 4) == 0) return new CyrilPushMatrixOp(_c); + if (strncmp("popMatrix", _s, 3) == 0) return new CyrilPopMatrixOp(_c); + if (strncmp("line", _s, 4) == 0) return new CyrilLineOp(_c); + if (strncmp("background", _s, 10) == 0) return new CyrilBackgroundOp(_c); + if (strncmp("color", _s, 5) == 0) return new CyrilColorOp(_c); + if (strncmp("debug", _s, 5) == 0) return new CyrilDebugOp(_c); + if (strncmp("peg", _s, 3) == 0) return new CyrilPegOp(_c); + if (strncmp("rect", _s, 4) == 0) return new CyrilRectOp(_c); + if (strncmp("cone", _s, 4) == 0) return new CyrilConeOp(_c); + if (strncmp("grid", _s, 4) == 0) return new CyrilGridOp(_c); + if (strncmp("ballDetail", _s, 10) == 0) return new CyrilBallDetailOp(_c); + if (strncmp("sphereDetail", _s, 12) == 0) return new CyrilSphereDetailOp(_c); + if (strncmp("ball", _s, 4) == 0) return new CyrilBallOp(_c); + if (strncmp("sphere", _s, 6) == 0) return new CyrilSphereOp(_c); + if (strncmp("img", _s, 3) == 0) return new CyrilImgOp(_c); + if (strncmp("light", _s, 5) == 0) return new CyrilLightOp(_c); + if (strncmp("lightColor", _s, 10) == 0) return new CyrilLightOp(_c); + if (strncmp("noFill", _s, 6) == 0) return new CyrilNoFillOp(_c); + if (strncmp("stroke", _s, 6) == 0) return new CyrilNoFillOp(_c); + if (strncmp("fill", _s, 4) == 0) return new CyrilFillOp(_c); + if (strncmp("vert", _s, 4) == 0) return new CyrilShapeList(_c); + return new CyrilOp(_c); +} + +Cyril * cyrilFunFactory(const char * _s, Cyril * _c) { + if (strncmp("wave", _s, 4) == 0) return new CyrilWaveFun(_c); + if (strncmp("sin", _s, 3) == 0) return new CyrilSinFun(_c); + if (strncmp("cos", _s, 3) == 0) return new CyrilCosFun(_c); + if (strncmp("tan", _s, 3) == 0) return new CyrilTanFun(_c); + if (strncmp("noise", _s, 5) == 0) return new CyrilNoiseFun(_c); + if (strncmp("rand", _s, 4) == 0) return new CyrilRandFun(_c); + if (strncmp("hsb", _s, 3) == 0) return new CyrilHsbFun(_c); + if (strncmp("hsv", _s, 3) == 0) return new CyrilHsbFun(_c); + if (strncmp("map", _s, 3) == 0) return new CyrilMapFun(_c); + if (strncmp("lerp", _s, 4) == 0) return new CyrilLerpFun(_c); + if (strncmp("pal", _s, 3) == 0) return new CyrilPaletteFun(_c); + if (strncmp("fft", _s, 3) == 0) return new CyrilFftFun(_c); + return new CyrilFun(_c); +} + +%} + +%union { + float fval; + char *sval; + class Cyril *ast; +} + +%token ENDL COMMA LEFT RIGHT ASSIGN DO TIMES END UNTIL IF WHILE INIT +%token FOR TO STEP PARTICLE PALETTE BLINK ANIM NEXT TILE SHAPE +%token PLUS MINUS MOD MULT DIV EQ LESS LESSEQ GR GREQ NOTEQ NOT AND OR +%token HEX_COLOR LABEL KEYWORD FUNCTION COLOR_VAR PALETTE_NAME COLOR_NAME +%token NUMBER + +%left MULT PLUS MINUS DIV MOD EQ NOTEQ LESSEQ LESS GREQ GR +%right NOT + +%type expr expr_list statement statement_list cyril palette_list anim_list + +%start cyril +%% + +cyril: statement_list { + pRoot = $1; +} + +statement_list: +statement +{ + $$ = $1; +} +| statement_list statement +{ + $$ = new CyrilList($1, $2); + +} +; + +statement: +ENDL +{ + $$ = new Cyril(); + line_no++; +} +| KEYWORD expr_list ENDL +{ + $$ = cyrilOpFactory($1, $2); + line_no++; +} +| KEYWORD ENDL +{ + $$ = cyrilOpFactory($1, new Cyril()); + line_no++; +} +| LABEL ASSIGN expr ENDL +{ + $$ = new CyrilAssign(regFind($1), $3); + line_no++; +} +| COLOR_VAR ASSIGN expr ENDL +{ + $$ = new CyrilAssign(regFind($1), $3); + line_no++; +} +| DO expr TIMES ENDL statement_list END ENDL +{ + $$ = new CyrilDo($2, $5); + line_no += 2; +} +| FOR LABEL ASSIGN expr TO expr STEP expr ENDL statement_list END ENDL +{ + $$ = new CyrilFor(regFind($2), $4, $6, $8, $10); + line_no += 2; +} +| IF expr statement +{ + $$ = new CyrilIf($2, $3); +} +| IF expr ENDL statement_list END ENDL +{ + $$ = new CyrilIf($2, $4); + line_no += 2; +} +| WHILE expr DO statement_list END ENDL +{ + $$ = new CyrilWhile($2, $4); + line_no += 2; +} +| PARTICLE expr_list ENDL statement_list END ENDL +{ + $$ = new CyrilParticle($2, $4); + line_no += 2; +} +| PALETTE PALETTE_NAME ENDL palette_list END ENDL +{ + int pNum = paletteFind($2); + $$ = new CyrilPalette(pNum, $4); + line_no += 2; +} +| BLINK expr_list ENDL statement_list END ENDL +{ + $$ = new CyrilBlink($2, $4); + line_no += 2; +} +| ANIM anim_list END ENDL +{ + $$ = new CyrilAnimation($2); + line_no += 2; +} +| TILE expr_list ENDL statement_list END ENDL +{ + $$ = new CyrilTile($2, $4); + line_no += 2; +} +| SHAPE ENDL statement_list END ENDL +{ + $$ = new CyrilShape($3); + line_no += 2; +} +| INIT statement +{ + $$ = new CyrilInitOp($2); + line_no += 1; +} +; + + +anim_list: +NUMBER ENDL statement_list +{ + $$ = new CyrilAnimStep($1, $3, new Cyril()); + line_no++; +} +| anim_list NEXT NUMBER ENDL statement_list +{ + $$ = new CyrilAnimStep($3, $5, $1); + line_no++; +} +; + +palette_list: +NUMBER expr_list ENDL +{ + $$ = new CyrilPaletteItem($1, $2); + line_no++; +} +| palette_list NUMBER expr_list ENDL +{ + $$ = new CyrilList($1, new CyrilPaletteItem($2, $3)); + line_no++; +} +; + +expr_list: +expr +{ + $$ = $1; +} +| expr_list COMMA expr +{ + $$ = new CyrilList($1, $3); +} +; + +expr: +COLOR_NAME +{ + $$ = new CyrilNamedColor($1); +} +| HEX_COLOR +{ + $$ = new CyrilHexColor($1); +} +| FUNCTION LEFT expr_list RIGHT +{ + $$ = cyrilFunFactory($1, $3); +} +| FUNCTION LEFT RIGHT +{ + $$ = cyrilFunFactory($1, new Cyril()); +} +| NUMBER +{ + $$ = new CyrilPush($1); +} +| COLOR_VAR +{ + $$ = new CyrilColorLoad(regFind($1)); +} +| PALETTE_NAME +{ + $$ = new CyrilPush(paletteFind($1)); +} +| LABEL +{ + $$ = new CyrilLoad(regFind($1)); +} +| expr MINUS expr +{ + $$ = new CyrilBinaryOp("-", $1, $3); +} +| expr PLUS expr +{ + $$ = new CyrilBinaryOp("+", $1, $3); +} +| expr MULT expr +{ + $$ = new CyrilBinaryOp("*", $1, $3); +} +| expr DIV expr +{ + $$ = new CyrilBinaryOp("/", $1, $3); +} +| expr MOD expr +{ + $$ = new CyrilBinaryOp("%", $1, $3); +} +| expr EQ expr +{ + $$ = new CyrilBinaryOp("==", $1, $3); +} +| expr NOTEQ expr +{ + $$ = new CyrilBinaryOp("!=", $1, $3); +} +| expr GR expr +{ + $$ = new CyrilBinaryOp(">", $1, $3); +} +| expr GREQ expr +{ + $$ = new CyrilBinaryOp(">=", $1, $3); +} +| expr LESS expr +{ + $$ = new CyrilBinaryOp("<", $1, $3); +} +| expr LESSEQ expr +{ + $$ = new CyrilBinaryOp("<=", $1, $3); +} +| expr AND expr +{ + $$ = new CyrilBinaryOp("&", $1, $3); +} +| expr OR expr +{ + $$ = new CyrilBinaryOp("|", $1, $3); +} +| NOT expr +{ + $$ = new CyrilUnaryOp("!", $2); +} +| LEFT expr RIGHT +{ + $$ = $2; +} +%% + +void yyerror(const char *s) { + cout << s << " at line " << (line_no + 1) << endl; +} diff --git a/src/Engine/Palette.cpp b/src/Engine/Palette.cpp new file mode 100644 index 0000000..00d74f0 --- /dev/null +++ b/src/Engine/Palette.cpp @@ -0,0 +1,93 @@ +// +// Palette.cpp +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#include "Palette.h" + +Palette::Palette() : total(0) { + +} +void Palette::addColor(float _d, int _hex) { + total += _d; + colors.push_back(PaletteItem(_d, _hex)); +} +void Palette::addColor(float _d, float _r, float _g, float _b) { + total += _d; + colors.push_back(PaletteItem(_d, _r, _g, _b)); +} + +void Palette::drawBackground() { + // TODO: draw gradient background using palette variable + //for (int y = 0; y < ofGetHeight(); y++) { + //ofSetColor(lerp(y / ofGetHeight())); + //ofLine(0, y, ofGetWidth(), y); + //} +} + +ofColor Palette::lerp(float _v) { + PaletteItem first = colors.front(); + float newV = ofMap(ofClamp(_v, 0, 1), 0, 1, 0, total); + float keepV = newV; + + bool findFirst = true; + ofColor found, nextC; + float prevD(0), nextD(0); + for(vector::iterator it = colors.begin(); it != colors.end(); ++it){ + if (findFirst) { + found = it->c; + prevD += it->distance; + newV -= it->distance; + if (newV < 0) { + findFirst = false; + nextD = prevD; + } + } + else { + nextC = it->c; + nextD += it->distance; + break; + } + } + if (prevD == nextD) { + return colors.back().c; + } + return found.lerp(nextC, ofMap(keepV, prevD - first.distance, nextD, 0, 1)); +} + +ofColor Palette::getColor(float _v) { + ofColor found; + for(vector::iterator it = colors.begin(); it != colors.end(); ++it){ + found = it->c; + _v -= it->distance; + if (_v <= 0) break; + } + return found; +} +ofColor Palette::randomColor() { + return getColor(ofRandom(total)); +} +ofColor Palette::getColorAt(float _i) { + return getColor(total * _i); +} + +Palette::Palette (const Palette &other) { + total = other.total; + colors = * new vector(other.colors); +} +Palette::~Palette () { + +} +Palette * Palette::clone () { + return new Palette(* this); +} + + + + + + + diff --git a/src/Engine/Palette.h b/src/Engine/Palette.h new file mode 100644 index 0000000..f9e89e3 --- /dev/null +++ b/src/Engine/Palette.h @@ -0,0 +1,47 @@ +// +// Palette.h +// cyril2 +// +// Created by Darren Mothersele on 06/11/2013. +// +// + +#ifndef __cyril2__Palette__ +#define __cyril2__Palette__ + +#include "ofMain.h" + +class PaletteItem { +public: + ofColor c; + float distance; + + PaletteItem(float _d, int _hex) { + c = ofColor::fromHex(_hex); + distance = _d; + } + PaletteItem(float _d, float _r, float _g, float _b) { + c = ofColor(_r, _g, _b); + distance = _d; + } +}; + +class Palette { + float total; + vector colors; +public: + Palette(); + void addColor(float, int); + void addColor(float, float, float, float); + ofColor getColor(float); + ofColor randomColor(); + ofColor getColorAt(float); + ofColor lerp(float); + Palette (const Palette &other) ; + virtual ~Palette (); + virtual Palette *clone (); + void drawBackground(); +}; + + +#endif /* defined(__cyril2__Palette__) */ diff --git a/src/Engine/Particle.cpp b/src/Engine/Particle.cpp new file mode 100644 index 0000000..d48a6da --- /dev/null +++ b/src/Engine/Particle.cpp @@ -0,0 +1,38 @@ +// +// Particle.cpp +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#include "Particle.h" + +Particle::~Particle() { + delete shape; +} + +void Particle::draw(CyrilState * _s) { + + ofPushMatrix(); + ofGetCurrentRenderer()->multMatrix(origin); + ofGetCurrentRenderer()->multMatrix(location); + + CyrilState _sub_state; + _sub_state.stk = new stack; + _sub_state.ms = new ofMatrixStack(*ofGetWindowPtr()); + _sub_state.ps = new vector; + _sub_state.sym = new map; + _sub_state.cs = new map; + _sub_state.img = new map; + (*_sub_state.sym)[REG_PARTICLE_HEALTH] = health; + (*_sub_state.sym)[REG_PARTICLE_DECAY] = decay; + _sub_state.parent = _s; + + shape->eval(_sub_state); + + ofPopMatrix(); + + +} + diff --git a/src/Engine/Particle.h b/src/Engine/Particle.h new file mode 100644 index 0000000..2975e15 --- /dev/null +++ b/src/Engine/Particle.h @@ -0,0 +1,45 @@ +// +// Particle.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_Particle_h +#define cyril2_Particle_h + +#include "ofMain.h" +#include "cmds.h" +#include "Cyril.h" +#include "CyrilState.h" + +class Particle { +public: + ofMatrix4x4 origin; + ofMatrix4x4 location; + ofVec3f velocity; + ofVec3f acceleration; + float health; + float decay; + Cyril* shape; + + Particle (ofMatrix4x4 _o, ofVec3f _v, ofVec3f _a, float _h, float _d, Cyril* _s) : + origin(_o), velocity(_v), acceleration(_a), health(_h), decay(_d), shape(_s) { + + } + ~Particle(); + void update() { + velocity += acceleration; + location.translate(velocity); + health -= decay; + } + void draw(CyrilState * _s); + static bool isDead(Particle *&p) { + return p->health <= 0; + } +}; + + + +#endif diff --git a/src/cmds.h b/src/cmds.h new file mode 100644 index 0000000..bdf9d9b --- /dev/null +++ b/src/cmds.h @@ -0,0 +1,116 @@ +// +// cmds.h +// cyril2 +// +// Created by Darren Mothersele on 05/11/2013. +// +// + +#ifndef cyril2_cmds_h +#define cyril2_cmds_h + +#define CMD_OP_COUNT 50 + +#define CMD_LOAD 0 +#define CMD_SAVE 1 +#define CMD_SAVE_NOPOP 37 +#define CMD_PUSH 3 +#define CMD_JUMP 4 +#define CMD_IF 5 +#define CMD_JUMPNIF 33 +#define CMD_JUMPNIF_NOPOP 38 +#define CMD_DEC_F 34 +#define CMD_INC_F 39 + +#define OP_DEBUG 41 +#define OP_MOVE 6 +#define OP_ROTATE 7 +#define OP_SCALE 46 +#define OP_PUSH_MATRIX 47 +#define OP_POP_MATRIX 48 + +#define OP_BACKGROUND 44 +#define OP_COLOR 45 + +#define OP_BOX 8 +#define OP_LINE 9 +#define OP_BALL 10 +#define OP_SPHERE 49 +#define OP_PEG 11 +#define OP_CONE 12 +#define OP_RECT 13 +#define OP_PARTICLE 14 +#define OP_GRID 43 + +#define OP_PLUS 15 +#define OP_MINUS 16 +#define OP_DIV 17 +#define OP_MULT 18 +#define OP_MOD 19 + +#define OP_EQ 20 +#define OP_NOTEQ 21 +#define OP_LESS 22 +#define OP_LESS_1POP 40 +#define OP_LESSEQ 23 +#define OP_GR 24 +#define OP_GREQ 25 +#define OP_GREQ_1POP 42 +#define OP_NOT 26 +#define OP_AND 35 +#define OP_OR 36 + +#define FUN_WAVE 27 +#define FUN_SIN 28 +#define FUN_COS 29 +#define FUN_TAN 30 +#define FUN_NOISE 31 +#define FUN_RAND 32 + +#define REG_COUNT 68 + +#define REG_TIME 0 +#define REG_FRAME 1 +#define REG_PI 13 +#define REG_TWO_PI 14 +#define REG_X_MAX 17 +#define REG_Y_MAX 18 +#define REG_X_MID 19 +#define REG_Y_MID 20 +#define REG_SECS 28 +#define REG_FAST 29 +#define REG_SLOW 30 + +#define REG_X_SCALE 21 +#define REG_Y_SCALE 22 +#define REG_Z_SCALE 23 + +#define REG_PARTICLE_HEALTH 15 +#define REG_PARTICLE_DECAY 16 + +#define REG_MIND_SIGNAL 2 +#define REG_MIND_ATTENTION 3 +#define REG_MIND_MEDITATION 4 +#define REG_MIND_DELTA 5 +#define REG_MIND_THETA 6 +#define REG_MIND_LOWALPHA 7 +#define REG_MIND_HIGHALPHA 8 +#define REG_MIND_LOWBETA 9 +#define REG_MIND_HIGHBETA 10 +#define REG_MIND_LOWGAMMA 11 +#define REG_MIND_MIDGAMMA 12 + +#define REG_BEAT_KICK 24 +#define REG_BEAT_SNARE 25 +#define REG_BEAT_HIHAT 26 +#define REG_BEAT_MAGNITUDE 27 +#define REG_BEAT_FFT_START 35 +#define REG_BEAT_FFT_MAX 67 + +#define REG_COLOR_WHITE 31 +#define REG_COLOR_GRAY 32 +#define REG_COLOR_BLACK 33 +#define REG_COLOR_RED 34 + + +#endif diff --git a/src/cyrilApp.cpp b/src/cyrilApp.cpp new file mode 100644 index 0000000..075fcc1 --- /dev/null +++ b/src/cyrilApp.cpp @@ -0,0 +1,363 @@ +#include "cyrilApp.h" + + +//-------------------------------------------------------------- +void cyrilApp::setup(){ + doResetTimers = true; + + ofSoundStreamSetup(0, 1, this, 44100, beat.getBufferSize(), 4); + + ofBackground(0); + pauseProg = false; + lightsOn = false; + + runningProg = false; + running[0] = false; + running[1] = false; + running[2] = false; + running[3] = false; + running[4] = false; + running[5] = false; + running[6] = false; + running[7] = false; + running[8] = false; + error[0] = false; + error[1] = false; + error[2] = false; + error[3] = false; + error[4] = false; + error[5] = false; + error[6] = false; + error[7] = false; + error[8] = false; + +#ifdef FULL_DEBUG + ofSetLogLevel("ofxGLEditor", OF_LOG_VERBOSE); +#endif + + + editor.addCommand('f', this, &cyrilApp::toggleFullscreen); + editor.addCommand('a', this, &cyrilApp::toggleEditor); + editor.addCommand('d', this, &cyrilApp::toggleBackground); + editor.addCommand('k', this, &cyrilApp::toggleLights); + editor.addCommand('l', this, &cyrilApp::loadFile); + editor.addCommand('s', this, &cyrilApp::saveFile); + editor.addCommand('e', this, &cyrilApp::resetTimers); + editor.addCommand('p', this, &cyrilApp::pauseProgram); + editor.addCommand('r', this, &cyrilApp::runScript); + + editorVisible = true; + + lastSignalReport = -1; + + // Init evaluation stack to empty + _state.stk = new stack; + // Initialise our own matrix stack + // TODO: replace with call to get from current renderer? + _state.ms = new ofMatrixStack(*ofGetWindowPtr()); + // Initialise empty paticle system + _state.ps = new vector; + // Initialise empty variable/register map + _state.sym = new map; + // Initialise palettes + _state.cs = new map; + // Initialise sprites + _state.img = new map; + _state.parent = NULL; + _state.light = new ofLight(); + //_state.light = NULL; + + (*_state.sym)[REG_X_MAX] = 640; + (*_state.sym)[REG_Y_MAX] = 480; + (*_state.sym)[REG_X_MID] = (*_state.sym)[REG_X_MAX] / 2.0; + (*_state.sym)[REG_Y_MID] = (*_state.sym)[REG_Y_MAX] / 2.0; + + (*_state.sym)[REG_X_SCALE] = 100; + (*_state.sym)[REG_Y_SCALE] = 100; + (*_state.sym)[REG_Z_SCALE] = 100; + + (*_state.sym)[REG_PI] = PI; + (*_state.sym)[REG_TWO_PI] = TWO_PI; + + (*_state.sym)[REG_PARTICLE_HEALTH] = 1; + (*_state.sym)[REG_PARTICLE_DECAY] = 0.1; + + // Reserve some space for Particle System + _state.ps->reserve(2000); + + // Global settings + ofEnableDepthTest(); + ofSetVerticalSync(true); + if (lightsOn) { + ofEnableLighting(); + _state.light->setAmbientColor(ofColor(0,0,0)); + _state.light->setDiffuseColor(ofColor(255,255,255)); + _state.light->setSpecularColor(ofColor(255,255,255)); + _state.light->setPointLight(); + _state.light->setAttenuation(1.f,0.f,0.f); + } + + autoClearBg = true; + ofSetBackgroundAuto(true); + + cursorVisible = false; + ofHideCursor(); +#ifdef __APPLE__ + CGDisplayHideCursor(NULL); // <- OK +#endif + + + (*_state.sym)[REG_FRAME] = 0; + + edBuf.allocate(); + edBuf.begin(); + ofClear(0,0,0,0); + edBuf.end(); + + isFullScreen = true; + ofSetFullscreen(true); +} + +//-------------------------------------------------------------- +void cyrilApp::update(){ + if (doResetTimers) { + (*_state.sym)[REG_FRAME] = 0; + ofResetElapsedTimeCounter(); + doResetTimers = false; + } + else { + (*_state.sym)[REG_FRAME]++; + } + + (*_state.sym)[REG_TIME] = ofGetElapsedTimeMillis(); + (*_state.sym)[REG_SECS] = ofGetElapsedTimef(); + (*_state.sym)[REG_FAST] = ofGetElapsedTimef() * 10; + (*_state.sym)[REG_SLOW] = ofGetElapsedTimef() * 2; + + // For beat detection + beat.update((*_state.sym)[REG_TIME]); + (*_state.sym)[REG_BEAT_MAGNITUDE] = beat.getMagnitude(); + (*_state.sym)[REG_BEAT_KICK] = beat.kick(); + (*_state.sym)[REG_BEAT_SNARE] = beat.snare(); + (*_state.sym)[REG_BEAT_HIHAT] = beat.hihat(); + for (int i = REG_BEAT_FFT_START; i < REG_BEAT_FFT_MAX; ++i) { + (*_state.sym)[i] = beat.getBand(i - REG_BEAT_FFT_START); + } + + for(vector::iterator it = _state.ps->begin(); it != _state.ps->end(); ++it){ + (*it)->update(); + } + ofRemove(*_state.ps, Particle::isDead); + +} + +//-------------------------------------------------------------- +void cyrilApp::draw(){ + + ofEnableDepthTest(); + + if (lightsOn) { + _state.light->enable(); + // The default position of the light (apply z-scale) + _state.light->setPosition(0,0,1000); + } + else { + ofDisableLighting(); + } + + _state.ms->clearStacks(); + float X_MAX = (*_state.sym)[REG_X_MAX]; + float Y_MAX = (*_state.sym)[REG_Y_MAX]; + float X_MID = (*_state.sym)[REG_X_MID]; + float Y_MID = (*_state.sym)[REG_Y_MID]; + float X_SCALE = (*_state.sym)[REG_X_SCALE]; + float Y_SCALE = (*_state.sym)[REG_Y_SCALE]; + float Z_SCALE = (*_state.sym)[REG_Z_SCALE]; + + for (int i = 0; i < 9; ++i) { + if (running[i]) { + if (prog[i]->valid) { + ofPushMatrix(); + ofTranslate(X_MID, Y_MID); + _state.ms->pushMatrix(); + _state.ms->translate(X_MID, Y_MID); + + ofScale(X_SCALE, Y_SCALE, Z_SCALE); + _state.ms->scale(X_SCALE, Y_SCALE, Z_SCALE); + + + prog[i]->eval(_state); + + _state.ms->popMatrix(); + ofPopMatrix(); + } + } + } + + for(vector::iterator it = _state.ps->begin(); it != _state.ps->end(); ++it){ + (*it)->draw(&_state); + } + + if (lightsOn) { + _state.light->disable(); + } + + if (editorVisible) { + ofDisableDepthTest(); + editor.draw(); + ofPushMatrix(); + ofPushStyle(); + ofTranslate(X_MID - 45, 10); + for (int i = 0; i < 9; ++i) { + if (error[i]) { + ofSetColor(255,0,0); + } + else if (running[i]) { + ofSetColor(255); + } + else { + ofSetColor(150); + } + ofRect(i * 10, 0, 8, 8); + if (editor.currentBuffer == i) { + ofSetColor(255); + ofRect(i * 10, 10, 8, 5); + } + } + ofPopStyle(); + ofPopMatrix(); + } +} + + + +void cyrilApp::toggleFullscreen(void * _o) { + ((cyrilApp *)_o)->isFullScreen = !((cyrilApp *)_o)->isFullScreen; + ofSetFullscreen(((cyrilApp *)_o)->isFullScreen); + + if (((cyrilApp *)_o)->isFullScreen) { + ofHideCursor(); +#ifdef __APPLE__ + CGDisplayHideCursor(NULL); +#endif + } + else { + ofShowCursor(); +#ifdef __APPLE__ + CGDisplayShowCursor(NULL); +#endif + } +} +void cyrilApp::toggleEditor(void * _o) { + ((cyrilApp *)_o)->editorVisible = !((cyrilApp *)_o)->editorVisible; +} +void cyrilApp::toggleBackground(void * _o) { + ((cyrilApp *)_o)->autoClearBg = !((cyrilApp *)_o)->autoClearBg; +} +void cyrilApp::toggleLights(void * _o) { + ((cyrilApp *)_o)->lightsOn = !((cyrilApp *)_o)->lightsOn; + ofEnableLighting(); + ofSetSmoothLighting(true); + ((cyrilApp *)_o)->_state.light->setAmbientColor(ofColor(0,0,0)); + ((cyrilApp *)_o)->_state.light->setDiffuseColor(ofColor(255,255,255)); + ((cyrilApp *)_o)->_state.light->setSpecularColor(ofColor(255,255,255)); + ((cyrilApp *)_o)->_state.light->setPointLight(); + ((cyrilApp *)_o)->_state.light->setAttenuation(1.f,0.f,0.f); +} +void cyrilApp::loadFile(void * _o) { + int whichEditor = ((cyrilApp *)_o)->editor.currentBuffer; + ((cyrilApp *)_o)->editor.loadFile(ofToString(whichEditor)+".txt", whichEditor); + ((cyrilApp *)_o)->editor.update(); +} +void cyrilApp::saveFile(void * _o) { + int whichEditor = ((cyrilApp *)_o)->editor.currentBuffer; + ((cyrilApp *)_o)->editor.saveFile(ofToString(whichEditor)+".txt", whichEditor); +} +void cyrilApp::resetTimers(void * _o) { + ((cyrilApp *)_o)->doResetTimers = true; +} +void cyrilApp::pauseProgram(void * _o) { + int whichEditor = ((cyrilApp *)_o)->editor.currentBuffer; + ((cyrilApp *)_o)->running[whichEditor] = !((cyrilApp *)_o)->running[whichEditor]; +} +void cyrilApp::runScript(void * _o) { + int whichEditor = ((cyrilApp *)_o)->editor.currentBuffer; +#ifdef DEBUG_PRINT + cout << "run script in editor " << whichEditor << endl; +#endif + ((cyrilApp *)_o)->prog[whichEditor] = CyrilParser::parseString(((cyrilApp *)_o)->editor.buf[whichEditor]->getText()); + if (((cyrilApp *)_o)->prog[whichEditor]->valid) { + ((cyrilApp *)_o)->runningProg = true; + ((cyrilApp *)_o)->running[whichEditor] = true; + ((cyrilApp *)_o)->error[whichEditor] = false; +#ifdef DEBUG_PRINT + ((cyrilApp *)_o)->prog[whichEditor]->print(); +#endif + } + else { + ((cyrilApp *)_o)->error[whichEditor] = true; +#ifdef DEBUG_PRINT + cout << "Invalid program" << endl; +#endif + } + ((cyrilApp *)_o)->reportError = true; +} + + + + +//-------------------------------------------------------------- +void cyrilApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void cyrilApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void cyrilApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void cyrilApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void cyrilApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void cyrilApp::mouseReleased(int x, int y, int button){ + +} + + +//-------------------------------------------------------------- +void cyrilApp::windowResized(int w, int h){ + (*_state.sym)[REG_X_MAX] = w; + (*_state.sym)[REG_Y_MAX] = h; + (*_state.sym)[REG_X_MID] = w / 2.0; + (*_state.sym)[REG_Y_MID] = h / 2.0; +} + +//-------------------------------------------------------------- +void cyrilApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void cyrilApp::dragEvent(ofDragInfo dragInfo){ + +} + + +void cyrilApp::audioReceived(float* input, int bufferSize, int nChannels) { + beat.audioReceived(input, bufferSize, nChannels); +} + + diff --git a/src/cyrilApp.h b/src/cyrilApp.h new file mode 100644 index 0000000..1dd848a --- /dev/null +++ b/src/cyrilApp.h @@ -0,0 +1,79 @@ +#pragma once +// #define CYRIL_DEBUG + +#include "ofMain.h" +#include "ofxXmlSettings.h" +#include "Particle.h" +#include "CyrilParser.h" + +#include "ofxEditor.h" +#include "ofxBeat.h" + +class cyrilApp : public ofBaseApp{ + + ofxEditor editor; + ofxBeat beat; + + //ofxXmlSettings settings; + string fileName; + + Cyril *prog[9]; + bool running[9]; + bool error[9]; + + CyrilState _state; + vector progFiles; + int currentProg; + bool reportError; + + ofFbo edBuf; + + bool lightsOn; + + bool autoClearBg; + bool pauseProg; + bool runningProg; + bool overlay; + bool editorVisible; + bool cursorVisible; + bool isFullScreen; + bool doResetTimers; + + int lastSignalReport; + +public: + + cyrilApp(): editor(9, "DroidSansMono.ttf") {} + + void setup(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + void applyGlobalSettings(); + void reloadSettings(); + void runProgram(); + + void audioReceived(float*, int, int); + + // Editor command callbacks + static void toggleFullscreen(void *); + static void toggleEditor(void *); + static void toggleBackground(void *); + static void toggleLights(void *); + static void loadFile(void *); + static void saveFile(void *); + static void resetTimers(void *); + static void pauseProgram(void *); + static void runScript(void *); + +}; + diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..6a9ca01 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,165 @@ +//#define OS_PRE_DATA_PATH "data/" +//#define OS_POST_DATA_PATH "../../../data/" + +#include "ofMain.h" +#include "cyrilApp.h" + +map < string, ofColor > colorNameMap; + +int main( ){ + ofSetDataPathRoot("../Resources/data"); + + colorNameMap["white"] = ofColor::white; + colorNameMap["gray"] = ofColor::gray; + colorNameMap["black"] = ofColor::black; + colorNameMap["red"] = ofColor::red; + colorNameMap["green"] = ofColor::green; + colorNameMap["blue"] = ofColor::blue; + colorNameMap["cyan"] = ofColor::cyan; + colorNameMap["magenta"] = ofColor::magenta; + colorNameMap["yellow"] = ofColor::yellow; + colorNameMap["aliceBlue"] = ofColor::aliceBlue; + colorNameMap["antiqueWhite"] = ofColor::antiqueWhite; + colorNameMap["aqua"] = ofColor::aqua; + colorNameMap["aquamarine"] = ofColor::aquamarine; + colorNameMap["azure"] = ofColor::azure; + colorNameMap["beige"] = ofColor::beige; + colorNameMap["bisque"] = ofColor::bisque; + colorNameMap["blanchedAlmond"] = ofColor::blanchedAlmond; + colorNameMap["blueViolet"] = ofColor::blueViolet; + colorNameMap["brown"] = ofColor::brown; + colorNameMap["burlyWood"] = ofColor::burlyWood; + colorNameMap["cadetBlue"] = ofColor::cadetBlue; + colorNameMap["chartreuse"] = ofColor::chartreuse; + colorNameMap["chocolate"] = ofColor::chocolate; + colorNameMap["coral"] = ofColor::coral; + colorNameMap["cornflowerBlue"] = ofColor::cornflowerBlue; + colorNameMap["cornsilk"] = ofColor::cornsilk; + colorNameMap["crimson"] = ofColor::crimson; + colorNameMap["darkBlue"] = ofColor::darkBlue; + colorNameMap["darkCyan"] = ofColor::darkCyan; + colorNameMap["darkGoldenRod"] = ofColor::darkGoldenRod; + colorNameMap["darkGray"] = ofColor::darkGray; + colorNameMap["darkGrey"] = ofColor::darkGrey; + colorNameMap["darkGreen"] = ofColor::darkGreen; + colorNameMap["darkKhaki"] = ofColor::darkKhaki; + colorNameMap["darkMagenta"] = ofColor::darkMagenta; + colorNameMap["darkOliveGreen"] = ofColor::darkOliveGreen; + colorNameMap["darkorange"] = ofColor::darkorange; + colorNameMap["darkOrchid"] = ofColor::darkOrchid; + colorNameMap["darkRed"] = ofColor::darkRed; + colorNameMap["darkSalmon"] = ofColor::darkSalmon; + colorNameMap["darkSeaGreen"] = ofColor::darkSeaGreen; + colorNameMap["darkSlateBlue"] = ofColor::darkSlateBlue; + colorNameMap["darkSlateGray"] = ofColor::darkSlateGray; + colorNameMap["darkSlateGrey"] = ofColor::darkSlateGrey; + colorNameMap["darkTurquoise"] = ofColor::darkTurquoise; + colorNameMap["darkViolet"] = ofColor::darkViolet; + colorNameMap["deepPink"] = ofColor::deepPink; + colorNameMap["deepSkyBlue"] = ofColor::deepSkyBlue; + colorNameMap["dimGray"] = ofColor::dimGray; + colorNameMap["dimGrey"] = ofColor::dimGrey; + colorNameMap["dodgerBlue"] = ofColor::dodgerBlue; + colorNameMap["fireBrick"] = ofColor::fireBrick; + colorNameMap["floralWhite"] = ofColor::floralWhite; + colorNameMap["forestGreen"] = ofColor::forestGreen; + colorNameMap["fuchsia"] = ofColor::fuchsia; + colorNameMap["gainsboro"] = ofColor::gainsboro; + colorNameMap["ghostWhite"] = ofColor::ghostWhite; + colorNameMap["gold"] = ofColor::gold; + colorNameMap["goldenRod"] = ofColor::goldenRod; + colorNameMap["grey"] = ofColor::grey; + colorNameMap["greenYellow"] = ofColor::greenYellow; + colorNameMap["honeyDew"] = ofColor::honeyDew; + colorNameMap["hotPink"] = ofColor::hotPink; + colorNameMap["indianRed "] = ofColor::indianRed ; + colorNameMap["indigo "] = ofColor::indigo ; + colorNameMap["ivory"] = ofColor::ivory; + colorNameMap["khaki"] = ofColor::khaki; + colorNameMap["lavender"] = ofColor::lavender; + colorNameMap["lavenderBlush"] = ofColor::lavenderBlush; + colorNameMap["lawnGreen"] = ofColor::lawnGreen; + colorNameMap["lemonChiffon"] = ofColor::lemonChiffon; + colorNameMap["lightBlue"] = ofColor::lightBlue; + colorNameMap["lightCoral"] = ofColor::lightCoral; + colorNameMap["lightCyan"] = ofColor::lightCyan; + colorNameMap["lightGoldenRodYellow"] = ofColor::lightGoldenRodYellow; + colorNameMap["lightGray"] = ofColor::lightGray; + colorNameMap["lightGrey"] = ofColor::lightGrey; + colorNameMap["lightGreen"] = ofColor::lightGreen; + colorNameMap["lightPink"] = ofColor::lightPink; + colorNameMap["lightSalmon"] = ofColor::lightSalmon; + colorNameMap["lightSeaGreen"] = ofColor::lightSeaGreen; + colorNameMap["lightSkyBlue"] = ofColor::lightSkyBlue; + colorNameMap["lightSlateGray"] = ofColor::lightSlateGray; + colorNameMap["lightSlateGrey"] = ofColor::lightSlateGrey; + colorNameMap["lightSteelBlue"] = ofColor::lightSteelBlue; + colorNameMap["lightYellow"] = ofColor::lightYellow; + colorNameMap["lime"] = ofColor::lime; + colorNameMap["limeGreen"] = ofColor::limeGreen; + colorNameMap["linen"] = ofColor::linen; + colorNameMap["maroon"] = ofColor::maroon; + colorNameMap["mediumAquaMarine"] = ofColor::mediumAquaMarine; + colorNameMap["mediumBlue"] = ofColor::mediumBlue; + colorNameMap["mediumOrchid"] = ofColor::mediumOrchid; + colorNameMap["mediumPurple"] = ofColor::mediumPurple; + colorNameMap["mediumSeaGreen"] = ofColor::mediumSeaGreen; + colorNameMap["mediumSlateBlue"] = ofColor::mediumSlateBlue; + colorNameMap["mediumSpringGreen"] = ofColor::mediumSpringGreen; + colorNameMap["mediumTurquoise"] = ofColor::mediumTurquoise; + colorNameMap["mediumVioletRed"] = ofColor::mediumVioletRed; + colorNameMap["midnightBlue"] = ofColor::midnightBlue; + colorNameMap["mintCream"] = ofColor::mintCream; + colorNameMap["mistyRose"] = ofColor::mistyRose; + colorNameMap["moccasin"] = ofColor::moccasin; + colorNameMap["navajoWhite"] = ofColor::navajoWhite; + colorNameMap["navy"] = ofColor::navy; + colorNameMap["oldLace"] = ofColor::oldLace; + colorNameMap["olive"] = ofColor::olive; + colorNameMap["oliveDrab"] = ofColor::oliveDrab; + colorNameMap["orange"] = ofColor::orange; + colorNameMap["orangeRed"] = ofColor::orangeRed; + colorNameMap["orchid"] = ofColor::orchid; + colorNameMap["paleGoldenRod"] = ofColor::paleGoldenRod; + colorNameMap["paleGreen"] = ofColor::paleGreen; + colorNameMap["paleTurquoise"] = ofColor::paleTurquoise; + colorNameMap["paleVioletRed"] = ofColor::paleVioletRed; + colorNameMap["papayaWhip"] = ofColor::papayaWhip; + colorNameMap["peachPuff"] = ofColor::peachPuff; + colorNameMap["peru"] = ofColor::peru; + colorNameMap["pink"] = ofColor::pink; + colorNameMap["plum"] = ofColor::plum; + colorNameMap["powderBlue"] = ofColor::powderBlue; + colorNameMap["purple"] = ofColor::purple; + colorNameMap["rosyBrown"] = ofColor::rosyBrown; + colorNameMap["royalBlue"] = ofColor::royalBlue; + colorNameMap["saddleBrown"] = ofColor::saddleBrown; + colorNameMap["salmon"] = ofColor::salmon; + colorNameMap["sandyBrown"] = ofColor::sandyBrown; + colorNameMap["seaGreen"] = ofColor::seaGreen; + colorNameMap["seaShell"] = ofColor::seaShell; + colorNameMap["sienna"] = ofColor::sienna; + colorNameMap["silver"] = ofColor::silver; + colorNameMap["skyBlue"] = ofColor::skyBlue; + colorNameMap["slateBlue"] = ofColor::slateBlue; + colorNameMap["slateGray"] = ofColor::slateGray; + colorNameMap["slateGrey"] = ofColor::slateGrey; + colorNameMap["snow"] = ofColor::snow; + colorNameMap["springGreen"] = ofColor::springGreen; + colorNameMap["steelBlue"] = ofColor::steelBlue; + colorNameMap["tan"] = ofColor::tan; + colorNameMap["teal"] = ofColor::teal; + colorNameMap["thistle"] = ofColor::thistle; + colorNameMap["tomato"] = ofColor::tomato; + colorNameMap["turquoise"] = ofColor::turquoise; + colorNameMap["violet"] = ofColor::violet; + colorNameMap["wheat"] = ofColor::wheat; + colorNameMap["whiteSmoke"] = ofColor::whiteSmoke; + colorNameMap["yellowGreen"] = ofColor::yellowGreen; + + int X_MAX = 640; + int Y_MAX = 480; + ofSetupOpenGL(X_MAX, Y_MAX, OF_WINDOW); + + ofRunApp(new cyrilApp()); +}