From 271d4699b76ab6d8922d656a98f2ee96e9d3a820 Mon Sep 17 00:00:00 2001 From: purplemarshmallow Date: Mon, 29 Feb 2016 23:06:42 +0100 Subject: [PATCH] replace tabs with spaces --- Source/Glide64/rdp.cpp | 156 ++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index 0a402eec6..d42c2e41a 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -4093,102 +4093,102 @@ output: none void CALL ProcessRDPList(void) { #ifdef _WIN32 - CGuard guard(*g_ProcessDListCS); + CGuard guard(*g_ProcessDListCS); #endif - WriteTrace(TraceGlide64, TraceDebug, "-"); + WriteTrace(TraceGlide64, TraceDebug, "-"); - no_dlist = false; - update_screen_count = 0; - ChangeSize(); + no_dlist = false; + update_screen_count = 0; + ChangeSize(); - // Switch to fullscreen? - if (to_fullscreen) - GoToFullScreen(); + // Switch to fullscreen? + if (to_fullscreen) + GoToFullScreen(); - //* Set states *// - if (g_settings->swapmode > 0) - SwapOK = TRUE; - rdp.updatescreen = 1; + //* Set states *// + if (g_settings->swapmode > 0) + SwapOK = TRUE; + rdp.updatescreen = 1; - rdp.tri_n = 0; // 0 triangles so far this frame - rdp.debug_n = 0; + rdp.tri_n = 0; // 0 triangles so far this frame + rdp.debug_n = 0; - rdp.model_i = 0; // 0 matrices so far in stack - //stack_size can be less then 32! Important for Silicon Vally. Thanks Orkin! - rdp.model_stack_size = minval(32, (*(uint32_t*)(gfx.DMEM + 0x0FE4)) >> 6); - if (rdp.model_stack_size == 0) - rdp.model_stack_size = 32; - rdp.Persp_en = TRUE; - rdp.fb_drawn = rdp.fb_drawn_front = FALSE; - rdp.update = 0x7FFFFFFF; // All but clear cache - rdp.geom_mode = 0; - rdp.acmp = 0; - rdp.maincimg[1] = rdp.maincimg[0]; - rdp.skip_drawing = FALSE; - rdp.s2dex_tex_loaded = FALSE; - rdp.bg_image_height = 0xFFFF; - fbreads_front = fbreads_back = 0; - rdp.fog_multiplier = rdp.fog_offset = 0; - rdp.zsrc = 0; - if (rdp.vi_org_reg != *gfx.VI_ORIGIN_REG) - rdp.tlut_mode = 0; //is it correct? - rdp.scissor_set = FALSE; - ucode5_texshiftaddr = ucode5_texshiftcount = 0; - cpu_fb_write = FALSE; - cpu_fb_read_called = FALSE; - cpu_fb_write_called = FALSE; - cpu_fb_ignore = FALSE; - d_ul_x = 0xffff; - d_ul_y = 0xffff; - d_lr_x = 0; - d_lr_y = 0; - depth_buffer_fog = TRUE; + rdp.model_i = 0; // 0 matrices so far in stack + //stack_size can be less then 32! Important for Silicon Vally. Thanks Orkin! + rdp.model_stack_size = minval(32, (*(uint32_t*)(gfx.DMEM + 0x0FE4)) >> 6); + if (rdp.model_stack_size == 0) + rdp.model_stack_size = 32; + rdp.Persp_en = TRUE; + rdp.fb_drawn = rdp.fb_drawn_front = FALSE; + rdp.update = 0x7FFFFFFF; // All but clear cache + rdp.geom_mode = 0; + rdp.acmp = 0; + rdp.maincimg[1] = rdp.maincimg[0]; + rdp.skip_drawing = FALSE; + rdp.s2dex_tex_loaded = FALSE; + rdp.bg_image_height = 0xFFFF; + fbreads_front = fbreads_back = 0; + rdp.fog_multiplier = rdp.fog_offset = 0; + rdp.zsrc = 0; + if (rdp.vi_org_reg != *gfx.VI_ORIGIN_REG) + rdp.tlut_mode = 0; //is it correct? + rdp.scissor_set = FALSE; + ucode5_texshiftaddr = ucode5_texshiftcount = 0; + cpu_fb_write = FALSE; + cpu_fb_read_called = FALSE; + cpu_fb_write_called = FALSE; + cpu_fb_ignore = FALSE; + d_ul_x = 0xffff; + d_ul_y = 0xffff; + d_lr_x = 0; + d_lr_y = 0; + depth_buffer_fog = TRUE; - const uint32_t length = dp_end - dp_current; + const uint32_t length = dp_end - dp_current; - dp_status &= ~0x0002; + dp_status &= ~0x0002; - if (dp_end <= dp_current) return; + if (dp_end <= dp_current) return; - rdp.LLE = TRUE; + rdp.LLE = TRUE; - // load command data - for (uint32_t i = 0; i < length; i += 4) - { - rdp_cmd_data[rdp_cmd_ptr] = READ_RDP_DATA(dp_current + i); - rdp_cmd_ptr = (rdp_cmd_ptr + 1) & maxCMDMask; - } + // load command data + for (uint32_t i = 0; i < length; i += 4) + { + rdp_cmd_data[rdp_cmd_ptr] = READ_RDP_DATA(dp_current + i); + rdp_cmd_ptr = (rdp_cmd_ptr + 1) & maxCMDMask; + } - bool setZero = true; + bool setZero = true; - while (rdp_cmd_cur != rdp_cmd_ptr) { - uint32_t cmd = (rdp_cmd_data[rdp_cmd_cur] >> 24) & 0x3f; + while (rdp_cmd_cur != rdp_cmd_ptr) { + uint32_t cmd = (rdp_cmd_data[rdp_cmd_cur] >> 24) & 0x3f; - if ((((rdp_cmd_ptr - rdp_cmd_cur)&maxCMDMask) * 4) < rdp_command_length[cmd]) { - setZero = false; - break; - } + if ((((rdp_cmd_ptr - rdp_cmd_cur)&maxCMDMask) * 4) < rdp_command_length[cmd]) { + setZero = false; + break; + } - if (rdp_cmd_cur + rdp_command_length[cmd] / 4 > MAXCMD) - ::memcpy(rdp_cmd_data + MAXCMD, rdp_cmd_data, rdp_command_length[cmd] - (MAXCMD - rdp_cmd_cur) * 4); + if (rdp_cmd_cur + rdp_command_length[cmd] / 4 > MAXCMD) + ::memcpy(rdp_cmd_data + MAXCMD, rdp_cmd_data, rdp_command_length[cmd] - (MAXCMD - rdp_cmd_cur) * 4); - // execute the command - rdp.cmd0 = rdp_cmd_data[rdp_cmd_cur + 0]; - rdp.cmd1 = rdp_cmd_data[rdp_cmd_cur + 1]; - rdp.cmd2 = rdp_cmd_data[rdp_cmd_cur + 2]; - rdp.cmd3 = rdp_cmd_data[rdp_cmd_cur + 3]; - //RSP.cmd = cmd; - rdp_command_table[cmd](); + // execute the command + rdp.cmd0 = rdp_cmd_data[rdp_cmd_cur + 0]; + rdp.cmd1 = rdp_cmd_data[rdp_cmd_cur + 1]; + rdp.cmd2 = rdp_cmd_data[rdp_cmd_cur + 2]; + rdp.cmd3 = rdp_cmd_data[rdp_cmd_cur + 3]; + //RSP.cmd = cmd; + rdp_command_table[cmd](); - rdp_cmd_cur = (rdp_cmd_cur + rdp_command_length[cmd] / 4) & maxCMDMask; - } + rdp_cmd_cur = (rdp_cmd_cur + rdp_command_length[cmd] / 4) & maxCMDMask; + } - if (setZero) { - rdp_cmd_ptr = 0; - rdp_cmd_cur = 0; - } + if (setZero) { + rdp_cmd_ptr = 0; + rdp_cmd_cur = 0; + } - rdp.LLE = FALSE; + rdp.LLE = FALSE; - dp_start = dp_current = dp_end; + dp_start = dp_current = dp_end; } \ No newline at end of file