From 99d92f75bf55b53d9153149607344f5e0a072000 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 27 Jul 2016 09:01:50 -0500 Subject: [PATCH] meh did some cleanings and i will work on mapread to mm thingy sometime soon --- src/lib/mapread.h | 5 ---- src/maptest.c | 11 +++++++- src/maptest0.c | 65 ----------------------------------------------- temp.cmd | 1 - 4 files changed, 10 insertions(+), 72 deletions(-) delete mode 100755 src/maptest0.c delete mode 100755 temp.cmd diff --git a/src/lib/mapread.h b/src/lib/mapread.h index d7e6328e..d3c26c03 100755 --- a/src/lib/mapread.h +++ b/src/lib/mapread.h @@ -22,11 +22,6 @@ #ifndef _LIBMAPREAD_H_ #define _LIBMAPREAD_H_ -//#include -//#include -#include -#include -#include #include "src/lib/jsmn/jsmn.h" #include "src/lib/modex16.h" diff --git a/src/maptest.c b/src/maptest.c index 2e6ae7cf..d4375e4e 100755 --- a/src/maptest.c +++ b/src/maptest.c @@ -19,7 +19,7 @@ * Fifth Floor, Boston, MA 02110-1301 USA. * */ - +//TODO: ADD MEMORY MANAGER! WWWW #include "src/lib/mapread.h" #define DUMP @@ -30,6 +30,15 @@ main(int argc, char *argv[]) { map_t map; short i; + char *fmt = "Memory available = %u\n"; + char *fmt0 = "Largest Contiguous Block of Memory available = %u\n"; + + fprintf(stderr, fmt, _memavl()); + fprintf(stderr, fmt0, _memmax()); + fprintf(stderr, "Size of map var = %u\n", _msize(&map)); + fprintf(stderr, "program always crashes for some reason...."); + getch(); + loadmap("data/test.map", &map); #ifdef DUMP fprintf(stdout, "map.width= %d\n", map.width); diff --git a/src/maptest0.c b/src/maptest0.c deleted file mode 100755 index 9c8cdf0f..00000000 --- a/src/maptest0.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include -#include "src/lib/fmapread.h" - -#define DUMP -//#define DUMP_MAP - -void -main(int argc, char *argv[]) -{ - map_t map; - short i; - char *fmt = "Memory available = %u\n"; - char *fmt0 = "Largest Contiguous Block of Memory available = %u\n"; - - fprintf(stderr, fmt, _memavl()); - fprintf(stderr, fmt0, _memmax()); - fprintf(stderr, "Size of map var = %u\n", _msize(&map)); - fprintf(stderr, "program always crashes for some reason...."); - getch(); - - fprintf(stderr, "loading~\n\n"); - loadmap("data/tes0.map", &map); - fprintf(stderr, "\nokies~\n"); - #ifdef DUMP - fprintf(stdout, "map.width= %d\n", map.width); - fprintf(stdout, "map.height= %d\n", map.height); - #ifdef DUMP_MAP - for(i=0; i<(map.width*map.height); i++) - { - fprintf(stdout, "%04d[%02d]", i, map.data[i]); - if(i && !(i%map.width)) fprintf(stdout, "\n"); - } - fprintf(stdout, "\n"); - #endif - fprintf(stdout, "&main()=%Fp\n", *argv[0]); - fprintf(stdout, "&map==%Fp\n", &map); - fprintf(stdout, "&map.tiles==%Fp\n", map.tiles); - fprintf(stdout, "&map.width==%Fp\n", map.width); - fprintf(stdout, "&map.height==%Fp\n", map.height); - fprintf(stdout, "&map.data==%Fp\n", map.data); - #endif - fprintf(stdout, "okies~\n"); -} diff --git a/temp.cmd b/temp.cmd deleted file mode 100755 index b24818d5..00000000 --- a/temp.cmd +++ /dev/null @@ -1 +0,0 @@ --mh -0 -d1 -wo -isrc/lib/doslib/ -obmilr -oe=24 -out -oh -ei -zp8 -fpi87 -onac -ol+ -ok -DTARGET_MSDOS=16 -DMSDOS=1 -sg -st -of+ -zu -zdf -zff -zgf -k32768 -zk0 -zc -zp8 -zm -zq -q -DDEBUGSERIAL 16.o mapread.o jsmn.o 16_in.o 16_mm.o wcpu.o 16_head.o 16_ca.o 16_dbg.o kitten.o 16_hc.o 16_timer.o src/lib/doslib/hw/cpu/dos86h/cpu.lib src/lib/doslib/hw/dos/dos86h/dos.lib src/lib/doslib/hw/vga/dos86h/vga.lib src/lib/doslib/hw/8250/dos86h/8250.lib gfx.lib -fm=16.mah -- 2.39.2