Results 1 to 10 of 121

Thread: G.T.A.2 Map Editor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    I know you are still using bit of your own texture loading, but i'll still give short example how nxPascal would do NPOT. You can download Delphi source and exe here. I made it as simple as possible but based on the game template:
    https://docs.google.com/file/d/0B7FI...NlYWRvLW8/edit

    There is no scaling of any kind, demo loads in 119x53 texture with 12 patterns in 6x2 grid. There is SkipWidth and Height of 1 because i drew it quickly with a green 1 pixel wide grid, which i had to take off because bi-linear rendering makes the grid show when drawn.

    To summarize key points:
    Code:
    n:=tex.AddTexture('anim', GetPath('textures\anim.png'), true);
    tex.SetPattern(n, 19, 26, 1, 1);
    ...
    pattern:=(pattern+1) mod 12;
    nx.DrawRotate((i mod 30)*15.0+20, (i div 30)*15.0+20, pattern, 0, 0.5, 0.5);
    // I drew 1000 of these patterns, 30 per row, each centered around coords 0.5, 0.5 of the pattern, that's exactly in the middle.
    Attached Images Attached Images

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
  •