From adf1e3b14c7eead67f3d80cac3e812736d028bf2 Mon Sep 17 00:00:00 2001 From: dmose Date: Mon, 25 Aug 2003 04:44:10 +0000 Subject: [PATCH] Basic support for static mode programs --- app/PdePreprocessor.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/PdePreprocessor.java b/app/PdePreprocessor.java index 401dd4f64..18477001a 100644 --- a/app/PdePreprocessor.java +++ b/app/PdePreprocessor.java @@ -218,6 +218,15 @@ public class PdePreprocessor { out.print("public class " + name + " extends " + extendsWhat + " {"); + + if (programType == BEGINNER) { + // XXXdmose need to actually deal with size / background info here + String sizeInfo = ""; + String backgroundInfo = ""; + + out.print("void setup() { " + sizeInfo + backgroundInfo + "} " + + "void draw() {"); + } } } @@ -227,6 +236,12 @@ public class PdePreprocessor { * @param out PrintStream to write it to. */ void writeFooter(PrintStream out) { + + if (programType == BEGINNER) { + // close off draw() definition + out.print("}"); + } + if (programType < ADVANCED) { // close off the class definition out.print("}");