From: sparky4 Date: Sun, 21 Jun 2015 01:49:50 +0000 (-0500) Subject: major changes to entire project for tweaking it amd making it cleaner!! OK PNGWEN... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=e0335fc72d6856ec3df7a081281ebd8f36e3981d;p=16.git major changes to entire project for tweaking it amd making it cleaner!! OK PNGWEN DO YOUR THING! new file: 16.exe modified: Project 16.bfproject renamed: data/gfx.pal -> data/default.pal modified: doc/project.txt modified: emsdump.exe modified: fmemtest.exe modified: makefile modified: maptest.exe modified: maptest0.exe new file: palettec.exe modified: pcxtest.exe modified: scroll.exe modified: src/16.h modified: src/emsdump.c modified: src/fmemtest.c modified: src/lib/bitmap.c modified: src/lib/bitmap.h modified: src/lib/dos_kb.c modified: src/lib/dos_kb.h modified: src/lib/lib_head.c modified: src/lib/lib_head.h modified: src/lib/modex16.c modified: src/lib/modex16.h modified: src/lib/planar.c modified: src/lib/planar.h modified: src/lib/scroll16.c modified: src/lib/scroll16.h modified: src/lib/types.h renamed: src/lib/wtest/makefile -> src/lib/wcpu/makefile renamed: src/lib/wtest/wtest.c -> src/lib/wcpu/wcpu.c renamed: src/lib/wtest/WTEST.EXE -> src/lib/wcpu/wcpu.exe new file: src/lib/wcpu/wcpu.h deleted: src/lib/wtest/wtest.h modified: src/maptest.c modified: src/maptest0.c modified: src/palettec.c modified: src/pcxtest.c modified: src/scroll.c modified: src/test.c modified: src/test2.c modified: test.exe modified: test2.exe --- diff --git a/16.exe b/16.exe new file mode 100644 index 00000000..92453743 Binary files /dev/null and b/16.exe differ diff --git a/Project 16.bfproject b/Project 16.bfproject index bf9de3ac..f5b7d095 100644 --- a/Project 16.bfproject +++ b/Project 16.bfproject @@ -1,40 +1,44 @@ c2e.convert_special: 0 e2c.convert_num: 0 -openfiles: /dos/z/16/doc/project.txt:138:0:0: -openfiles: /dos/z/16/src/palettec.c:179:0:0: -openfiles: /dos/z/16/src/pcxtest.c:141:0:0: -openfiles: /dos/z/16/src/scroll.c:2181:1209:0: -openfiles: /dos/z/16/src/fmemtest.c:116:0:0: +openfiles: /dos/z/16/doc/project.txt:127:0:0: +openfiles: /dos/z/16/src/palettec.c:882:85:1: +openfiles: /dos/z/16/src/pcxtest.c:891:0:0: +openfiles: /dos/z/16/src/scroll.c:4297:3926:0: +openfiles: /dos/z/16/src/fmemtest.c:890:0:0: openfiles: /dos/z/16/src/emmtest.c:439:0:0: -openfiles: /dos/z/16/src/emsdump.c:59:0:0: -openfiles: /dos/z/16/src/maptest.c:64:0:0: -openfiles: /dos/z/16/src/maptest0.c:366:0:0: -openfiles: /dos/z/16/src/test.c:0:0:0: -openfiles: /dos/z/16/src/test2.c:0:0:0: -openfiles: /dos/z/16/src/lib/modex16.c:2759:2367:0: -openfiles: /dos/z/16/src/lib/modex16.h:1279:866:0: -openfiles: /dos/z/16/src/lib/planar.h:131:0:0: -openfiles: /dos/z/16/src/lib/PLANAR.C:0:0:0: -openfiles: /dos/z/16/src/lib/bitmap.c:1152:604:0: -openfiles: /dos/z/16/src/lib/bitmap.h:257:0:0: -openfiles: /dos/z/16/src/lib/dos_kb.c:2857:2407:0: -openfiles: /dos/z/16/src/lib/dos_kb.h:0:0:0: -openfiles: /dos/z/16/src/lib/mapread.c:2265:1988:0: -openfiles: /dos/z/16/src/lib/mapread.h:585:0:0: +openfiles: /dos/z/16/src/emsdump.c:890:0:0: +openfiles: /dos/z/16/src/maptest.c:890:0:0: +openfiles: /dos/z/16/src/maptest0.c:890:0:0: +openfiles: /dos/z/16/src/test.c:890:0:0: +openfiles: /dos/z/16/src/test2.c:890:0:0: +openfiles: /dos/z/16/src/lib/modex16.c:890:0:0: +openfiles: /dos/z/16/src/lib/modex16.h:966:338:0: +openfiles: /dos/z/16/src/lib/planar.h:1010:511:0: +openfiles: /dos/z/16/src/lib/planar.c:944:0:0: +openfiles: /dos/z/16/src/lib/bitmap.c:890:0:0: +openfiles: /dos/z/16/src/lib/bitmap.h:0:0:0: +openfiles: /dos/z/16/src/lib/wcpu/wcpu.c:942:0:0: +openfiles: /dos/z/16/src/lib/wcpu/wcpu.h:995:0:0: +openfiles: /dos/z/16/src/lib/dos_kb.c:118:0:0: +openfiles: /dos/z/16/src/lib/dos_kb.h:361:0:0: +openfiles: /dos/z/16/src/lib/mapread.c:2792:1988:0: +openfiles: /dos/z/16/src/lib/mapread.h:148:0:0: openfiles: /dos/z/16/src/lib/fmapread.c:5968:4541:0: openfiles: /dos/z/16/src/lib/fmapread.h:240:0:0: -openfiles: /dos/z/16/src/lib/exmm/memory.c:308:99:0: +openfiles: /dos/z/16/src/lib/exmm/memory.c:308:215:0: openfiles: /dos/z/16/src/lib/exmm/memory.h:0:0:0: -openfiles: /dos/z/16/src/lib/exmm/emmsize.h:0:0:0: +openfiles: /dos/z/16/src/lib/exmm/emmsize.h:1223:819:0: openfiles: /dos/z/16/src/lib/exmm/emmret.h:0:0:0: -openfiles: /dos/z/16/src/lib/jsmn/farjsmn.c:7182:6673:0: +openfiles: /dos/z/16/src/lib/jsmn/farjsmn.c:7182:6170:0: openfiles: /dos/z/16/src/lib/jsmn/farjsmn.h:861:381:0: -openfiles: /dos/z/16/src/lib/lib_head.c:0:0:0: -openfiles: /dos/z/16/src/lib/lib_head.h:2786:1673:0: -openfiles: /dos/z/16/makefile:2533:2173:0: -openfiles: /dos/z/16/src/lib/types.h:528:0:0: -openfiles: /dos/z/16/src/16.h:850:0:0: -openfiles: /dos/z/16/src/16.c:854:0:1: +openfiles: /dos/z/16/src/lib/lib_head.c:890:0:0: +openfiles: /dos/z/16/src/lib/lib_head.h:890:338:0: +openfiles: /dos/z/16/makefile:890:45:0: +openfiles: /dos/z/16/src/lib/types.h:885:0:0: +openfiles: /dos/z/16/src/16.h:943:0:0: +openfiles: /dos/z/16/src/16.c:929:0:0: +openfiles: /dos/z/16/src/lib/scroll16.h:961:0:0: +openfiles: /dos/z/16/src/lib/scroll16.c:944:0:0: snr_recursion_level: 0 convertcolumn_horizontally: 0 adv_open_matchname: 0 @@ -46,10 +50,10 @@ view_left_panel: 0 default_mime_type: text/plain e2c.convert_xml: 1 c2e.convert_iso: 0 -opendir: file:///dos/z/16 +opendir: file:///dos/z/16/src/lib/wcpu wrap_text_default: 0 bookmarks_filename_mode: 1 -ssearch_text: mapscrollr +ssearch_text: getfree snr_casesens: 0 view_blocks: 1 name: Project 16 @@ -117,6 +121,9 @@ recent_files: file:///dos/z/16/src/lib/lib_head.c recent_files: file:///dos/z/16/src/scroll.c recent_files: file:///dos/z/16/src/lib/modex16.c recent_files: file:///dos/z/16/16.c +recent_files: file:///dos/z/16/src/lib/wcpu/wtest.c +recent_files: file:///dos/z/16/src/lib/wcpu/wtest.h +recent_files: file:///dos/z/16/src/lib/wcpu/makefile snr_replacetype: 0 savedir: file:///dos/z/16/src spell_check_default: 1 @@ -128,13 +135,6 @@ snr_escape_chars: 0 htmlbar_view: 0 spell_lang: en ssearch_dotmatchall: 0 -searchlist: voi scroll -searchlist: void scrollright -searchlist: void mscrollright -searchlist: void mascrollright -searchlist: void mapscrollright -searchlist: scrollright -searchlist: mvdb[id].mv searchlist: ]-> searchlist: scroll searchlist: mscroll @@ -143,6 +143,13 @@ searchlist: maposcroll searchlist: mv-> searchlist: mapscrollr searchlist: , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + #include #include //#include diff --git a/src/fmemtest.c b/src/fmemtest.c index a62e26dc..83012799 100644 --- a/src/fmemtest.c +++ b/src/fmemtest.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 void diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index c34e13d0..5e65195e 100644 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 #include diff --git a/src/lib/bitmap.h b/src/lib/bitmap.h index 802313d9..1a2abcf9 100644 --- a/src/lib/bitmap.h +++ b/src/lib/bitmap.h @@ -1,6 +1,28 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ /* * Functions and types for loading and manipulating bitmaps. - */ + */ + #ifndef BITMAP_H #define BITMAP_H #include "src/lib/types.h" diff --git a/src/lib/dos_kb.c b/src/lib/dos_kb.c index a99f2ca4..2bebd707 100644 --- a/src/lib/dos_kb.c +++ b/src/lib/dos_kb.c @@ -1,6 +1,7 @@ /* Thanks to Alex Russell for example code */ /* Thanks to Gary Neal for example code */ -#include "src\lib\dos_kb.h" +/* working out the licencing~ */ +#include "src/lib/dos_kb.h" // keyboard buffer static byte key[NUM_SCANCODES]; // pressed diff --git a/src/lib/dos_kb.h b/src/lib/dos_kb.h index debb0c30..8f85fe7f 100644 --- a/src/lib/dos_kb.h +++ b/src/lib/dos_kb.h @@ -1,6 +1,6 @@ #ifndef _DOSLIB_KB_H_ #define _DOSLIB_KB_H_ -#include "src\lib\lib_head.h" +#include "src/lib/lib_head.h" /* Maximum number of scan codes on keyboard controllers */ #define NUM_SCANCODES 128 diff --git a/src/lib/lib_head.c b/src/lib/lib_head.c index 0053446f..0f080bca 100644 --- a/src/lib/lib_head.c +++ b/src/lib/lib_head.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 "src/lib/lib_head.h" /* local function */ diff --git a/src/lib/lib_head.h b/src/lib/lib_head.h index ca5d2de6..a0e0cc61 100644 --- a/src/lib/lib_head.h +++ b/src/lib/lib_head.h @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ + #ifndef _LIBHEAD_H_ #define _LIBHEAD_H_ #include diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 2988f27d..af4c946e 100644 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 #include @@ -6,7 +28,6 @@ #include #include "src/lib/modex16.h" - byte far* VGA=(byte far*) 0xA0000000; /* this points to video memory. */ /*word text_mask[16] = { 0x0002, 0x0102, 0x0202, 0x0302, diff --git a/src/lib/modex16.h b/src/lib/modex16.h index 7df4e9b0..0c3b5081 100644 --- a/src/lib/modex16.h +++ b/src/lib/modex16.h @@ -1,3 +1,24 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ /* * Functions for handling modex and doing other basic graphics stuff. */ diff --git a/src/lib/planar.c b/src/lib/planar.c index 8b9f0042..8b713691 100644 --- a/src/lib/planar.c +++ b/src/lib/planar.c @@ -1,8 +1,29 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ /* * Implimentation of the planar buffer files. */ #include -#include "planar.h" +#include "src/lib/planar.h" /* creates a planar buffer from the bitmap data. The planar buffer is dynamically allocated, and should diff --git a/src/lib/planar.h b/src/lib/planar.h index 6aa8e260..38ee46eb 100644 --- a/src/lib/planar.h +++ b/src/lib/planar.h @@ -1,8 +1,29 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ /* * Functions and types for a planar image buffer. * This is meant to be able to load into video memory faster. */ -#include "bitmap.h" +#include "src/lib/bitmap.h" #ifndef PLANAR_H #define PLANAR_H diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 0b517d12..f02a5be1 100644 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -22,4 +22,4 @@ /* scroll16 library~ */ -#include "src/lib/scroll.h" +#include "src/lib/scroll16.h" diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index b97a9f3c..baac6a8f 100644 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -24,4 +24,4 @@ #define __SCROLL16_H_ -#endif __SCROLL16_H_ +#endif /*__SCROLL16_H_*/ diff --git a/src/lib/types.h b/src/lib/types.h index a0bc6317..66606fc2 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -30,3 +30,5 @@ typedef unsigned long dword; typedef signed char sbyte; typedef signed short sword; typedef signed long sdword; + +//typedef enum {FALSE,TRUE} boolean; diff --git a/src/lib/wtest/makefile b/src/lib/wcpu/makefile similarity index 62% rename from src/lib/wtest/makefile rename to src/lib/wcpu/makefile index 8e16c03f..fb68e20d 100644 --- a/src/lib/wtest/makefile +++ b/src/lib/wcpu/makefile @@ -1,11 +1,11 @@ CFLAGS=-0 -all: wtest.exe +all: wcpu.exe -wtest.exe: wtest.obj +wcpu.exe: wcpu.obj wcl $(CFLAGS) $< -wtest.obj: wtest.c +wcpu.obj: wcpu.c wcl $(CFLAGS) -c $< .NOCHECK diff --git a/src/lib/wtest/wtest.c b/src/lib/wcpu/wcpu.c similarity index 61% rename from src/lib/wtest/wtest.c rename to src/lib/wcpu/wcpu.c index dacabb25..ea76843a 100644 --- a/src/lib/wtest/wtest.c +++ b/src/lib/wcpu/wcpu.c @@ -1,10 +1,31 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ /* tab size = 8 */ -#include "lib\wtest\wtest.h" +#include "src/lib/wcpu/wcpu.h" -static unsigned char detectcpu() +byte detectcpu() { - unsigned char cputype; + byte cputype; __asm { PUSHF ; we gonna modify flags, so back them up @@ -44,7 +65,8 @@ static unsigned char detectcpu() return cputype; } -/*int main(int argc, char **argv) +#ifdef TEST +int main(int argc, char **argv) { const char *cpus; unsigned char cput; @@ -59,5 +81,6 @@ static unsigned char detectcpu() } printf("detected CPU type: %s\n", cpus); return 0; -}*/ +} +#endif diff --git a/src/lib/wtest/WTEST.EXE b/src/lib/wcpu/wcpu.exe similarity index 100% rename from src/lib/wtest/WTEST.EXE rename to src/lib/wcpu/wcpu.exe diff --git a/src/lib/wcpu/wcpu.h b/src/lib/wcpu/wcpu.h new file mode 100644 index 00000000..ab741502 --- /dev/null +++ b/src/lib/wcpu/wcpu.h @@ -0,0 +1,32 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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. + * + */ + +#ifndef _WCPU_H_ +#define _WCPU_H_ +#include +#include "src/lib/types.h" + +//#define TEST + +extern byte detectcpu(void); + +#endif/*_WCPU_H_*/ diff --git a/src/lib/wtest/wtest.h b/src/lib/wtest/wtest.h deleted file mode 100644 index 81455803..00000000 --- a/src/lib/wtest/wtest.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _WTEST_H_ -#define _WTEST_H_ -#include - -static unsigned char detectcpu(void); - -#endif/*_WTEST_H_*/ diff --git a/src/maptest.c b/src/maptest.c index b9fe79de..90996a9f 100644 --- a/src/maptest.c +++ b/src/maptest.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 "src/lib/mapread.h" #define DUMP diff --git a/src/maptest0.c b/src/maptest0.c index d3b39b4b..e0350150 100644 --- a/src/maptest0.c +++ b/src/maptest0.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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" diff --git a/src/palettec.c b/src/palettec.c index 09b25945..ba5e0b28 100644 --- a/src/palettec.c +++ b/src/palettec.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 "src/lib/modex16.h" void @@ -9,7 +31,7 @@ main() { pal = modexNewPal(); modexPalSave(pal); - modexSavePalFile("gfx.pal", pal); + modexSavePalFile("data/default.pal", pal); modexLeave(); diff --git a/src/pcxtest.c b/src/pcxtest.c index 7e10a958..989aa58f 100644 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 #include diff --git a/src/scroll.c b/src/scroll.c index 950c7efa..9d3a93f1 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -1,7 +1,29 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 "src/lib/dos_kb.h" #include "src/lib/mapread.h" -#include "src/lib/wtest/wtest.c" -#include "src/lib/planar.c" +#include "src/lib/wcpu/wcpu.h" +#include "src/lib/planar.h" //====#include "src\lib\ems.c" //word far *clock= (word far*) 0x046C; /* 18.2hz clock */ @@ -63,7 +85,7 @@ void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword //#define TRIGGY 9 void main() { - size_t oldfreemem=GetFreeSize(); +//++++ size_t oldfreemem=GetFreeSize(); /*long emmhandle; long emsavail; char teststr[80];*/ @@ -593,8 +615,8 @@ void main() { printf("player.hp: %d", player.hp); printf(" player.q: %d", player.q); printf(" player.d: %d\n", player.d); printf("tile data value at player trigger position: %d\n", bg->map->data[(player.triggerx-1)+(map.width*(player.triggery-1))]); printf("palette offset: %d\n", paloffset/3); - printf("Total used: %zu\n", oldfreemem-GetFreeSize()); - printf("Total free: %zu\n", GetFreeSize()); +//++++ printf("Total used: %zu\n", oldfreemem-GetFreeSize()); +//++++ printf("Total free: %zu\n", GetFreeSize()); printf("temporary player sprite 0: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45556867\n"); printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n"); printf("Screen: %dx", screen.width); printf("%d\n", screen.height); diff --git a/src/test.c b/src/test.c index 3e2b1e6f..99a2f9f1 100644 --- a/src/test.c +++ b/src/test.c @@ -1,5 +1,27 @@ -#include "src/lib/modex16.h" +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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/modex16.h" word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ diff --git a/src/test2.c b/src/test2.c index 2f76a02e..5fae4d50 100644 --- a/src/test2.c +++ b/src/test2.c @@ -1,3 +1,25 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * 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 #include "src/lib/modex16.h" diff --git a/test.exe b/test.exe index 79a5b31d..cf0005e2 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 7d62d246..c19556ff 100644 Binary files a/test2.exe and b/test2.exe differ