removed unpreaty line endings / beginnings

This commit is contained in:
Kirill Kranz 2024-10-18 17:33:06 +02:00
parent 192b8a8bff
commit 53df6927c5
7 changed files with 450 additions and 367 deletions

View File

@ -1018,7 +1018,7 @@ procedure setPolyGT4(var p: POLY_GT4);
procedure setSprt8(var p: SPRT_8); procedure setSprt8(var p: SPRT_8);
procedure setSprt16(var p: SPRT_16); procedure setSprt16(var p: SPRT_16);
procedure setSprt(var p: SPRT); procedure setSprt(var p: SPRT);
//procedure setTile1(var p: TILE_1); procedure setTile1(var p: TILE_1);
procedure setTile8(var p: TILE_8); procedure setTile8(var p: TILE_8);
procedure setTile16(var p: TILE_16); procedure setTile16(var p: TILE_16);
procedure setTile(var p: TILE); procedure setTile(var p: TILE);
@ -2077,68 +2077,79 @@ begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: LINE_G2); procedure dumpXY0(p: LINE_G2);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: LINE_F3); procedure dumpXY0(p: LINE_F3);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: LINE_G3); procedure dumpXY0(p: LINE_G3);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: LINE_F4); procedure dumpXY0(p: LINE_F4);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: LINE_G4); procedure dumpXY0(p: LINE_G4);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: SPRT); procedure dumpXY0(p: SPRT);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: SPRT_16); procedure dumpXY0(p: SPRT_16);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: SPRT_8); procedure dumpXY0(p: SPRT_8);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: TILE); procedure dumpXY0(p: TILE);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: TILE_16); procedure dumpXY0(p: TILE_16);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: TILE_8); procedure dumpXY0(p: TILE_8);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpXY0(p: TILE_1); procedure dumpXY0(p: TILE_1);
begin begin
GPU_printf('(%d,%d)\n', p.x0, p.y0); GPU_printf('(%d,%d)\n', p.x0, p.y0);
end; end;
procedure dumpUV0(p: POLY_FT3); procedure dumpUV0(p: POLY_FT3);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
@ -2150,101 +2161,121 @@ begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: POLY_GT3); procedure dumpUV0(p: POLY_GT3);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: POLY_GT4); procedure dumpUV0(p: POLY_GT4);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: SPRT); procedure dumpUV0(p: SPRT);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: SPRT_16); procedure dumpUV0(p: SPRT_16);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: SPRT_8); procedure dumpUV0(p: SPRT_8);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpUV0(p: TMD_PRIM); procedure dumpUV0(p: TMD_PRIM);
begin begin
GPU_printf('(%d,%d)\n', p.u0, p.v0); GPU_printf('(%d,%d)\n', p.u0, p.v0);
end; end;
procedure dumpXY2(p: POLY_F3); procedure dumpXY2(p: POLY_F3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_F4); procedure dumpXY2(p: POLY_F4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_FT3); procedure dumpXY2(p: POLY_FT3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_FT4); procedure dumpXY2(p: POLY_FT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_G3); procedure dumpXY2(p: POLY_G3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_G4); procedure dumpXY2(p: POLY_G4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_GT3); procedure dumpXY2(p: POLY_GT3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: POLY_GT4); procedure dumpXY2(p: POLY_GT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_F2); procedure dumpXY2(p: LINE_F2);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_G2); procedure dumpXY2(p: LINE_G2);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_F3); procedure dumpXY2(p: LINE_F3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_G3); procedure dumpXY2(p: LINE_G3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_F4); procedure dumpXY2(p: LINE_F4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
end; end;
procedure dumpXY2(p: LINE_G4); procedure dumpXY2(p: LINE_G4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1); GPU_printf('(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1);
@ -2298,26 +2329,31 @@ begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2);
end; end;
procedure dumpXY3(p: LINE_F3); procedure dumpXY3(p: LINE_F3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2);
end; end;
procedure dumpXY3(p: LINE_G3); procedure dumpXY3(p: LINE_G3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2);
end; end;
procedure dumpXY3(p: LINE_F4); procedure dumpXY3(p: LINE_F4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2);
end; end;
procedure dumpXY3(p: LINE_G4); procedure dumpXY3(p: LINE_G4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2);
end; end;
procedure dumpUV3(p: POLY_FT3); procedure dumpUV3(p: POLY_FT3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2);
@ -2329,16 +2365,19 @@ begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2);
end; end;
procedure dumpUV3(p: POLY_GT3); procedure dumpUV3(p: POLY_GT3);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2);
end; end;
procedure dumpUV3(p: POLY_GT4); procedure dumpUV3(p: POLY_GT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2);
end; end;
procedure dumpUV3(p: TMD_PRIM); procedure dumpUV3(p: TMD_PRIM);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2);
@ -2350,16 +2389,19 @@ begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3);
end; end;
procedure dumpXY4(p: POLY_FT4); procedure dumpXY4(p: POLY_FT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3);
end; end;
procedure dumpXY4(p: POLY_G4); procedure dumpXY4(p: POLY_G4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3);
end; end;
procedure dumpXY4(p: POLY_GT4); procedure dumpXY4(p: POLY_GT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.x0, p.y0, p.x1, p.y1, p.x2, p.y2, p.x3, p.y3);
@ -2371,11 +2413,13 @@ begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3);
end; end;
procedure dumpUV4(p: POLY_GT4); procedure dumpUV4(p: POLY_GT4);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3);
end; end;
procedure dumpUV4(p: TMD_PRIM); procedure dumpUV4(p: TMD_PRIM);
begin begin
GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3); GPU_printf('(%d,%d)-(%d,%d)-(%d,%d)-(%d,%d)\n', p.u0, p.v0, p.u1, p.v1, p.u2, p.v2, p.u3, p.v3);
@ -2387,41 +2431,49 @@ begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_F4); procedure dumpRGB0(p: POLY_F4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_FT3); procedure dumpRGB0(p: POLY_FT3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_FT4); procedure dumpRGB0(p: POLY_FT4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_G3); procedure dumpRGB0(p: POLY_G3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_G4); procedure dumpRGB0(p: POLY_G4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_GT3); procedure dumpRGB0(p: POLY_GT3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: POLY_GT4); procedure dumpRGB0(p: POLY_GT4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
end; end;
procedure dumpRGB0(p: DRAWENV); procedure dumpRGB0(p: DRAWENV);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0); GPU_printf('(%3d,%3d,%3d)\n', p.r0, p.g0, p.b0);
@ -2433,36 +2485,43 @@ begin
GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1); GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1);
end; end;
procedure dumpRGB1(p:POLY_G4); procedure dumpRGB1(p:POLY_G4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1); GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1);
end; end;
procedure dumpRGB1(p:POLY_GT3); procedure dumpRGB1(p:POLY_GT3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1); GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1);
end; end;
procedure dumpRGB1(p:POLY_GT4); procedure dumpRGB1(p:POLY_GT4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1); GPU_printf('(%3d,%3d,%3d)\n', p.r1, p.g1, p.b1);
end; end;
procedure dumpRGB2(p: POLY_G3); procedure dumpRGB2(p: POLY_G3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2); GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2);
end; end;
procedure dumpRGB2(p: POLY_G4); procedure dumpRGB2(p: POLY_G4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2); GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2);
end; end;
procedure dumpRGB2(p: POLY_GT3); procedure dumpRGB2(p: POLY_GT3);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2); GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2);
end; end;
procedure dumpRGB2(p: POLY_GT4); procedure dumpRGB2(p: POLY_GT4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2); GPU_printf('(%3d,%3d,%3d)\n', p.r2, p.g2, p.b2);
@ -2474,13 +2533,13 @@ begin
GPU_printf('(%3d,%3d,%3d)\n', p.r3, p.g3, p.b3); GPU_printf('(%3d,%3d,%3d)\n', p.r3, p.g3, p.b3);
end; end;
procedure dumpRGB3(p: POLY_GT4); procedure dumpRGB3(p: POLY_GT4);
begin begin
GPU_printf('(%3d,%3d,%3d)\n', p.r3, p.g3, p.b3); GPU_printf('(%3d,%3d,%3d)\n', p.r3, p.g3, p.b3);
end; end;
procedure setTPage(var p: DRAWENV; tp, abr, x, y: longint); procedure setTPage(var p: DRAWENV; tp, abr, x, y: longint);
begin begin
p.tpage:= GetTPage(tp, abr, x, y); p.tpage:= GetTPage(tp, abr, x, y);
@ -2522,59 +2581,61 @@ begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: POLY_FT4; x, y: longint); procedure setClut(var p: POLY_FT4; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: POLY_GT3; x, y: longint); procedure setClut(var p: POLY_GT3; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: POLY_GT4; x, y: longint); procedure setClut(var p: POLY_GT4; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: SPRT; x, y: longint); procedure setClut(var p: SPRT; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: SPRT_16; x, y: longint); procedure setClut(var p: SPRT_16; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: SPRT_8; x, y: longint); procedure setClut(var p: SPRT_8; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure setClut(var p: TMD_PRIM; x, y: longint); procedure setClut(var p: TMD_PRIM; x, y: longint);
begin begin
p.clut:= getClut(x, y); p.clut:= getClut(x, y);
end; end;
procedure dumpRECT(r: RECT); procedure dumpRECT(r: RECT);
begin begin
GPU_printf('(%d,%d)-(%d,%d)\n', r.x, r.y, r.w, r.h); GPU_printf('(%d,%d)-(%d,%d)\n', r.x, r.y, r.w, r.h);
end; end;
procedure setlen(var p: P_TAG; const len: byte); procedure setlen(var p: P_TAG; const len: byte);
begin begin
p.len:= len; p.len:= len;
end; end;
procedure setlen(var p: POLY_F3; const len: byte); procedure setlen(var p: POLY_F3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2582,6 +2643,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_FT3; const len: byte); procedure setlen(var p: POLY_FT3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2589,6 +2651,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_G3; const len: byte); procedure setlen(var p: POLY_G3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2596,6 +2659,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_GT3; const len: byte); procedure setlen(var p: POLY_GT3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2603,6 +2667,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_F4; const len: byte); procedure setlen(var p: POLY_F4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2610,6 +2675,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_FT4; const len: byte); procedure setlen(var p: POLY_FT4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2617,6 +2683,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_G4; const len: byte); procedure setlen(var p: POLY_G4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2624,6 +2691,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: POLY_GT4; const len: byte); procedure setlen(var p: POLY_GT4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2631,6 +2699,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: SPRT_8; const len: byte); procedure setlen(var p: SPRT_8; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2638,6 +2707,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: SPRT_16; const len: byte); procedure setlen(var p: SPRT_16; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2645,6 +2715,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: SPRT; const len: byte); procedure setlen(var p: SPRT; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2652,6 +2723,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: TILE_1; const len: byte); procedure setlen(var p: TILE_1; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2659,6 +2731,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: TILE_8; const len: byte); procedure setlen(var p: TILE_8; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2666,6 +2739,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: TILE_16; const len: byte); procedure setlen(var p: TILE_16; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2673,6 +2747,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: TILE; const len: byte); procedure setlen(var p: TILE; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2680,6 +2755,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_F2; const len: byte); procedure setlen(var p: LINE_F2; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2687,6 +2763,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_G2; const len: byte); procedure setlen(var p: LINE_G2; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2694,6 +2771,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_F3; const len: byte); procedure setlen(var p: LINE_F3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2701,6 +2779,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_G3; const len: byte); procedure setlen(var p: LINE_G3; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2708,6 +2787,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_F4; const len: byte); procedure setlen(var p: LINE_F4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2715,6 +2795,7 @@ begin
x^.len:= len; x^.len:= len;
end; end;
procedure setlen(var p: LINE_G4; const len: byte); procedure setlen(var p: LINE_G4; const len: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2723,16 +2804,12 @@ begin
end; end;
procedure setaddr(var p: P_TAG; const addr: dword); procedure setaddr(var p: P_TAG; const addr: dword);
begin begin
p.addr:= addr; p.addr:= addr;
end; end;
procedure setcode(var p: P_TAG; const code: byte); procedure setcode(var p: P_TAG; const code: byte);
begin begin
p.code:= code; p.code:= code;
@ -2746,6 +2823,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_FT3; const code: byte); procedure setcode(var p: POLY_FT3; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2753,6 +2831,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_G3; const code: byte); procedure setcode(var p: POLY_G3; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2760,6 +2839,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_GT3; const code: byte); procedure setcode(var p: POLY_GT3; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2767,6 +2847,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_F4; const code: byte); procedure setcode(var p: POLY_F4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2774,6 +2855,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_FT4; const code: byte); procedure setcode(var p: POLY_FT4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2781,6 +2863,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_G4; const code: byte); procedure setcode(var p: POLY_G4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2788,6 +2871,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: POLY_GT4; const code: byte); procedure setcode(var p: POLY_GT4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2795,6 +2879,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: SPRT_8; const code: byte); procedure setcode(var p: SPRT_8; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2802,6 +2887,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: SPRT_16; const code: byte); procedure setcode(var p: SPRT_16; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2809,6 +2895,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: SPRT; const code: byte); procedure setcode(var p: SPRT; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2816,6 +2903,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: TILE_1; const code: byte); procedure setcode(var p: TILE_1; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2823,6 +2911,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: TILE_8; const code: byte); procedure setcode(var p: TILE_8; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2830,6 +2919,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: TILE_16; const code: byte); procedure setcode(var p: TILE_16; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2837,6 +2927,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: TILE; const code: byte); procedure setcode(var p: TILE; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2844,6 +2935,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_F2; const code: byte); procedure setcode(var p: LINE_F2; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2851,6 +2943,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_G2; const code: byte); procedure setcode(var p: LINE_G2; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2858,6 +2951,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_F3; const code: byte); procedure setcode(var p: LINE_F3; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2865,6 +2959,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_G3; const code: byte); procedure setcode(var p: LINE_G3; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2872,6 +2967,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_F4; const code: byte); procedure setcode(var p: LINE_F4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2879,6 +2975,7 @@ begin
x^.code:= code; x^.code:= code;
end; end;
procedure setcode(var p: LINE_G4; const code: byte); procedure setcode(var p: LINE_G4; const code: byte);
var x : ^P_TAG; var x : ^P_TAG;
begin begin
@ -2892,46 +2989,42 @@ begin
getlen:= p.len; getlen:= p.len;
end; end;
function getcode(p: P_TAG): byte; function getcode(p: P_TAG): byte;
begin begin
getcode:= p.code; getcode:= p.code;
end; end;
function getaddr(p: P_TAG): dword; function getaddr(p: P_TAG): dword;
begin begin
getaddr:= p.addr; getaddr:= p.addr;
end; end;
// Primitive Lentgh Code // Primitive Lentgh Code
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// //
//#define setPolyF3(p) setlen(p, 4), setcode(p, 0x20)
procedure setPolyF3(var p: POLY_F3); procedure setPolyF3(var p: POLY_F3);
begin begin
setlen(p, 4); setlen(p, 4);
setcode(p, $20); setcode(p, $20);
end; end;
//#define setPolyFT3(p) setlen(p, 7), setcode(p, 0x24)
procedure setPolyFT3(var p: POLY_FT3); procedure setPolyFT3(var p: POLY_FT3);
begin begin
setlen(p, 7); setlen(p, 7);
setcode(p, $24); setcode(p, $24);
end; end;
//#define setPolyG3(p) setlen(p, 6), setcode(p, 0x30)
procedure setPolyG3(var p: POLY_G3); procedure setPolyG3(var p: POLY_G3);
begin begin
setlen(p, 6); setlen(p, 6);
setcode(p, $30); setcode(p, $30);
end; end;
//#define setPolyGT3(p) setlen(p, 9), setcode(p, 0x34)
procedure setPolyGT3(var p: POLY_GT3); procedure setPolyGT3(var p: POLY_GT3);
begin begin
setlen(p, 9); setlen(p, 9);
@ -2939,14 +3032,13 @@ begin
end; end;
//#define setPolyF4(p) setlen(p, 5), setcode(p, 0x28)
procedure setPolyF4(var p: POLY_F4); procedure setPolyF4(var p: POLY_F4);
begin begin
setlen(p, 5); setlen(p, 5);
setcode(p, $28); setcode(p, $28);
end; end;
//#define setPolyFT4(p) setlen(p, 9), setcode(p, 0x2c)
procedure setPolyFT4(var p: POLY_FT4); procedure setPolyFT4(var p: POLY_FT4);
begin begin
setlen(p, 9); setlen(p, 9);
@ -2954,14 +3046,13 @@ begin
end; end;
//#define setPolyG4(p) setlen(p, 8), setcode(p, 0x38)
procedure setPolyG4(var p: POLY_G4); procedure setPolyG4(var p: POLY_G4);
begin begin
setlen(p, 8); setlen(p, 8);
setcode(p, $38); setcode(p, $38);
end; end;
//#define setPolyGT4(p) setlen(p, 12), setcode(p, 0x3c)
procedure setPolyGT4(var p: POLY_GT4); procedure setPolyGT4(var p: POLY_GT4);
begin begin
setlen(p, 12); setlen(p, 12);
@ -2969,72 +3060,69 @@ begin
end; end;
//#define setSprt8(p) setlen(p, 3), setcode(p, 0x74)
procedure setSprt8(var p: SPRT_8); procedure setSprt8(var p: SPRT_8);
begin begin
setlen(p, 3); setlen(p, 3);
setcode(p, $74); setcode(p, $74);
end; end;
//#define setSprt16(p) setlen(p, 3), setcode(p, 0x7c)
procedure setSprt16(var p: SPRT_16); procedure setSprt16(var p: SPRT_16);
begin begin
setlen(p, 3); setlen(p, 3);
setcode(p, $7c); setcode(p, $7c);
end; end;
//#define setSprt(p) setlen(p, 4), setcode(p, 0x64)
procedure setSprt(var p: SPRT); procedure setSprt(var p: SPRT);
begin begin
setlen(p, 4); setlen(p, 4);
setcode(p, $64); setcode(p, $64);
end; end;
//#define setTile1(p) setlen(p, 2), setcode(p, 0x68)
{
procedure setTile1(var p: TILE_1); procedure setTile1(var p: TILE_1);
begin begin
setlen(p, 2); setlen(p, 2);
setcode(p, $68); setcode(p, $68);
end; end;
}
//#define setTile8(p) setlen(p, 2), setcode(p, 0x70)
procedure setTile8(var p: TILE_8); procedure setTile8(var p: TILE_8);
begin begin
setlen(p, 2); setlen(p, 2);
setcode(p, $70); setcode(p, $70);
end; end;
//#define setTile16(p) setlen(p, 2), setcode(p, 0x78)
procedure setTile16(var p: TILE_16); procedure setTile16(var p: TILE_16);
begin begin
setlen(p, 2); setlen(p, 2);
setcode(p, $78); setcode(p, $78);
end; end;
//#define setTile(p) setlen(p, 3), setcode(p, 0x60)
procedure setTile(var p: TILE); procedure setTile(var p: TILE);
begin begin
setlen(p, 3); setlen(p, 3);
setcode(p, $60); setcode(p, $60);
end; end;
//#define setLineF2(p) setlen(p, 3), setcode(p, 0x40)
procedure setLineF2(var p: LINE_F2); procedure setLineF2(var p: LINE_F2);
begin begin
setlen(p, 3); setlen(p, 3);
setcode(p, $40); setcode(p, $40);
end; end;
//#define setLineG2(p) setlen(p, 4), setcode(p, 0x50)
procedure setLineG2(var p: LINE_G2); procedure setLineG2(var p: LINE_G2);
begin begin
setlen(p, 4); setlen(p, 4);
setcode(p, $50); setcode(p, $50);
end; end;
//#define setLineF3(p) setlen(p, 5), setcode(p, 0x48),(p)->pad = 0x55555555
procedure setLineF3(var p: LINE_F3); procedure setLineF3(var p: LINE_F3);
begin begin
setlen(p, 5); setlen(p, 5);
@ -3042,8 +3130,7 @@ begin
p.pad:= $55555555; p.pad:= $55555555;
end; end;
//#define setLineG3(p) setlen(p, 7), setcode(p, 0x58),(p)->pad = 0x55555555, \
// (p)->p2 = 0
procedure setLineG3(var p: LINE_G3); procedure setLineG3(var p: LINE_G3);
begin begin
setlen(p, 7); setlen(p, 7);
@ -3052,7 +3139,7 @@ begin
p.p2:= 0; p.p2:= 0;
end; end;
//#define setLineF4(p) setlen(p, 6), setcode(p, 0x4c),(p)->pad = 0x55555555
procedure setLineF4(var p: LINE_F4); procedure setLineF4(var p: LINE_F4);
begin begin
setlen(p, 6); setlen(p, 6);
@ -3060,8 +3147,7 @@ begin
p.pad:= $55555555; p.pad:= $55555555;
end; end;
//#define setLineG4(p) setlen(p, 9), setcode(p, 0x5c),(p)->pad = 0x55555555, \
// (p)->p2 = 0, (p)->p3 = 0
procedure setLineG4(var p: LINE_G4); procedure setLineG4(var p: LINE_G4);
begin begin
setlen(p, 9); setlen(p, 9);
@ -3074,19 +3160,21 @@ end;
{ {
function getTPage(tp, abr, x, y: longint): longint; function getTPage(tp, abr, x, y: longint): longint;
begin begin
result:= ((((tp) and $3)shl 7)or(((abr) and $3) shl 5) or (((y) and $100) shr 4)|(((x)and $3ff) shr6) or (((y) and $200) shl 2)); result:= ((((tp) and $3) shl 7) or (((abr) and $3) shl 5) or (((y) and $100) shr 4) or (((x) and $3ff) shr 6) or (((y) and $200) shl 2));
end; end;
function getClut(x, y): longint; function getClut(x, y): longint;
begin begin
result:= (((y) shl 6)or(((x) shr 4) and $3f)); result:= (((y) shl 6) or (((x) shr 4) and $3f));
end; end;
} }
procedure dumpTPage(tpage: longint); procedure dumpTPage(tpage: longint);
begin begin
GPU_printf('tpage: (%d,%d,%d,%d)\n', ((tpage) shr 7) and $003, ((tpage) shr 5) and $003, ((tpage) shl 6) and $7c0, (((tpage) shl 4) and $100)+(((tpage)shr 2) and $200)); GPU_printf('tpage: (%d,%d,%d,%d)\n', ((tpage) shr 7) and $003, ((tpage) shr 5) and $003, ((tpage) shl 6) and $7c0, (((tpage) shl 4) and $100)+(((tpage)shr 2) and $200));
end; end;
procedure dumpClut(clut: longint); procedure dumpClut(clut: longint);
begin begin
GPU_printf('clut: (%d,%d)\n', (clut and $3f) shl 4, (clut shr 6)); GPU_printf('clut: (%d,%d)\n', (clut and $3f) shl 4, (clut shr 6));

View File

@ -175,14 +175,14 @@ type
w, h : word; w, h : word;
r, g, b : byte; r, g, b : byte;
end; end;
PGsBOXF = ^GsBOXF; PGsBOXF = ^GsBOXF;
GsFOGPARAM = packed record GsFOGPARAM = packed record
dqa : smallint; dqa : smallint;
dqb : longint; dqb : longint;
rfc, gfc, bfc : byte; rfc, gfc, bfc : byte;
end; end;
PGsFOGPARAM = ^GsFOGPARAM; PGsFOGPARAM = ^GsFOGPARAM;
GsIMAGE = packed record GsIMAGE = packed record
@ -984,8 +984,8 @@ begin
inc(PSDCNT); inc(PSDCNT);
if PSDCNT > 0 then PSDCNT:= PSDCNT else PSDCNT:= 1; if PSDCNT > 0 then PSDCNT:= PSDCNT else PSDCNT:= 1;
if PSDIDX = 0 then PSDIDX:=1 else PSDIDX:= 0; if PSDIDX = 0 then PSDIDX:=1 else PSDIDX:= 0;
end; end;

View File

@ -11,18 +11,19 @@ const
type type
PMATRIX = ^MATRIX;
MATRIX = packed record MATRIX = packed record
m : array [0..2, 0..2] of smallint; // 3x3 rotation matrix m : array [0..2, 0..2] of smallint; // 3x3 rotation matrix
t : array [0..2] of longint; // transfer vector t : array [0..2] of longint; // transfer vector
end; end;
PMATRIX = ^MATRIX;
VECTOR = packed record // long word type 3D vector
vx, vy : longint;
vz, pad : longint;
end;
VECTOR = packed record // long word type 3D vector
vx, vy : longint;
vz, pad : longint;
end;
PVECTOR = ^VECTOR; PVECTOR = ^VECTOR;
SVECTOR = packed record // short word type 3D vector SVECTOR = packed record // short word type 3D vector
vx, vy : smallint; vx, vy : smallint;
vz, pad : smallint; vz, pad : smallint;

View File

@ -86,7 +86,6 @@ type
nortop2 : PSVECTOR; nortop2 : PSVECTOR;
end; end;
GsARGUNIT_IMAGE = packed record GsARGUNIT_IMAGE = packed record
primp : pdword; primp : pdword;
tagp : PGsOT; tagp : PGsOT;
@ -198,7 +197,7 @@ type
end; end;
PGsARGUNIT_ANIM = ^GsARGUNIT_ANIM; PGsARGUNIT_ANIM = ^GsARGUNIT_ANIM;
GsARGUNIT_ANIM = packed record GsARGUNIT_ANIM = packed record
primp : pdword; primp : pdword;
tagp : PGsOT; tagp : PGsOT;
shift : longint; shift : longint;

View File

@ -17,8 +17,7 @@ type
addr : pointer; addr : pointer;
end; end;
// Memory Card Information Structure
// Memory Card Information Structure */
sMcGuiCards = packed record sMcGuiCards = packed record
_file : array [0..20] of char; _file : array [0..20] of char;
title : array [0..64] of char; title : array [0..64] of char;
@ -37,14 +36,12 @@ type
timadr : pointer; timadr : pointer;
end; end;
// Cursor Information Structure // Cursor Information Structure
sMcGuiCursor = packed record sMcGuiCursor = packed record
mode : byte; mode : byte;
r, g, b : byte; r, g, b : byte;
end; end;
// BGM,Sound Effects Information Structure // BGM,Sound Effects Information Structure
Tbgm = packed record Tbgm = packed record
isbgm : longint; isbgm : longint;

View File

@ -5,12 +5,12 @@ uses libstd;
type type
MemCB = function(cmds, rslt: longint): pointer; MemCB = function(cmds, rslt: longint): pointer;
const const
McFuncExist = 1; McFuncExist = 1;
McFuncAccept = 2; McFuncAccept = 2;
McFuncReadFile = 3; McFuncReadFile = 3;
McFuncWriteFile = 4; McFuncWriteFile = 4;
McFuncReadData = 5; McFuncReadData = 5;
McFuncWriteData = 6; McFuncWriteData = 6;
McErrNone = 0; McErrNone = 0;
McErrCardNotExist = 1; McErrCardNotExist = 1;

View File

@ -780,14 +780,7 @@ const
SR_SWC = $00020000; // swap cache SR_SWC = $00020000; // swap cache
SR_ISC = $00010000; // Isolate data cache SR_ISC = $00010000; // Isolate data cache
SR_MM_MODE = $00010000; // lwl/swl/etc become scache/etc SR_MM_MODE = $00010000; // lwl/swl/etc become scache/etc
{
define:
lcache lwl
scache swl
flush lwr $0,
inval swr $0,
}
// Interrupt enable bits // Interrupt enable bits
@ -911,19 +904,19 @@ const
NF_NENTRIES = 8; NF_NENTRIES = 8;
// TLB size constants // TLB size constants
TLBWIREDBASE = 0; // WAG for now TLBWIREDBASE = 0; // WAG for now
NWIREDENTRIES = 8; // WAG for now NWIREDENTRIES = 8; // WAG for now
TLBRANDOMBASE = NWIREDENTRIES; TLBRANDOMBASE = NWIREDENTRIES;
NTLBENTRIES = 64; NTLBENTRIES = 64;
NRANDOMENTRIES = (NTLBENTRIES - NWIREDENTRIES); NRANDOMENTRIES = (NTLBENTRIES - NWIREDENTRIES);
TLBRAND_RANDMASK = $00003f00; TLBRAND_RANDMASK = $00003f00;
TLBRAND_RANDSHIFT = 8; TLBRAND_RANDSHIFT = 8;
// Chip interrupt vector // Chip interrupt vector
NC0VECS = 8; NC0VECS = 8;
@ -933,12 +926,12 @@ var
const const
BRK_KERNEL = $f1; BRK_KERNEL = $f1;
EXCEPT_NORM = 1; EXCEPT_NORM = 1;
EXCEPT_UTLB = 2; EXCEPT_UTLB = 2;
EXCEPT_BRKPT = 3; EXCEPT_BRKPT = 3;
EXCEPT_DB = 4; EXCEPT_DB = 4;
EXCEPT_GDB = 4; EXCEPT_GDB = 4;
EXCEPT_INT = 9; EXCEPT_INT = 9;
EXCEPT_ELSE = $ff; EXCEPT_ELSE = $ff;
@ -974,13 +967,13 @@ procedure longjmp(buf: jmp_buf; i: longint); external;
// status bits // status bits
const const
SR_IRQ = $200; SR_IRQ = $200;
SR_CTS = $100; SR_CTS = $100;
SR_DSR = $80; SR_DSR = $80;
SR_FE = $20; SR_FE = $20;
SR_OE = $10; SR_OE = $10;
SR_PERROR = $8; SR_PERROR = $8;
SR_TXU = $4; SR_TXU = $4;
SR_RXRDY = $2; SR_RXRDY = $2;
SR_TXRDY = $1; SR_TXRDY = $1;
SIO_CTS = $100; SIO_CTS = $100;
@ -1041,23 +1034,28 @@ generic procedure va_start<T>(out AP: Pointer; var LastArg: T);
procedure va_end(out AP: Pointer); procedure va_end(out AP: Pointer);
generic function va_arg<T>(var AP: Pointer):T; generic function va_arg<T>(var AP: Pointer):T;
implementation implementation
generic function __va_rounded_size<T>: SizeInt;inline; generic function __va_rounded_size<T>: SizeInt;inline;
begin begin
Result := ((sizeof(T) + sizeof (longint) - 1) div sizeof (longint)) * sizeof (longint); Result := ((sizeof(T) + sizeof (longint) - 1) div sizeof (longint)) * sizeof (longint);
end; end;
generic procedure va_start<T>(out AP: Pointer; var LastArg: T);inline; generic procedure va_start<T>(out AP: Pointer; var LastArg: T);inline;
begin begin
AP := Pointer(@LastArg) + specialize __va_rounded_size<T>; AP := Pointer(@LastArg) + specialize __va_rounded_size<T>;
end; end;
procedure va_end(out AP: Pointer);inline; procedure va_end(out AP: Pointer);inline;
begin begin
AP := nil; AP := nil;
end; end;
generic function va_arg<T>(var AP: Pointer):T;inline; generic function va_arg<T>(var AP: Pointer):T;inline;
type type
PT=^T; PT=^T;