From: sparky4 Date: Thu, 8 Sep 2016 14:50:03 +0000 (-0500) Subject: wwww yakuji wwww ca use to load maps w X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=79b01b5a9750ff9971fc5e33945fa2f5e2f6602c;hp=b76c0985ea68720687947fb46a5a49cebe6cbac2;p=16.git wwww yakuji wwww ca use to load maps w --- 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