From 79b01b5a9750ff9971fc5e33945fa2f5e2f6602c Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 8 Sep 2016 09:50:03 -0500 Subject: [PATCH] wwww yakuji wwww ca use to load maps w --- src/lib/16_ca.c | 7 ++++--- src/lib/typdefst.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 67bd4f40..6cde8074 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -1102,8 +1102,8 @@ void CAL_SetupMapFile (global_game_variables_t *gvar) // // open the data file // -//todo multiple files - if ((gvar->ca.file.maphandles[0] = open("data/test.map", +//TODO: multiple files + if ((gvar->ca.file.maphandle[0] = open("data/test.map", O_RDONLY | O_BINARY, S_IREAD)) == -1) { printf("Can't open data/test.map!"); @@ -1234,8 +1234,9 @@ void CA_Shutdown(global_game_variables_t *gvar) close(gvar->handle.profilehandle); #endif close(gvar->handle.showmemhandle); + + close(gvar->ca.file.maphandle); /*++++ - close(maphandle); close(grhandle); close(audiohandle);*/ } diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h index d0e4a463..8373f8ee 100755 --- a/src/lib/typdefst.h +++ b/src/lib/typdefst.h @@ -185,7 +185,7 @@ typedef struct typedef struct { - int maphandles[4]; // handle to MAPTEMP / GAMEMAPS + int maphandle[4]; // handle to MAPTEMP / GAMEMAPS } handle_t; typedef struct -- 2.39.2