X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_grid.pas;h=2d5d6323f00f2f0ae41d6728d073ea66d3f865cc;hb=a4f25c41dfd783a925aa2dab4b9b84753d5c3f18;hp=5b88258c09ffb54111ce0d3ac116196d1b8a5ed5;hpb=5db5b1f141c10ebe97a0e06404cb7118fb412a37;p=d2df-sdl.git diff --git a/src/game/g_grid.pas b/src/game/g_grid.pas index 5b88258..2d5d632 100644 --- a/src/game/g_grid.pas +++ b/src/game/g_grid.pas @@ -20,7 +20,7 @@ {.$DEFINE D2F_DEBUG_XXQ} {.$DEFINE D2F_DEBUG_MOVER} {$ENDIF} -{$DEFINE GRID_USE_ORTHO_ACCEL} +{.$DEFINE GRID_USE_ORTHO_ACCEL} unit g_grid; interface @@ -1656,16 +1656,6 @@ begin y := yptr^+miny; //prevx := x; //prevy := y; - {$IF DEFINED(D2F_DEBUG)} - if hopt then - begin - if (y <> ay0) then raise Exception.Create('htrace fatal internal error'); - end - else - begin - if (x <> ax0) then raise Exception.Create('vtrace fatal internal error'); - end; - {$ENDIF} while (wklen > 0) do begin {$IF DEFINED(D2F_DEBUG)} @@ -2039,7 +2029,7 @@ var temp: Integer; ccidx, curci: Integer; lastGA: Integer = -1; - ga, x, y: Integer; + ga: Integer; gw, gh, minx, miny, maxx, maxy: Integer; cc: PGridCell; px: PBodyProxyRec; @@ -2254,23 +2244,10 @@ begin if dbgShowTraceLog then e_LogWritefln('optimized htrace; wklen=%d', [wklen]); {$ENDIF} ga := (yptr^ div tsize)*gw+(xptr^ div tsize); - // one of those will never change - x := xptr^+minx; - y := yptr^+miny; - {$IF DEFINED(D2F_DEBUG)} - if hopt then - begin - if (y <> ay0) then raise Exception.Create('htrace fatal internal error'); - end - else - begin - if (x <> ax0) then raise Exception.Create('vtrace fatal internal error'); - end; - {$ENDIF} while (wklen > 0) do begin {$IF DEFINED(D2F_DEBUG)} - if dbgShowTraceLog then e_LogWritefln(' htrace; ga=%d; x=%d, y=%d; y=%d; y=%d', [ga, xptr^+minx, yptr^+miny, y, ay0]); + if dbgShowTraceLog then e_LogWritefln(' htrace; ga=%d; x=%d, y=%d; ay0=%d', [ga, xptr^+minx, yptr^+miny, ay0]); {$ENDIF} // new tile? if (ga <> lastGA) then @@ -2278,7 +2255,6 @@ begin lastGA := ga; ccidx := mGrid[lastGA]; // convert coords to map (to avoid ajdusting coords inside the loop) - if hopt then x := xptr^+minx else y := yptr^+miny; while (ccidx <> -1) do begin cc := @mCells[ccidx]; @@ -2395,9 +2371,6 @@ begin begin // process cell curci := ccidx; - // convert coords to map (to avoid ajdusting coords inside the loop) - x := xptr^+minx; - y := yptr^+miny; // process cell list while (curci <> -1) do begin