X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_vl.c;h=91776466836ea7cb0bd26297e9b02aaa5967d5af;hb=946dfbe9b29be3a3b180c37e0b414a938e867dc6;hp=833a75a6f8f116c6c0fca834e49bc2988f4d52db;hpb=424d6f05d9aaa0000302df70be10c2598886a030;p=16.git diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 833a75a6..91776466 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -55,6 +55,12 @@ void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv) default: // init the video if(gv->video.VL_Started) return; + if(!gv->video.VL_Initiated) + TL_VidInit(gv); + // 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; @@ -165,7 +171,7 @@ void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv) } break; } - VL_SetLineWidth (cm.offset, &gv->video.ofs); +// VL_SetLineWidth (cm.offset, &gv->video.ofs); gv->video.VL_Started=1; } @@ -175,39 +181,6 @@ modexLeave() { vgaSetMode(TEXT_MODE); } -/* -==================== -= -= VL_SetLineWidth -= -= Line witdh is in WORDS, 40 words is normal width for vgaplanegr -= -==================== -*/ - -void VL_SetLineWidth (unsigned width, ofs_t *ofs) -{ - int i,offset; - -// -// set wide virtual screen -// - outport (CRTC_INDEX,CRTC_OFFSET+width*256); - -// -// set up lookup tables -// - ofs->linewidth = width*2; - - offset = 0; - - for (i=0;iylookup[i]=offset; - offset += ofs->linewidth; - } -} - page_t modexDefaultPage(page_t *p) { @@ -441,7 +414,7 @@ modexPanPage(page_t *page, int dx, int dy) { void modexSelectPlane(byte plane) { - outp(SC_INDEX, MAP_MASK); /* select plane */ + outp(SC_INDEX, SC_MAPMASK); /* select plane */ outp(SC_DATA, plane); } @@ -477,7 +450,7 @@ modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) MOV ES, AX MOV DI, poffset ; go to the first pixel MOV DX, SC_INDEX ; point to the map mask - MOV AL, MAP_MASK + MOV AL, SC_MAPMASK OUT DX, AL INC DX MOV AL, color ; get ready to write colors @@ -566,7 +539,7 @@ modexCopyPageRegion(page_t *dest, page_t *src, MOV AX, SC_INDEX ; point to the mask register MOV DX, AX ; - MOV AL, MAP_MASK ; + MOV AL, SC_MAPMASK ; OUT DX, AL ; INC DX ; @@ -800,7 +773,8 @@ modexPalUpdate(byte *p) } void -modexPalUpdate0(byte *p) +//modexPalUpdate0(byte *p) +VL_modexPalScramble(byte *p) { int i; //modexWaitBorder();