From d9fc24ba26f94a0104a2ea13446e65ad6564a14e Mon Sep 17 00:00:00 2001 From: minjaesong Date: Tue, 9 Feb 2021 17:27:14 +0900 Subject: [PATCH] 1 million virtual tiles!!! --- REFERENCING.md | 4 ++-- src/net/torvald/terrarum/ReferencingRanges.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/REFERENCING.md b/REFERENCING.md index f4aa76758..08ae0db85 100644 --- a/REFERENCING.md +++ b/REFERENCING.md @@ -6,8 +6,8 @@ |8448..0x0F_FFFF|Items (static) (1M possible)| |0x10_0000..0x0FFF_FFFF|Items (dynamic\*) (267M possible)| |0x1000_0000..0x7FFF_FFFF|Actors (1879M possible)| -|-1..-65536|Virtual Tiles| -|-2147483648..-65537 (all negative numbers)|Faction (2147M possible)| +|-2..-1048576|Virtual Tiles| +|-2147483648..-1048577 (all negative numbers)|Faction (2147M possible)| * dynamic items have own properties that will persist through savegame. diff --git a/src/net/torvald/terrarum/ReferencingRanges.kt b/src/net/torvald/terrarum/ReferencingRanges.kt index 49d8be8f4..f8e2c2217 100644 --- a/src/net/torvald/terrarum/ReferencingRanges.kt +++ b/src/net/torvald/terrarum/ReferencingRanges.kt @@ -13,12 +13,13 @@ object ReferencingRanges { val ITEMS_DYNAMIC = 0x10_0000..0x0FFF_FFFF val ACTORS = 0x1000_0000..0x7FFF_FFFF + // Actor IDs are assigned in 256 groups, single actor can have 256 sub-actors val ACTORS_BEHIND = 0x1000_0000..0x1FFF_FFFF // Rendered behind (e.g. tapestries) val ACTORS_MIDDLE = 0x2000_0000..0x4FFF_FFFF // Regular actors (e.g. almost all of them) val ACTORS_MIDTOP = 0x5000_0000..0x5FFF_FFFF // Special (e.g. weapon swung, bullets, dropped item, particles) val ACTORS_FRONT = 0x6000_0000..0x6FFF_FFFF // Rendered front (e.g. fake tile) val ACTORS_OVERLAY = 0x7000_0000..0x7FFF_FFFF // Rendered as screen overlay, not affected by light nor environment overlays - val VIRTUAL_TILES = -2 downTo -65536 // index of -1 breaks things for some reason :( + val VIRTUAL_TILES = -2 downTo -1048576 // index of -1 breaks things for some reason :( } \ No newline at end of file