From 4a30fbe923f9e7ef8f95ff7fa35553e1f015f8f3 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Mon, 6 Jun 2016 11:42:00 -0500 Subject: [PATCH] deleted: SCROLL.16L deleted: pcx2vrl deleted: pcxsscut deleted: scroll.smp deleted: src/lib/16_timer.c deleted: src/lib/modex16.c deleted: src/lib/modex16.h deleted: src/lib/scroll16.c deleted: src/lib/typdefst.h deleted: src/scroll.c deleted: vrl2vrs deleted: vrsdump --- SCROLL.16L | 24 - pcx2vrl | Bin 14456 -> 0 bytes pcxsscut | Bin 23696 -> 0 bytes scroll.smp | Bin 427 -> 0 bytes src/lib/16_timer.c | 104 ---- src/lib/modex16.c | 1307 -------------------------------------------- src/lib/modex16.h | 191 ------- src/lib/scroll16.c | 864 ----------------------------- src/lib/typdefst.h | 130 ----- src/scroll.c | 344 ------------ vrl2vrs | Bin 19944 -> 0 bytes vrsdump | Bin 14104 -> 0 bytes 12 files changed, 2964 deletions(-) delete mode 100755 SCROLL.16L delete mode 100755 pcx2vrl delete mode 100755 pcxsscut delete mode 100755 scroll.smp delete mode 100755 src/lib/16_timer.c delete mode 100755 src/lib/modex16.c delete mode 100755 src/lib/modex16.h delete mode 100755 src/lib/scroll16.c delete mode 100755 src/lib/typdefst.h delete mode 100755 src/scroll.c delete mode 100755 vrl2vrs delete mode 100755 vrsdump diff --git a/SCROLL.16L b/SCROLL.16L deleted file mode 100755 index c1cf1cc5..00000000 --- a/SCROLL.16L +++ /dev/null @@ -1,24 +0,0 @@ -starting timer ok -index=4096 -chkmap ok Project 16 scroll.exe. This is just a test file! -version May 9 2016 02:45:56 -tx: 0 -ty: 0 -player.x: 160 player.y: 128 -player.tx: 10 player.ty: 8 -player.triggx: 10 player.triggy: 9 -player.hp: 4 player.q: 1 player.info.dir: 2 player.d: 2 pdir=0 -tile data value at player trigger position: 0 -Virtual Screen: 352x272 -Screen: 320x240 -virtual tile resolution: 22x17 -tile resolution: 20x15 -middle tile position: 10x8 -video memory remaining: 40447 -page [0]=(a000:0000) size=30208 sw=320 sh=240 width=352 height=272 - [1]=(a000:7600) size=30208 sw=320 sh=240 width=352 height=272 - [2]=(a000:ec00) size=30208 sw=320 sh=240 width=352 height=272 -mv[1].tx: 0 mv[1].ty: 0 panswitch=0 - - -detected CPU type: 386 or newer diff --git a/pcx2vrl b/pcx2vrl deleted file mode 100755 index 3d9ac6e6d0e4fe19bb8f1962de5fd02253dea7be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14456 zcmeHOe{@vUoxhV|AO^?;1mu_UB%)x=2oz$#SSJY&UN`|FCW3VF%_Q?eMw6N8{D8nI z8VGSSXQbt{)q_2|J?xRXEONGNPm6AJA%IKRv$e+Vw#&A3H`X7UG3rL~2in!y&-cE2 zCvRRduKUOCUtZ3<@BMzhKkoPbeDB^|9#QMo7C0PCrULd2M%idC?nKH{?Un22L5SKEcMt5cp$pj;krE-iy)D>OzT)<_ zKv`Qbl;|kys3j8`xzmW&8&Vz5wgYV9R-vfLao5T7R`jBH- zCq%+HYo=jU&UD=$iy6_l-r^6ov38?9X2by+(P${Fw}qSi@nAT_qJ}@fS|W*fGi!?( z#zQO?kH*6Z82HeBQf z&Tl53x-#9#`Srw87p5beuO^*$$v1Y+ zdk)@sw@ll9h6I^GC?6n@Z9m^a$s_sGByZIAy~`b({oDx$T5?1?J9M|^xS+lAd3NhVmFq3t*=u&-Q);fu45Yai$fOAG(Nkfz%=reG}5$w^(ruQvN|H@5Yc}11!{`)B|KB=3kT~R$;KD7 z!`i_af6vuY-Q3zSprz0NYM+);``o8kWtqGCVVG!LYM&#E#YZT6`YnW`CHsepKg(n= zduMX+Z2^ArUj!y*JV)+_{0RCv9>9;#v|RB$p*UbFF8LBsT}{uSSg7nP!uoq(-g+ec zJA}fmKNQvtU*38s{pZs9V_`kZv|jx`MczwIaGD;}T1#Qo!sR_R<)y9wRKQK9CvopSa3f!hlWts-m5G=31o!He)v}u zZuY}0?pM7k<1)+bg2SYGv}^BCw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}`)_KaO$7h| diff --git a/pcxsscut b/pcxsscut deleted file mode 100755 index d743ac3b8ac58a73b3cb2380e2367aee9b167169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23696 zcmeHveSB2ao%fl9!5AeI6%@pmD;fnQAs|v->x6J&LU~D%fY$0HOeSP%lF7~sNqkBT z4$(}~43dx-M-nAE`JLZ6_uQL%hq+>Dp2H#Zl_$O|2r53?%_#W`xQ0Q6n=1;0 zTU;V0i?P5s@z2c^DrHTVeM+@13lv{I$}v>WQ;0mbtf=xL2?<=(1lKrb{hNeWQODss3G* z=LSTun+manf72!V0=VkmMe3>EI!`jR&U14`mrW8abgAXO3OVkdqJL3QtQclA1vbo? zJ)^0GV9XasJa^TO(fqy** zerFDRAP1g?Ycx9_%YlD92i}(hZ{)zcbKt*`1Aj{n{Ea#AFXq5sn*;w;4*ZXE;LCF0 ze*?UMf7w?%5Tp5dat{23Iql`XgcDZUVj8-yHTw zz~&EyT7urDpsy|x2)2ljzph?1v_>O7(G>RkZxao^reN4lVv%69Ni^3rftTB?3;TV| ztx(~MbhP@t8%PNV_0T99+CqT{OZgfBDbvVONT2{uFa%NRg*P0jgQ3lJffg9bgocpc z59-F|V2h%9#j+Juiz~ge%C5C)v&yc6GxARRzii%oNILi*)+^=K^8$f!l%YNZOt|QU zfip?&Q$h#-zqw+(-ejenaBZ=b(AZ20qR{5x%UTEq0U%Z8tz zktlcD@b);_XTx7$SuT{!4!h2K8EKLOre+B&G0OODdbW+8NQle z3boWWhNlpGKEa&~Uq~>8R;rcZa|x!9O4Tx4NHB#`s+!?Ef+>VjZiYXZ1DHZ5RnG8- z1XIYQ42It$m_j9040z@rs^Tx->WRPOiT!q{dTrI=zS@~?;W>O@sGN$!j}^H^@&p+F z)Zn^wi4gl-m9?VAQ(Az+6B{n_#DBMG@;+$ea60Ff=ZG*e0OqZP6t_IzKv$WDdx>7- z+44tLaNuM<6nNr8o&(A2J&r@3mrq6}SlZ6g+FX~C9&W#L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of$&Ybm z;Ql|`*uyV9GEwzVrODc083ZD{ffx?j_y$6puA6qR4;%Ea-5LT{L#)4@pGRgc6woDY}Xr{NDTQeEd*VD3)_@Y}TChK!)P#X?<@%l$S zhQeF58pBy1Xz@nF{(6pRisP_7xF{Ue=iRat)5KNLfCpyM9gxKByu$MHL7Fx^Iq1o7 zrUw2bT_(!Ae3N&L%4(HO^sPGnG#!0oE|Za_Cq8SJiIkt0%fxxT2w^=1DYkXe%!q6R z6F365 zsfJ~cFS$EV0E$)kM`y8GzB|ti2;Xhf2<-3ZqVrtxla|-#rt5$s7R|2DZMs#1`n(q` ze31_Obt?cmYt{1ld}o_FKz1u;ZNKKz@@E0rsGeO^uSbe54V{~h4SC(7LP`BNc~xUx@5$X5Fm2Vj@i z=Tvx~gD-yeYZIVHxOD0Ae$?&qdY@XX9w4kKVRq|B%W1@Sv*h*jg?b8XTsVQtxU%iv z2`aU({jbl*T9v%zFr`KNPk~}rw!Ato)8FH5(u}IiZhudfygqLmm?s5ZA>(XUcKdyx z72%(nCc-+Ga|4Mhn?D;q3LY2!X?cC0U*HB3S2lk(d>lMvqL$a^WW{bEab@#o!*s4h zv8UzrdEi7hkhuC)|8;z7c^wDug2&#zJ~vEOuz1e)wH|qXm2O|3FAiyW)xOl0?vIxL zQ&#)>esfq&NNs1fyoNtPg>>ouyDMt}0awX|=u7C9BfZP^$@ZftR7he*@RGD xkjcol^n=wyNQjy4U^jSxNr(ut8i;8S5eOS%7qTrNzi}|IGrYaW#H0jd0|3bTI)DHG diff --git a/src/lib/16_timer.c b/src/lib/16_timer.c deleted file mode 100755 index 0b5cf416..00000000 --- a/src/lib/16_timer.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 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/16_timer.h" - -clock_t start_timer(global_game_variables_t *gv) -{ - gv->kurokku.t = clock(); - gv->kurokku.tiku = 0; - gv->kurokku.clock_start = *clockw; - gv->kurokku.clock = clockw; - gv->kurokku.frames_per_second = 60; - gv->pee = _nmalloc(sizeof(byte)*16); - //turn this off if XT - switch(detectcpu()) - { - case 0: - gv->kurokku.fpscap=0; - break; - default: - gv->kurokku.fpscap=1; - break; - } - return gv->kurokku.t; -} - -double elapsed_timer(global_game_variables_t *gv) -{ - return (clock() - gv->kurokku.t) / CLOCKS_PER_SEC; -} - -double ticktock(global_game_variables_t *gv) -{ - double clocku; - clocku = (clock() - gv->kurokku.t) / CLOCKS_PER_SEC; - gv->kurokku.t = clock(); - return clocku; -} - -double time_in_seconds(global_game_variables_t *gv) -{ - return (gv->kurokku.t) / CLOCKS_PER_SEC; -} - -/*double time_in_seconds(time_t in_t) -{ - return (in_t) / CLOCKS_PER_SEC; -}*/ - -/* sync */ -void shinkutxt(global_game_variables_t *gv) -{ - //float t; - if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) - { - //t=(((*(gv->clock))-gv->clock_start) /18.2); - sprintf(gv->pee, "%f fps", (double)gv->kurokku.tiku/ticktock(gv)); - fprintf(stderr, "%s\n", gv->pee); - //(gv->clock_start)=*(gv->clock); - gv->kurokku.tiku=0; - } - gv->kurokku.tiku++; - switch(gv->kurokku.fpscap) - { - case 0: - gv->kurokku.frames_per_second=1; - break; - case 1: - //turn this off if XT - WaitPee(); - gv->kurokku.frames_per_second=60; - break; - } -} - -void WaitPee() -{ - while(inp(INPUT_STATUS_1) & 8) { - /* spin */ - } - - while(!(inp(INPUT_STATUS_1) & 8)) { - /* spin */ - } -} diff --git a/src/lib/modex16.c b/src/lib/modex16.c deleted file mode 100755 index 1f1e303b..00000000 --- a/src/lib/modex16.c +++ /dev/null @@ -1,1307 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 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 verson 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 -#include "src/lib/modex16.h" - -byte far* VGA=(byte far*) 0xA0000000; /* this points to video memory. */ - -static void fadePalette(sbyte fade, sbyte start, word iter, byte *palette); -static byte tmppal[PAL_SIZE]; - -///////////////////////////////////////////////////////////////////////////// -// // -// setvideo() - This function Manages the video modes // -// // -///////////////////////////////////////////////////////////////////////////// -void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv) -{ - union REGS in, out; - - switch (vq) - { - case 0: // deinit the video - // change to the video mode we were in before we switched to mode 13h - modexLeave(); - in.h.ah = 0x00; - in.h.al = gv->video.old_mode; - int86(0x10, &in, &out); - break; - default: // init the video - // get old video mode - //in.h.ah = 0xf; - //int86(0x10, &in, &out); - gv->video.old_mode = vgaGetMode();//out.h.al; - // enter mode - modexEnter(vq, cmem, gv); - break; - } -} - -static void -vgaSetMode(byte mode) -{ - union REGS regs; - - regs.h.ah = SET_MODE; - regs.h.al = mode; - int86(VIDEO_INT, ®s, ®s); - //int10_setmode(mode); -} - -//--------------------------------------------------- -// -// Use the bios to get the current video mode -// - -byte/*FIXME: why long? "long" is 32-bit datatype, VGA modes are 8-bit numbers. */ -vgaGetMode() -{ - return int10_getmode(); -} - -/* -========================= Entry Points ==========================- */ -void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) -{ - word i; - struct vga_mode_params cm; - int CRTParmCount; - - vgaSetMode(VGA_256_COLOR_MODE); - vga_enable_256color_modex(); - - update_state_from_vga_(); - vga_read_crtc_mode(&cm); - - /* reprogram the CRT controller */ - //outp(CRTC_INDEX, 0x11); /* VSync End reg contains register write prot */ - //outp(CRTC_DATA, 0x7f); /* get current write protect on varios regs */ - - switch(vq) - { - case 1: - //CRTParmCount = sizeof(ModeX_320x240regs) / sizeof(ModeX_320x240regs[0]); - /*for(i=0; ivideo.page[0].sw = vga_state.vga_width = 320; // VGA lib currently does not update this - gv->video.page[0].sh = vga_state.vga_height = 240; // VGA lib currently does not update this - /* virtual width and height. match screen, at first */ - gv->video.page[0].height = gv->video.page[0].sh; - gv->video.page[0].width = gv->video.page[0].sw; - - // mode X BYTE mode - cm.word_mode = 0; - cm.dword_mode = 0; - // 320x240 mode 60Hz - cm.horizontal_total=0x5f + 5; /* CRTC[0] -5 */ - cm.horizontal_display_end=0x4f + 1; /* CRTC[1] -1 */ - cm.horizontal_blank_start=0x50 + 1; /* CRTC[2] */ -// cm.horizontal_blank_end=0x82 + 1; /* CRTC[3] bit 0-4 & CRTC[5] bit 7 *///skewing ^^; - cm.horizontal_start_retrace=0x54;/* CRTC[4] */ - cm.horizontal_end_retrace=0x80; /* CRTC[5] bit 0-4 */ - //cm.horizontal_start_delay_after_total=0x3e; /* CRTC[3] bit 5-6 */ - //cm.horizontal_start_delay_after_retrace=0x41; /* CRTC[5] bit 5-6 */ - cm.vertical_total = 0x20D + 2; - cm.vertical_start_retrace = 0x1EA; - cm.vertical_end_retrace = 0x1EC; - cm.vertical_display_end = 480; - cm.vertical_blank_start = 0x1E7 + 1; - cm.vertical_blank_end = 0x206 + 1; - cm.clock_select = 0; /* misc register = 0xE3 25MHz */ - cm.vsync_neg = 1; - cm.hsync_neg = 1; - cm.offset = (vga_state.vga_width / (4 * 2)); // 320 wide (40 x 4 pixel groups x 2) - break; - case 2: // TODO: 160x120 according to ModeX_160x120regs - return; - case 3: // TODO: 160x120 according to ModeX_320x200regs - return; - case 4: // TODO: 160x120 according to ModeX_192x144regs - return; - case 5: // TODO: 160x120 according to ModeX_256x192regs - return; - default: - return; - } - - vga_state.vga_stride = cm.offset * 2; - vga_write_crtc_mode(&cm,0); - - /* clear video memory */ - switch (cmem) - { - case 1: { - /* clear video memory */ - dword far*ptr=(dword far*)vga_state.vga_graphics_ram;//VGA; /* used for faster screen clearing */ - vga_write_sequencer(2/*map mask register*/,0xf/*all 4 planes*/); - for(i = 0;i < 0x4000; i++) ptr[i] = 0x0000; // 0x4000 x dword = 64KB - } - break; - } - -// gv->video.page[0].tw = gv->video.page[0].sw/TILEWH; -// gv->video.page[0].th = gv->video.page[0].sh/TILEWH; - - //TODO MAKE FLEXIBLE~ -// gv->video.page[0].tilemidposscreenx = gv->video.page[0].tilesw; -// gv->video.page[0].tilemidposscreeny = (gv->video.page[0].tilesh/2)+1; -} - -void -modexLeave() { - /* VGAmodeX restores original mode and palette */ - vgaSetMode(TEXT_MODE); -} - -page_t -modexDefaultPage(page_t *p) -{ - page_t page; - - /* default page values */ - //page.data = VGA; - //page.data = (byte far *)(vga_state.vga_graphics_ram); - page.data = (vga_state.vga_graphics_ram); - page.dx = 0; - page.dy = 0; - page.sw = p->sw; - page.sh = p->sh; - page.width = p->sw+TILEWHD; - page.height = p->sh+TILEWHD; - page.tw = page.sw/TILEWH; - page.th = page.sh/TILEWH; - page.tilesw=page.width/TILEWH; - page.tilesh=page.height/TILEWH; - page.tilemidposscreenx = page.tw/2; - page.tilemidposscreeny = (page.th/2)+1; - page.stridew=page.width/4; - page.pagesize = (word)(page.width/4)*page.height; - page.id = 0; - - return page; -} - -/* returns the next page in contiguous memory - * the next page will be the same size as p, by default - */ -page_t -modexNextPage(page_t *p) { - page_t result; - - result.data = p->data + (p->pagesize); - result.dx = 0; - result.dy = 0; - result.sw = p->sw; - result.sh = p->sh; - result.width = p->width; - result.height = p->height; - result.tw = p->tw; - result.th = p->th; - result.tilesw = p->tilesw; - result.tilesh = p->tilesh; - result.id = p->id+1; - result.stridew=p->stridew; - result.pagesize = p->pagesize; - - return result; -} - -//next page with defined dimentions~ -page_t -modexNextPageFlexibleSize(page_t *p, word x, word y) -{ - page_t result; - - result.data = p->data + (p->pagesize); /* compute the offset */ - result.dx = 0; - result.dy = 0; - result.sw = x; - result.sh = y; - result.width = x; - result.height = y; - result.tw = result.sw/TILEWH; - result.th = result.sh/TILEWH; - result.tilesw=result.width/TILEWH; - result.tilesh=result.height/TILEWH; - result.id = p->id+1; - result.stridew=result.width/4; - result.pagesize = (word)(result.width/4)*result.height; - - return result; -} - -void modexCalcVmemRemain(video_t *video) -{ - byte i; - //printf("\n\n 1st vmem_remain=%u\n", video->vmem_remain); - for(i=0; inum_of_pages; i++) - { - video->vmem_remain-=video->page[i].pagesize; - //printf(" [%u], video->page[%u].pagesize=%u\n", i, i, video->page[i].pagesize); - //printf(" [%u], vmem_remain=%u\n", i, video->vmem_remain); - } -} - -void modexHiganbanaPageSetup(video_t *video) -{ - video->vmem_remain=65535U; - video->num_of_pages=0; - (video->page[0]) = modexDefaultPage(&(video->page[0])); video->num_of_pages++; //video->page[0].width += (TILEWHD); video->page[0].height += (TILEWHD); - (video->page[1]) = modexNextPage(&(video->page[0])); video->num_of_pages++; - (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), TILEWH*4, TILEWH*4); video->num_of_pages++; - (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), video->page[0].sw, 208); video->num_of_pages++; -// (video->page[2]) = modexNextPageFlexibleSize(&(video->page[1]), video->page[0].width, 172); video->num_of_pages++; -// (video->page[3]) = modexNextPageFlexibleSize(&(video->page[2]), 72, 128); video->num_of_pages++; - modexCalcVmemRemain(video); - video->p=0; - video->r=1; -} - -void -modexShowPage(page_t *page) { - word high_address; - word low_address; - word offset; - byte crtcOffset; - - /* calculate offset */ - offset = (word) page->data; - offset += page->dy * (page->width >> 2 ); - offset += page->dx >> 2; - - /* calculate crtcOffset according to virtual width */ - crtcOffset = page->width >> 3; - - high_address = HIGH_ADDRESS | (offset & 0xff00); - low_address = LOW_ADDRESS | (offset << 8); - - /* wait for appropriate timing and then program CRTC */ - while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); - outpw(CRTC_INDEX, high_address); - outpw(CRTC_INDEX, low_address); - outp(CRTC_INDEX, 0x13); - outp(CRTC_DATA, crtcOffset); - - /* wait for one retrace */ - while (!(inp(INPUT_STATUS_1) & VRETRACE)); - - /* do PEL panning here */ - outp(AC_INDEX, 0x33); - outp(AC_INDEX, (page->dx & 0x03) << 1); -} - -void -modexPanPage(page_t *page, int dx, int dy) { - page->dx = dx; - page->dy = dy; -} - -void -modexSelectPlane(byte plane) { - outp(SC_INDEX, MAP_MASK); /* select plane */ - outp(SC_DATA, plane); -} - -void -modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) { - word pageOff = (word) page->data; - word xoff=x/4; /* xoffset that begins each row */ - word scanCount=w/4; /* number of iterations per row (excluding right clip)*/ - word poffset = pageOff + y*(page->stridew) + xoff; /* starting offset */ - word nextRow = page->stridew-scanCount-1; /* loc of next row */ - byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; /* clips for rectangles not on 4s */ - byte rclip[] = {0x00, 0x01, 0x03, 0x07}; - byte left = lclip[x&0x03]; - byte right = rclip[(x+w)&0x03]; - - /* handle the case which requires an extra group */ - if((x & 0x03) && !((x+w) & 0x03)) { - right=0x0f; - } - - __asm { - PUSHF - PUSH ES - PUSH AX - PUSH BX - PUSH CX - PUSH DX - PUSH SI - PUSH DI - MOV AX, SCREEN_SEG ; go to the VGA memory - MOV ES, AX - MOV DI, poffset ; go to the first pixel - MOV DX, SC_INDEX ; point to the map mask - MOV AL, MAP_MASK - OUT DX, AL - INC DX - MOV AL, color ; get ready to write colors - SCAN_START: - MOV CX, scanCount ; count the line - MOV BL, AL ; remember color - MOV AL, left ; do the left clip - OUT DX, AL ; set the left clip - MOV AL, BL ; restore color - STOSB ; write the color - DEC CX - JZ SCAN_DONE ; handle 1 group stuff - - ;-- write the main body of the scanline - MOV BL, AL ; remember color - MOV AL, 0x0f ; write to all pixels - OUT DX, AL - MOV AL, BL ; restore color - REP STOSB ; write the color - SCAN_DONE: - MOV BL, AL ; remeber color - MOV AL, right - OUT DX, AL ; do the right clip - MOV AL, BL ; restore color - STOSB ; write pixel - ADD DI, nextRow ; go to the next row - DEC h - JNZ SCAN_START - POP DI - POP SI - POP DX - POP CX - POP BX - POP AX - POP ES - POPF - } -} - -/* moved to src/lib/modex16/16render.c */ - -/* copy a region of video memory from one page to another. - * It assumes that the left edge of the tile is the same on both - * regions and the memory areas do not overlap. - */ -void -modexCopyPageRegion(page_t *dest, page_t *src, - word sx, word sy, - word dx, word dy, - word width, word height) -{ - word doffset = (word)dest->data + dy*(dest->stridew) + dx/4; - word soffset = (word)src->data + sy*(src->stridew) + sx/4; - word scans = vga_state.vga_stride; - word nextSrcRow = src->stridew - scans - 1; - word nextDestRow = dest->stridew - scans - 1; - byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; /* clips for rectangles not on 4s */ - byte rclip[] = {0x0f, 0x01, 0x03, 0x07}; - byte left = lclip[sx&0x03]; - byte right = rclip[(sx+width)&0x03]; - - __asm { - PUSHF - PUSH ES - PUSH AX - PUSH BX - PUSH CX - PUSH DX - PUSH SI - PUSH DI - - MOV AX, SCREEN_SEG ; work in the vga space - MOV ES, AX ; - MOV DI, doffset ; - MOV SI, soffset ; - - MOV DX, GC_INDEX ; turn off cpu bits - MOV AX, 0008h ; - OUT DX, AX - - MOV AX, SC_INDEX ; point to the mask register - MOV DX, AX ; - MOV AL, MAP_MASK ; - OUT DX, AL ; - INC DX ; - - ROW_START: - PUSH DS - MOV AX, ES - MOV DS, AX - MOV CX, scans ; the number of latches - - MOV AL, left ; do the left column - OUT DX, AL ; - MOVSB ; - DEC CX ; - - MOV AL, 0fh ; do the inner columns - OUT DX, AL - REP MOVSB ; copy the pixels - - MOV AL, right ; do the right column - OUT DX, AL - MOVSB - POP DS - - MOV AX, SI ; go the start of the next row - ADD AX, nextSrcRow ; - MOV SI, AX ; - MOV AX, DI ; - ADD AX, nextDestRow ; - MOV DI, AX ; - - DEC height ; do the rest of the actions - JNZ ROW_START ; - - MOV DX, GC_INDEX+1 ; go back to CPU data - MOV AL, 0ffh ; none from latches - OUT DX, AL ; - - POP DI - POP SI - POP DX - POP CX - POP BX - POP AX - POP ES - POPF - } -} - - -/* fade and flash */ -void -modexFadeOn(word fade, byte *palette) { - fadePalette(-fade, 64, 64/fade+1, palette); -} - - -void -modexFadeOff(word fade, byte *palette) { - fadePalette(fade, 0, 64/fade+1, palette); -} - - -void -modexFlashOn(word fade, byte *palette) { - fadePalette(fade, -64, 64/fade+1, palette); -} - - -void -modexFlashOff(word fade, byte *palette) { - fadePalette(-fade, 0, 64/fade+1, palette); -} - - -static void -fadePalette(sbyte fade, sbyte start, word iter, byte *palette) { - word i; - byte dim = start; - - /* handle the case where we just update */ - if(iter == 0) { - modexPalUpdate1(palette); - return; - } - - while(iter > 0) { /* FadeLoop */ - for(i=0; i 127) { - tmppal[i] = 0; - } else if(tmppal[i] > 63) { - tmppal[i] = 63; - } - } - modexPalUpdate1(tmppal); - iter--; - dim += fade; - } -} - - -/* save and load */ -void -modexPalSave(byte *palette) { - int i; - - outp(PAL_READ_REG, 0); /* start at palette entry 0 */ - for(i=0; ipalette; - word w=0; - word q=0; - word qq=0; - static word a[PAL_SIZE]; //palette array of change values! - word z=0, aq=0, aa=0, pp=0; - - //modexWaitBorder(); - vga_wait_for_vsync(); - if((*i)==0) - { - memset(a, -1, sizeof(a)); - outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */ - } - else if(qp==0) - { - q=(*i); - } - else - { - q=(*i); - qq=(*i)/3; -// printf("q: %02d\n", (q)); -// printf("qq: %02d\n", (qq)); - //printf(" (*i)-q=%02d\n", (*i)-q); - outp(PAL_WRITE_REG, qq); /* start at the beginning of palette */ - } - if((*i)0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else - if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) - { - w++; - break; - } - else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3)) - { - //printf("qp=%d\n", qp); - //printf(" (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]); - printf(" %d's color=%d\n", (*i), (a[qp])-(bmp->offset*3)+qp); - //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit! - if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; } - } - else - { - if(bmp->offset==0 && (*i)<3 && q==0) outp(PAL_DATA_REG, 0); - else - if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]); - else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]); - printf("p[]=%d qp=%d p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); } - } - } - //if(qp>0) printf("qp=%d\n", qp); - //if(qp>0) printf(" (*i)=%d\n", (*i)/3); - } - //modexWaitBorder(); /* waits one retrace -- less flicker */ - vga_wait_for_vsync(); - if((*i)>=PAL_SIZE/2 && w==0) - { - for(; (*i)0)&&((*i)-q)%3==0 && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) outp(PAL_DATA_REG, p[(*i)-q]); else - if(((((*i)-q)%3==0)) && (p[((*i)-q)]==p[((*i)-q)+3] && p[((*i)-q)+1]==p[((*i)-q)+4] && p[((*i)-q)+2]==p[((*i)-q)+5])) - { - w++; - break; - } - else if(qp>0 && (*i)>=(qp) && (*i)<((qp)+3)) - { - //printf("qp=%d\n", qp); - //printf(" (*i)=%d a[%d]=%d\n", (*i), qp, a[qp]); - printf(" %d's color=%d\n", (*i), (a[qp]-(bmp->offset*3)+qp)); - //outp(PAL_DATA_REG, p[((a[qp])-(bmp->offset*3)+qp)]);// fix this shit! - if((*i)+1==(qp)+3){ w++; /*(*i)++;*/ break; } - } - else - { - if(qp==0) outp(PAL_DATA_REG, p[(*i)-q]); - else{ //outp(PAL_DATA_REG, p[((*i)-(bmp->offset*3)+qp)]); - printf("p[]=%d qp=%d p[]-qp=%d\n", ((*i)-(bmp->offset*3)), qp, ((*i)-(bmp->offset*3))+qp); } - } - } - //printf(" (*i)=%d\n", (*i)/3); - } - -printf("\nqqqqqqqq\n\n"); - - //palette checker~ - if(q>0 && qp==0) - { - long lq; - long bufSize = (bmp->width * bmp->height); - pp = q; - //printf("1(*i)=%02d\n", (*i)/3); - //printf("1z=%02d\n", z/3); - modexchkcolor(bmp, &q, &a, &aa, &z, i); - //printf("2(*i)=%02d\n", (*i)/3); - //printf("2z=%02d\n", z/3); - aq=0; -aqpee: - while(aq<=aa) - { -// printf("a[%02d]=(%d)\n", aq, a[aq]); - if(a[aq]==-1) aq++; - else { aqoffset++; break; } - } -//update the image data here! - for(lq=0; lqoffset for this spot! - NO! wwww - */ - - /* - Facking bloody point the values of the changed palette to correct values.... major confusion! wwww - */ - - //(offset/bmp->offset)*bmp->offset - - - //printf("%02d ",bmp->data[lq]+bmp->offset); - //if(lq > 0 && lq%bmp->width==0) printf("\n"); - //printf("%02d_", bmp->data[lq]+bmp->offset); - /*if(bmp->data[lq]+bmp->offset==aq) - { - //printf("%02d", bmp->data[lq]); - //printf("\n%02d\n", bmp->offset); - printf("aq=%02d ", aq); - printf("a[aq]=%02d ", a[aq]); - printf("a[aq]+aqpp=%02d ", a[aq]+aqpp); - printf("a[aq]-aqpp=%02d\n", a[aq]-aqpp); - //bmp->data[lq]=((bmp->data[lq]+bmp->offset)-a[aq]); -//++++ bmp->data[lq]=a[aq]-aqpp; -// printf("_%d ", bmp->data[lq]); - //if(lq > 0 && lq%bmp->width==0) printf("\n"); - } - else if(bmp->data[lq]+bmp->offset < ((*i)/3)-aqpp) - { - if(bmp->data[lq]+bmp->offset >= aq) - { - bmp->data[lq]=(bmp->data[lq]+bmp->offset)-aqpp;//-((z-(*i))/3); - //printf("_%d ", bmp->data[lq]+bmp->offset)-aqpp-((z-(*i))/3); - } - else bmp->data[lq]+=(bmp->offset-aqpp); - }*/ - - //printf("%02d`", bmp->data[lq]); - //if(lq > 0 && lq%bmp->width==0) printf("\n"); - } - -//printf(" aq=%02d\n", aq); -//printf(" aa=%02d\n", aa); - - //update the palette~ - modexPalUpdate(bmp, &pp, aq, aqoffset); - (*i)=pp; - - if(aqdata; - /* Each address accesses four neighboring pixels, so set - Write Plane Enable according to which pixel we want - to modify. The plane is determined by the two least - significant bits of the x-coordinate: */ - modexSelectPlane(PLANE(x)); - //outp(SC_INDEX, 0x02); - //outp(SC_DATA, 0x01 << (x & 3)); - - /* The offset of the pixel into the video segment is - offset = (width * y + x) / 4, and write the given - color to the plane we selected above. Heed the active - page start selection. */ - VGA[(unsigned)((page->width/4) * y) + (x / 4) + pageOff] = color; - -} - -byte modexgetPixel(page_t *page, int x, int y) -{ - word pageOff = (word) page->data; - /* Select the plane from which we must read the pixel color: */ - outpw(GC_INDEX, 0x04); - outpw(GC_INDEX+1, x & 3); - - return VGA[(unsigned)((page->width/4) * y) + (x / 4) + pageOff]; - -} - -void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) -{ - word s, o, w; - word x_draw = x; - word addr = (word) romFontsData.l; - word addrq = (page->width/4) * y + (x / 4) + ((word)page->data); - word addrr = addrq; - byte c; - - s=romFonts[t].seg; - o=romFonts[t].off; - w=romFonts[t].charSize; - romFontsData.chw=0; - - for(; *str != '\0'; str++) - { - c = (*str); - if(c=='\n') - { - x = x_draw; - romFontsData.chw = 0; - addrq += (page->width / 4) * 8; - addrr = addrq; - y += 8; - continue; - } - - // load the character into romFontsData.l - // no need for inline assembly! - // NTS: It might even be faster to just let the modexDrawChar point directly at ROM font than to copy per char! --J.C. - _fmemcpy(romFontsData.l,MK_FP(s,o+(w*c))/*ROM font location*/,w/*char size*/); - modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr); - x_draw += 8; /* track X for edge of screen */ - addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */ - } -} - -void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str) -{ - word i, s, o, w, j, xp; - byte l[1024]; - word addr = (word) l; - word chw=0; - byte c; - - switch(t) - { - case 0: - w=14; - break; - case 1: - w=8; - break; - case 2: - w=8; - break; - case 3: - w=16; - break; - default: - t=3; - w=16; - break; - } - - s=romFonts[t].seg; - o=romFonts[t].off; - - for(; *str != '\0'; str++) - { - c = (*str); - if((c=='\n'/* || c=="\ -"*/)/* || chw>=page->width*/) - { - chw=0; - y+=w; - continue; - } - //load the letter 'A' - __asm { - PUSHF - PUSH ES - PUSH AX - PUSH BX - PUSH CX - PUSH DX - PUSH SI - PUSH DI - - MOV DI, addr - MOV SI, o - MOV ES, s - SUB AH, AH - MOV AL, c ; the letter - MOV CX, w - MUL CX - ADD SI, AX ;the address of charcter - L1: MOV AX, ES:SI - MOV DS:DI, AX - INC SI - INC DI - DEC CX - JNZ L1 - - POP DI - POP SI - POP DX - POP CX - POP BX - POP AX - POP ES - POPF - } - - for(i=0; i>=1; - } - } - chw += xp; - } -} - -/* palette dump on display! */ -void modexpdump(page_t *pee) -{ - int mult=(QUADWH); - int palq=(mult)*TILEWH; - int palcol=0; - int palx, paly; - for(paly=0; palywidth, page->height, color); - /* set map mask to all 4 planes */ - outpw(SC_INDEX, 0xff02); - //_fmemset(VGA, color, 16000); - _fmemset(Where, color, page->width*(page->height)/4); -} - -void -modexWaitBorder() { - while(inp(INPUT_STATUS_1) & 8) { - // spin - } - - while(!(inp(INPUT_STATUS_1) & 8)) { - //spin - } -} - -void bios_cls() { - VGA_ALPHA_PTR ap; - VGA_RAM_PTR rp; - unsigned char m; - - m = int10_getmode(); - if ((rp=vga_state.vga_graphics_ram) != NULL && !(m <= 3 || m == 7)) { - unsigned int i,im; - - im = (FP_SEG(vga_state.vga_graphics_ram_fence) - FP_SEG(vga_state.vga_graphics_ram)); - if (im > 0xFFE) im = 0xFFE; - im <<= 4; - for (i=0;i < im;i++) vga_state.vga_graphics_ram[i] = 0; - } - else if ((ap=vga_state.vga_alpha_ram) != NULL) { - unsigned int i,im; - - im = (FP_SEG(vga_state.vga_alpha_ram_fence) - FP_SEG(vga_state.vga_alpha_ram)); - if (im > 0x7FE) im = 0x7FE; - im <<= 4 - 1; /* because ptr is type uint16_t */ - for (i=0;i < im;i++) vga_state.vga_alpha_ram[i] = 0x0720; - } - else { - printf("WARNING: bios cls no ptr\n"); - } -} - -void modexprintmeminfo(video_t *v) -{ - byte i; - printf("video memory remaining: %u\n", v->vmem_remain); - printf("page "); - for(i=0; inum_of_pages;i++) - { - printf(" [%u]=", i); - printf("(%Fp)", (v->page[i].data)); - printf(" size=%u", v->page[i].pagesize); - printf(" sw=%lu sh=%lu ", (unsigned long)v->page[i].sw, (unsigned long)v->page[i].sh); - printf(" width=%lu height=%lu", (unsigned long)v->page[i].width, (unsigned long)v->page[i].height); - printf("\n"); - } -} - -void update_state_from_vga_() { - unsigned char c; - - vga_state.vga_pos_x = 0; - vga_state.vga_pos_y = 0; - vga_state.vga_stride = 80; - vga_state.vga_height = 25; - vga_state.vga_width = 80; - vga_state.vga_9wide = 1; - - if (vga_state.vga_flags & VGA_IS_VGA) { /* VGA only. EGA cards DO have the misc. output reg but it's write-only */ - /* update state from H/W which I/O port */ - c = inp(0x3CC); - if (c & 1) { - vga_state.vga_base_3x0 = 0x3D0; - } - else { - vga_state.vga_base_3x0 = 0x3B0; - } - - /* now ask the graphics controller where/how VGA memory is mapped */ - c = vga_read_GC(6); - /* bit 0 = alpha disable (if set, graphics) */ - vga_state.vga_alpha_mode = ((c & 1) == 0); - /* bits 2-3 memory map select */ - update_state_vga_memory_map_select((c>>2)&3); - - /* read the sequencer: are we in 8 or 9 dot mode? */ - c = vga_read_sequencer(0x1); - vga_state.vga_9wide = (c & 1) == 0; - - /* read from the CRTC controller the stride, width, and height */ - vga_state.vga_stride = vga_read_CRTC(0x13) * 2; /* "offset" register */ - if (vga_state.vga_alpha_mode) { - vga_state.vga_width = vga_state.vga_stride; - vga_sync_hw_cursor(); - /* TODO: read vertical blank values and calculate active area, then divide by scan line height, to get alpha height */ - /* TODO: read horizontal blank values to calculate active area, then visible width */ - } - else { - /* TODO: similar semantics for graphics mode */ - } - } - else if (vga_state.vga_flags & VGA_IS_EGA) { - /* Well the EGA has similar registers BUT they aren't readable. So we have to - * guess based on other information handed to us */ - - /* reading the misc. output register doesn't work, use BIOS data area */ - c = *((unsigned char far*)MK_FP(0x40,0x63)); - if ((c&0xF0) == 0xD0) - vga_state.vga_base_3x0 = 0x3D0; - else if ((c&0xF0) == 0xB0) - vga_state.vga_base_3x0 = 0x3B0; - else { - vga_state.vga_base_3x0 = 0x3D0; - } - - /* reading from the graphics controller (0x3CE) doesn't work, deduce from BIOS mode */ - c = int10_getmode(); - switch (c) { - case 0: case 1: case 2: case 3: case 7: - vga_state.vga_alpha_mode = 1; - - /* the best we can do is assume B0000 if CRTC is at 3Bx or B8000 if at 3Dx even though it's possible to map at B8000 and 3Bx */ - if (vga_state.vga_base_3x0 == 0x3B0) - update_state_vga_memory_map_select(2); - else - update_state_vga_memory_map_select(3); - break; - case 4: case 5: case 6: - vga_state.vga_alpha_mode = 0; - update_state_vga_memory_map_select(3); - break; - case 13: case 14: case 15: case 16: case 17: case 18: default: - vga_state.vga_alpha_mode = 0; - update_state_vga_memory_map_select(1); - break; - } - - /* read from the CRTC controller the stride, width, and height */ - vga_state.vga_stride = vga_read_CRTC(0x13) * 2; /* "offset" register */ - if (vga_state.vga_alpha_mode) { - vga_state.vga_width = vga_state.vga_stride; - vga_sync_hw_cursor(); - /* TODO: read vertical blank values and calculate active area, then divide by scan line height, to get alpha height */ - /* TODO: read horizontal blank values to calculate active area, then visible width */ - } - else { - /* TODO: similar semantics for graphics mode */ - } - } - else if (vga_state.vga_flags & VGA_IS_CGA) { - vga_state.vga_base_3x0 = 0x3D0; /* always at 0x3Dx */ - - /* TODO: If Tandy, detect state */ - - /* read the status register to determine the state of the CGA... oh wait... we can't. - * fine. deduce it from the BIOS video mode. */ - c = int10_getmode(); - switch (c) { - case 0: case 1: case 2: case 3: case 7: - vga_state.vga_alpha_mode = 1; - break; - default: - vga_state.vga_alpha_mode = 0; - break; - } - - if (c <= 1) { - vga_state.vga_stride = 40; - vga_state.vga_width = 40; - } - - update_state_vga_memory_map_select(3); /* 0xB8000 */ - } - else if (vga_state.vga_flags & VGA_IS_MDA) { - vga_state.vga_base_3x0 = 0x3B0; /* always at 0x3Bx */ - vga_state.vga_alpha_mode = 1; /* stock MDA doesn't have graphics */ - - /* Hercules MDA: It would be nice to be able to read bit 2 of the display control, - * except that the port is write-only. Thanks >:( */ - update_state_vga_memory_map_select(2); /* 0xB0000 */ - } - - vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = vga_state.vga_stride; -} diff --git a/src/lib/modex16.h b/src/lib/modex16.h deleted file mode 100755 index 9ce226e1..00000000 --- a/src/lib/modex16.h +++ /dev/null @@ -1,191 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 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. - */ -#ifndef MODEX16_H -#define MODEX16_H - -#include "src/lib/16_head.h" -#include "src/lib/bitmap.h" -#include "src/lib/planar.h" -#include "src/lib/modex16/16planar.h" -#include "src/lib/16text.h" -#include "src/lib/modex16/16render.h" -#include "src/lib/modex16/320x240.h" -// #include "src/lib/modex16/320x200.h" -// #include "src/lib/modex16/256x192.h" -// #include "src/lib/modex16/192x144_.h" -// #include "src/lib/modex16/160x120.h" - -#include -#include -#include -#include - -static struct pcxHeader { - byte id; - byte version; - byte encoding; - byte bpp; - word xmin; - word ymin; - word xmax; - word ymax; - word hres; - word vres; - byte pal16[48]; - byte res1; - word bpplane; - word palType; - word hScreenSize; - word vScreenSize; - byte padding[54]; -} head; - -//320x240 = 20x15 -//192x144 = 12x9 - -//temp defines -#define TILEWH 16 -#define TILEWHD TILEWH*2 -#define QUADWH TILEWH/2 - -/* -========================== Types & Macros ==========================- */ -#define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2)) -#define PLANE(x) (1 << ((x) & 3)) -#define SELECT_ALL_PLANES() outpw(0x03c4, 0xff02) -#define PALSIZE 768 - -typedef union -{ - byte red; - byte green; - byte blue; -} rgb_t; - -/* -======================= Constants & Vars ==========================- */ -extern byte far* VGA; /* The VGA Memory */ -#define SCREEN_SEG 0xa000 -#define VIDEO_INT 0x10 -#define SET_MODE 0x00 -#define VGA_256_COLOR_MODE 0x13 -#define TEXT_MODE 0x03 - -#define AC_INDEX 0x03c0 -#define SC_INDEX 0x03c4 -#define SC_DATA 0x03c5 -#define CRTC_INDEX 0x03d4 -#define CRTC_DATA 0x03d5 -#define GC_INDEX 0x03ce -#define MISC_OUTPUT 0x03c2 -#define HIGH_ADDRESS 0x0C -#define LOW_ADDRESS 0x0D -#define VRETRACE 0x08 -//#define INPUT_STATUS_1 0x03da defined in 16_head -#define DISPLAY_ENABLE 0x01 -#define MAP_MASK 0x02 -#define PAL_READ_REG 0x03C7 /* Color register, read address */ -#define PAL_WRITE_REG 0x03C8 /* Color register, write address */ -#define PAL_DATA_REG 0x03C9 /* Color register, data port */ -#define PAL_SIZE (256 * 3) - -/* -============================ Functions =============================- */ -/* mode switching, page, and plane functions */ -void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv); -void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv); -byte vgaGetMode(); -void modexLeave(); -void modexsetBaseXMode(); -page_t modexDefaultPage(page_t *p); -page_t modexNextPage(page_t *p); -page_t modexNextPageFlexibleSize(page_t *p, word x, word y); -void modexCalcVmemRemain(video_t *video); -void modexHiganbanaPageSetup(video_t *video); -void modexShowPage(page_t *page); -void modexPanPage(page_t *page, int dx, int dy); -void modexSelectPlane(byte plane); -void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color); -/* moved to src/lib/modex16/16render.c */ -void modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height); - -/* Palette fade and flash effects */ -void modexFadeOn(word fade, byte *palette); -void modexFadeOff(word fade, byte *palette); -void modexFlashOn(word fade, byte *palette); -void modexFlashOff(word fade, byte *palette); - -/* palette loading and saving */ -void modexPalSave(byte *palette); -byte *modexNewPal(); -void modexLoadPalFile(char *filename, byte **palette); -void modexSavePalFile(char *filename, byte *palette); - -/* fixed palette functions */ -void modexPalBlack(); -void modexPalWhite(); - -/* utility functions */ -void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset); -void modexPalUpdate1(byte *p); -void modexPalUpdate0(byte *p); -void modexPalOverscan(word col); -void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/); -void modexputPixel(page_t *page, int x, int y, byte color); -byte modexgetPixel(page_t *page, int x, int y); - -#if 0 // not needed anymore. maybe good for reference purposes though. -static inline void modexwritepixel(page_t *page, int x, int y, word addr, byte color) -{ - /* Each address accesses four neighboring pixels, so set - Write Plane Enable according to which pixel we want - to modify. The plane is determined by the two least - significant bits of the x-coordinate: */ - modexSelectPlane(PLANE(x)); - //outp(SC_INDEX, 0x02); - //outp(SC_DATA, 0x01 << (x & 3)); - - /* The offset of the pixel into the video segment is - offset = (width * y + x) / 4, and write the given - color to the plane we selected above. Heed the active - page start selection. */ - vga_state.vga_graphics_ram[addr] = color; -} -static inline byte modexreadPixel(page_t *page, int x, int y, word addr) -{ - /* Select the plane from which we must read the pixel color: */ - outpw(GC_INDEX, 0x04); - outpw(GC_INDEX+1, x & 3); - return vga_state.vga_graphics_ram[addr]; -} -#endif - -void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); -void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); -void modexpdump(page_t *pee); -void modexcls(page_t *page, byte color, byte *Where); -void modexWaitBorder(); -void bios_cls(); -void modexprintmeminfo(video_t *v); -void update_state_from_vga_(); - -#endif diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c deleted file mode 100755 index 312a76e6..00000000 --- a/src/lib/scroll16.c +++ /dev/null @@ -1,864 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 - * - * 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. - * - */ -/* - scroll16 library~ -*/ -#include "src/lib/scroll16.h" - -void walk(map_view_t *pip, player_t *player, word pn) -{ - #define INC_PER_FRAME if(player[pn].q&1) player[pn].persist_aniframe++; if(player[pn].persist_aniframe>4) player[pn].persist_aniframe = 1; - //printf("player[%d].d=%d\n", pn, player[pn].d); - switch(player[pn].d) - { - //right movement - case 3: - //printf("pip[0].page->tilesw=%d ", pip[0].page->tilesw); printf("pip[0].page->tw=%d\n", pip[0].page->tw); - if(pip[0].tx >= 0 && pip[0].tx+pip[0].page->tw < pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx && - !(pip[0].map->data[(player[pn].tx)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx+1 == TRIGGX && player[pn].ty == TRIGGY)) //collision detection! - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{ - mapScrollRight(pip, player, 0, pn); - mapScrollRight(pip, player, 1, pn); - ScrollRight(pip, player, 2, pn); - ScrollRight(pip, player, 3, pn); } - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; } - } - else if(player[pn].tx < pip[0].map->width && !(pip[0].map->data[(player[pn].tx)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx+1 == TRIGGX && player[pn].ty == TRIGGY)) - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - player[pn].x+=(player[pn].speed); - animatePlayer(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); -#ifdef SPRITE - PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATA); -#else - modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 14); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].d = 2; - } - player[pn].triggerx = player[pn].tx+1; - player[pn].triggery = player[pn].ty; - break; - - //left movement - case 1: - if(pip[0].tx > 0 && pip[0].tx+pip[0].page->tw <= pip[0].map->width && player[pn].tx == pip[0].tx+pip[0].page->tilemidposscreenx && - !(pip[0].map->data[(player[pn].tx-2)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx-1 == TRIGGX && player[pn].ty == TRIGGY)) //collision detection! - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{ - mapScrollLeft(pip, player, 0, pn); - mapScrollLeft(pip, player, 1, pn); - ScrollLeft(pip, player, 2, pn); - ScrollLeft(pip, player, 3, pn); } - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; } - } - else if(player[pn].tx > 1 && !(pip[0].map->data[(player[pn].tx-2)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx-1 == TRIGGX && player[pn].ty == TRIGGY)) - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - player[pn].x-=(player[pn].speed); - animatePlayer(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); -#ifdef SPRITE - PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATA); -#else - modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 10); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].d = 2; - } - player[pn].triggerx = player[pn].tx-1; - player[pn].triggery = player[pn].ty; - break; - - //down movement - case 4: - if(pip[0].ty >= 0 && pip[0].ty+pip[0].page->th < pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny && - !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty+1 == TRIGGY)) //collision detection! - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{ - mapScrollDown(pip, player, 0, pn); - mapScrollDown(pip, player, 1, pn); - ScrollDown(pip, player, 2, pn); - ScrollDown(pip, player, 3, pn); } - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; } - } - else if(player[pn].ty < pip[0].map->height && !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty+1 == TRIGGY)) - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - player[pn].y+=(player[pn].speed); - animatePlayer(pip, player, pn, 0); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); -#ifdef SPRITE - PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA); -#else - modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 9); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].d = 2; - } - player[pn].triggerx = player[pn].tx; - player[pn].triggery = player[pn].ty+1; - break; - - //up movement - case 0: - if(pip[0].ty > 0 && pip[0].ty+pip[0].page->th <= pip[0].map->height && player[pn].ty == pip[0].ty+pip[0].page->tilemidposscreeny && - !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty-2))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty-1 == TRIGGY)) //collision detection! - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{ - mapScrollUp(pip, player, 0, pn); - mapScrollUp(pip, player, 1, pn); - ScrollUp(pip, player, 2, pn); - ScrollUp(pip, player, 3, pn); } - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; } - } - else if(player[pn].ty > 1 && !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty-2))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty-1 == TRIGGY)) - { - if(player[pn].q<=player[pn].spt) - { - INC_PER_FRAME; - player[pn].y-=(player[pn].speed); - animatePlayer(pip, player, 0, pn); - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; } - } - else - { - if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32); -#ifdef SPRITE - PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATA); -#else - modexClearRegion(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 12); -#endif - if(!pageflipflop) modexShowPage(pip[1].page); - player[pn].d = 2; - } - player[pn].triggerx = player[pn].tx; - player[pn].triggery = player[pn].ty-1; - break; - } -} - -//panning page -void panpagemanual(map_view_t *pip, player_t *player, word pn) -{ - switch(player[pn].d) - { - //right movement - case 3: - if(pip[pip[0].pan->pn].tx >= 0 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw < pip[pip[0].pan->pn].page->tilesw) - { - if(player[pn].q<=player[pn].spt) - { - pip[pip[0].pan->pn].page->dx+=4; - modexShowPage(pip[pip[0].pan->pn].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx++; } - } - break; - - //left movement - case 1: - if(pip[pip[0].pan->pn].tx > 0 && pip[pip[0].pan->pn].tx+pip[pip[0].pan->pn].page->tw <= pip[pip[0].pan->pn].page->tilesw) - { - if(player[pn].q<=player[pn].spt) - { - pip[pip[0].pan->pn].page->dx-=4; - modexShowPage(pip[pip[0].pan->pn].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx--; } - } - break; - - //down movement - case 4: - if(pip[pip[0].pan->pn].ty >= 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th < pip[pip[0].pan->pn].page->tilesh) - { - if(player[pn].q<=player[pn].spt) - { - pip[pip[0].pan->pn].page->dy+=4; - modexShowPage(pip[pip[0].pan->pn].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty++; } - } - break; - - //up movement - case 0: - if(pip[pip[0].pan->pn].ty > 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th <= pip[pip[0].pan->pn].page->tilesh) - { - if(player[pn].q<=player[pn].spt) - { - pip[pip[0].pan->pn].page->dy-=4; - modexShowPage(pip[pip[0].pan->pn].page); - player[pn].q++; - } else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty--; } - } - break; - } - //if (player[pn].d!=2) printf("player[%u].d=%u player[%u].q=%u\n", pn, player[pn].d, pn, player[pn].q); -} - -/*map_t -allocMap(int w, int h) { - map_t result; - - result.width =w; - result.height=h; - result.data = malloc(sizeof(byte) * w * h); - //result.data = (byte *)alloc_emem(((int)sizeof(byte) * w * h)/1024); - if(isEMS() || checkEMS()) - { - XMOVE mm; - //emmhandle = mallocEMS(coretotalEMS());//alloc_emem((int)sizeof(map)) - mm.length=sizeof(result); - mm.sourceH=0; - mm.sourceOff=ptr2long(&result); - mm.destH=emmhandle; - mm.destOff=0; - ist = move_emem(&mm); - if(!ist){ dealloc_emem(emmhandle); exit(5); } - printf("%d\n", coretotalEMS()); - } - - return result; -}*/ - -/*void -initMap(map_t *map) { - // just a place holder to fill out an alternating pattern - int x, y, xx, yy; - int i, q; -// int tile = 1; - //if(!isEMS() || !checkEMS()) -// map->tiles = malloc(sizeof(tiles_t)); - //else - // map->tiles = (tiles_t *)alloc_emem(sizeof(tiles_t)); - - //create the tile set - //if(!isEMS() || !checkEMS()) -// map->tiles->data = malloc(sizeof(bitmap_t)); - //else - // map->tiles->data = (bitmap_t *)alloc_emem(sizeof(bitmap_t)); -// map->tiles->data->width = (TILEWH); -// map->tiles->data->height= TILEWH; - //if(!isEMS() || !checkEMS()) -// map->tiles->data->data = malloc((TILEWH*2)*TILEWH); - //else - // map->tiles->data->data = (byte *)alloc_emem((TILEWH*2)*TILEWH); -// map->tiles->tileHeight = TILEWH; -// map->tiles->tileWidth =TILEWH; -// map->tiles->rows = 1; -// map->tiles->cols = 1;//2; - - q=0; - //for(y=0; yheight; y++) { - //for(x=0; xwidth; x++) { - i=0; - for(yy=0; yytiles->data->data[i+1] = map->data[q];//28;//0x24; -// printf("[%d]", map->tiles->data->data[i]); - //}else{ - //map->tiles->data->data[i] = map->data[q];//0;//0x34; - //printf("]%d[==[%d]", i, map->tiles->data->data[i]); - //} - i++; - } -// printf("\n"); - } -// printf("[%d]", map->data[q]); - q++; -// } - //printf("\n\n"); -// } - - i=0; - for(y=0; yheight; y++) { - for(x=0; xwidth; x++) { -// map->data[i]=255; - printf("[%d]", map->data[i]); - //tile = tile ? 0 : 1; - i++; - } - //tile = tile ? 0 : 1; - } -}*/ - -void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) -{ - word x, y; /* coordinate for drawing */ - - /* increment the pixel position and update the page */ - mv[id].page->dx += player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dx >= mv[id].dxThresh ) - { - /* go forward one tile */ - mv[id].tx++; - /* Snap the origin forward */ - mv[id].page->data += 4; - mv[id].page->dx = mv[id].map->tiles->tileWidth; - } - - /* draw the next column */ - x= mv[0].page->sw + mv[id].map->tiles->tileWidth; - if(player[plid].q%4) - if(pageflipflop){ - if(id==0) - mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx); - else - modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2)); - }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx); -} - - -void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) -{ - word x, y; /* coordinate for drawing */ - - /* decrement the pixel position and update the page */ - mv[id].page->dx -= player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dx == 0) - { - /* go backward one tile */ - mv[id].tx--; - - /* Snap the origin backward */ - mv[id].page->data -= 4; - mv[id].page->dx = mv[id].map->tiles->tileWidth; - } - - /* draw the next column */ - x= 0; - if(player[plid].q%4) - if(pageflipflop){ - if(id==0) - mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx); - else - modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2)); - }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx); -} - - -void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) -{ - word x, y; /* coordinate for drawing */ - - /* decrement the pixel position and update the page */ - mv[id].page->dy -= player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dy == 0 ) - { - /* go down one tile */ - mv[id].ty--; - /* Snap the origin downward */ - mv[id].page->data -= mv[id].page->width*4; - mv[id].page->dy = mv[id].map->tiles->tileHeight; - } - - /* draw the next row */ - y= 0; - if(player[plid].q%3) - if(pageflipflop){ - if(id==0) - mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy); - else - modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight); - }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy); -} - -void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) -{ - word x, y; /* coordinate for drawing */ - - /* increment the pixel position and update the page */ - mv[id].page->dy += player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[id].page->dy >= mv[id].dyThresh ) - { - /* go down one tile */ - mv[id].ty++; - /* Snap the origin downward */ - mv[id].page->data += mv[id].page->width*4; - mv[id].page->dy = mv[id].map->tiles->tileHeight; - } - - /* draw the next row */ - y= mv[0].page->sh + mv[id].map->tiles->tileHeight; - if(player[plid].q%3) - if(pageflipflop){ - if(id==0) - mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy); - else - modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight); - }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy); -} - - -//TODO finish this wwww -void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid) -{ - /* increment the pixel position and update the page */ - mv[0].video->page[id].dx += player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[0].video->page[id].dx >= mv[id].dxThresh ) - { - /* Snap the origin forward */ - mv[0].video->page[id].data += 4; - mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth; - } -} - - -void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid) -{ - /* decrement the pixel position and update the page */ - mv[0].video->page[id].dx -= player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[0].video->page[id].dx == 0) - { - /* Snap the origin backward */ - mv[0].video->page[id].data -= 4; - mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth; - } -} - -void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid) -{ - /* decrement the pixel position and update the page */ - mv[0].video->page[id].dy -= player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[0].video->page[id].dy == 0) - { - /* Snap the origin backward */ - mv[0].video->page[id].data -= 4; - mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth; - } -} - -void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid) -{ - /* increment the pixel position and update the page */ - mv[0].video->page[id].dy += player[plid].speed; - - /* check to see if this changes the tile */ - if(mv[0].video->page[id].dy >= mv[id].dxThresh ) - { - /* Snap the origin forward */ - mv[0].video->page[id].data += 4; - mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth; - } -// modexClearRegion(&(mv[0].video->page[id]), 0, 0, -// mv[0].video->page[id].width-1, -// mv[0].video->page[id].height-1, id*2); -} - -sword chkmap(map_t *map, word q) -{ -// bitmap_t bp; - static byte x[(MAPW*MAPH)+1] = -{ 1, 2, 3, 4, 0, 3, 3, 3, 3, 3, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 11, 12, 4, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 2, 3, 4 };*/ - //check for failed to load map - if((map->width == map->height == 0) && (q>0)) - { - //initiate a null map! - map->width=MAPW;///2; - map->height=MAPH;///2; -// map->data = malloc(((map->width*map->height)+1)*sizeof(byte)); - map->data = &x; - map->tiles = malloc(sizeof(tiles_t)); - //fix this to be far~ -// bp = bitmapLoadPcx("data/ed.pcx"); -// map->tiles->data = &bp; - map->tiles->debug_data = map->data; - map->tiles->tileHeight = 16; - map->tiles->tileWidth = 16; - map->tiles->rows = 1; - map->tiles->cols = 1; - map->tiles->debug_text = true; - } - else map->tiles->debug_text = false; - return 0; -} - -void mapGoTo(map_view_t *mv, int tx, int ty) -{ - int px, py; - unsigned int i; - - /* set up the coordinates */ - mv[0].tx = mv[1].tx = tx; - mv[0].ty = mv[1].ty = ty; - mv[0].page->dx = mv[1].page->dx = mv->map->tiles->tileWidth; - mv[0].page->dy = mv[1].page->dy = mv->map->tiles->tileHeight; - - /* set up the thresholds */ - mv[0].dxThresh = mv[1].dxThresh = mv->map->tiles->tileWidth * 2; - mv[0].dyThresh = mv[1].dyThresh = mv->map->tiles->tileHeight * 2; - - /* draw the tiles */ - modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0); - py=0; - i=mv[0].ty * mv[0].map->width + mv[0].tx; - for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) { - mapDrawWRow(&mv[0], tx-1, ty, py); - i+=mv->map->width - tx; - } - modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); -} - - -void near -mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) -{ - word rx; - word ry; - word textx=0; - word texty=0; - //if(i==0) i=2; - if(i==0) - { - //wwww - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 0); //currently the over scan color! - } - else - { - rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth); - ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight); -////0000printf("i=%d\n", i); - switch(t->debug_text) - { - case 0: -#ifndef TILERENDER - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)); - modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i])); -#else - PBUFBFUN (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); - /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */ - //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header)); - //modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); -#endif - break; - case 1: - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (t->debug_data[i]+1)); - //modexprintbig(page, x, y, 1, 15, 0, (t->debug_data)); - /*for(texty=0; texty<2; texty++) - { - for(textx=0; textx<2; textx++) - {*/ -// modexprint(page, x+(textx*8), y+(texty*8), 1, (word)(t->debug_data), 0, (t->debug_data)); -/* } - }*/ - break; - } - } -} - -void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *p, word poopoffset) -{ - word x; - int i; - poopoffset%=p[0].speed; -//printf("y: %d\n", poopoffset); - /* the position within the map array */ - i=ty * mv->map->width + tx; - for(x=poopoffset; x<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; x+=mv->map->tiles->tileWidth, tx++) { - if(i>=0) { - /* we are in the map, so copy! */ - mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); - } - i++; /* next! */ - } -} - -void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *p, word poopoffset) -{ - int y; - int i; - poopoffset%=p[0].speed; -//printf("x: %d\n", poopoffset); - /* location in the map array */ - i=ty * mv->map->width + tx; - - /* We'll copy all of the columns in the screen, - i + 1 row above and one below */ - for(y=poopoffset; y<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height; y+=mv->map->tiles->tileHeight, ty++) { - if(i>=0) { - /* we are in the map, so copy away! */ - mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); - } - i += mv->map->width; - } -} - -void mapDrawWRow(map_view_t *mv, int tx, int ty, word y) -{ - word x; - int i; - - /* the position within the map array */ - i=ty * mv->map->width + tx; - for(x=0; xpage->sw+mv->dxThresh && tx < mv->map->width; x+=mv->map->tiles->tileWidth, tx++) { - if(i>=0) { - /* we are in the map, so copy! */ - mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); - } - i++; /* next! */ - } -} - -void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) -{ - int y; - int i; - - /* location in the map array */ - i=ty * mv->map->width + tx; - - /* We'll copy all of the columns in the screen, - i + 1 row above and one below */ - for(y=0; ypage->sh+mv->dyThresh && ty < mv->map->height; y+=mv->map->tiles->tileHeight, ty++) { - if(i>=0) { - /* we are in the map, so copy away! */ - mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); - } - i += mv->map->width; - } -} - -/*void qclean() -{ - //setkb(0); -}*/ - -unsigned char shinku_fps_indicator_page = 2; -boolean pageflipflop=0; -//gv->video.p - -/* sync */ -void shinku(global_game_variables_t *gv) -{ - word x = (0) + gv->video.page[!(gv->video.p)].dx; // follow the screen - word y = (0) + gv->video.page[!(gv->video.p)].dy; // follow the screen - word w = 64; - word h = 8; - word col = 7; - word bgcol = 0; - word type = 1; - byte o,o2,i; - //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4); - /* block copy to visible RAM from offscreen */ -// vga_setup_wm1_block_copy(); -// modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x+w, 0, w, h); -// o = *(gv->video.page[2].data); // source offscreen -// o2 = *(gv->video.page[shinku_fps_indicator_page].data)+(y * vga_state.vga_stride) + (x >> 2); // dest visible (original stride) -// for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += vga_state.vga_stride) vga_wm1_mem_block_copy(o2,o,w >> 2); - /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ -// vga_restore_rm0wm0(); - if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) - { - sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); - //modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45); - modexprint(&(gv->video.page[!(gv->video.p)]), x, y, type, col, bgcol, gv->pee); - gv->kurokku.tiku=0; - /* block copy to visible RAM from offscreen */ -// vga_setup_wm1_block_copy(); -// o = *(gv->video.page[shinku_fps_indicator_page].data); // source offscreen -// o2 = *(gv->video.page[2].data)+(y * vga_state.vga_stride) + (x >> 2); // dest visible (original stride) -// for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += vga_state.vga_stride) vga_wm1_mem_block_copy(o2,o,w >> 2); -// modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x, 0, w, h); - /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ -// vga_restore_rm0wm0(); - }else //copy dat sheet - gv->kurokku.tiku++; - - switch(gv->kurokku.fpscap) - { - case 0: - modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y+8, type, col, bgcol, "sanic!"); - gv->kurokku.frames_per_second=1; - break; - case 1: - //turn this off if XT - modexWaitBorder(); - //vga_wait_for_vsync(); - gv->kurokku.frames_per_second=60; - break; - } - if(pageflipflop){ - if(gv->video.r){ - modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); - modexShowPage(&(gv->video.page[gv->video.p])); //this is slow as fack too!! - gv->video.p=!gv->video.p; - gv->video.r=!gv->video.r; - } - } -} - -void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch) -{ - sword x = player[pn].x; - sword y = player[pn].y; -#ifdef SPRITE - word dire=32; //direction -#else - word dire=8; //direction -#endif - sword qq; //scroll offset - word ls = player[pn].persist_aniframe; - - if(scrollswitch==0) qq = 0; - else qq = ((player[pn].q)*(player[pn].speed)); - x-=4; - y-=TILEWH; - switch (player[pn].d) - { - case 0: - //up - dire*=player[pn].d; - y-=qq; - break; - case 3: - // right - dire*=(player[pn].d-2); - x+=qq; - break; - case 2: - break; - case 4: - //down - dire*=(player[pn].d-2); - y+=qq; - break; - case 1: - //left - dire*=(player[pn].d+2); - x-=qq; - break; - } - -#ifdef SPRITE -// #define FRAME1 PBUFSFUN(pip[1].page, x, y, 48, dire, 24, 32, PLAYERBMPDATA); -// #define FRAME2 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -// #define FRAME3 PBUFSFUN(pip[1].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA); -// #define FRAME4 PBUFSFUN(pip[1].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -#define FRAME1 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 48, dire, 24, 32, PLAYERBMPDATA); -#define FRAME2 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -#define FRAME3 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 0, dire, 24, 32, PLAYERBMPDATA); -#define FRAME4 PBUFSFUN(pip[!(pip->video->p)].page, x, y, 24, dire, 24, 32, PLAYERBMPDATA); -#else -#define FRAME1 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 2+dire); -#define FRAME2 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 1+dire); -#define FRAME3 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, dire); -#define FRAME4 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 1+dire); - #endif -// if(pageflipflop) -//modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height); - modexCopyPageRegion(pip[pip->video->p].page, - pip[!(pip->video->p)].page, x-4, y-4, x-4, y-4, 28, 36); -// else modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 40); - //modexCopyPageRegion(pip[2].page, pip[1].page, 16, 16, 16, 16, (14*8)+4, 8+4); - if(2>ls && ls>=1) { FRAME1 }else - if(3>ls && ls>=2) { FRAME2 }else - if(4>ls && ls>=3) { FRAME3 }else - if(5>ls && ls>=4) { FRAME4 } - pip->video->r=1; - //TODO: mask copy //modexCopyPageRegion(dest->page, src->page, x-4, y-4, x-4, y-4, 28, 40); - //modexClearRegion(top->page, 66, 66, 2, 40, 0); - //modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40); -} diff --git a/src/lib/typdefst.h b/src/lib/typdefst.h deleted file mode 100755 index 0f47b2b1..00000000 --- a/src/lib/typdefst.h +++ /dev/null @@ -1,130 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 - * - * 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 _TYPEDEFSTRUCT_H_ -#define _TYPEDEFSTRUCT_H_ - -#include "src/lib/types.h" - - -#define AARED "\x1b[41;31m" -#define AABLUE "\x1b[44;34m" -#define AAGREEN "\x1b[42;32m" -#define AAYELLOW "\x1b[43;33m" -#define AAGREY "\x1b[47;37m" -#define AABLACK "\x1b[40;30m" -#define AAWHITE "\x1b[47;37m" -#define AAMAGENTA "\x1b[45;35m" -#define AARESET "\x1b[0m" - -#define MAXPAGE 4 - -/* - * typedefs of the game variables! - */ -typedef struct { - byte huge *data; - word width; - word height; - byte *palette; - word offset; -} bitmap_t; - -typedef struct { - byte huge **data; - word ntiles; /* the number of tiles */ - word twidth; /* width of the tiles */ - word theight; /* height of the tiles */ - byte *palette; /* palette for the tile set */ -} tileset_t; - -typedef struct { - byte huge *plane[4]; /* 4 planes of image data */ - word width; /* width of the image (spread across 4 planes) */ - word height; /* height of the image (spread across 4 planes) */ - word pwidth; /* the number of bytes in each plane */ - byte *palette; -} planar_buf_t; - -typedef struct { - word id; /* the Identification number of the page~ For layering~ */ - byte far* data; /* the data for the page */ - word dx; /* col we are viewing on the virtual screen */ - word dy; /* row we are viewing on the virtual screen */ - word sw; /* screen width */ - word sh; /* screen heigth */ - word tw; /* screen width in tiles */ - word th; /* screen height in tiles */ - word width; /* virtual width of the page */ - word height; /* virtual height of the page */ - word tilesw; /* virtual screen width in tiles */ - word tilesh; /* virtual screen height in tiles */ - sword tilemidposscreenx; /* middle tile position */ - sword tilemidposscreeny; /* middle tile position */ - sword tileplayerposscreenx; /* player position on screen */ - sword tileplayerposscreeny; /* player position on screen */ - word stridew; /*width/4*/ - word pagesize; /* page size */ -} page_t; - -typedef struct -{ -// int showmemhandle; - int profilehandle,debughandle; - int heaphandle; -} handle_t; - -typedef struct -{ - word frames_per_second; - clock_t t; - dword tiku; //frames passed - word clock_start; //timer start - word *clock; //current time on clock - boolean fpscap; //cap the fps var -} kurokku_t; - -typedef struct -{ - word pn; -} pan_t; - -typedef struct -{ - char old_mode; //old video mode before game! - page_t page[MAXPAGE]; //pointer to root page[0] - word vmem_remain; //remaining video memory - byte num_of_pages; //number of actual pages - boolean __near p; //render page number - boolean __near r; //page flip if true - word pr[MAXPAGE][4]; //render sections of pages -} video_t; - -typedef struct -{ - video_t video; // video settings variable - byte *pee; // message for fps - handle_t handle; //handles for file logging - kurokku_t kurokku; //clock struct -} global_game_variables_t; - -#endif /* _TYPEDEFSTRUCT_H_ */ diff --git a/src/scroll.c b/src/scroll.c deleted file mode 100755 index 90a3ba3f..00000000 --- a/src/scroll.c +++ /dev/null @@ -1,344 +0,0 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 - * - * 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/scroll16.h" -#include "src/lib/16_timer.h" -#include "src/lib/wcpu/wcpu.h" - -//#define FADE -#define MODEX //this is for mode x initiating - -//word far *clock= (word far*) 0x046C; /* 18.2hz clock */ - -global_game_variables_t gvar; -static map_t map; -player_t player[MaxPlayers]; -//page_t screen, gvar.video.page[1], gvar.video.page[2]; -map_view_t mv[4]; -bitmap_t p; -//word pn=0; //i forgot ww -static planar_buf_t huge *pp; -float t; -sword bakapee; -pan_t pan; -//debugswitches -boolean panswitch=0; -boolean pageflipflop=1; - unsigned int i; - const char *cpus; - //static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */ - - //map_view_db_t pgid[4]; - word pg; -//#ifdef FADE - static word paloffset=0; - byte *dpal, *default_pal; -//#endif - byte *gpal; - byte *ptr; - byte *mappalptr; - -void main(int argc, char *argv[]) -{ - byte *mesg=malloc(sizeof(dword)); - - if(argv[1]) bakapee = atoi(argv[1]); - else bakapee = 1; - - // DOSLIB: check our environment - probe_dos(); - - // DOSLIB: what CPU are we using? - // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. - // So this code by itself shouldn't care too much what CPU it's running on. Except that other - // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for - // the CPU to carry out tasks. --J.C. - cpu_probe(); - - // DOSLIB: check for VGA - if (!probe_vga()) { - printf("VGA probe failed\n"); - return; - } - // hardware must be VGA or higher! - if (!(vga_state.vga_flags & VGA_IS_VGA)) { - printf("This program requires VGA or higher graphics hardware\n"); - return; - } - - if (_DEBUG_INIT() == 0) { -#ifdef DEBUGSERIAL - printf("WARNING: Failed to initialize DEBUG output\n"); -#endif - } - _DEBUG("Serial debug output started\n"); // NTS: All serial output must end messages with newline, or DOSBox-X will not emit text to log - _DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U); - - pan.pn=1; - //player[0].data = &pp; - - printf("starting timer "); - start_timer(&gvar); - printf("ok\n"); - -// atexit(qclean()); - - /* create the map */ - fprintf(stderr, "testing map load~ "); - loadmap("data/test.map", &map); - chkmap(&map, 0); - printf("chkmap ok "); - fprintf(stderr, "yay map loaded~~\n"); - - /* draw the tiles */ -#ifdef MODEX - ptr = map.data; - //mappalptr = map.tiles->btdata->palette; - - /* data */ - //++++p = bitmapLoadPcx("data/ptmp.pcx"); // load sprite - //npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite - - /* create the planar buffer */ -////++++ (player[0].data) = *planar_buf_from_bitmap(&p); - /*++++printf("load pee!! "); - pp = planar_buf_from_bitmap(&p); - printf("done!\n");*/ - -#endif - /* input! */ - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); - //IN_Default(1,&player,ctrl_Joystick); - - /* save the palette */ -#ifdef MODEX -#ifdef FADE - dpal = modexNewPal(); - default_pal = modexNewPal(); - *default_pal = *dpal; - modexPalSave(dpal); - modexFadeOff(4, dpal); -#endif - - textInit(); - VGAmodeX(bakapee, 1, &gvar); -// printf("%dx%d\n", gvar.video.page[0].sw, gvar.video.page[0].sh); -#ifdef FADE - modexPalBlack(); //reset the palette~ -#endif -#endif -// printf("Total used @ before palette initiation: %zu\n", oldfreemem-GetFreeSize()); -//++++ player[0].data.offset=(paloffset/3); -//++++ modexPalUpdate1(&player[0].data, &paloffset, 0, 0); - //modexPalUpdate1(p.palette); -//++++0000 modexPalUpdate1(map.tiles->btdata->palette); - //printf(" %d\n", sizeof(ptmp->data)); - //printf("1: %d\n", paloffset); -//++++ map.tiles->data->offset=(paloffset/3); - //XTmodexPalUpdate(map.tiles->data, &paloffset, 0, 0); -// printf("\n====\n"); -// printf("0 paloffset= %d\n", paloffset/3); -// printf("====\n\n"); -#ifdef MODEX -#ifdef FADE - gpal = modexNewPal(); - modexPalSave(gpal); - modexSavePalFile("data/g.pal", gpal); - modexPalBlack(); //so player will not see loadings~ -#endif -#endif - - /* setup camera and screen~ */ - modexHiganbanaPageSetup(&gvar.video); - for(i=0;iwidth, mv[1].page->height); - - //TODO: put player in starting position of spot - //default player position on the viewable map - player[0].tx = mv[0].tx + mv[0].page->tilemidposscreenx; - player[0].ty = mv[0].ty + mv[0].page->tilemidposscreeny; - IN_initplayer(&player, 0); - //IN_initplayer(&player, 1); - -#ifndef SPRITE - modexClearRegion(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 32, 15); -#else - //PBUFSFUN(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA); - PBUFSFUN(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &pp); -#endif - - if(!pageflipflop) modexShowPage(mv[1].page); - else modexShowPage(mv[(gvar.video.p)].page); - shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible. - //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1); -#ifdef MODEX -#ifdef FADE - modexFadeOn(4, gpal); -#endif -#endif - while(!IN_KeyDown(sc_Escape) && player[0].hp>0) - { - shinku(&gvar); - //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square - //to stop scrolling and have the player position data move to the edge of the screen with respect to the direction - //when player[0].tx or player[0].ty == 0 or player[0].tx == 20 or player[0].ty == 15 then stop because that is edge of map and you do not want to walk of the map - - //player movement - IN_ReadControl(0,&player); - if(!panswitch){ - walk(mv, player, 0); - }else{ - panpagemanual(mv, player, 0); - //printf(" player[0].q: %d", player[0].q); printf(" player[0].d: %d\n", player[0].d); - } - - //the scripting stuff.... - //if(((player[0].triggerx == TRIGGX && player[0].triggery == TRIGGY) && IN_KeyDown(0x1C))||(player[0].tx == 5 && player[0].ty == 5)) - if(((mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))] == 0) && IN_KeyDown(0x1C))||(player[0].tx == 5 && player[0].ty == 5)) - { - short i; - for(i=800; i>=400; i--) - { - sound(i); - } - nosound(); - } - if(player[0].q == (TILEWH/(player[0].speed))+1 && player[0].info.dir != 2 && (player[0].triggerx == 5 && player[0].triggery == 5)){ player[0].hp--; } - //debugging binds! - if(IN_KeyDown(2)){ modexShowPage(mv[0].page); pan.pn=0; IN_UserInput(1,1); } - if(IN_KeyDown(3)){ modexShowPage(mv[1].page); pan.pn=1; IN_UserInput(1,1); } - if(IN_KeyDown(4)){ modexShowPage(mv[2].page); pan.pn=2; IN_UserInput(1,1); } - if(IN_KeyDown(4+1)){ modexShowPage(mv[3].page); pan.pn=3; IN_UserInput(1,1); } - if(IN_KeyDown(25)){ modexpdump(mv[0].page); modexpdump(mv[1].page); - IN_UserInput(1,1); - } //p -#ifdef MODEX -#ifdef FADE - if(IN_KeyDown(24)){ modexPalUpdate0(gpal); paloffset=0; modexpdump(mv[0].page); modexpdump(mv[1].page); IN_UserInput(1,1); } - if(IN_KeyDown(22)){ - paloffset=0; modexPalBlack(); modexPalUpdate(&player[0].data, &paloffset, 0, 0); - printf("1paloffset = %d\n", paloffset/3); - modexPalUpdate(map.tiles->data, &paloffset, 0, 0); - printf("2paloffset = %d\n", paloffset/3); - modexpdump(mv[0].page); modexpdump(mv[1].page); - IN_UserInput(1,1); - } -#endif -#endif - //pan switch - if(IN_KeyDown(88)){panswitch=!panswitch; IN_UserInput(1,1);} //f12 - //TSR - if(IN_KeyDown(87)) //f11 - { - pageflipflop=!pageflipflop; - IN_UserInput(1,1); -// VGAmodeX(0, 0, &gvar); -// IN_Shutdown(); -// __asm -// { -// mov ah,31h -// int 21h -// } - } - if(IN_KeyDown(68)) //s - { - gvar.kurokku.fpscap=!gvar.kurokku.fpscap; - IN_UserInput(1,1); - } - //TODO fmemtest into page - /*if(IN_KeyDown(4+1)) //4 - { - pg=1; - SELECT_ALL_PLANES(); - _fmemset(((mv[pg].page->data+4)+(16*(mv[pg].page->width/4))), 15, 4); - }*/ - - //9 - if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(default_pal); IN_UserInput(1,1); } - //if(IN_KeyDown(11)){ modexPalOverscan(15); } - if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync! - } - - /* fade back to text mode */ - /* but 1st lets save the game palette~ */ -#ifdef MODEX -#ifdef FADE - modexPalSave(gpal); - modexSavePalFile("data/g.pal", gpal); - modexFadeOff(4, gpal); -#endif - VGAmodeX(0, 1, &gvar); -#endif - IN_Shutdown(); - printf("Project 16 scroll.exe. This is just a test file!\n"); - printf("version %s\n", VERSION); - printf("tx: %d\n", mv[0].tx); - printf("ty: %d\n", mv[0].ty); - printf("player.x: %d", player[0].x); printf(" player.y: %d\n", player[0].y); - //if(player[0].hp==0) printf("%d wwww\n", player[0].y+8); - //else printf("\nplayer[0].y: %d\n", player[0].y); - printf("player.tx: %d", player[0].tx); printf(" player.ty: %d\n", player[0].ty); - printf("player.triggx: %d", player[0].triggerx); printf(" player.triggy: %d\n", player[0].triggery); - printf("player.hp: %d", (player[0].hp)); printf(" player.q: %d", player[0].q); printf(" player.info.dir: %d", player[0].info.dir); printf(" player.d: %d ", player[0].d); - printf("pdir=%d\n", player[0].pdir); - printf("tile data value at player trigger position: %d\n", mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))]); -// printf("palette offset: %d\n", paloffset/3); -//++++ printf("Total used: %zu\n", oldfreemem-GetFreeSize()); -//++++ printf("Total free: %zu\n", GetFreeSize()); -//not used now printf("temporary player sprite 0: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45556867\n"); -//not used now printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n"); - printf("Virtual Screen: %dx", gvar.video.page[0].width); printf("%d\n", gvar.video.page[0].height); - printf("Screen: %dx", gvar.video.page[0].sw); printf("%d\n", gvar.video.page[0].sh); - printf("virtual tile resolution: %dx", gvar.video.page[0].tilesw); printf("%d\n", gvar.video.page[0].tilesh); - printf("tile resolution: %dx", gvar.video.page[0].tw); printf("%d \n", gvar.video.page[0].th); - printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny); - modexprintmeminfo(&gvar.video); - printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u\n", gvar.video.p); - //printf("player[1].q: %d", player[1].q); printf(" player[1].d: %d\n", player[1].d); - printf("\n"); - //printf("map.width=%d map.height=%d map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]); - - printf("\n"); - switch(detectcpu()) - { - case 0: cpus = "8086/8088 or 186/88"; break; - case 1: cpus = "286"; break; - case 2: cpus = "386 or newer"; break; - default: cpus = "internal error"; break; - } - printf("detected CPU type: %s\n", cpus); -#ifdef MODEX -#ifdef FADE - modexFadeOn(4, dpal); -#endif -#endif -} diff --git a/vrl2vrs b/vrl2vrs deleted file mode 100755 index acdd4bda2f0dd8772cdce97a19b6c906e4e09f8e..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*X2|RNusxMh zK-;O+XgLkPiw5CR<5%}n`;>g=0lS1#3#yt9p2+^W8F($fI0LW4N!RCsuKTvKKB@XI t(u|6j0or2UDnIaX3DIN3R4&1XT&hQ-^EZ*R^}nYI1eE787EEUU{|64do@f97 diff --git a/vrsdump b/vrsdump deleted file mode 100755 index 8ba0497deb819d75caeef21a3a0d4086b394845b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14104 zcmcIreRP!7nZJ`{LJW{e0?`O4F9a%bN+1*?f~ynAz=Vd6MnG#9XNF`#Qj(eMd_-V% zjUC2jHe&IsO+9wy?Ai9XEoT>ZPnD`LgSf=)diJ2Fb#05MochrjgS+vIveugYJal zTrK8`av*m6oXnwGwsf6RrgdGR2c0zR&0-)L3Dc#s z#}^VIzpqR5`};fl2Si`k@88SBz<$y1>+1`4ig2XM9}0=?J43w@zv%1>hW#Qq;17uI zflzNC(k(n5vg`>*e4&V^-`5)evZp^7P>4rtY;Rk)-m|i?X_eVr*?1j!RWjut%{7fm zzipstO6mFh$b;X;G%FPc6c(M+dl^}ZOL1{&p_f}U7b_J;mCgt4Ei^B6sc-Oda~iI4 z>M|*e1}`@VS4*7fB@JG#38!_T%ZdgsHwo8kmVng_UaAD)x%-;4!3#vx(qaUxk>UfxFs+98ob;f zd?vT#WvIc+4Z^FqB`@ySg$nnG{qA{&aK}>-d-_Mf-LV%dPD}pebs?}O7e{b)%y*(i zbPq8z=O(Px?7O*9QbCdKsaL{sWB$C&OQno^!Q!t^GhDb<<7Os^xFQk)rL zdJWO!c4mO-l|)lYGhU{b5>2VhY-4&M(UiiBlj%7`Q|dA+n64$7QkF58t|XdLm8k~Z z^j=%yl{?&t-?(FMO>EoVHkLX&$0^)nr@UN^4OTcs`c?>j)a{txD#Y<88oXkMd)X)| zckEJ?JMs45+~csu>8#n6B*x@<2p=R+>^j{|rBTx-iNC{r?|-v_Q=gT>fIBhaK9#=N zZ9C(B<+DhgX>Gc;=9o`*xc{NQ=$&f_5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