Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Help. sprites are making me mad.  (Read 2318 times)

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: Help. sprites are making me mad.
« Reply #15 on: March 18, 2012, 12:52:35 AM »
Quote from: bbond007;684231
   scanf("%c");
That for sure can crash. It reads a char and places it to random location in memory.

The example code is very very old. It lacks __interrupt __saveds for the interrupt code (vbinter).

Quote
I'm also not understanding vBlankInterrupt.is_data is used for. Is it like DOS where when you have an interrupt you have no clue where your data segment points? That can't be right.
is_Data is used to pass a user controlled data to the interrupt routine (it arrives in A1 register). Typically this is used if the code cannot use static variables (and thus __saveds cannot be used), for example where there might be several different interrupts  added, each with unique instance data.
« Last Edit: March 18, 2012, 01:02:55 AM by Piru »
 

Offline bbond007

Re: Help. sprites are making me mad.
« Reply #16 on: March 18, 2012, 02:48:41 AM »
Quote from: Piru;684237
That for sure can crash. It reads a char and places it to random location in memory.

The example code is very very old. It lacks __interrupt __saveds for the interrupt code (vbinter).


yeah, too bad it crashes before i type the char... i'll try __interrupt (i did have __saveds)..

thanks!

as an interesting note, i see that i don't have to worry about screen->TopEdge it seems, MoveSprite always positions the sprites relative to the screen. so just calling it is enough to get the desired effect.

I ended up just replacing my Wait(signal) with Delay(1) so my main loop constantly runs (calling MoveSprite) but that is not good form i'm sure.


UPDATE:
__interupt fixed the problem!

i  bet it would even have fixed the  AddTOF() method....

thanks! results look better :)
« Last Edit: March 18, 2012, 03:14:18 AM by bbond007 »
 

Offline ChaosLord

Re: Help. sprites are making me mad.
« Reply #17 on: March 18, 2012, 06:52:45 PM »
I was going to mention __interrupt as soon as u said SASC but when I searched my 100,000s of lines of source code I could not find it anywhere. (?)  So I got puzzled and forgot about it.... **scratching head**

Quote
as an interesting note, i see that i don't have to worry about  screen->TopEdge it seems, MoveSprite always positions the sprites  relative to the screen. so just calling it is enough to get the desired  effect.
hehehe kewl trick.  I might possibly use that one myself.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

Re: Help. sprites are making me mad.
« Reply #18 on: March 18, 2012, 09:11:58 PM »
I found out why I have no __interrupt in my sources.

Because Real Men(tm) code their interrupts in asm! :D
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline bbond007

Re: Help. sprites are making me mad.
« Reply #19 on: March 18, 2012, 09:36:57 PM »
Quote from: ChaosLord;684331
I found out why I have no __interrupt in my sources.

Because Real Men(tm) code their interrupts in asm! :D


assembler, blah...  i have had enough crashes for now.

i did get my sprite toolbar working... happy with the results.

thanks for the help!
« Last Edit: March 18, 2012, 09:40:25 PM by bbond007 »