eliminate texrels (wip2)

This commit is contained in:
notaz 2017-08-06 19:23:20 +03:00
parent ea38612fad
commit 99bdfd31b8
13 changed files with 102 additions and 147 deletions

View file

@ -94,7 +94,7 @@ void pemu_prep_defconfig(void)
static int EmuScanBegin16(unsigned int num)
{
DrawLineDest = (unsigned short *) giz_screen + 321 * num;
Pico.est.DrawLineDest = (unsigned short *) giz_screen + 321 * num;
if ((currentConfig.EmuOpt&0x4000) && (num&1) == 0) // (Pico.m.frame_count&1))
return 1; // skip next line
@ -105,7 +105,7 @@ static int EmuScanBegin16(unsigned int num)
static int EmuScanBegin8(unsigned int num)
{
// draw like the fast renderer
HighCol = gfx_buffer + 328 * num;
Pico.est.HighCol = gfx_buffer + 328 * num;
return 0;
}
@ -122,13 +122,6 @@ static void osd_text(int x, int y, const char *text)
emu_text_out16(x, y, text);
}
/*
void log1(void *p1, void *p2)
{
lprintf("%p %p %p\n", p1, p2, DrawLineDest);
}
*/
static void cd_leds(void)
{
static int old_reg = 0;

View file

@ -222,7 +222,7 @@ static unsigned char __attribute__((aligned(4))) rot_buff[320*4*2];
static int EmuScanBegin16_rot(unsigned int num)
{
DrawLineDest = rot_buff + (num & 3) * 320 * 2;
Pico.est.DrawLineDest = rot_buff + (num & 3) * 320 * 2;
return 0;
}
@ -237,7 +237,7 @@ static int EmuScanEnd16_rot(unsigned int num)
static int EmuScanBegin8_rot(unsigned int num)
{
DrawLineDest = rot_buff + (num & 3) * 320;
Pico.est.DrawLineDest = rot_buff + (num & 3) * 320;
return 0;
}
@ -262,14 +262,14 @@ static int EmuScanBegin16_ld(unsigned int num)
if (emu_scan_begin)
return emu_scan_begin(ld_counter);
else
DrawLineDest = (char *)g_screen_ptr + 320 * ld_counter * gp2x_current_bpp / 8;
Pico.est.DrawLineDest = (char *)g_screen_ptr + 320 * ld_counter * gp2x_current_bpp / 8;
return 0;
}
static int EmuScanEnd16_ld(unsigned int num)
{
void *oldline = DrawLineDest;
void *oldline = Pico.est.DrawLineDest;
if (emu_scan_end)
emu_scan_end(ld_counter);
@ -280,7 +280,7 @@ static int EmuScanEnd16_ld(unsigned int num)
ld_left = ld_lines;
EmuScanBegin16_ld(num);
memcpy32(DrawLineDest, oldline, 320 * gp2x_current_bpp / 8 / 4);
memcpy32(Pico.est.DrawLineDest, oldline, 320 * gp2x_current_bpp / 8 / 4);
if (emu_scan_end)
emu_scan_end(ld_counter);

View file

@ -242,8 +242,8 @@ static void do_slowmode_lines(int line_to)
static void EmuScanPrepare(void)
{
HighCol = (unsigned char *)VRAM_CACHED_STUFF + 8;
if (!(Pico.video.reg[1]&8)) HighCol += 8*512;
Pico.est.HighCol = (unsigned char *)VRAM_CACHED_STUFF + 8;
if (!(Pico.video.reg[1]&8)) Pico.est.HighCol += 8*512;
if (dynamic_palette > 0)
dynamic_palette--;
@ -258,7 +258,7 @@ static void EmuScanPrepare(void)
static int EmuScanSlowBegin(unsigned int num)
{
if (!dynamic_palette)
HighCol = (unsigned char *)VRAM_CACHED_STUFF + num * 512 + 8;
Pico.est.HighCol = (unsigned char *)VRAM_CACHED_STUFF + num * 512 + 8;
return 0;
}
@ -276,7 +276,7 @@ static int EmuScanSlowEnd(unsigned int num)
if (dynamic_palette) {
int line_len = (Pico.video.reg[12]&1) ? 320 : 256;
void *dst = (char *)VRAM_STUFF + 512*240 + 512*2*num;
amips_clut_f(dst, HighCol + 8, localPal, line_len);
amips_clut_f(dst, Pico.est.HighCol + 8, localPal, line_len);
}
return 0;