Disable many unused variables as identifed by cppcheck. [Oliver Stöneberg]

This commit is contained in:
Scott Stone 2010-04-23 23:21:39 +00:00
parent fb508b560b
commit cb93774e22
37 changed files with 103 additions and 101 deletions

View File

@ -622,9 +622,9 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const
}
else
{
parameter_item *item = NULL, *prev = NULL;
parameter_item *item = NULL/*, *prev = NULL*/;
for (item = cheat->parameter->itemlist; item != NULL; prev = item, item = item->next)
for (item = cheat->parameter->itemlist; item != NULL; /*prev = item, */item = item->next)
if (item->value == cheat->parameter->value)
break;
if (state != NULL)

View File

@ -158,7 +158,7 @@ static char *dis_decode_reg(unsigned long iCode, char* tmpStr,unsigned char cnt)
static char *i960_disassemble(disassemble_t *diss)
{
unsigned char op,op2;
unsigned char mode, modeh, model;
unsigned char /*mode,*/ modeh, model;
unsigned char dst,abase,reg2;
unsigned short opc;
unsigned long iCode;
@ -171,7 +171,7 @@ static char *i960_disassemble(disassemble_t *diss)
model = (unsigned char) (iCode >> 10) &0x3;
modeh = (unsigned char) (iCode >> 12) &0x3;
mode = (unsigned char) (iCode >> 10) &0x7;
//mode = (unsigned char) (iCode >> 10) &0x7;
dst = (unsigned char) (iCode >> 19) &0x1f;
abase = (unsigned char) (iCode>>14)&0x1f;
reg2 = (unsigned char) (iCode)&0x1f;

View File

@ -205,7 +205,7 @@ static const lr35902dasm mnemonic_main[256]= {
CPU_DISASSEMBLE( lr35902 )
{
const lr35902dasm *d;
const char *symbol, *src;
const char /* *symbol,*/ *src;
char *dst;
INT8 offset = 0;
UINT8 op, op1;
@ -213,7 +213,7 @@ CPU_DISASSEMBLE( lr35902 )
int pos = 0;
dst = buffer;
symbol = NULL;
//symbol = NULL;
op = oprom[pos++];
op1 = 0; /* keep GCC happy */

View File

@ -375,12 +375,12 @@ int m7700_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8
signed char varS;
int length = 1;
unsigned int address;
unsigned int start;
//unsigned int start;
UINT32 flags = 0;
pb <<= 16;
address = pc | pb;
start = address;
//start = address;
instruction = read_8(oprom,0);

View File

@ -155,7 +155,7 @@ CPU_DISASSEMBLE( pic16c5x )
int cnt = 1;
int code;
int bit;
char *buffertmp;
//char *buffertmp;
const char *cp; /* character pointer in OpFormats */
UINT32 flags = 0;
@ -184,7 +184,7 @@ CPU_DISASSEMBLE( pic16c5x )
sprintf(buffer,"???? dw %04Xh",code);
return cnt;
}
buffertmp = buffer;
//buffertmp = buffer;
if (Op[op].extcode) /* Actually, theres no double length opcodes */
{
bit = 27;

View File

@ -166,7 +166,7 @@ CPU_DISASSEMBLE( pic16c62x )
int cnt = 1;
int code;
int bit;
char *buffertmp;
//char *buffertmp;
const char *cp; /* character pointer in OpFormats */
UINT32 flags = 0;
@ -195,7 +195,7 @@ CPU_DISASSEMBLE( pic16c62x )
sprintf(buffer,"???? dw %04Xh",code);
return cnt;
}
buffertmp = buffer;
//buffertmp = buffer;
if (Op[op].extcode) /* Actually, theres no double length opcodes */
{
bit = 29;

View File

@ -141,18 +141,18 @@ static void sharc_dma_exec(SHARC_REGS *cpustate, int channel)
UINT32 src, dst;
UINT32 src_count, dst_count;
UINT32 src_modifier, dst_modifier;
int chen, tran, dtype, pmode, mswf, master, ishake, intio, ext, flsh;
int chen, tran, dtype, pmode, /*mswf, master,*/ ishake, intio/*, ext, flsh*/;
chen = (cpustate->dma[channel].control >> 1) & 0x1;
tran = (cpustate->dma[channel].control >> 2) & 0x1;
dtype = (cpustate->dma[channel].control >> 5) & 0x1;
pmode = (cpustate->dma[channel].control >> 6) & 0x3;
mswf = (cpustate->dma[channel].control >> 8) & 0x1;
master = (cpustate->dma[channel].control >> 9) & 0x1;
//mswf = (cpustate->dma[channel].control >> 8) & 0x1;
//master = (cpustate->dma[channel].control >> 9) & 0x1;
ishake = (cpustate->dma[channel].control >> 10) & 0x1;
intio = (cpustate->dma[channel].control >> 11) & 0x1;
ext = (cpustate->dma[channel].control >> 12) & 0x1;
flsh = (cpustate->dma[channel].control >> 13) & 0x1;
//ext = (cpustate->dma[channel].control >> 12) & 0x1;
//flsh = (cpustate->dma[channel].control >> 13) & 0x1;
if (ishake)
fatalerror("SHARC: dma_exec: handshake not supported");

View File

@ -231,7 +231,7 @@ CPU_DISASSEMBLE( tms32010 )
int cnt = 1;
int code;
int bit;
char *buffertmp;
//char *buffertmp;
const char *cp; /* character pointer in OpFormats */
if (!OpInizialized) InitDasm32010();
@ -255,7 +255,7 @@ CPU_DISASSEMBLE( tms32010 )
sprintf(buffer, "dw %04Xh *(invalid op)", code);
return cnt | DASMFLAG_SUPPORTED;
}
buffertmp = buffer;
//buffertmp = buffer;
if (Op[op].extcode)
{
bit = 31;

View File

@ -394,7 +394,7 @@ CPU_DISASSEMBLE( tms32025 )
int cnt = 1;
int code;
int bit;
char *buffertmp;
//char *buffertmp;
const char *cp; /* character pointer in OpFormats */
if (!OpInizialized) InitDasm32025();
@ -418,7 +418,7 @@ CPU_DISASSEMBLE( tms32025 )
sprintf(buffer,"???? dw %04Xh",code);
return cnt | DASMFLAG_SUPPORTED;
}
buffertmp = buffer;
//buffertmp = buffer;
if (Op[op].extcode)
{
bit = 31;

View File

@ -361,7 +361,7 @@ static const opcodeinfo opcodes[] = {
CPU_DISASSEMBLE( tms7000 )
{
int opcode, i, size = 1;
int opcode, i/*, size = 1*/;
int pos = 0;
char tmpbuf[32];
@ -395,32 +395,32 @@ CPU_DISASSEMBLE( tms7000 )
case UI8:
a = (UINT8)opram[pos++];
buffer += sprintf(buffer, of[j].opstr[k], (unsigned int)a);
size += 1;
//size += 1;
break;
case I8:
b = (INT8)opram[pos++];
buffer += sprintf (buffer, of[j].opstr[k], (INT8)b);
size += 1;
//size += 1;
break;
case UI16:
c = (UINT16)opram[pos++];
c <<= 8;
c += opram[pos++];
buffer += sprintf (buffer, of[j].opstr[k], (unsigned int)c);
size += 2;
//size += 2;
break;
case I16:
d = (INT16)opram[pos++];
d <<= 8;
d += opram[pos++];
buffer += sprintf (buffer, of[j].opstr[k], (signed int)d);
size += 2;
//size += 2;
break;
case PCREL:
b = (INT8)opram[pos++];
sprintf(tmpbuf, "$%04X", pc+2+k+b);
buffer += sprintf (buffer, of[j].opstr[k], tmpbuf);
size += 1;
//size += 1;
break;
case PCABS:
c = (UINT16)opram[pos++];
@ -428,7 +428,7 @@ CPU_DISASSEMBLE( tms7000 )
c += opram[pos++];
sprintf(tmpbuf, "$%04X", c);
buffer += sprintf (buffer, of[j].opstr[k], tmpbuf);
size += 2;
//size += 2;
break;
case TRAP:
vector = 0xffff - ((0xff - opcode) * 2);

View File

@ -1913,7 +1913,7 @@ static void get_register_string_value(running_device *device, void *baseptr, con
#ifdef UNUSED_FUNCTION
static int get_register_string_max_width(running_device *device, void *baseptr, const cpu_state_entry *entry)
{
int leadzero = 0, width = 0, percent = 0, explicitsign = 0, reset;
int /*leadzero = 0,*/ width = 0, percent = 0, explicitsign = 0, reset;
int totalwidth = 0;
const char *fptr;
@ -1927,7 +1927,7 @@ static int get_register_string_max_width(running_device *device, void *baseptr,
{
/* reset any accumulated state */
if (reset)
leadzero = width = percent = explicitsign = reset = 0;
/*leadzero =*/ width = percent = explicitsign = reset = 0;
/* if we're not within a format, then anything other than a % outputs directly */
if (!percent && *fptr != '%')
@ -1952,8 +1952,9 @@ static int get_register_string_max_width(running_device *device, void *baseptr,
/* 0 means insert leading 0s, unless it follows another width digit */
case '0':
if (width == 0)
leadzero = TRUE;
if (width == 0) {
//leadzero = TRUE;
}
else
width *= 10;
break;

View File

@ -1976,11 +1976,12 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr
char *newstring;
UINT32 hash_index;
int strindex;
int all_digits, i;
//int all_digits, i;
// assert_always(entry->table == table, "Mismatched symbol tables");
/* we cannot add numeric symbols */
/*
all_digits = TRUE;
for (i = 0; name[i]; i++)
{
@ -1990,7 +1991,8 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr
break;
}
}
// assert_always(!all_digits, "All-digit symbols are not allowed");
assert_always(!all_digits, "All-digit symbols are not allowed");
*/
/* see if we already have an entry and just overwrite it if we do */
oldentry = (symbol_entry *)symtable_find(table, name);

View File

@ -973,13 +973,13 @@ static WRITE_LINE_DEVICE_HANDLER( changed_write_line_device )
time_t input_port_init(running_machine *machine, const input_port_token *tokens)
{
input_port_private *portdata;
//input_port_private *portdata;
char errorbuf[1024];
time_t basetime;
/* allocate memory for our data structure */
machine->input_port_data = auto_alloc_clear(machine, input_port_private);
portdata = machine->input_port_data;
//portdata = machine->input_port_data;
/* add an exit callback and a frame callback */
add_exit_callback(machine, input_port_exit);

View File

@ -92,7 +92,7 @@ static TIMER_CALLBACK( am53cf96_irq )
WRITE32_HANDLER( am53cf96_w )
{
int reg, val, dma;
int reg, val/*, dma*/;
reg = offset * 2;
val = data;
@ -133,7 +133,7 @@ WRITE32_HANDLER( am53cf96_w )
// command
if (reg == REG_COMMAND)
{
dma = (val & 0x80) ? 1 : 0;
//dma = (val & 0x80) ? 1 : 0;
fptr = 0;
switch (val & 0x7f)
{

View File

@ -113,7 +113,7 @@ static void mc146818_set_base_datetime(running_machine *machine);
static TIMER_CALLBACK( mc146818_timer )
{
int year, month;
int year/*, month*/;
if (BCD_MODE)
{
@ -132,7 +132,7 @@ static TIMER_CALLBACK( mc146818_timer )
mc146818->data[4]=0;
WEEK_DAY=bcd_adjust(WEEK_DAY+1)%7;
DAY=bcd_adjust(DAY+1);
month=bcd_2_dec(MONTH);
//month=bcd_2_dec(MONTH);
year=bcd_2_dec(YEAR);
if (mc146818->type!=MC146818_IGNORE_CENTURY) year+=bcd_2_dec(CENTURY)*100;
else year+=2000; // save for julian_days_in_month calculation

View File

@ -944,7 +944,7 @@ static void process_rom_entries(rom_load_data *romdata, const char *regiontag, c
do
{
rom_entry modified_romp = *romp++;
int readresult;
//int readresult;
/* handle flag inheritance */
if (!ROM_INHERITSFLAGS(&modified_romp))
@ -956,7 +956,7 @@ static void process_rom_entries(rom_load_data *romdata, const char *regiontag, c
/* attempt to read using the modified entry */
if (!ROMENTRY_ISIGNORE(&modified_romp) && !irrelevantbios)
readresult = read_rom_data(romdata, &modified_romp);
/*readresult = */read_rom_data(romdata, &modified_romp);
}
while (ROMENTRY_ISCONTINUE(romp) || ROMENTRY_ISIGNORE(romp));

View File

@ -53,13 +53,13 @@ static STREAM_UPDATE( cdda_update )
static DEVICE_START( cdda )
{
const struct CDDAinterface *intf;
//const struct CDDAinterface *intf;
cdda_info *info = get_safe_token(device);
/* allocate an audio cache */
info->audio_cache = auto_alloc_array( device->machine, UINT8, CD_MAX_SECTOR_DATA * MAX_SECTORS );
intf = (const struct CDDAinterface *)device->baseconfig().static_config;
//intf = (const struct CDDAinterface *)device->baseconfig().static_config;
info->stream = stream_create(device, 0, 2, 44100, info, cdda_update);

View File

@ -386,7 +386,7 @@ WRITE8_DEVICE_HANDLER( okim6376_w )
if (info->command != -1)
{
int temp = data >> 4, i, start;
unsigned char *base, *base_end;
unsigned char *base/*, *base_end*/;
/* FIX: Check if it's possible to start multiple voices at the same time */
@ -405,7 +405,7 @@ WRITE8_DEVICE_HANDLER( okim6376_w )
/* determine the start position, max address space is 16Mbit */
base = &info->region_base[info->command * 4];
base_end = &info->region_base[(MAX_WORDS+1) * 4];
//base_end = &info->region_base[(MAX_WORDS+1) * 4];
start = ((base[0] << 16) + (base[1] << 8) + base[2]) & 0x1fffff;
if (start == 0)

View File

@ -552,13 +552,13 @@ static void s14001a_clock(S14001AChip *chip) /* called once per clock */
static STREAM_UPDATE( s14001a_pcm_update )
{
INT32 mix[48000];
INT32 *mixp;
//INT32 *mixp;
S14001AChip *chip = (S14001AChip *)param;
int i;
memset(mix, 0, sizeof(mix));
mixp = &mix[0];
//mixp = &mix[0];
for (i = 0; i < samples; i++)
{
s14001a_clock(chip);

View File

@ -1106,7 +1106,7 @@ static STREAM_UPDATE( sp0256_update )
sp0256_state *sp = (sp0256_state *)param;
stream_sample_t *output = outputs[0];
int output_index = 0;
int length, did_samp, old_idx;
int length, did_samp/*, old_idx*/;
while( output_index < samples )
{
@ -1137,7 +1137,7 @@ static STREAM_UPDATE( sp0256_update )
/* repeat count holds up and we have room in our scratch buffer. */
/* ---------------------------------------------------------------- */
did_samp = 0;
old_idx = sp->sc_head;
//old_idx = sp->sc_head;
if (length > 0) do
{
int do_samp;

View File

@ -1225,11 +1225,11 @@ static void ymf271_write_fm(YMF271Chip *chip, int grp, int adr, int data)
int slotnum;
int slot_group;
int sync_mode, sync_reg;
YMF271Slot *slot;
//YMF271Slot *slot;
slotnum = 12*grp;
slotnum += fm_tab[adr & 0xf];
slot = &chip->slots[slotnum];
//slot = &chip->slots[slotnum];
slot_group = fm_tab[adr & 0xf];
reg = (adr >> 4) & 0xf;

View File

@ -3123,7 +3123,7 @@ static void menu_crosshair(running_machine *machine, ui_menu *menu, void *parame
crosshair_user_settings settings;
crosshair_item_data *data = (crosshair_item_data *)event->itemref;
int changed = FALSE;
int set_def = FALSE;
//int set_def = FALSE;
int newval = data->cur;
/* retreive the user settings */
@ -3134,7 +3134,7 @@ static void menu_crosshair(running_machine *machine, ui_menu *menu, void *parame
/* if selected, reset to default value */
case IPT_UI_SELECT:
newval = data->defvalue;
set_def = TRUE;
//set_def = TRUE;
break;
/* left decrements */

View File

@ -1349,7 +1349,7 @@ error:
static avi_error extract_movie_info(avi_file *file)
{
avi_stream *audiostream;
//avi_stream *audiostream;
avi_stream *stream;
/* get the video stream */
@ -1380,7 +1380,7 @@ static avi_error extract_movie_info(avi_file *file)
}
/* now make sure all other audio streams are valid */
audiostream = stream;
//audiostream = stream;
while (1)
{
/* get the stream info */

View File

@ -1560,7 +1560,7 @@ INLINE void counter_update_count(int which)
static READ16_HANDLER( pit8254_r )
{
struct counter_state *ctr;
//struct counter_state *ctr;
int which = offset / 0x40;
int reg = offset & 3;
@ -1572,7 +1572,7 @@ static READ16_HANDLER( pit8254_r )
case 2:
/* warning: assumes LSB/MSB addressing and no latching! */
which = (which * 3) + reg;
ctr = &counter[which];
//ctr = &counter[which];
/* update the count */
counter_update_count(which);

View File

@ -72,7 +72,9 @@ if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n");
WRITE8_DEVICE_HANDLER( turbo_sound_a_w )
{
#if (!DISCRETE_TEST)
running_device *samples = devtag_get_device(device->machine, "samples");
#endif
turbo_state *state = (turbo_state *)device->machine->driver_data;
UINT8 diff = data ^ state->sound_state[0];
state->sound_state[0] = data;

View File

@ -214,7 +214,7 @@ INLINE void update_engine (int eng[4])
static STREAM_UPDATE( tx1_stream_update )
{
UINT32 step_0, step_1, step_2;
double gain_0, gain_1, gain_2, gain_3;
double /*gain_0, gain_1,*/ gain_2, gain_3;
stream_sample_t *fl = &outputs[0][0];
stream_sample_t *fr = &outputs[1][0];
@ -232,8 +232,8 @@ static STREAM_UPDATE( tx1_stream_update )
step_1 = pit8253.counts[1].val ? (TX1_PIT_CLOCK / pit8253.counts[1].val) * freq_to_step : 0;
step_2 = pit8253.counts[2].val ? (TX1_PIT_CLOCK / pit8253.counts[2].val) * freq_to_step : 0;
gain_0 = tx1_engine_gains[ay_outputa & 0xf];
gain_1 = tx1_engine_gains[ay_outputa >> 4];
//gain_0 = tx1_engine_gains[ay_outputa & 0xf];
//gain_1 = tx1_engine_gains[ay_outputa >> 4];
gain_2 = tx1_engine_gains[ay_outputb & 0xf];
gain_3 = BIT(ay_outputb, 5) ? 1.0f : 1.5f;

View File

@ -493,9 +493,9 @@ MACHINE_DRIVER_END
static DRIVER_INIT(hitpoker)
{
#if 1
UINT8 *ROM = memory_region(machine, "maincpu");
#if 1
ROM[0x1220] = 0x01; //patch eeprom write?
ROM[0x1221] = 0x01;
ROM[0x1222] = 0x01;

View File

@ -1264,7 +1264,7 @@ static DRIVER_INIT( kram3 )
{
const address_space *mainspace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
const address_space *videospace = cputag_get_address_space(machine, "videocpu", ADDRESS_SPACE_PROGRAM);
const UINT8 *patch;
//const UINT8 *patch;
UINT8 *rom, *decrypted;
int i;
@ -1283,7 +1283,7 @@ static DRIVER_INIT( kram3 )
********************************/
i = 0;
patch = memory_region(machine, "user1");
//patch = memory_region(machine, "user1");
rom = memory_region(machine, "maincpu");
decrypted = auto_alloc_array(machine, UINT8, 0x6000);
@ -1296,7 +1296,7 @@ static DRIVER_INIT( kram3 )
}
i = 0;
patch = memory_region(machine, "user2");
//patch = memory_region(machine, "user2");
rom = memory_region(machine, "videocpu");
decrypted = auto_alloc_array(machine, UINT8, 0x6000);

View File

@ -1557,7 +1557,7 @@ void stvcd_exit(running_machine* machine)
static void cd_readTOC(void)
{
int i, ntrks, toclen, tocptr, fad;
int i, ntrks, /*toclen, */tocptr, fad;
xfertype = XFERTYPE_TOC;
xfercount = 0;
@ -1571,7 +1571,7 @@ static void cd_readTOC(void)
ntrks = 0;
}
toclen = (4 * ntrks); // toclen header entry
//toclen = (4 * ntrks); // toclen header entry
// data format for Saturn TOC:
// no header.
@ -1822,9 +1822,9 @@ static void cd_playdata(void)
if (cdrom)
{
partitionT *playpart;
//partitionT *playpart;
playpart = cd_read_filtered_sector(cd_curfad);
/*playpart = */cd_read_filtered_sector(cd_curfad);
cd_curfad++;
fadstoplay--;

View File

@ -1761,7 +1761,7 @@ void cps1_get_video_base( running_machine *machine )
state->stars_enabled[0] = layercontrol & state->game_config->layer_enable_mask[3];
state->stars_enabled[1] = layercontrol & state->game_config->layer_enable_mask[4];
#ifdef MAME_DEBUG
{
int enablemask = 0;
@ -1774,24 +1774,20 @@ void cps1_get_video_base( running_machine *machine )
if (state->game_config->layer_enable_mask[1] == state->game_config->layer_enable_mask[2])
enablemask = state->game_config->layer_enable_mask[1];
#ifdef MAME_DEBUG
if (enablemask)
{
if (((layercontrol & enablemask) && (layercontrol & enablemask) != enablemask))
popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f);
}
#endif
enablemask = state->game_config->layer_enable_mask[0] | state->game_config->layer_enable_mask[1]
| state->game_config->layer_enable_mask[2]
| state->game_config->layer_enable_mask[3] | state->game_config->layer_enable_mask[4];
#ifdef MAME_DEBUG
if (((layercontrol & ~enablemask) & 0x003e) != 0)
popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f);
#endif
}
#endif
}

View File

@ -10383,18 +10383,18 @@ WRITE32_DEVICE_HANDLER( k001604_tile_w )
{
k001604_state *k001604 = k001604_get_safe_token(device);
int x, y;
int x/*, y*/;
COMBINE_DATA(k001604->tile_ram + offset);
if (k001604->layer_size)
{
x = offset & 0xff;
y = offset / 256;
/*y = offset / 256;*/
}
else
{
x = offset & 0x7f;
y = offset / 128;
/*y = offset / 128;*/
}
if (k001604->layer_size)

View File

@ -380,6 +380,7 @@ static void copy_screen(bitmap_t *bitmap, const rectangle *cliprect)
VIDEO_UPDATE( model3 )
{
/*
int layer_scroll_x[4], layer_scroll_y[4];
UINT32 layer_data[4];
@ -395,7 +396,7 @@ VIDEO_UPDATE( model3 )
layer_scroll_y[2] = (layer_data[2] & 0x8000) ? (layer_data[2] & 0x1ff) : -(layer_data[2] & 0x1ff);
layer_scroll_x[3] = (layer_data[3] & 0x8000) ? (layer_data[3] & 0x1ff) : -(layer_data[3] & 0x1ff);
layer_scroll_y[3] = (layer_data[3] & 0x8000) ? (layer_data[3] & 0x1ff) : -(layer_data[3] & 0x1ff);
*/
screen_clip = (rectangle*)cliprect;
clip3d.min_x = cliprect->min_x;
@ -1454,7 +1455,7 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address)
{
const UINT32 *node = get_memory_pointer(address);
UINT32 link_address;
float viewport_left, viewport_right, viewport_top, viewport_bottom;
float /*viewport_left, viewport_right, */viewport_top, viewport_bottom;
float /*fov_x,*/ fov_y;
link_address = node[1];
@ -1477,8 +1478,8 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address)
viewport_region_height = ((node[20] >> 16) & 0xffff) >> 2;
/* frustum plane angles */
viewport_left = RADIAN_TO_DEGREE(asin(*(float *)&node[12]));
viewport_right = RADIAN_TO_DEGREE(asin(*(float *)&node[16]));
//viewport_left = RADIAN_TO_DEGREE(asin(*(float *)&node[12]));
//viewport_right = RADIAN_TO_DEGREE(asin(*(float *)&node[16]));
viewport_top = RADIAN_TO_DEGREE(asin(*(float *)&node[14]));
viewport_bottom = RADIAN_TO_DEGREE(asin(*(float *)&node[18]));

View File

@ -1672,7 +1672,7 @@ static void stv_vpd1_draw_scaled_sprite(running_machine *machine, const rectangl
static void stv_vpd1_draw_normal_sprite(running_machine *machine, const rectangle *cliprect, int sprite_type)
{
UINT16 *destline;
//UINT16 *destline;
int y, ysize, drawypos;
int x, xsize, drawxpos;
@ -1745,7 +1745,7 @@ static void stv_vpd1_draw_normal_sprite(running_machine *machine, const rectangl
maxdrawxpos = MIN(x+xsize-1,cliprect->max_x);
for (drawypos = y; drawypos <= maxdrawypos; drawypos++ )
{
destline = stv_framebuffer_draw_lines[drawypos];
//destline = stv_framebuffer_draw_lines[drawypos];
su = u;
for (drawxpos = x; drawxpos <= maxdrawxpos; drawxpos++ )
{

View File

@ -2850,8 +2850,8 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
//popmessage("%04x",STV_VDP2_SCRCTL);
int xsize = 0, xsizemask = 0;
int ysize = 0, ysizemask = 0;
int xlinesize = 0, xpixelsize = 0;
int ysize = 0/*, ysizemask = 0*/;
int xlinesize = 0/*, xpixelsize = 0*/;
int xcnt,ycnt;
UINT8* gfxdata = stv_vdp2_gfx_decode;
static UINT16 *destline;
@ -2872,14 +2872,14 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
case 3: xsize=1024; ysize=512; break;
}
xsizemask = xsize - 1;
ysizemask = ysize - 1;
/*ysizemask = ysize - 1;*/
switch( stv2_current_tilemap.colour_depth )
{
case 0: xlinesize = xsize / 2; xpixelsize = 0; break;
case 1: xlinesize = xsize; xpixelsize = 1; break;
case 2: case 3: xlinesize = xsize * 2; xpixelsize = 2; break;
case 4: xlinesize = xsize * 4; xpixelsize = 4; break;
case 0: xlinesize = xsize / 2; /*xpixelsize = 0;*/ break;
case 1: xlinesize = xsize; /*xpixelsize = 1;*/ break;
case 2: case 3: xlinesize = xsize * 2; /*xpixelsize = 2;*/ break;
case 4: xlinesize = xsize * 4; /*xpixelsize = 4;*/ break;
}
if(stv2_current_tilemap.colour_depth == 0)
@ -3360,7 +3360,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm
/* Plane Variables */
int pltiles_x, plpixels_x;
int pltiles_y, plpixels_y;
int plsize_bytes, plsize_dwords;
int plsize_bytes/*, plsize_dwords*/;
/* Map Variables */
int mptiles_x, mppixels_x;
@ -3559,7 +3559,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm
stv2_current_tilemap.scrolly &= mppixels_y-1;
pgsize_dwords = pgsize_bytes /4;
plsize_dwords = plsize_bytes /4;
//plsize_dwords = plsize_bytes /4;
mpsize_dwords = mpsize_bytes /4;
// if (stv2_current_tilemap.layer_name==3) popmessage ("well this is a bit %08x", stv2_current_tilemap.map_offset[0]);

View File

@ -121,7 +121,7 @@ WRITE16_HANDLER( sys16_paletteram_w )
/* sBGR BBBB GGGG RRRR */
/* x000 4321 4321 4321 */
{
int r, g, b, rs, gs, bs, rh, gh, bh;
int r, g, b, rs, gs, bs/*, rh, gh, bh*/;
int r0 = (newword >> 12) & 1;
int r1 = (newword >> 0) & 1;
int r2 = (newword >> 1) & 1;
@ -149,9 +149,9 @@ WRITE16_HANDLER( sys16_paletteram_w )
bs = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 0);
/* Highlight colors */
rh = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 1);
gh = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 1);
bh = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 1);
//rh = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 1);
//gh = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 1);
//bh = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 1);
palette_set_color(space->machine, offset, MAKE_RGB(r, g, b) );

View File

@ -2922,7 +2922,7 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_
const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
const int min_x=visarea->min_x,max_x=visarea->max_x;
const int min_y=visarea->min_y,max_y=visarea->max_y;
int offs,spritecont,flipx,flipy,old_x,color,x,y;
int offs,spritecont,flipx,flipy,/*old_x,*/color,x,y;
int sprite,global_x=0,global_y=0,subglobal_x=0,subglobal_y=0;
int block_x=0, block_y=0;
int last_color=0,last_x=0,last_y=0,block_zoom_x=0,block_zoom_y=0;
@ -2939,7 +2939,7 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_
color=0;
flipx=flipy=0;
old_x=0;
//old_x=0;
y=x=0;
sprite_top=0x1000;

View File

@ -124,7 +124,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_
{
FILE *infile;
int i, numtracks;
int chdpos=0;
//int chdpos=0;
infile = fopen(tocfname, "rt");
@ -212,7 +212,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_
hunks = (outtoc->tracks[trknum].frames+CD_FRAMES_PER_HUNK - 1) / CD_FRAMES_PER_HUNK;
outtoc->tracks[trknum].extraframes = hunks * CD_FRAMES_PER_HUNK - outtoc->tracks[trknum].frames;
chdpos+=outtoc->tracks[trknum].frames+outtoc->tracks[trknum].extraframes;
//chdpos+=outtoc->tracks[trknum].frames+outtoc->tracks[trknum].extraframes;
}
/*