From 60cc0187c31516a481c58b86d7e9e6e6740b40f5 Mon Sep 17 00:00:00 2001
From: sparky4 <sparky4@cock.li>
Date: Thu, 8 Sep 2016 10:28:58 -0500
Subject: [PATCH] wwww yakuji wwww ca use to load maps w hmmm cachemap wwww

---
 src/lib/16_ca.c    | 32 ++++++++++++++++----------------
 src/lib/typdefst.h |  3 ++-
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c
index 762a6bb7..c85c3a7a 100755
--- a/src/lib/16_ca.c
+++ b/src/lib/16_ca.c
@@ -1229,7 +1229,7 @@ void CA_Startup(global_game_variables_t *gvar)
 
 	CAL_SetupMapFile (gvar);
 
-	gvar->ca.mapon = -1;
+	gvar->ca.map.mapon = -1;
 	gvar->ca.ca_levelbit = 1;
 	gvar->ca.ca_levelnum = 0;
 
@@ -1953,15 +1953,15 @@ void CA_CacheMap (global_game_variables_t *gvar)
 =
 ======================
 */
-/*++++
-void CA_UpLevel (void)
+
+void CA_UpLevel (global_game_variables_t *gvar)
 {
-	if (ca_levelnum==7)
-		Quit ("CA_UpLevel: Up past level 7!");
+	if (gvar->ca.ca_levelnum==7)
+		printf("CA_UpLevel: Up past level 7!");
 
-	ca_levelbit<<=1;
-	ca_levelnum++;
-}*/
+	gvar->ca.ca_levelbit<<=1;
+	gvar->ca.ca_levelnum++;
+}
 
 //===========================================================================
 
@@ -1975,15 +1975,15 @@ void CA_UpLevel (void)
 =
 ======================
 */
-/*++
-void CA_DownLevel (void)
+
+void CA_DownLevel (global_game_variables_t *gvar)
 {
-	if (!ca_levelnum)
-		Quit ("CA_DownLevel: Down past level 0!");
-	ca_levelbit>>=1;
-	ca_levelnum--;
-	CA_CacheMarks(NULL);
-}*/
+	if (!gvar->ca.ca_levelnum)
+		printf("CA_DownLevel: Down past level 0!");
+	gvar->ca.ca_levelbit>>=1;
+	gvar->ca.ca_levelnum--;
+	////++++++++++++++++++++++++++++++++++++++++++CA_CacheMarks(NULL);
+}
 
 //===========================================================================
 
diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h
index 02c1df1a..70012de8 100755
--- a/src/lib/typdefst.h
+++ b/src/lib/typdefst.h
@@ -188,8 +188,10 @@ typedef struct
 
 typedef struct
 {
+	int		mapon, mapnum;
 	__segment	*mapsegs[4];
 	__segment	*mapheaderseg[NUMMAPS];
+	__segment	*tinf;
 } mapinfo_t;
 
 typedef struct
@@ -200,7 +202,6 @@ typedef struct
 typedef struct
 {
 	byte		ca_levelbit,ca_levelnum;
-	int		mapon, mapnum;
 	handle_t	file;		//files to open
 	mapinfo_t	map;
 	//_seg	*grsegs[NUMCHUNKS];
-- 
2.39.5