trying to sync rc1

parent dd63b94a
......@@ -4405,7 +4405,7 @@ void config_check_vsync (void)
cnt--;
if (config_changed) {
// if (config_changed == 1)
// write_log (L"* configuration check trigger\n");
// write_log ("* configuration check trigger\n");
config_changed++;
if (config_changed > 10)
config_changed = 0;
......
......@@ -1969,7 +1969,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
{
case LINE_REMEMBERED_AS_PREVIOUS:
// if (!warned) // happens when program messes up with VPOSW
// write_log (L"Shouldn't get here... this is a bug.\n"), warned++;
// write_log ("Shouldn't get here... this is a bug.\n"), warned++;
return;
case LINE_BLACK:
......
......@@ -63,9 +63,9 @@ static struct uniq_head *find_uniq (uniq_list *a, uae_u32 uniq)
{
struct uniq_head *b = a->head;
while (b && b->uniq != uniq)
b = b->next;
b = b->next;
if (!b)
write_log ("Couldn't find structure. Bad\n");
write_log ("Couldn't find structure. Bad\n");
return b;
}
......@@ -73,12 +73,12 @@ static struct uniq_head *find_and_rem_uniq (uniq_list *a, uae_u32 uniq)
{
struct uniq_head **b = &a->head, *c;
while (*b && (*b)->uniq != uniq)
b = &(*b)->next;
b = &(*b)->next;
c = *b;
if (!c)
write_log ("Couldn't find structure. Bad\n");
write_log ("Couldn't find structure. Bad\n");
else
*b = c->next;
*b = c->next;
return c;
}
......@@ -87,7 +87,7 @@ static void add_uniq (uniq_list *a, struct uniq_head *item, uaecptr amem)
item->uniq = a->uniq++;
put_long (amem, item->uniq);
if (a->uniq == 0)
a->uniq++;
a->uniq++;
item->next = a->head;
a->head = item;
}
......@@ -131,7 +131,7 @@ static int GFX_PointInRectangle(uaecptr rect, int x, int y)
uae_s16 maxy = get_word (rect+6);
if (x < minx || x > maxx || y < miny || y > maxy)
return 0;
return 0;
return 1;
}
......@@ -164,7 +164,7 @@ static int GFX_Bitmap_WritePixel(uaecptr bitmap, int x, int y, uaecptr rp)
uae_u8 pen = drmd & 4 ? bgpen : fgpen;
if (x < 0 || y < 0 || x >= 8*bpr || y >= rows)
return -1;
return -1;
offs = y*bpr + (x & ~15)/8;
......
......@@ -477,7 +477,7 @@ void alloc_colors256 (allocfunc_type allocfunc)
free (map);
for (i = 0; i < 4096; i++)
xcolors[i] = xcolors[i] * 0x01010101;
xcolors[i] = xcolors[i] * 0x01010101;
}
/*
......@@ -502,22 +502,22 @@ void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc)
xcolnr *map;
for (i = 0; i < 4096; i++)
xcolors[i] = i << 16 | i;
xcolors[i] = i << 16 | i;
map = (xcolnr *)malloc (sizeof(xcolnr) * maxcol);
if (!map) {
write_log ("Not enough mem for colormap!\n");
abort();
write_log ("Not enough mem for colormap!\n");
abort();
}
/*
* set the colormap
*/
for (i = 0; i < maxcol; ++i) {
int c, result;
c = (15 * i + (maxcol-1)/2) / (maxcol - 1);
result = allocfunc(c, c, c, map + i);
/* @@@ check for errors */
int c, result;
c = (15 * i + (maxcol-1)/2) / (maxcol - 1);
result = allocfunc(c, c, c, map + i);
/* @@@ check for errors */
}
/*
......@@ -529,24 +529,21 @@ void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc)
for (r = 0; r<16; ++r) {
int g;
for (g = 0; g < 16; ++g) {
int b;
for (b = 0; b < 16; ++b) {
int b;
for (b = 0; b < 16; ++b) {
int rgb = (r << 8) | (g << 4) | b;
int c,p,q;
c = (77 * r +
151 * g +
28 * b) / 15; /* c in 0..256 */
c = (77 * r + 151 * g + 28 * b) / 15; /* c in 0..256 */
k = maxcol-1;
p = (c * k) / 256;
q = (c * k) % 256;
if (q /*/ k*/> d /*/ k*/ && p < k) ++p;
/* sam: ^^^^^^^ */
/* It seems that produces better output */
cidx[i][rgb + (j+4)*4096] =
cidx[i][rgb + j*4096] = (uae_u8)map[p];
}
cidx[i][rgb + (j+4)*4096] = cidx[i][rgb + j*4096] = (uae_u8)map[p];
}
}
}
}
......@@ -570,12 +567,12 @@ void setup_dither (int bits, allocfunc_type allocfunc)
map = (xcolnr *)malloc (sizeof(xcolnr) * maxcol);
if (!map) {
write_log ("Not enough mem for colormap!\n");
abort();
write_log ("Not enough mem for colormap!\n");
abort();
}
for (i = 0; i < 4096; i++)
xcolors[i] = i << 16 | i;
xcolors[i] = i << 16 | i;
/*
* compute #cols per components
......@@ -589,10 +586,10 @@ void setup_dither (int bits, allocfunc_type allocfunc)
nb_cols[BLU] = i;
if (nb_cols[RED]*(++i)*nb_cols[BLU] <= maxcol) {
nb_cols[GRN] = i;
if ((i)*nb_cols[GRN]*nb_cols[BLU] <= maxcol)
nb_cols[RED] = i;
}
nb_cols[GRN] = i;
if ((i)*nb_cols[GRN]*nb_cols[BLU] <= maxcol)
nb_cols[RED] = i;
}
redvals = (int *)malloc (sizeof(int) * maxcol);
grnvals = redvals + nb_cols[RED];
......@@ -633,39 +630,7 @@ void setup_dither (int bits, allocfunc_type allocfunc)
for (i = 0; i < 4; ++i) for (j = 0; j < 4; ++j) {
int d = dither[i][j];
int cr, cg, cb, k, q;
#if 0 /* Slightly different algorithm. Needs some tuning. */
int rederr = 0, grnerr = 0, bluerr = 0;
k = nb_cols[RED]-1;
cr = r * k / 15;
q = r * k - 15*cr;
if (cr < 0)
cr = 0;
else if (q / k > d / k && rederr <= 0)
++cr;
if (cr > k) cr = k;
rederr += redvals[cr]-r;
k = nb_cols[GRN]-1;
cg = g * k / 15;
q = g * k - 15*cg;
if (cg < 0)
cg = 0;
else if (q / k > d / k && grnerr <= 0)
++cg;
if (cg > k) cg = k;
grnerr += grnvals[cg]-g;
k = nb_cols[BLU]-1;
cb = b * k / 15;
q = b * k - 15*cb;
if (cb < 0)
cb = 0;
else if (q / k > d / k && bluerr <= 0)
++cb;
if (cb > k) cb = k;
bluerr += bluvals[cb]-b;
#else
k = nb_cols[RED]-1;
cr = r * k / 15;
q = r * k - 15*cr;
......@@ -692,7 +657,7 @@ void setup_dither (int bits, allocfunc_type allocfunc)
else if (q /*/ k*/ > d /*/ k*/)
++cb;
if (cb > k) cb = k;
#endif
cidx[i][rgb + (j+4)*4096] = cidx[i][rgb + j*4096] = (uae_u8)map[(cr*nb_cols[GRN]+cg)*nb_cols[BLU]+cb];
}
}
......
This diff is collapsed.
......@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccKkOe2m.o: In function `main':
/tmp/ccbgMYIz.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
configure:4350: $? = 1
......@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccZO2eLu.o: In function `main':
/tmp/ccc0XecR.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
configure:4364: $? = 1
......@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccmHyUSz.o: In function `main':
/tmp/ccfbSEaY.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
configure:4364: $? = 1
......
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