Search found 3004 matches

by Stef
Tue Sep 03, 2019 10:26 am
Forum: SGDK
Topic: Need Remove All Sprites from VDP
Replies: 9
Views: 1571

Re: Need Remove All Sprites from VDP

I want do release a sprite and replace it with another sprite. Please, tell me if the code bellow is a good pratice. SPR_releaseSprite(arrRope[lastIndex]); arrRope[lastIndex] = SPR_addSpriteSafe(&rope_2_32, shootStartX_p1 + 1, shootStartY_p1 - 2 - (lastIndex * 32) - 32, TILE_ATTR(PAL1, FALSE, FALSE...
by Stef
Mon Sep 02, 2019 8:08 am
Forum: SGDK
Topic: Need Remove All Sprites from VDP
Replies: 9
Views: 1571

Re: Need Remove All Sprites from VDP

indeed we do not see sprite 22 and normally SPR_clear() is enough to (temporary) hide all sprites until next SPR_update() call.
SPR_reset() will clear them definitely (releasing all attached resources). Also you should never mix high level methods (SPR_xxx) with low level ones (VDP_xxxSprites).
by Stef
Sun Sep 01, 2019 3:02 pm
Forum: SGDK
Topic: My SGDK Tutorials (Spanish)
Replies: 10
Views: 2856

Re: My SGDK Tutorials (Spanish)

Glad to finally see your tutorial, and tons of thanks for making it ! Just wanted to tell you that on first lesson, you are using https://stephane-d.github.io/SGDK/ address which doesn't exist anymore. You need to directly use the github repository now : https://github.com/Stephane-D/SGDK And if you...
by Stef
Sun Sep 01, 2019 2:58 pm
Forum: SGDK
Topic: Need Remove All Sprites from VDP
Replies: 9
Views: 1571

Re: Need Remove All Sprites from VDP

What is important is that they don't appear anymore on screen. Filling the list with 0 and sending the complete list to the VDP would be a waste of time, so the sprites are cleared, it's just that we don't need to "clear" the list itself for that.
by Stef
Tue Aug 27, 2019 1:10 pm
Forum: Megadrive/Genesis
Topic: Sega Tech Docs archive
Replies: 26
Views: 8775

Re: Sega Tech Docs archive

Wow :shock: That is really really nice to have all these centralized in one place ! Thanks for having spent the time to archive and organize all that, i hope you will be able to complete it with time. That will be the definitely place to visit for sega tech docs !
by Stef
Tue Aug 27, 2019 8:07 am
Forum: SGDK
Topic: Debugging
Replies: 4
Views: 1178

Re: Debugging

This is just rounding issue because fix16 has very limited precision. fix32 has better but still not perfect too.
Also just to make it more convenient, you can directly use :

Code: Select all

KLog_U1("int:", var);
or

Code: Select all

KLog_f1("", var);
if you don't need any text display before the value :)
by Stef
Mon Aug 26, 2019 2:48 pm
Forum: SGDK
Topic: Debugging
Replies: 4
Views: 1178

Re: Debugging

You know you have many KLog_xx(..) functions to take care of different numbering formats ? void KLog(char* text); void KLog_U1(char* t1, u32 v1); void KLog_U2(char* t1, u32 v1, char* t2, u32 v2); void KLog_U3(char* t1, u32 v1, char* t2, u32 v2, char* t3, u32 v3); void KLog_U4(char* t1, u32 v1, char*...
by Stef
Fri Aug 23, 2019 2:51 pm
Forum: SGDK
Topic: I Need tips with animations
Replies: 6
Views: 1231

Re: I Need tips with animations

Then your solution is ok for that but i guess you can simply use a counter which start at defeat time then after some frames (when animation is done) you simply hide the sprite :)
by Stef
Fri Aug 23, 2019 8:04 am
Forum: SGDK
Topic: I Need tips with animations
Replies: 6
Views: 1231

Re: I Need tips with animations

Looks like a bit complicated but so you want to hide it after animation or just stay on last frame ?
by Stef
Thu Aug 22, 2019 8:18 pm
Forum: SGDK
Topic: I Need tips with animations
Replies: 6
Views: 1231

Re: Need tips with animations

You need to pass the timer to 0 after the SPR_update() call : SPR_setAnimAndFrame(arrEnemies[enemyIndex], ENEMY_DIE, 0); ... // actually update the anim / frame SPR_update(); // disable auto animation for further SPR_update() call arrEnemies[enemyIndex]->timer = 0; And there is no way to disable loo...
by Stef
Mon Aug 05, 2019 7:57 am
Forum: SGDK
Topic: About sinFix16()
Replies: 5
Views: 1675

Re: About sinFix16()

Chilly Willy perfectly explained the reason of the value you obtained and sin table size :) If you want faster sin wav depending x position, try something as : enemyPosy = contsY + sinFix16(enemyPosx * sinSpeed); If you also want larger sin amplitude then multiply that way : enemyPosy = contsY + sin...
by Stef
Tue Jul 30, 2019 12:34 pm
Forum: Demos
Topic: Sid Meier’s Civilization for Sega Genesis
Replies: 5
Views: 2455

Re: Sid Meier’s Civilization for Sega Genesis

One of my preferred game ! It looks really nice :)
Too bad it was never released on Megadrive (while a SNES version does exist). It would be awesome to have mouse support :D
by Stef
Thu Jul 25, 2019 12:29 pm
Forum: SGDK
Topic: SGDK1.4 crashes at compilation
Replies: 4
Views: 1374

Re: SGDK1.4 crashes at compilation

Good test :P
Seriously you may have a hardware issue on your laptop, you shoul try some burning tests on it to check that everything is ok.
by Stef
Wed Jul 24, 2019 7:53 am
Forum: SGDK
Topic: SGDK1.4 crashes at compilation
Replies: 4
Views: 1374

Re: SGDK1.4 crashes at compilation

Same.. what you have to know is that the new rescomp can heavily use your CPU for the sprite optimization process. I'm almost certain that is overheat problem which cause the hardware failure, you may try to force your computer to run in eco mode (for a laptop), reducing the CPU performance but so a...
by Stef
Mon Jul 22, 2019 9:43 pm
Forum: SGDK
Topic: SGDK1.4 : Typo in sample/xgmplayer
Replies: 1
Views: 1086

Re: SGDK1.4 : Typo in sample/xgmplayer

fixed :p

I didn't updated it since a while (so the problem with the SPR_initEx(..) method)