Commit c113d466 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Further cleanups

parent 86b6a2cc
......@@ -9,10 +9,6 @@
/* graphics.cpp: implementation of the graphics class. */
/* Flavor - Convert from DirectDraw to SDL */
/* Flavor #define WIN32_LEAN_AND_MEAN */
#include "StdAfx.h"
#include "main.h"
#include "graphics.h"
......@@ -21,8 +17,6 @@
extern ngp_screen* screen;
extern int gfx_hacks;
#define INITGUID
/*
* 16 bit graphics buffers
* At the moment there's no system which uses more than 16 bit
......@@ -149,13 +143,6 @@ unsigned short p2[16] = {
/* extra fudge factor for PSP? */
#define SCREEN_OFFET (SCREEN_X_OFFSET + (SCREEN_Y_OFFSET*(screen->w+PSP_FUDGE)))
#ifndef __LIBRETRO__
#define DO_PERIODIC_FLASH_SAVES
#endif
#if defined(DO_PERIODIC_FLASH_SAVES)
static unsigned int frameCount = 0;
#endif
/* Flavor - For speed testing, you can turn off screen updates */
#if 0
......@@ -174,13 +161,6 @@ void graphicsBlitEnd(void)
void graphics_paint(void);
#if defined(DO_PERIODIC_FLASH_SAVES)
static inline void incFrameCount(void)
{
frameCount++;
}
#endif
void write_screenshot(FILE *f)
{
#if 0
......@@ -601,8 +581,6 @@ static inline void set_paletteCol(
/* initialize palette table
*
* initialize back plane palette table
* these should actually be setting the SDL palette
*/
for(i=0;i<16*4;i++)
......@@ -1134,10 +1112,6 @@ void graphicsBlitLine(unsigned char render)
tlcsMemWriteB(0x00008010,tlcsMemReadB(0x00008010) & ~0x40);
graphicsBlitInit();
#if defined(DO_PERIODIC_FLASH_SAVES)
incFrameCount();
#endif
*scanlineY = 0;
}
else
......@@ -1485,12 +1459,7 @@ void myGraphicsBlitLine(unsigned char render) /* NOTA */
}
else
{
#ifdef __LIBRETRO__
if (((*scanlineY)&7) == 0)
#else
if (options[HICOLOR_OPTION] || (!options[HICOLOR_OPTION] && ((*scanlineY)&7)==0))
#endif
{
if (bw)
{
......@@ -1598,13 +1567,6 @@ void myGraphicsBlitLine(unsigned char render) /* NOTA */
*
*/
const char ErrDirectDrawCreate[] = "DirectDrawCreate Failed";
const char ErrQueryInterface[] = "QueryInterface Failed";
const char ErrSetCooperativeLevel[] = "SetCooperativeLevel Failed";
const char ErrCreateSurface[] = "CreateSurface Failed";
#define DDOK(x) if (hRet != DD_OK) { LastErr = x; return FALSE; }
BOOL graphics_init(void)
{
#ifdef __LIBRETRO__
......@@ -1614,7 +1576,6 @@ BOOL graphics_init(void)
#else
dbg_print("in graphics_init\n");
switch (screen->format->BitsPerPixel)
{
case 8:
......@@ -1628,9 +1589,6 @@ BOOL graphics_init(void)
break;
}
#if 0
palettes = palette_table;
#endif
drawBuffer = ((unsigned short*) screen->pixels) + SCREEN_OFFET;
palette_init(screen->format->Rmask,
......@@ -1666,4 +1624,3 @@ BOOL graphics_init(void)
void graphics_cleanup(void)
{
}
......@@ -9183,8 +9183,12 @@ void tlcs_execute(int cycles)
while(cycles > 0)
{
/* AKTODO */
// if(options[TURBO_OPTION])
#if 0
if(options[TURBO_OPTION])
#else
/* TODO/FIXME - perhaps this is too fast as a default? */
if (1)
#endif
{
//call a bunch of steps
for (elapsed = tlcs_step();elapsed<(515>>(tlcsClockMulti-1)); elapsed += tlcs_step());
......@@ -9199,7 +9203,9 @@ void tlcs_execute(int cycles)
soundStep(elapsed);
hCounter-= elapsed;
// *ngpScX = hCounter>>2;
#if 0
*ngpScX = hCounter>>2;
#endif
#ifdef TCLS900H_PROFILING
......@@ -9214,16 +9220,12 @@ void tlcs_execute(int cycles)
{
// time equivalent to 1 horizontal line has passed
#ifdef FRAMESKIP
//graphicsBlitLine(frame == 0);
myGraphicsBlitLine(frame==0);
#else
//graphicsBlitLine(true);
myGraphicsBlitLine(true);
#endif
//NOTA
//NOTA
hCounter+= 515;
// now check what needs to be done at the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment