mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
minor drawing code cleanup
This commit is contained in:
parent
19886062f1
commit
41946d7023
14 changed files with 23 additions and 58 deletions
|
@ -17,10 +17,6 @@
|
|||
#include "input_pico.h"
|
||||
#include "version.h"
|
||||
|
||||
// FIXME: these 2 shouldn't be here
|
||||
static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)];
|
||||
unsigned char *PicoDraw2FB = PicoDraw2FB_;
|
||||
|
||||
static void *shadow_fb;
|
||||
|
||||
static const struct in_default_bind in_sdl_defbinds[] = {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
// main 300K gfx-related buffer. Used by menu and renderers.
|
||||
unsigned char gfx_buffer[321*240*2*2];
|
||||
unsigned char *PicoDraw2FB = gfx_buffer; // temporary buffer for alt renderer ( (8+320)*(8+240+8) )
|
||||
|
||||
static short *snd_cbuff = NULL;
|
||||
static int snd_cbuf_samples = 0, snd_all_samples = 0;
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
extern int crashed_940;
|
||||
|
||||
static short __attribute__((aligned(4))) sndBuffer[2*(44100+100)/50];
|
||||
static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)];
|
||||
unsigned char *PicoDraw2FB = PicoDraw2FB_;
|
||||
static int osd_fps_x, osd_y, doing_bg_frame;
|
||||
const char *renderer_names[] = { "16bit accurate", " 8bit accurate", " 8bit fast", NULL };
|
||||
const char *renderer_names32x[] = { "accurate", "faster", "fastest", NULL };
|
||||
|
@ -524,11 +522,9 @@ static void vid_reset_mode(void)
|
|||
// Wiz 16bit is an exception, uses line rendering due to rotation mess
|
||||
if (renderer == RT_16BIT && (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX)) {
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
PicoDraw32xSetFrameMode(0, 0);
|
||||
}
|
||||
else {
|
||||
PicoDrawSetOutFormat(PDF_NONE, 0);
|
||||
PicoDraw32xSetFrameMode(1, 0);
|
||||
}
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
gp2x_mode = 16;
|
||||
|
@ -785,7 +781,6 @@ void pemu_forced_frame(int no_scale, int do_emu)
|
|||
{
|
||||
doing_bg_frame = 1;
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
PicoDraw32xSetFrameMode(0, 0);
|
||||
PicoDrawSetCallbacks(NULL, NULL);
|
||||
Pico.m.dirtyPal = 1;
|
||||
|
||||
|
|
|
@ -40,10 +40,6 @@ static int vout_width, vout_height;
|
|||
|
||||
static short __attribute__((aligned(4))) sndBuffer[2*44100/50];
|
||||
|
||||
// FIXME: these 2 shouldn't be here
|
||||
static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)];
|
||||
unsigned char *PicoDraw2FB = PicoDraw2FB_;
|
||||
|
||||
static void snd_write(int len);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -151,7 +147,6 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols)
|
|||
|
||||
void emu_32x_startup(void)
|
||||
{
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
}
|
||||
|
||||
#ifndef ANDROID
|
||||
|
@ -614,7 +609,7 @@ void retro_init(void)
|
|||
vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
|
||||
|
||||
PicoInit();
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 0);
|
||||
PicoDrawSetOutBuf(vout_buf, vout_width * 2);
|
||||
|
||||
//PicoMessage = plat_status_msg_busy_next;
|
||||
|
|
|
@ -142,17 +142,8 @@ static void apply_renderer(void)
|
|||
break;
|
||||
}
|
||||
|
||||
if (PicoAHW & PAHW_32X) {
|
||||
int only_32x = 0;
|
||||
if (currentConfig.renderer == RT_16BIT)
|
||||
only_32x = 1;
|
||||
else
|
||||
PicoDrawSetOutFormat(PDF_NONE, 0);
|
||||
PicoDraw32xSetFrameMode(1, only_32x);
|
||||
if (PicoAHW & PAHW_32X)
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
}
|
||||
//PicoDraw32xSetFrameMode(0, 0);
|
||||
//PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
}
|
||||
|
||||
void plat_video_toggle_renderer(int change, int is_menu)
|
||||
|
@ -198,7 +189,6 @@ void plat_update_volume(int has_changed, int is_up)
|
|||
void pemu_forced_frame(int no_scale, int do_emu)
|
||||
{
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
PicoDraw32xSetFrameMode(0, 0);
|
||||
PicoDrawSetCallbacks(NULL, NULL);
|
||||
Pico.m.dirtyPal = 1;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "log_io.h"
|
||||
|
||||
int current_keys;
|
||||
unsigned char *PicoDraw2FB;
|
||||
|
||||
#ifdef FBDEV
|
||||
|
||||
|
@ -265,7 +264,6 @@ static void realloc_screen(void)
|
|||
g_menubg_ptr = realloc(g_menubg_ptr, size);
|
||||
memset(g_screen_ptr, 0, size);
|
||||
memset(g_menubg_ptr, 0, size);
|
||||
PicoDraw2FB = g_menubg_ptr;
|
||||
scr_changed = 0;
|
||||
}
|
||||
|
||||
|
@ -335,7 +333,6 @@ void plat_init(void)
|
|||
g_screen_width = g_menuscreen_w = w;
|
||||
g_screen_height = g_menuscreen_h = h;
|
||||
g_menubg_ptr = realloc(g_menubg_ptr, w * g_screen_height * 2);
|
||||
PicoDraw2FB = g_menubg_ptr;
|
||||
#else
|
||||
realloc_screen();
|
||||
memset(g_screen_ptr, 0, g_screen_width * g_screen_height * 2);
|
||||
|
|
|
@ -43,7 +43,6 @@ static int g_osd_fps_x, g_osd_y, doing_bg_frame;
|
|||
static const char pnd_script_base[] = "sudo -n /usr/pandora/scripts";
|
||||
static unsigned char __attribute__((aligned(4))) fb_copy[320 * 240 * 2];
|
||||
static void *temp_frame;
|
||||
unsigned char *PicoDraw2FB;
|
||||
const char *renderer_names[] = { NULL };
|
||||
const char *renderer_names32x[] = { NULL };
|
||||
|
||||
|
@ -140,13 +139,6 @@ static void draw_cd_leds(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int emuscan(unsigned int num)
|
||||
{
|
||||
DrawLineDest = (unsigned short *)g_screen_ptr + num * g_screen_width;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pemu_finalize_frame(const char *fps, const char *notice)
|
||||
{
|
||||
if (notice && notice[0])
|
||||
|
@ -160,6 +152,7 @@ void pemu_finalize_frame(const char *fps, const char *notice)
|
|||
void plat_video_flip(void)
|
||||
{
|
||||
g_screen_ptr = vout_fbdev_flip(layer_fb);
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
|
||||
// XXX: drain OS event queue here, maybe we'll actually use it someday..
|
||||
xenv_update(NULL, NULL, NULL, NULL);
|
||||
|
@ -308,7 +301,7 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols)
|
|||
return;
|
||||
|
||||
PicoDrawSetOutFormat(PDF_RGB555, 1);
|
||||
PicoDrawSetCallbacks(emuscan, NULL);
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
|
||||
if (is_32cols) {
|
||||
fb_w = 256;
|
||||
|
@ -474,7 +467,6 @@ void plat_init(void)
|
|||
}
|
||||
g_menubg_ptr = temp_frame;
|
||||
g_menubg_src_ptr = temp_frame;
|
||||
PicoDraw2FB = temp_frame;
|
||||
|
||||
pnd_menu_init();
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ int sceAudio_E0727056(int volume, void *buffer); // blocking output
|
|||
int sceAudioOutput2GetRestSample();
|
||||
|
||||
|
||||
unsigned char *PicoDraw2FB = (unsigned char *)VRAM_CACHED_STUFF + 8; // +8 to be able to skip border with 1 quadword..
|
||||
//unsigned char *PicoDraw2FB = (unsigned char *)VRAM_CACHED_STUFF + 8; // +8 to be able to skip border with 1 quadword..
|
||||
int engineStateSuspend;
|
||||
|
||||
#define PICO_PEN_ADJUST_X 4
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "main.h"
|
||||
|
||||
static unsigned short screen_buff[320 * 240];
|
||||
static unsigned char PicoDraw2FB_[(8+320) * (8+240+8)];
|
||||
unsigned char *PicoDraw2FB = PicoDraw2FB_;
|
||||
const char *renderer_names[] = { NULL };
|
||||
const char *renderer_names32x[] = { NULL };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue