Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //dec10,2014 connor oliver
- #include <genesis.h>
- #include "music.h"
- #include "gfx.h"
- int startMnu = 0;
- void joyEvent(u16 joy, u16 changed, u16 state)
- {
- //Check is start button has been pressed
- if (state & BUTTON_START)
- {
- startMnu = 1;
- }
- }
- int main(){
- u16 palette[64];
- u16 ind;
- //disable interrupt while accessing VDP
- SYS_disableInts();
- //init
- VDP_setScreenWidth320();
- //start sprites engine
- SPR_init(256);
- //load up bg
- ind = TILE_USERINDEX;
- VDP_drawImageEx(APLAN, &bg_img, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE);
- ind += bg_img.tileset->numTile;
- //start music
- SND_startPlay_VGM(christmas_music);
- //Was going play some PCM audio, decided against it.
- //SND_startPlay_PCM(DeckTheHalls, sizeof(DeckTheHalls), SOUND_RATE_8000, SOUND_PAN_CENTER, 0);
- //VDP done, renable interrupts
- SYS_enableInts();
- //prepare palettes
- memcpy(&palette[16], bg_img.palette->data, 16 * 2);
- //fade in, doesn't seem to want to fade in right atm, should fix.
- SYS_disableInts();
- VDP_fadeIn(0, (3 * 16) - 1, palette, 20, FALSE);
- SYS_enableInts();
- while(1){
- //main game code if there was any
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement