#8416 - jcpredator - Thu Jul 10, 2003 12:07 am
I am trying to implement a fadeout from my titlescreen to just a black plain. At the moment nothing happens and the titlescreen is displayed with no fading in or out. I will include my code below:
From gamemode.c (the file that is responsible from switching from pregame mode to the real game)
From my fades.c (file that contains register BLDMOD defines)
This is my first try at implementing a fade in/out. Thanks in advance for your help.
-Jc-
_________________
There is no spoon...
From gamemode.c (the file that is responsible from switching from pregame mode to the real game)
Quote: |
void gamemode_fadeOut(void)
{ SetBlendMode(BD_TARGET | MODE3 | BG3_START); SetColY(0x10); } void gamemode_enter(void) { gamemode_fadeOut(); while(1); } |
From my fades.c (file that contains register BLDMOD defines)
Quote: |
#define REG_BLDMOD *(volatile word*)0x04000050
#define REG_COLY *(volatile word*)0x04000054 #define BG0_TARGET 0x1 #define BG1_TARGET 0x2 #define BG2_TARGET 0x4 #define BG3_TARGET 0x8 #define OBJ_TARGET 0x10 #define BD_TARGET 0x20 #define MODE0 0x00 #define MODE1 0x40 #define MODE2 0x80 #define MODE3 0x100 #define BG0_START 0x200 #define BG1_START 0x400 #define BG2_START 0x800 #define BG3_START 0x1000 #define OBJ_START 0x2000 #define BD_START 0x4000 #define SetBlendMode(mode) REG_BLDMOD = (mode) #define SetColY(factor) REG_COLY = (factor) |
This is my first try at implementing a fade in/out. Thanks in advance for your help.
-Jc-
_________________
There is no spoon...