Skip to content

Commit

Permalink
Fixed some incongruities in allowed ranges.
Browse files Browse the repository at this point in the history
  • Loading branch information
MTrop committed May 20, 2024
1 parent f98af1f commit 727b6ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Doom Struct (C) 2015-2024
by Matt Tropiano et al. (see AUTHORS.txt)


Changed in 2.15.8
-----------------

- `Fixed` Some incongruities in allowed ranges in `DoomSector`.


Changed in 2.15.7
-----------------

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/mtrop/doom/map/data/DoomSector.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ public String getTextureCeiling()
/**
* Sets the sector's light level.
* @param lightLevel the new light level.
* @throws IllegalArgumentException if lightLevel is outside the range 0 to 255.
* @throws IllegalArgumentException if lightLevel is outside the range -32768 to 32767.
*/
public void setLightLevel(int lightLevel)
{
RangeUtils.checkByteUnsigned("Light Level", lightLevel);
RangeUtils.checkShort("Light Level", lightLevel);
this.lightLevel = lightLevel;
}

Expand All @@ -158,7 +158,7 @@ public int getLightLevel()
/**
* Sets the sector's special.
* @param special the new special number.
* @throws IllegalArgumentException if special is outside the range 0 to 65535.
* @throws IllegalArgumentException if special is outside the range -32768 to 32767.
*/
public void setSpecial(int special)
{
Expand All @@ -177,7 +177,7 @@ public int getSpecial()
/**
* Sets the sector's tag.
* @param tag the new tag.
* @throws IllegalArgumentException if tag is outside the range 0 to 65535.
* @throws IllegalArgumentException if tag is outside the range -32768 to 32767.
*/
public void setTag(int tag)
{
Expand Down

0 comments on commit 727b6ae

Please sign in to comment.