Skip to content

Commit

Permalink
Made an internal improvement to the way colours are defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedseven committed Jun 19, 2022
1 parent c0e9be6 commit 9b88c32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/Green/Actor.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public abstract class Actor
private int _height;
private float _opacity = 255;
private int _resizeFormat = Green.NEAREST_NEIGHBOR;

private static final int GREEN_COLOUR = 0xFF4D975B;

//Constructors
/**
Expand Down Expand Up @@ -788,7 +790,7 @@ public void draw() //Overridable
}
else
{
app.fill(-11692197); //color(77, 151, 91)
app.fill(GREEN_COLOUR);
app.rect(-_width / 2f, -_height / 2f, _width, _height);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Green/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public abstract class World
private int _width;
private int _height;

private int _backgroundColour = -1; //app.color(255, 255, 255);
private int _outOfBoundsColour = -16777216;
private int _backgroundColour = 0xFFFFFFFF;
private int _outOfBoundsColour = 0xFF000000;
private PImage _sourceBackgroundImage = null;
private PImage _backgroundImage = null;
private boolean _unbounded = false;
Expand Down Expand Up @@ -751,7 +751,7 @@ else if((_width > app.width || _height > app.height) && _camFollowActor != null)
{
app.background(_backgroundColour);
}
app.fill(-16777216); //app.color(0, 0, 0)
app.fill(0xFF000000);
app.tint(255, 255);
if(_backgroundImage != null)
app.image(_backgroundImage, 0, 0, _width, _height);
Expand Down

0 comments on commit 9b88c32

Please sign in to comment.