A lot of cleanaps, got rid of all warnings with -Wall;
The makefile now uses -Wall.
This commit is contained in:
@@ -180,17 +180,15 @@ void ega_jega_render_blit_text(ega_t *ega, int x, int dl, int start, int width,
|
||||
|
||||
void ega_render_text_jega(ega_t *ega, int drawcursor)
|
||||
{
|
||||
int x_add = (enable_overscan) ? 8 : 0;
|
||||
int dl = ega_display_line(ega);
|
||||
uint8_t chr, attr;
|
||||
uint16_t dat, dat2;
|
||||
uint32_t charaddr;
|
||||
int x, xx;
|
||||
uint32_t fg, bg;
|
||||
uint16_t dat = 0, dat2;
|
||||
int x;
|
||||
uint32_t fg = 0, bg = 0;
|
||||
|
||||
/* Temporary for DBCS. */
|
||||
unsigned int chr_left;
|
||||
unsigned int bsattr;
|
||||
unsigned int chr_left = 0;
|
||||
unsigned int bsattr = 0;
|
||||
int chr_wide = 0;
|
||||
uint32_t bg_ex = 0;
|
||||
uint32_t fg_ex = 0;
|
||||
@@ -208,7 +206,7 @@ void ega_render_text_jega(ega_t *ega, int drawcursor)
|
||||
chr = ega->vram[(ega->ma << 1) & ega->vrammask];
|
||||
attr = ega->vram[((ega->ma << 1) + 1) & ega->vrammask];
|
||||
|
||||
if (chr_wide = 0)
|
||||
if (chr_wide == 0)
|
||||
{
|
||||
if (ega->RMOD2 & 0x80)
|
||||
{
|
||||
|
||||
@@ -212,7 +212,6 @@ uint8_t et4000w32p_in(uint16_t addr, void *p)
|
||||
{
|
||||
et4000w32p_t *et4000 = (et4000w32p_t *)p;
|
||||
svga_t *svga = &et4000->svga;
|
||||
uint8_t temp;
|
||||
|
||||
if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(svga->miscout & 1))
|
||||
addr ^= 0x60;
|
||||
|
||||
@@ -1464,7 +1464,7 @@ uint8_t s3_accel_read(uint32_t addr, void *p)
|
||||
void s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, s3_t *s3)
|
||||
{
|
||||
svga_t *svga = &s3->svga;
|
||||
uint32_t src_dat, dest_dat;
|
||||
uint32_t src_dat = 0, dest_dat;
|
||||
int frgd_mix, bkgd_mix;
|
||||
int clip_t = s3->accel.multifunc[1] & 0xfff;
|
||||
int clip_l = s3->accel.multifunc[2] & 0xfff;
|
||||
|
||||
@@ -22,10 +22,10 @@ static int reg_writes = 0, reg_reads = 0;
|
||||
|
||||
static int dither[4][4] =
|
||||
{
|
||||
0, 4, 1, 5,
|
||||
6, 2, 7, 3,
|
||||
1, 5, 0, 4,
|
||||
7, 3, 6, 2,
|
||||
{0, 4, 1, 5},
|
||||
{6, 2, 7, 3},
|
||||
{1, 5, 0, 4},
|
||||
{7, 3, 6, 2},
|
||||
};
|
||||
|
||||
#define RB_SIZE 256
|
||||
|
||||
@@ -511,15 +511,20 @@ void svga_render_2bpp_highres(svga_t *svga)
|
||||
|
||||
void svga_render_4bpp_lowres(svga_t *svga)
|
||||
{
|
||||
int x;
|
||||
int y_add = (enable_overscan) ? 16 : 0;
|
||||
int x_add = y_add >> 1;
|
||||
int dl = svga_display_line(svga);
|
||||
int offset;
|
||||
uint32_t *p;
|
||||
uint32_t *r, *q;
|
||||
uint8_t edat[4];
|
||||
uint8_t dat;
|
||||
|
||||
if (svga->changedvram[svga->ma >> 12] || svga->changedvram[(svga->ma >> 12) + 1] || svga->fullchange)
|
||||
{
|
||||
int x;
|
||||
int offset = ((8 - svga->scrollcache) << 1) + 16;
|
||||
uint32_t *p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||
offset = ((8 - svga->scrollcache) << 1) + 16;
|
||||
p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
@@ -527,10 +532,9 @@ void svga_render_4bpp_lowres(svga_t *svga)
|
||||
|
||||
for (x = 0; x <= svga->hdisp; x += 16)
|
||||
{
|
||||
uint8_t edat[4];
|
||||
uint8_t dat;
|
||||
|
||||
*(uint32_t *)(&edat[0]) = *(uint32_t *)(&svga->vram[svga->ma]);
|
||||
r = (uint32_t *)(&edat[0]);
|
||||
q = (uint32_t *)(&svga->vram[svga->ma]);
|
||||
*r = *q;
|
||||
svga->ma += 4;
|
||||
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||
|
||||
@@ -559,6 +563,12 @@ void svga_render_4bpp_highres(svga_t *svga)
|
||||
int y_add = (enable_overscan) ? 16 : 0;
|
||||
int x_add = y_add >> 1;
|
||||
int dl = svga_display_line(svga);
|
||||
int x;
|
||||
int offset;
|
||||
uint32_t *p;
|
||||
uint8_t edat[4];
|
||||
uint8_t dat;
|
||||
uint32_t *r, *q;
|
||||
|
||||
if (svga->sc & 1 && !(svga->crtc[0x17] & 1))
|
||||
changed_offset = svga_mask_addr(svga->ma | 0x8000, svga) >> 12;
|
||||
@@ -572,9 +582,8 @@ void svga_render_4bpp_highres(svga_t *svga)
|
||||
|
||||
if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset2] || svga->fullchange)
|
||||
{
|
||||
int x;
|
||||
int offset = (8 - svga->scrollcache) + 24;
|
||||
uint32_t *p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||
offset = (8 - svga->scrollcache) + 24;
|
||||
p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
@@ -582,13 +591,12 @@ void svga_render_4bpp_highres(svga_t *svga)
|
||||
|
||||
for (x = 0; x <= svga->hdisp; x += 8)
|
||||
{
|
||||
uint8_t edat[4];
|
||||
uint8_t dat;
|
||||
|
||||
if (svga->sc & 1 && !(svga->crtc[0x17] & 1))
|
||||
*(uint32_t *)(&edat[0]) = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma | 0x8000, svga)]);
|
||||
r = (uint32_t *)(&edat[0]);
|
||||
if (svga->sc & 1 && !(svga->crtc[0x17] & 1))
|
||||
q = (uint32_t *)(&svga->vram[svga_mask_addr(svga->ma | 0x8000, svga)]);
|
||||
else
|
||||
*(uint32_t *)(&edat[0]) = *(uint32_t *)(&svga->vram[svga->ma]);
|
||||
q = (uint32_t *)(&svga->vram[svga->ma]);
|
||||
*r = *q;
|
||||
svga->ma += 4;
|
||||
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||
|
||||
|
||||
@@ -759,10 +759,14 @@ static inline void voodoo_generate(uint8_t *code_block, voodoo_t *voodoo, voodoo
|
||||
addbyte(0x47);
|
||||
addbyte(0xc3);
|
||||
|
||||
if (depth_jump_pos)
|
||||
*(uint8_t *)&code_block[depth_jump_pos] = (block_pos - depth_jump_pos) - 1;
|
||||
if (depth_jump_pos)
|
||||
*(uint8_t *)&code_block[depth_jump_pos2] = (block_pos - depth_jump_pos2) - 1;
|
||||
if (depth_jump_pos)
|
||||
{
|
||||
*(uint8_t *)&code_block[depth_jump_pos] = (block_pos - depth_jump_pos) - 1;
|
||||
}
|
||||
if (depth_jump_pos2)
|
||||
{
|
||||
*(uint8_t *)&code_block[depth_jump_pos2] = (block_pos - depth_jump_pos2) - 1;
|
||||
}
|
||||
|
||||
if ((params->fogMode & (FOG_ENABLE|FOG_CONSTANT|FOG_Z|FOG_ALPHA)) == FOG_ENABLE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user