Search found 99 matches

by orlanrod
Sat Jun 22, 2019 6:50 pm
Forum: SGDK
Topic: Using fade_out
Replies: 2
Views: 805

Re: Using fade_out

Nevermind, i ended up using VDP_fadePal() and that worked fine.
by orlanrod
Fri Jun 21, 2019 10:19 pm
Forum: SGDK
Topic: Using fade_out
Replies: 2
Views: 805

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) memcpy(&pal...
by orlanrod
Mon Jun 17, 2019 4:22 pm
Forum: SGDK
Topic: Compile Error with var type.
Replies: 2
Views: 815

Re: Compile Error with var type.

Stef wrote:
Mon Jun 17, 2019 1:41 pm
Do you have

Code: Select all

#include "genesis.h"
in the headers inclusion part of your code ?
Also how do you compile (command line / ide) ?
Oops, i used "<genesis.h>", that corrected it. Thanks!
by orlanrod
Mon Jun 17, 2019 3:04 am
Forum: SGDK
Topic: Compile Error with var type.
Replies: 2
Views: 815

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 _joyEv...
by orlanrod
Mon Aug 28, 2017 9:20 pm
Forum: SGDK
Topic: Colors and the different compressions
Replies: 1
Views: 657

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 ...
by orlanrod
Mon Aug 07, 2017 5:42 pm
Forum: SGDK
Topic: Flipping sprites issue.
Replies: 4
Views: 971

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() { ... Oh okay. Now ...
by orlanrod
Mon Aug 07, 2017 1:12 am
Forum: SGDK
Topic: Flipping sprites issue.
Replies: 4
Views: 971

Re: Flipping sprites issue.

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.
Ah okay. Yeah, i switched to int and made them constant. It worked. Thanks.
by orlanrod
Sun Aug 06, 2017 1:57 am
Forum: SGDK
Topic: Flipping sprites issue.
Replies: 4
Views: 971

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] = { {0,0,...
by orlanrod
Mon Jul 31, 2017 12:49 am
Forum: SGDK
Topic: Issue with sprite drawing.
Replies: 6
Views: 1825

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);
by orlanrod
Mon Jul 31, 2017 12:41 am
Forum: SGDK
Topic: Issue with sprite drawing.
Replies: 6
Views: 1825

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); //-->PAL0 sprite...
by orlanrod
Fri Jul 28, 2017 7:40 am
Forum: SGDK
Topic: Issue with sprite drawing.
Replies: 6
Views: 1825

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 #ifndef _RES_S...
by orlanrod
Sun Nov 29, 2015 12:01 am
Forum: Demos
Topic: Cosmic PI (Week # 8)
Replies: 11
Views: 4123

Re: Cosmic PI (Week # 7)

Week 8 of development is up on the first post! 8)
by orlanrod
Sun Nov 15, 2015 12:43 am
Forum: Demos
Topic: Cosmic PI (Week # 8)
Replies: 11
Views: 4123

Re: Cosmic PI (Week # 6)

New blog post is up! 8)
by orlanrod
Sat Nov 07, 2015 6:18 am
Forum: Demos
Topic: Miniplanets (single stage demo)
Replies: 18
Views: 6765

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 the...
by orlanrod
Sat Oct 31, 2015 7:18 pm
Forum: Demos
Topic: Cosmic PI (Week # 8)
Replies: 11
Views: 4123

Re: Cosmic PI

Back with another weekly blog, so check the top post! 8)