Skip to content

Commit

Permalink
Added Actor-specific isMouse...Here() methods, added a few missing Wo…
Browse files Browse the repository at this point in the history
…rld constructors, and made getWorld() return null instead of throwing an exception.
  • Loading branch information
zedseven committed Jan 14, 2019
1 parent 379488e commit e9d1452
Show file tree
Hide file tree
Showing 23 changed files with 454 additions and 89 deletions.
2 changes: 1 addition & 1 deletion distribution/Green-1.0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1>Green</h1>
<h2>Green</h2>
<p>
A Library by <a href="https://ztdp.ca/">Zacchary Dempsey-Plante</a> for the <a href="http://www.processing.org" target="_blank">Processing</a> programming environment.<br>
Last update, 2018-12-09.
Last update, 2019-01-13.
</p>
<p>
A library for Processing to emulate Greenfoot functionality.<br>
Expand Down
165 changes: 133 additions & 32 deletions distribution/Green-1.0/reference/Green/Actor.html

Large diffs are not rendered by default.

61 changes: 56 additions & 5 deletions distribution/Green-1.0/reference/Green/Green.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Green (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand All @@ -18,7 +18,7 @@
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":10,"i3":9,"i4":9,"i5":9,"i6":10,"i7":10,"i8":10,"i9":9,"i10":9,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":42,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":9,"i39":10};
var methods = {"i0":9,"i1":9,"i2":10,"i3":9,"i4":9,"i5":9,"i6":10,"i7":10,"i8":10,"i9":9,"i10":9,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":42,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":9,"i38":10,"i39":9,"i40":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
Expand Down Expand Up @@ -431,20 +431,35 @@ <h3>Method Summary</h3>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Green/Green.html#pointInRectangle-float-float-float-float-float-float-float-float-float-float-">pointInRectangle</a></span>(float&nbsp;pXx,
float&nbsp;pXy,
float&nbsp;pYx,
float&nbsp;pYy,
float&nbsp;pZx,
float&nbsp;pZy,
float&nbsp;pWx,
float&nbsp;pWy,
float&nbsp;pPx,
float&nbsp;pPy)</code>
<div class="block">Checks whether a point (<code>pPx</code>, <code>pPy</code>) is within the bounds of a rectangle ((<code>pXx</code>, <code>pXy</code>), (<code>pYx</code>, <code>pYy</code>), (<code>pZx</code>, <code>pZy</code>), (<code>pWx</code>, <code>pWy</code>)) where the points are provided in clockwise order.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code><a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Green/Green.html#resizeNN-processing.core.PImage-int-int-">resizeNN</a></span>(<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;src,
int&nbsp;w,
int&nbsp;h)</code>
<div class="block">A nearest-neighbour resizing implementation.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Green/Green.html#sec-float-">sec</a></span>(float&nbsp;angle)</code>
<div class="block">Calculates the secant of <code>angle</code> in radians.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<tr id="i40" class="altColor">
<td class="colFirst"><code><a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../Green/Green.html#tileImage-processing.core.PImage-int-int-">tileImage</a></span>(<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;src,
int&nbsp;w,
Expand Down Expand Up @@ -785,6 +800,42 @@ <h4>tileImage</h4>
</dl>
</li>
</ul>
<a name="pointInRectangle-float-float-float-float-float-float-float-float-float-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pointInRectangle</h4>
<pre>public static&nbsp;boolean&nbsp;pointInRectangle(float&nbsp;pXx,
float&nbsp;pXy,
float&nbsp;pYx,
float&nbsp;pYy,
float&nbsp;pZx,
float&nbsp;pZy,
float&nbsp;pWx,
float&nbsp;pWy,
float&nbsp;pPx,
float&nbsp;pPy)</pre>
<div class="block">Checks whether a point (<code>pPx</code>, <code>pPy</code>) is within the bounds of a rectangle ((<code>pXx</code>, <code>pXy</code>), (<code>pYx</code>, <code>pYy</code>), (<code>pZx</code>, <code>pZy</code>), (<code>pWx</code>, <code>pWy</code>)) where the points are provided in clockwise order.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pXx</code> - The X-axis position of the X point.</dd>
<dd><code>pXy</code> - The Y-axis position of the X point.</dd>
<dd><code>pYx</code> - The X-axis position of the Y point.</dd>
<dd><code>pYy</code> - The Y-axis position of the Y point.</dd>
<dd><code>pZx</code> - The X-axis position of the Z point.</dd>
<dd><code>pZy</code> - The Y-axis position of the Z point.</dd>
<dd><code>pWx</code> - The X-axis position of the W point.</dd>
<dd><code>pWy</code> - The Y-axis position of the W point.</dd>
<dd><code>pPx</code> - The X-axis position of the point to check.</dd>
<dd><code>pPy</code> - The Y-axis position of the point to check.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the point to check is within the bounds of the provided rectangle.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://gamedev.stackexchange.com/a/110233">https://gamedev.stackexchange.com/a/110233</a></dd>
</dl>
</li>
</ul>
<a name="loadWorld-Green.World-">
<!-- -->
</a>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/Green/InputKey.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>InputKey (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/Green/NoWorldException.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>NoWorldException (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>SingleInstanceException (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>UnknownResizeFormatException (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
71 changes: 67 additions & 4 deletions distribution/Green-1.0/reference/Green/World.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>World (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down Expand Up @@ -190,6 +190,15 @@ <h3>Constructor Summary</h3>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-int-processing.core.PImage-boolean-">World</a></span>(int&nbsp;w,
int&nbsp;h,
int&nbsp;bgColor,
<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;bgImage,
boolean&nbsp;unbounded)</code>
<div class="block">Creates a new world with defined dimensions and a background image with a background colour to draw underneath, set to be bounded or otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-int-processing.core.PImage-int-">World</a></span>(int&nbsp;w,
int&nbsp;h,
int&nbsp;bgColor,
Expand All @@ -198,7 +207,7 @@ <h3>Constructor Summary</h3>
<div class="block">Creates a new world with defined dimensions and a background image with a background colour to draw underneath.</div>
</td>
</tr>
<tr class="altColor">
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-int-processing.core.PImage-int-boolean-">World</a></span>(int&nbsp;w,
int&nbsp;h,
int&nbsp;bgColor,
Expand All @@ -208,13 +217,21 @@ <h3>Constructor Summary</h3>
<div class="block">Creates a new world with defined dimensions and a background image with a background colour to draw underneath, set to be bounded or otherwise.</div>
</td>
</tr>
<tr class="rowColor">
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-processing.core.PImage-">World</a></span>(int&nbsp;w,
int&nbsp;h,
<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;bgImage)</code>
<div class="block">Creates a new world with defined dimensions and a background image.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-processing.core.PImage-boolean-">World</a></span>(int&nbsp;w,
int&nbsp;h,
<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;bgImage,
boolean&nbsp;unbounded)</code>
<div class="block">Creates a new world with defined dimensions and a background image, set to be bounded or otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../Green/World.html#World-int-int-processing.core.PImage-int-">World</a></span>(int&nbsp;w,
int&nbsp;h,
Expand Down Expand Up @@ -786,6 +803,28 @@ <h4>World</h4>
</dl>
</li>
</ul>
<a name="World-int-int-processing.core.PImage-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>World</h4>
<pre>public&nbsp;World(int&nbsp;w,
int&nbsp;h,
<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;bgImage,
boolean&nbsp;unbounded)</pre>
<div class="block">Creates a new world with defined dimensions and a background image, set to be bounded or otherwise.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>w</code> - The width to create the world with.</dd>
<dd><code>h</code> - The height to create the world with.</dd>
<dd><code>bgImage</code> - The background image.</dd>
<dd><code>unbounded</code> - Whether or not <a href="../Green/Actor.html" title="class in Green"><code>Actor</code></a> instances should be able to go out of bounds.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../Green/UnknownResizeFormatException.html" title="class in Green">UnknownResizeFormatException</a></code> - Thrown when an unknown resize format is supplied.</dd>
</dl>
</li>
</ul>
<a name="World-int-int-processing.core.PImage-int-boolean-">
<!-- -->
</a>
Expand All @@ -810,6 +849,30 @@ <h4>World</h4>
</dl>
</li>
</ul>
<a name="World-int-int-int-processing.core.PImage-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>World</h4>
<pre>public&nbsp;World(int&nbsp;w,
int&nbsp;h,
int&nbsp;bgColor,
<a href="http://processing.github.io/processing-javadocs/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core">PImage</a>&nbsp;bgImage,
boolean&nbsp;unbounded)</pre>
<div class="block">Creates a new world with defined dimensions and a background image with a background colour to draw underneath, set to be bounded or otherwise.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>w</code> - The width to create the world with.</dd>
<dd><code>h</code> - The height to create the world with.</dd>
<dd><code>bgColor</code> - The background colour. Use the <a href="http://processing.github.io/processing-javadocs/core/processing/core/PApplet.html?is-external=true#color-int-int-int-" title="class or interface in processing.core"><code>PApplet.color(int, int, int)</code></a> method to define it.</dd>
<dd><code>bgImage</code> - The background image.</dd>
<dd><code>unbounded</code> - Whether or not <a href="../Green/Actor.html" title="class in Green"><code>Actor</code></a> instances should be able to go out of bounds.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../Green/UnknownResizeFormatException.html" title="class in Green">UnknownResizeFormatException</a></code> - Thrown when an unknown resize format is supplied.</dd>
</dl>
</li>
</ul>
<a name="World-int-int-int-processing.core.PImage-int-boolean-">
<!-- -->
</a>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/Green/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Green (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/Green/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Green (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/Green/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Green Class Hierarchy (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>All Classes (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>All Classes (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Constant Field Values (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>Deprecated List (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions distribution/Green-1.0/reference/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_181) on Sun Dec 09 19:24:08 EST 2018 -->
<!-- Generated by javadoc (1.8.0_181) on Sun Jan 13 23:49:04 EST 2019 -->
<title>API Help (Javadocs: Green)</title>
<meta name="date" content="2018-12-09">
<meta name="date" content="2019-01-13">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
Loading

0 comments on commit e9d1452

Please sign in to comment.