Results 1 to 10 of 121

Thread: G.T.A.2 Map Editor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #22
    Ok, i did stupid mistake. And i got better and faster average color calculation using scanlines: http://www.delphimaster.net/view/2-1...72/all#PageTop

    I was calculating this for every pixel 64x64 and in a third loop. Thats why it was terribly slow. I really should not code at nights and after the work when im very tired.

    Now i just get avg color for each of the 992 tiles and store it in a 1D array of TColors:
    Code:
    tileColorIndexes: array[0..991] of TColor;
    Later i just loop through map and set minimap pixel color according to: tileColorIndexes[tile_id];

    But i still have to optimize a bit. Just do reading tiles once, not twice. But anyways, here are the results using average colors. Amazing how good the minimaps look right now.
    I still have to think about the logic for the transparent faces (tiles), so here is one with transparent disabled and second one enabled. The first one with lots of black pixels is the disabled transparency version.



    Second
    Last edited by hwnd; 21-09-2013 at 12:29 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •