Search found 2977 matches

by Stef
Mon Sep 23, 2019 7:59 am
Forum: SGDK
Topic: Load Custom Font
Replies: 1
Views: 17

Re: Load Custom Font

You just need to use one or the other: .res IMAGE custom_font "gfx/font.png" BEST .c VDP_loadFont(custom_font.tileset, DMA); should be enough to get your custom font loaded (i used IMAGE resource but the tileset as you did is also ok). If you need to set a specific palette then don't forget to load ...
by Stef
Sat Sep 14, 2019 6:07 pm
Forum: SGDK
Topic: Scrolling only one row.
Replies: 5
Views: 199

Re: Scrolling only one row.

Oh sorry I read too quickly your message :oops:
Indeed it was related to how you passed parameters.
Also there is a Discord server for SGDK, you have the link in the SGDK readme.txt file.
by Stef
Fri Sep 13, 2019 10:21 am
Forum: SGDK
Topic: Scrolling only one row.
Replies: 5
Views: 199

Re: Scrolling only one row.

You need to set the current scroll mode first using VDP_setHorizontalScrollMode(..) or something like that (on my phone currently).
by Stef
Tue Sep 03, 2019 10:26 am
Forum: SGDK
Topic: Need Remove All Sprites from VDP
Replies: 9
Views: 252

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: 252

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: 5
Views: 1048

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: 252

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: 2254

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: 268

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: 268

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: 276

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: 276

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: 276

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: 675

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: 4
Views: 978

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