Search found 99 matches
- Sat Jun 22, 2019 6:50 pm
- Forum: SGDK
- Topic: Using fade_out
- Replies: 2
- Views: 5057
Re: Using fade_out
Nevermind, i ended up using VDP_fadePal() and that worked fine.
- Fri Jun 21, 2019 10:19 pm
- Forum: SGDK
- Topic: Using fade_out
- Replies: 2
- Views: 5057
Using fade_out
I'm not sure how to use it. From the example i got fade in working fine with my function. but not fade_out. Here is the function.
void screenTrans(void){
if (fadeState == FADEOUT){
// prepare palettes
if (ISTITLEMAP) memcpy(&palette[0], titlescr.palette->data, 16 * 2);
//if (ISSELECTMAP ...
void screenTrans(void){
if (fadeState == FADEOUT){
// prepare palettes
if (ISTITLEMAP) memcpy(&palette[0], titlescr.palette->data, 16 * 2);
//if (ISSELECTMAP ...
- Mon Jun 17, 2019 4:22 pm
- Forum: SGDK
- Topic: Compile Error with var type.
- Replies: 2
- Views: 5292
Re: Compile Error with var type.
Oops, i used "<genesis.h>", that corrected it. Thanks!Stef wrote: Mon Jun 17, 2019 1:41 pm Do you havein the headers inclusion part of your code ?Code: Select all
#include "genesis.h"
Also how do you compile (command line / ide) ?
- Mon Jun 17, 2019 3:04 am
- Forum: SGDK
- Topic: Compile Error with var type.
- Replies: 2
- Views: 5292
Compile Error with var type.
Hey yall.
I seem to have an issue compiling, giving this error.
In file included from main.c:5:0:
C:/SGDK/inc/joy.h:123:32: error: unknown type name 'u16'
typedef void _joyEventCallback(u16 joy, u16 changed, u16 state);
^~~
C:/SGDK/inc/joy.h:123:41: error: unknown type name 'u16'
typedef void ...
I seem to have an issue compiling, giving this error.
In file included from main.c:5:0:
C:/SGDK/inc/joy.h:123:32: error: unknown type name 'u16'
typedef void _joyEventCallback(u16 joy, u16 changed, u16 state);
^~~
C:/SGDK/inc/joy.h:123:41: error: unknown type name 'u16'
typedef void ...
- Mon Aug 28, 2017 9:20 pm
- Forum: SGDK
- Topic: Colors and the different compressions
- Replies: 1
- Views: 3049
Colors and the different compressions
If i made a copy of the background tiles from a previous set, but the only difference is the color information, does that count as more tiles in vram? For example, i copied over background tiles of a car, but the color is now different but It's using the same palette.
Also, can someone run down the ...
Also, can someone run down the ...
- Mon Aug 07, 2017 5:42 pm
- Forum: SGDK
- Topic: Flipping sprites issue.
- Replies: 4
- Views: 5022
Re: Flipping sprites issue.
Not enought, it's building those arrays into the stack every time you call the function.
Make it static or make it global to solve this nuisance.
Like:
void updatePAnim()
{
static int const townbodyanims[12][8] = {
...
or
int const townbodyanims[12][8] = {
...
void updatePAnim ...
- Mon Aug 07, 2017 1:12 am
- Forum: SGDK
- Topic: Flipping sprites issue.
- Replies: 4
- Views: 5022
Re: Flipping sprites issue.
Ah okay. Yeah, i switched to int and made them constant. It worked. Thanks.cero wrote: Sun Aug 06, 2017 8:43 am That function does not take a string, it takes a TRUE/FALSE integer. Also, your arrays are non-const, so they're wasting RAM.
Your compiler probably warned you about that.
- Sun Aug 06, 2017 1:57 am
- Forum: SGDK
- Topic: Flipping sprites issue.
- Replies: 4
- Views: 5022
Flipping sprites issue.
While trying a new way to handle animation, the flipping function seems to stop working after triggering once.
Setting the frame keeps on working though. I'm new to using arrays in c, but i don't think that's the issue. Here is the code bellow.
void updatePAnim()
{
int townbodyanims[12][8 ...
Setting the frame keeps on working though. I'm new to using arrays in c, but i don't think that's the issue. Here is the code bellow.
void updatePAnim()
{
int townbodyanims[12][8 ...
- Mon Jul 31, 2017 12:49 am
- Forum: SGDK
- Topic: Issue with sprite drawing.
- Replies: 6
- Views: 9557
Re: Issue with sprite drawing.
Solved. Removed code that needed to be there
Code: Select all
// set all palette to black
VDP_setPaletteColors(0, (u16*) palette_black, 64);
// fade in
VDP_fadeIn(0, (4 * 16) - 1, palette, 20, FALSE);
- Mon Jul 31, 2017 12:41 am
- Forum: SGDK
- Topic: Issue with sprite drawing.
- Replies: 6
- Views: 9557
Re: Issue with sprite drawing.
Maybe you're not writing the good palette :
// init player sprite
sprites[0] = SPR_addSprite(&maleplayer_sprite, fix32ToInt(posx), fix32ToInt(posy), TILE_ATTR(PAL1, TRUE, FALSE, FALSE));
SPR_update();
// prepare palettes
memcpy(&palette[0], maleplayer_sprite.palette->data, 16 * 2 ...
- Fri Jul 28, 2017 7:40 am
- Forum: SGDK
- Topic: Issue with sprite drawing.
- Replies: 6
- Views: 9557
Issue with sprite drawing.
The sprite looks silhouette, but has the correct palette. On the right of the red silhouette, i pasted how the sprites actually look. I'm not sure what i am doing wrong.
testimg.png
My resource file has this
SPRITE maleplayer_sprite "sprite/mainpltown.png" 2 2 -1 10
My Header has this ...
testimg.png
My resource file has this
SPRITE maleplayer_sprite "sprite/mainpltown.png" 2 2 -1 10
My Header has this ...
- Sun Nov 29, 2015 12:01 am
- Forum: Demos
- Topic: Cosmic PI (Week # 8)
- Replies: 11
- Views: 13472
Re: Cosmic PI (Week # 7)
Week 8 of development is up on the first post! 

- Sun Nov 15, 2015 12:43 am
- Forum: Demos
- Topic: Cosmic PI (Week # 8)
- Replies: 11
- Views: 13472
Re: Cosmic PI (Week # 6)
New blog post is up! 

- Sat Nov 07, 2015 6:18 am
- Forum: Demos
- Topic: Miniplanets (single stage demo)
- Replies: 18
- Views: 24938
Re: Miniplanets (single stage demo)
Sweet pseudo 3D effect with the planet! I can't even wrap my head around how you did it.
As for the gameplay, it feels like a solid arcade type game in my opinion. The moving platforms are a bit tricky though, but not cheap.
I almost beat 1-4, but the timer ran out. Will try to see if i can beat ...
As for the gameplay, it feels like a solid arcade type game in my opinion. The moving platforms are a bit tricky though, but not cheap.
I almost beat 1-4, but the timer ran out. Will try to see if i can beat ...
- Sat Oct 31, 2015 7:18 pm
- Forum: Demos
- Topic: Cosmic PI (Week # 8)
- Replies: 11
- Views: 13472
Re: Cosmic PI
Back with another weekly blog, so check the top post! 
