X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=b8f733be22b581f1748cffffa04e1f60e988b3be;hb=70fe32e01a3eeac5230aa562ab9b8062c6f3d30d;hp=eeba90fcfdd295bcc56d73993b3d2563400e9f65;hpb=ee5eabc08d125136522d536bfe93f67f644ed20b;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index eeba90fc..b8f733be 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -1,11 +1,11 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * * Project 16 is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either verson 3 of the License, or + * 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, @@ -198,8 +198,8 @@ modexDefaultPage(page_t *p) 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.pi=4; + page.pagesize = (word)(page.stridew)*page.height; + page.pi=page.width*4; page.id = 0; return page; @@ -225,7 +225,7 @@ modexNextPage(page_t *p) { result.tilesh = p->tilesh; result.stridew=p->stridew; result.pagesize = p->pagesize; - result.pi=4; + result.pi=result.width*4; result.id = p->id+1; return result; @@ -249,11 +249,17 @@ modexNextPageFlexibleSize(page_t *p, word x, word y) 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; - if(result.id==2) - result.pi=p->width*p->pi; - else if(result.id==3) result.pi=p->pi; + result.stridew=p->sw/4;//result.width/4; + result.pagesize = (word)(result.stridew)*result.height; + switch(result.id) + { + case 2: + result.pi=p->width*4; + break; + case 3: + result.pi=p->pi; + break; + } return result; } @@ -419,7 +425,7 @@ modexCopyPageRegion(page_t *dest, page_t *src, { 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+8; //++++0000 the quick and dirty fix of the major issue with p16 video display wwww + word scans = vga_state.vga_stride; //++++0000 the quick and dirty fix of the major issue with p16 video display wwww word nextSrcRow = src->stridew - scans - 1; word nextDestRow = dest->stridew - scans - 1; byte lclip[] = {0x0f, 0x0e, 0x0c, 0x08}; /* clips for rectangles not on 4s */