Skip to content

Commit

Permalink
Merge pull request #188 from LengaJenga/main
Browse files Browse the repository at this point in the history
Broken texture fix, new locations, xtea ignore
  • Loading branch information
ConnorDY authored Mar 21, 2024
2 parents 14bb329 + 39a27d9 commit 1c142a8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### :sparkles: Enhancements

- More locations added

- Regions with newer textures will now display properly.

- Add custom scale factors and default to 1:128 instead of 1:100 – [#177](https://github.com/ConnorDY/OSRS-Environment-Exporter/pull/177) @ScoreUnder

- Add command line option to select Z layers – [#181](https://github.com/ConnorDY/OSRS-Environment-Exporter/pull/181) @ScoreUnder
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/cache/XteaManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cache

import com.fasterxml.jackson.annotation.JsonAlias
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.ObjectMapper
import java.io.File
Expand All @@ -23,6 +24,7 @@ class XteaManager(path: String) {
return xteaKeys[region]
}

@JsonIgnoreProperties(ignoreUnknown = true)
data class XteaKey @JsonCreator constructor(
@JsonProperty("mapsquare") @JsonAlias("region") val mapsquare: Int,
@JsonProperty("key") @JsonAlias("keys") val key: IntArray
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/models/scene/SceneRegionBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ class SceneRegionBuilder constructor(
if (yi in 0 until REGION_SIZE) {
val r: RegionDefinition =
regionLoader.findRegionForWorldCoordinates(baseX + xi, baseY + yi) ?: continue
val underlayId: Int = r.tiles[z][xi][yi].underlayId.toInt() and 0xFF
val overlayId: Int = r.tiles[z][xi][yi].overlayId.toInt() and 0xFF
val underlayId: Int = r.tiles[z][xi][yi].underlayId.toInt() and 0xFFF
val overlayId: Int = r.tiles[z][xi][yi].overlayId.toInt() and 0xFFF
if (underlayId <= 0 && overlayId <= 0) {
continue
}
Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/data/locations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
{
"locations": [
{ "name": "Perilous Moons", "coords": [1440, 9632, 0] },
{ "name": "Whisperer Arena", "coords": [2656, 6370, 0] },
{ "name": "Whisperer Arena (Shadow realm)", "coords": [2400, 6370, 0] },
{ "name": "Duke Sucellus Arena", "coords": [3039, 6440, 0] },
{ "name": "Vardorvis Arena", "coords": [1120, 3426, 0] },
{ "name": "The Scar", "coords": [2016, 6434, 0] },
{ "name": "Leviathan Arena", "coords": [2080, 6370, 0] },
{ "name": "Lassar Undercity", "coords": [2512, 6396, 0] },
{ "name": "Lassar Undercity (Shadow realm)", "coords": [2400, 6370, 0] },
{ "name": "True Yu'biusk", "coords": [3552, 4386, 0] },
{ "name": "Goblin Temple", "coords": [3744, 4322, 0] },
{ "name": "Yu'biusk", "coords": [3872, 4386, 0] },
{ "name": "Daimon's Crater", "coords": [3424, 3695, 0] },
{ "name": "The Escape Caves", "coords": [3360, 10272, 0] },
{ "name": "Vet'ion Arena", "coords": [3296, 10208, 0] },
{ "name": "Callisto Arena", "coords": [3360, 10336, 0] },
{ "name": "The Stranglewood", "coords": [1567, 3114, 0] },
{ "name": "Kingdom of Varlamore", "coords": [1567, 3114, 0] },
{ "name": "Hunter Guild", "coords": [1567, 3050, 0] },
{ "name": "Ralos' Rise", "coords": [1440, 3178, 0] },
{ "name": "Fortis", "coords": [1696, 3106, 0] },
{ "name": "Fortis Colosseum", "coords": [1696, 3114, 0] },
{ "name": "Venenatis Arena", "coords": [3424, 10208, 0] },
{ "name": "2015 Clan Cup PvM Arena", "coords": [1698, 4700, 0] },
{ "name": "2017 Wilderness Wars lobby", "coords": [3296, 4639, 0] },
{ "name": "2018 Allstars Tournament Arena", "coords": [3329, 5823, 2] },
Expand Down

0 comments on commit 1c142a8

Please sign in to comment.