mirror of
https://github.com/holub/mame
synced 2025-05-31 01:51:46 +03:00
Naomi: work-around for an int32 overflow bug in the renderer, makes The House of the Dead 2 / The Typing of the Dead to not crash during attract mode [Angelo Salese]
This commit is contained in:
parent
b5fac5bcba
commit
6948662d63
@ -1810,6 +1810,9 @@ static void render_span(bitmap_t *bitmap, texinfo *ti,
|
||||
yy0 = round(y0);
|
||||
yy1 = round(y1);
|
||||
|
||||
if((yy0 < 0 && y0 > 0) || (yy1 < 0 && y1 > 0)) //temp handling of int32 overflow, needed by hotd2/totd
|
||||
return;
|
||||
|
||||
dy = yy0+0.5-y0;
|
||||
|
||||
if(0)
|
||||
@ -1927,6 +1930,7 @@ static void render_tri_sorted(bitmap_t *bitmap, texinfo *ti, const vert *v0, con
|
||||
v1->x, v0->x + dx02dy*dy01, v1->u, v0->u + du02dy*dy01, v1->v, v0->v + dv02dy*dy01, v1->w, v0->w + dw02dy*dy01,
|
||||
dx12dy, dx02dy, du12dy, du02dy, dv12dy, dv02dy, dw12dy, dw02dy);
|
||||
} else {
|
||||
|
||||
render_span(bitmap, ti, v0->y, v1->y,
|
||||
v0->x, v0->x, v0->u, v0->u, v0->v, v0->v, v0->w, v0->w,
|
||||
dx02dy, dx01dy, du02dy, du01dy, dv02dy, dv01dy, dw02dy, dw01dy);
|
||||
|
Loading…
Reference in New Issue
Block a user