notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only build evdev code on GP2X and Pandora
[picodrive.git]
/
pico
/
draw2.c
diff --git
a/pico/draw2.c
b/pico/draw2.c
index
db155fa
..
f0e0518
100644
(file)
--- a/
pico/draw2.c
+++ b/
pico/draw2.c
@@
-25,7
+25,7
@@
static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)];
static int HighCache2A[41*(TILE_ROWS+1)+1+1]; // caches for high layers
\r
static int HighCache2B[41*(TILE_ROWS+1)+1+1];
\r
\r
static int HighCache2A[41*(TILE_ROWS+1)+1+1]; // caches for high layers
\r
static int HighCache2B[41*(TILE_ROWS+1)+1+1];
\r
\r
-unsigned short *PicoCramHigh=Pico.cram; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now)
\r
+unsigned short *PicoCramHigh=Pico
Mem
.cram; // pointer to CRAM buff (0x40 shorts), converted to native device color (works only with 16bit for now)
\r
void (*PicoPrepareCram)()=0; // prepares PicoCramHigh for renderer to use
\r
\r
\r
void (*PicoPrepareCram)()=0; // prepares PicoCramHigh for renderer to use
\r
\r
\r
@@
-46,7
+46,7
@@
static int TileXnormYnorm(unsigned char *pd,int addr,unsigned char pal)
int i;
\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {
\r
int i;
\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {
\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels
\r
+ pack=*(unsigned int *)(Pico
Mem
.vram+addr); // Get 8 pixels
\r
if(!pack) continue;
\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);
\r
if(!pack) continue;
\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);
\r
@@
-69,7
+69,7
@@
static int TileXflipYnorm(unsigned char *pd,int addr,unsigned char pal)
int i;
\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {
\r
int i;
\r
\r
for(i=8; i; i--, addr+=2, pd += LINE_WIDTH) {
\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels
\r
+ pack=*(unsigned int *)(Pico
Mem
.vram+addr); // Get 8 pixels
\r
if(!pack) continue;
\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);
\r
if(!pack) continue;
\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);
\r
@@
-92,7
+92,7
@@
static int TileXnormYflip(unsigned char *pd,int addr,unsigned char pal)
\r
addr+=14;
\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {
\r
\r
addr+=14;
\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {
\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels
\r
+ pack=*(unsigned int *)(Pico
Mem
.vram+addr); // Get 8 pixels
\r
if(!pack) continue;
\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);
\r
if(!pack) continue;
\r
\r
t=pack&0x0000f000; if (t) pd[0]=(unsigned char)((t>>12)|pal);
\r
@@
-116,7
+116,7
@@
static int TileXflipYflip(unsigned char *pd,int addr,unsigned char pal)
\r
addr+=14;
\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {
\r
\r
addr+=14;
\r
for(i=8; i; i--, addr-=2, pd += LINE_WIDTH) {
\r
- pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels
\r
+ pack=*(unsigned int *)(Pico
Mem
.vram+addr); // Get 8 pixels
\r
if(!pack) continue;
\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);
\r
if(!pack) continue;
\r
\r
t=pack&0x000f0000; if (t) pd[0]=(unsigned char)((t>>16)|pal);
\r
@@
-161,7
+161,7
@@
static void DrawWindowFull(int start, int end, int prio, struct PicoEState *est)
nametab += nametab_step*start;
\r
\r
// check priority
\r
nametab += nametab_step*start;
\r
\r
// check priority
\r
- code=Pico.vram[nametab+tile_start];
\r
+ code=Pico
Mem
.vram[nametab+tile_start];
\r
if ((code>>15) != prio) return; // hack: just assume that whole window uses same priority
\r
\r
scrpos+=8*LINE_WIDTH+8;
\r
if ((code>>15) != prio) return; // hack: just assume that whole window uses same priority
\r
\r
scrpos+=8*LINE_WIDTH+8;
\r
@@
-175,7
+175,7
@@
static void DrawWindowFull(int start, int end, int prio, struct PicoEState *est)
// unsigned short *pal=NULL;
\r
unsigned char pal;
\r
\r
// unsigned short *pal=NULL;
\r
unsigned char pal;
\r
\r
- code=Pico.vram[nametab+tilex];
\r
+ code=Pico
Mem
.vram[nametab+tilex];
\r
if (code==blank) continue;
\r
\r
// Get tile address/2:
\r
if (code==blank) continue;
\r
\r
// Get tile address/2:
\r
@@
-222,7
+222,7
@@
static void DrawLayerFull(int plane, int *hcache, int planestart, int planeend,
\r
if(!(pvid->reg[11]&3)) { // full screen scroll
\r
// Get horizontal scroll value
\r
\r
if(!(pvid->reg[11]&3)) { // full screen scroll
\r
// Get horizontal scroll value
\r
- hscroll=Pico.vram[htab&0x7fff];
\r
+ hscroll=Pico
Mem
.vram[htab&0x7fff];
\r
htab = 0; // this marks that we don't have to update scroll value
\r
}
\r
\r
htab = 0; // this marks that we don't have to update scroll value
\r
}
\r
\r
@@
-243,7
+243,7
@@
static void DrawLayerFull(int plane, int *hcache, int planestart, int planeend,
scrpos+=8*LINE_WIDTH*(planestart-START_ROW);
\r
\r
// Get vertical scroll value:
\r
scrpos+=8*LINE_WIDTH*(planestart-START_ROW);
\r
\r
// Get vertical scroll value:
\r
- vscroll=Pico.vsram[plane]&0x1ff;
\r
+ vscroll=Pico
Mem
.vsram[plane]&0x1ff;
\r
scrpos+=(8-(vscroll&7))*LINE_WIDTH;
\r
if(vscroll&7) planeend++; // we have vertically clipped tiles due to vscroll, so we need 1 more row
\r
\r
scrpos+=(8-(vscroll&7))*LINE_WIDTH;
\r
if(vscroll&7) planeend++; // we have vertically clipped tiles due to vscroll, so we need 1 more row
\r
\r
@@
-262,7
+262,7
@@
static void DrawLayerFull(int plane, int *hcache, int planestart, int planeend,
if(htab) {
\r
int htaddr=htab+(trow<<4);
\r
if(trow) htaddr-=(vscroll&7)<<1;
\r
if(htab) {
\r
int htaddr=htab+(trow<<4);
\r
if(trow) htaddr-=(vscroll&7)<<1;
\r
- hscroll=Pico.vram[htaddr&0x7fff];
\r
+ hscroll=Pico
Mem
.vram[htaddr&0x7fff];
\r
}
\r
\r
// Draw tiles across screen:
\r
}
\r
\r
// Draw tiles across screen:
\r
@@
-276,7
+276,7
@@
static void DrawLayerFull(int plane, int *hcache, int planestart, int planeend,
// unsigned short *pal=NULL;
\r
unsigned char pal;
\r
\r
// unsigned short *pal=NULL;
\r
unsigned char pal;
\r
\r
- code=Pico.vram[nametab_row+(tilex&xmask)];
\r
+ code=Pico
Mem
.vram[nametab_row+(tilex&xmask)];
\r
if (code==blank) continue;
\r
\r
if (code>>15) { // high priority tile
\r
if (code==blank) continue;
\r
\r
if (code>>15) { // high priority tile
\r
@@
-422,7
+422,7
@@
static void DrawAllSpritesFull(int prio, int maxwidth)
unsigned int *sprite=NULL;
\r
int code, code2, sx, sy, height;
\r
\r
unsigned int *sprite=NULL;
\r
int code, code2, sx, sy, height;
\r
\r
- sprite=(unsigned int *)(Pico.vram+((table+(link<<2))&0x7ffc)); // Find sprite
\r
+ sprite=(unsigned int *)(Pico
Mem
.vram+((table+(link<<2))&0x7ffc)); // Find sprite
\r
\r
// get sprite info
\r
code = sprite[0];
\r
\r
// get sprite info
\r
code = sprite[0];
\r