From a3d0ca40c1241d4e9214fd1874ede71dccb0c96b Mon Sep 17 00:00:00 2001
From: mibi88 <76903855+mibi88@users.noreply.github.com>
Date: Wed, 31 Jul 2024 22:21:34 +0200
Subject: [PATCH] Added portal support
---
assets/converters.py | 1 +
assets/interior1_0.tmx | 10 +++++-----
src/game.c | 43 +++++++++++++++++++++++++++++++++++++-----
src/game.h | 2 ++
4 files changed, 46 insertions(+), 10 deletions(-)
diff --git a/assets/converters.py b/assets/converters.py
index 3d97807..63d6de5 100644
--- a/assets/converters.py
+++ b/assets/converters.py
@@ -327,6 +327,7 @@ def convert_map(input: str, output: str, params: dict, target):
portal_struct += fxconv.u32(rect[3])
# Add a reference to the destination portal
portal_struct += fxconv.ref(f"{dest_file_name}_{dest_portal}")
+ portal_struct += fxconv.ref(f"{dest_file_name}")
map_struct += fxconv.ptr(portal_struct)
map_struct += fxconv.u32(dialog_num)
diff --git a/assets/interior1_0.tmx b/assets/interior1_0.tmx
index e40d41a..cca09fa 100644
--- a/assets/interior1_0.tmx
+++ b/assets/interior1_0.tmx
@@ -14,9 +14,9 @@
86,93,94,1,1,1,1,1,9,10,1,92,
110,117,118,1,1,1,1,1,33,34,1,116,
86,1,1,1,1,1,1,1,1,1,1,92,
-110,1,1,1,1,1,1,1,1,1,1,116,
-110,1,1,1,1,133,2,1,1,1,1,92,
-110,1,1,1,1,2,2,1,1,1,1,116
+110,1,1,1,1,133,2,1,1,1,1,116,
+110,1,1,1,1,2,2,1,1,1,1,92,
+110,114,114,114,114,114,114,114,114,114,114,116
@@ -40,11 +40,11 @@
410,0,0,0,0,0,0,0,0,0,0,410,
410,0,0,0,0,0,0,0,0,0,0,410,
410,0,0,0,0,0,0,0,0,0,0,410,
-410,0,0,0,0,0,0,0,0,0,0,410
+410,410,410,410,410,410,410,410,410,410,410,410
-