From dfb8588b1c3e70a63132cbc8c3b61125310a2fd5 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 12 Feb 2005 19:51:13 +0000 Subject: [PATCH] fix setup of firstMouse and pmouseX/Y --- processing/build/shared/revisions.txt | 18 ++++++++++++++++++ processing/core/PApplet.java | 11 +++++++---- processing/core/PSound.java | 2 +- processing/core/todo.txt | 9 +++++++-- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/processing/build/shared/revisions.txt b/processing/build/shared/revisions.txt index 4eaaa9e0d..f2eb532cb 100644 --- a/processing/build/shared/revisions.txt +++ b/processing/build/shared/revisions.txt @@ -7,6 +7,24 @@ releases will be super crusty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +ABOUT REV 0077 + ++ forgot to mention in rev 75 that double-clicking a .pde file on the +mac will now launch processing with that sketch running + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + +ABOUT REV 0076 + +this was a quick release that fixed launcher issues on both mac os x +and windows. + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + ABOUT REV 0075 * DON'T USE THIS RELEASE IF YOU'RE ON ANY SORT OF MEDICATION * diff --git a/processing/core/PApplet.java b/processing/core/PApplet.java index 12826dc1a..ceb6ca055 100644 --- a/processing/core/PApplet.java +++ b/processing/core/PApplet.java @@ -87,7 +87,7 @@ public class PApplet extends Applet * (frameCount == 0) won't work since mouseXxxxx() may not be called * until a couple frames into things. */ - boolean firstMouse; + public boolean firstMouse; public boolean mousePressed; public MouseEvent mouseEvent; @@ -802,14 +802,15 @@ public class PApplet extends Applet draw(); + // dmouseX/Y is updated only once per frame + dmouseX = mouseX; + dmouseY = mouseY; + // these are called *after* loop so that valid // drawing commands can be run inside them. it can't // be before, since a call to background() would wipe // out anything that had been drawn so far. dequeueMouseEvents(); - // dmouseX/Y is updated only once per frame - dmouseX = mouseX; - dmouseY = mouseY; dequeueKeyEvents(); if (THREAD_DEBUG) println(Thread.currentThread().getName() + @@ -958,6 +959,8 @@ public class PApplet extends Applet if (firstMouse) { pmouseX = mouseX; pmouseY = mouseY; + dmouseX = mouseX; + dmouseY = mouseY; firstMouse = false; } diff --git a/processing/core/PSound.java b/processing/core/PSound.java index f1a2d0ba0..9e4ea5bf4 100755 --- a/processing/core/PSound.java +++ b/processing/core/PSound.java @@ -49,7 +49,7 @@ public class PSound { //int length; int position; - int data[]; + int data[]; // 16 bit, from -32768 to +32767 public PSound() { } // for 1.3 subclass diff --git a/processing/core/todo.txt b/processing/core/todo.txt index 9c8990689..38eafad72 100644 --- a/processing/core/todo.txt +++ b/processing/core/todo.txt @@ -1,6 +1,7 @@ 0077 core X bring back pmouseX/Y using a tricky method of storing separate X values for inside draw() versus inside the event handler versions +X debug handling, and make firstMouse public covered in previous X before graphics engine change, attach jogl stuff @@ -32,17 +33,21 @@ X add gzipInput and gzipOutput _ get regular graphics engine working again _ look for size() method to determine default size of applet +_ (same as applet exporter function) _ when using core graphics, don't show applet frame until first frame _ (in opengl, open frame early, make sure this isn't inhibited) +_ default to single byte input from serial port +_ and add serial.setBuffer() for message length as alternative +_ or serial.setDelimiter() to fire message on delim + _ light(x, y, z, c1, c2, c3, TYPE) _ also BLight with same constructor, and on() and off() fxn +_ be consistent about getXxx() methods // -_ be consistent about getXxx() methods - _ basic sample audio playback needed for p5 _ make separate java 1.1 and java 1.3 classes