Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: sprite is not drawn

  1. #11

    sprite is not drawn

    Thanks,
    Here You are - one SFX file:
    http://rapidshare.com/files/33362780...te_project.exe
    Let's hope You will do better than me...

  2. #12

    sprite is not drawn

    So, your error is in the loop in DXDrawInitialize procedure. Your loop goes from 0 to mtiles, but in this way you are trying to access 4 tiles. In fact, you get an access violation error starting the game.

    [pascal]procedure TForm22.DXDraw1Initialize(Sender: TObject);
    var imgcnt:integer;
    begin
    Form22.DXTimer1.Enabled:=true;

    //for imgcnt := 0 to mtiles do
    for imgcnt := 0 to mtiles - 1 do // <<<<< Here!!
    begin
    tiles[imgcnt] := tdirectdrawsurface.create(form22.dxdraw1.DDraw);
    tiles[imgcnt].loadfromgraphic(form22.DXImageList2.Items[imgcnt].Picture.Graphic);
    end;
    GameState:=gsStart;
    end;
    [/pascal]
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  3. #13

    sprite is not drawn

    Oh thank You!
    And to think that it would have saved me lots of time if I just had not ignored those errors... douh
    Well thanks again. I'm sure it won't be the last time you save me

  4. #14

    sprite is not drawn

    Quote Originally Posted by leniz
    Oh thank You!
    And to think that it would have saved me lots of time if I just had not ignored those errors... douh
    Well thanks again. I'm sure it won't be the last time you save me
    You are welcome

    Lesson 1: Never ignore access violation errors.
    Lesson 2: Never forget "Lesson 1"

    :mrgreen:
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

Page 2 of 2 FirstFirst 12

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
  •