https://www.segasaturno.com/portal/viewtopic.php?f=33&t=3970&p=46153#p46153
-----------------------------------
television2000
16 Noviembre 2011, 07:25 AM

Re: [Homebrew] [VDP1] - Controlando Sprites.
-----------------------------------
Thanks for the reply. :)

The code compiles fine but actually doesn't seem to do anything strangely.
However reading SGL document from Sega, you can set the framerate with this command :
slInitSystem(TV_352x224, tex_SON , [b]1[/b]);
The higher the number the slower the framerate will be and you can process more commands/code.

That's one thing though. If I could ask you for one more thing, 
I can't seem to get the idle sprite (Left or Right) to display with this command :

[code linenumbers=false]        
         if( (Smpc_Peripheral[index].data & PER_DGT_KR) == 0)
            {  pos[X] = pos[X] + toFIXED(  1.0);
                pos_river[X] = pos[X];
                slDispSprite(pos_river, attr_SON + sprite_walk_ID, ang_river);
                slPrint ("Right Walk Sprite -- ON", slLocate (0,4));
            }

        else if( (Smpc_Peripheral[index].data & PER_DGT_KL) == 0)
            {  pos[X] = pos[X] - toFIXED(  1.0);
                pos_river[X] = pos[X]; 
                slDispSprite(pos_river, attr_SONH + sprite_walk_ID, ang_river);
                slPrint ("Left Walk Sprite -- ON", slLocate (0,4));
            }

        else if ((Smpc_Peripheral[index].pull & PER_DGT_KL) == 0)
            {   slDispSprite(pos_river, attr_SONH + sprite_idle_ID, ang_river);
                slPrint ("Idle Left Sprite -- ON", slLocate (0,4));
            } 

        else if( ((Smpc_Peripheral[index].data & PER_DGT_KR) == 1) || ((Smpc_Peripheral[index].pull & PER_DGT_KR) == 0))
            {   slDispSprite(pos_river, attr_SON + sprite_idle_ID, ang_river);
                slPrint ("Idle Right Sprite -- ON", slLocate (0,4));
            }[/code]

Can you please tell me what causes this ?


