void showBmp ( u16 pal, struct genresTiles *grt, u16 tile, VDPPlan plan, u16 x, u16 y, u8 pal_steps ) { SYS_disableInts(); VDP_loadTileData ( grt->tiles, tile, grt->width * grt->height, 0 ); SYS_enableInts(); SYS_disableInts(); VDP_fillTileMapRectInc ( plan, TILE_ATTR_FULL ( pal, 1, 0, 0, tile ), x, y, grt->width, grt->height ); SYS_enableInts(); }
void planHide ( ) { u16 sprite; u16 width = VDP_getScreenWidth() / 8 + 1; s16 desp = VDP_getScreenWidth() == 320 ? 0 : 4; for ( ; width > 0; width-- ) { bool update = false; for ( sprite=0; sprite<MAX_SPRITE; sprite++ ) { if ( vdpSpriteCache[sprite].x/8+2 - 16 + 1 >= width ) { splist_hide_sprite ( sprite ); update = true; } } if ( update ) { VDP_updateSprites(80,1); } SYS_disableInts(); VDP_clearTileMapRect ( PLAN_B, width - 1 + desp, 0, 1, planHeight ); VDP_clearTileMapRect ( PLAN_A, width - 1 + desp, 0, 1, planHeight ); SYS_enableInts(); //waitMs ( PLAN_HIDE_MS ); waitHz(1); } }
void text_write ( char *str, u8 x, u8 y ) { SYS_disableInts ( ); VDP_clearTileMapRect ( PLAN_B, x, y, strlen(str), 1 ); VDP_drawText ( str, x, y ); SYS_enableInts ( ); }
void planHide_and_sprites ( ) { u16 w, sprite; const u16 height = VDP_getPlanHeight(); const u16 width = VDP_getScreenWidth() / 8 + 1; const s16 desp = VDP_getScreenWidth() == 320 ? 0 : 4; for ( w = width; w > 0; w-- ) { for ( sprite=0; sprite<MAX_SPRITE; sprite++ ) { if ( vdpSpriteCache[sprite].x/8+2 >= w ) { splist_hide_sprite ( sprite ); } } VDP_updateSprites(80,1); SYS_disableInts(); VDP_clearTileMapRect ( PLAN_B, w-1+desp, 0, 1, height ); VDP_clearTileMapRect ( PLAN_A, w-1+desp, 0, 1, height ); SYS_enableInts ( ); //waitMs ( PLAN_HIDE_MS ); waitHz(1); } }
void setup(void) { // Initialize Sega VDP VDP_init(); // Configure the screen with to 40 columns VDP_setScreenWidth320(); // Configure background planes to be 64 x 32 cells VDP_setPlanSize(64,32); // Initialize column text output (DMA graphic tiles) col_init(); // Disable interrupts during configuration SYS_disableInts(); // Allow all three interrupts SYS_setInterruptMaskLevel(0); // Set pointers to interrupt service routines SYS_setVIntCallback((_voidCallback *)v_int); SYS_setHIntCallback((_voidCallback *)h_int); // Now we can enable interrupts SYS_enableInts(); // Configure the screen with to 40 columns VDP_setScreenWidth320(); // Configure background planes to be 64 x 32 cells VDP_setPlanSize(64,32); }
void FMP_load ( FMP *fmp, u8 dma ) { SYS_disableInts(); VDP_loadTileData ( fmp->map->tiles, fmp->vram, fmp->map->nbTiles, dma ); SYS_enableInts(); // if ( dma ) VDP_waitDMACompletion(); }
void tool_reset_plan ( VDPPlan plan ) { if ( plan.value == PLAN_A.value ) _plan_dir_a = 0; else _plan_dir_b = 0; SYS_disableInts(); VDP_setHorizontalScroll( plan, 0 ); SYS_enableInts(); }
void _show_scr( const Image *img, u32 ms ) { SYS_disableInts(); VDP_setEnable(FALSE); VDP_drawImageEx( BPLAN, img, TILE_ATTR_FULL( PAL0, FALSE, FALSE, FALSE, TILE_USERINDEX ), 0, 0, TRUE, FALSE ); VDP_setEnable(TRUE); SYS_enableInts(); waitMs(ms); }
void tool_move_plan ( VDPPlan plan, s16 dir ) { if ( plan.value == PLAN_A.value ) { _plan_dir_a += dir; SYS_disableInts(); VDP_setHorizontalScroll( plan, _plan_dir_a ); SYS_enableInts(); } else { _plan_dir_b += dir; SYS_disableInts(); VDP_setHorizontalScroll( plan, _plan_dir_b ); SYS_enableInts(); } }
//Character selection menu //@Fix glitchy BG screen and display of Arrow void ChrselMenu() { Sprite sprites[1]; //Sprite struct DrawBG(0); //Cls DrawBG(8); //Draw "How many players" BG InitMenu(1,0,0,3,_FALSE); //Init a 2 item Menu //Setup the arrow sprite SYS_disableInts(); SPR_init(16); //Sprite tile cache of 16 tiles SYS_enableInts(); // !@ Screws up SPR_initSprite(&sprites[0], &SPR_Arrow, 271, 266, TILE_ATTR(MISCPAL,TRUE,FALSE,FALSE)); //Init the Arrow Sprite VDP_setPalette(MISCPAL, SPR_Arrow.palette->data); //Init pal OBJPAL to Arrow pal echo_play_sfx(SFX_13); //"How many players are going to play today?" JOY_setEventHandler( &BtnHMenu ); //Setup joy handler to HMenu type //While no items are selected while (SItem==0) { //If 1 player hilighted if ((HItem==1) && (Trig==_FALSE)) { SPR_setPosition(&sprites[0],271,266); //Set new arrow position SPR_update(sprites, 1); //Update it } else { SPR_setPosition(&sprites[0],311, 266); SPR_update(sprites, 1); } VDP_waitVSync(); } VDP_resetSprites(); //@Toggle amt of players as appropriately if (SItem==1) { Opts[0]=_FALSE; } else { Opts[0]=PTRUE; } SPR_setPosition(&sprites[0],-128, -128); //@Kill sprite SPR_update(sprites, 1); //Update it SPR_end; //Kill sprite engine echo_wait_sfx(SFX_10); //"Let us play some hockey!" VDP_fadeOutAll(100,_FALSE); }
static void writeText ( u8 *str, u16 pal, u8 inc_y ) { u8 x = 20 - strlen ( str ) / 2; SYS_disableInts(); VDP_setTextPalette ( pal ); VDP_drawText ( prepare_string(str), x, y ); SYS_enableInts(); y += inc_y; }
static void beastScrollingFX(){ u32 hscrollInc = 0; u16 vblCount = 0; u16 vramIndex = TILE_USERINDEX; short i; Sprite sprites[BALL_COUNT]; SYS_disableInts(); VDP_clearPlan(APLAN, 0); VDP_clearPlan(BPLAN, 0); /* Set a larger tileplan to be able to scroll */ VDP_setPlanSize(64, 32); /* Draw the foreground */ VDP_setPalette(PAL1, ground.palette->data); VDP_drawImageEx(BPLAN, &ground, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, vramIndex), 0, 4, FALSE, FALSE); VDP_drawImageEx(BPLAN, &ground, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, vramIndex), 24, 4, FALSE, FALSE); vramIndex += ground.tileset->numTile; VDP_setPalette(PAL0, rse_logo.palette->data); VDP_drawImageEx(APLAN, &rse_logo, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, vramIndex), 0, 6, FALSE, FALSE); vramIndex += rse_logo.tileset->numTile; for(i = 0; i < BALL_COUNT; i++) SPR_initSprite(&sprites[i], &ball_metal, 0, 0, TILE_ATTR_FULL(PAL2, TRUE, FALSE, FALSE, 0)); VDP_setPalette(PAL2, ball_metal.palette->data); SPR_init(BALL_COUNT); SYS_enableInts(); SND_startPlay_XGM(midnight); while (1){ hscrollInc = 0; VDP_waitVSync(); VDP_setHorizontalScroll(PLAN_B, -vblCount); VDP_setHorizontalScroll(PLAN_A, sinFix16(vblCount << 2)); for(i = 0; i < BALL_COUNT; i++) { // SPR_setPosition(&sprites[i], 160 + sinFix16((vblCount << 2) + (i << 5)), 100 + cosFix16((vblCount << 3) + (i << 3))); sprites[i].x = (160 + 0x80) + sinFix16((vblCount << 2) + (i << 5)); sprites[i].y = (100 + 0x80) + cosFix16((vblCount << 3) + (i << 3)); } SPR_update(sprites, BALL_COUNT); vblCount += 1; } }
void transition_fx(u8 frames, u16 vramindex_start) { s16 i, j, k, l; u16 sw, sh; current_plan = VDP_PLAN_A; current_pal = PAL0; SYS_disableInts(); vramIndex = vramindex_start; // u16 VDP_getPlanWidth(); // u16 VDP_getPlanHeight(); VDP_drawImageEx(APLAN, &transition_pattern_0, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, vramIndex), 0, 0, FALSE, FALSE); // vramIndex += transition_pattern_0.tileset->numTile; SYS_enableInts(); sw = VDP_getPlanWidth(); sh = VDP_getPlanHeight(); for(i = 0; i < sw + WIPE_TILE_WIDTH; i++) { VDP_waitVSync(); for(j = 0; j < sh; j++) for(k = 0; k < WIPE_TILE_WIDTH; k++) { l = i - k; if (l < 0) l = 0; else if (l > sw) l = sw - 1; l -= j; if (l < 0) break; else if (l > sw) break; VDP_setTileMapXY(current_plan, vramIndex + k, l, j); //TILE_ATTR_FULL(current_pal, FALSE, FALSE, FALSE, j)); } } }
void typeText ( char *str, u8 x, u8 y, u16 ms ) { u8 i, len = strlen ( str ); for ( i=0; i<len; i++ ) { const char aux[2] = { str[i], '\0' }; SYS_disableInts(); VDP_drawText ( aux, x++, y ); SYS_enableInts(); if ( aux[0] != ' ' ) { waitMs(ms); } } }
void FMP_draw ( FMP *fmp, s8 x_pos, s8 y_pos, s8 x_inner, s8 y_inner, u8 width, u8 height ) { SYS_disableInts(); u16 x, y; const u16 *map = fmp->map->map ; for ( y = 0; y < height; y++ ) { u16 aux = ( y + y_inner ) * fmp->map->width + x_inner; for ( x = 0; x < width; x++ ) { u16 tile = TILE_ATTR_FULL ( fmp->pal, fmp->prio, 0, 0, map [ aux + x ] + fmp->vram ); VDP_setTileMapXY ( fmp->plan, tile, x + x_pos, y + y_pos ); } } SYS_enableInts(); }
u16 RSE_writerSetup(void) { u16 j; current_plan = VDP_PLAN_A; current_pal = PAL0; SYS_disableInts(); VDP_drawImageEx(APLAN, &oddball_fonts, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, vramIndex), 0, 0, FALSE, FALSE); for(j = 0; j < 4; j++) RSE_clearTileRowA(j); SYS_enableInts(); vramIndex += oddball_fonts.tileset->numTile; writer_switch = FALSE; writer_is_done = FALSE; x_offset = 0; writer_display_duration = RSE_FRAMES(50); return vramIndex; }
void planHide_Ex ( VDPPlan plan ) { u16 width = screenWidth / 8 + 1; s16 desp = screenWidth == 320 ? 0 : 4; u16 pal = PAL1; if ( plan.value == PLAN_B.value ) { pal = PAL2; } while ( width-- ) { SYS_disableInts(); VDP_clearTileMapRect ( plan, width - 1 + desp, 0, 1, planHeight ); SYS_enableInts ( ); //waitMs ( PLAN_HIDE_MS ); waitHz(1); } }
static void setDisplay ( u16 on, u16 frames, u16 *colors ) { VDP_waitVSync(); if ( frames ) { if ( on ) { VDP_fadeAllTo ( (u16*) colors, frames, 0 ); } else { VDP_fadeOutAll ( frames, 0 ); } } else { SYS_disableInts ( ); VDP_setPaletteColors ( 0, (u16*) colors, 64 ); SYS_enableInts ( ); } }
static void drawDisclaimerGraphics( void ) { u16 tileIndex; displayOff(0); SYS_disableInts(); tileIndex = TILE_USERINDEX; VDP_drawImageEx( PLAN_B, &screen_disclaimerBGImage_all, IMG_ATTRIBUTES( PAL0 ), 0, 0, 0, FALSE ); tileIndex += screen_disclaimerBGImage_all.tileset->numTile; VDP_drawImageEx( PLAN_A, &screen_disclaimerLogoImage_all, IMG_ATTRIBUTES( PAL1 ), 9, 9, 0, FALSE ); tileIndex += screen_disclaimerLogoImage_all.tileset->numTile; VDP_drawImageEx( PLAN_B, &screen_disclaimerLogoLedImage_all, IMG_ATTRIBUTES( PAL2 ), 26, 9, 0, FALSE ); SYS_enableInts(); preparePal(PAL0, screen_disclaimerBGImage_all.palette->data); preparePal(PAL1, screen_disclaimerLogoImage_all.palette->data); preparePal(PAL2, screen_disclaimerLogoLedImage_all.palette->data); }
static void _disclaimer_simple ( ) { displayInit(); displayOff(0); SYS_disableInts(); resetPalettes(); resetScroll(); resetSprites(); resetScreen(); VDP_drawImageEx ( PLAN_A, &ob_cs_disclaimer, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, 16), 0, 0, 0, 0 ); preparePal ( PAL1, ob_cs_disclaimer.palette->data ); SYS_enableInts(); displayOn(0); waitJoySc(3); displayOff(10); }
static void fastStarFieldFX() { u16 vramIndex = TILE_USERINDEX; s16 i, ns, s; Sprite sprites[256]; SYS_disableInts(); VDP_clearPlan(APLAN, 0); VDP_clearPlan(BPLAN, 0); VDP_setPlanSize(32, 32); /* Draw the foreground */ VDP_drawImageEx(BPLAN, &starfield, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, vramIndex), 0, 0, TRUE, FALSE); vramIndex += starfield.tileset->numTile; /* Set the proper scrolling mode (line by line) */ VDP_setScrollingMode(HSCROLL_LINE, VSCROLL_PLANE); /* Create the scrolling offset table */ s = 1; for(i = 0; i < TABLE_LEN; i++) { scroll_PLAN_B[i] = 0; do { ns = -((random() % 3) + 1); } while (ns == s); scroll_speed[i] = ns; s = ns; } /* Setup the sprites */ SPR_init(256); for(i = 0; i < MAX_DONUT; i++) SPR_initSprite(&sprites[i], &donut, 0, 0, TILE_ATTR_FULL(PAL2, TRUE, FALSE, FALSE, 0)); SPR_update(sprites, MAX_DONUT); VDP_setPalette(PAL2, donut.palette->data); SYS_enableInts(); /* Start !!!! */ s = 0; while (TRUE) { VDP_waitVSync(); BMP_showFPS(1); /* Scroll the starfield */ VDP_setHorizontalScrollLine(PLAN_B, 2, scroll_PLAN_B, TABLE_LEN, TRUE); for(i = 0; i < TABLE_LEN; i++) scroll_PLAN_B[i] = (scroll_PLAN_B[i] + scroll_speed[i]) & 0xFF; /* Animate the donuts */ for(i = 0; i < MAX_DONUT; i++) { // SPR_setPosition(&sprites[i], (cosFix16(s + (i << 5)) << 1) + 160 - 16, sinFix16(s + (i << 5)) + 112 - 16); sprites[i].x = (cosFix16(s + (i << 5)) << 1) + 160 - 16 + 0x80; sprites[i].y = sinFix16(s + (i << 5)) + 112 - 16 + 0x80; SPR_setFrame(&sprites[i], ((s >> 4) + i) & 0x7); } s += 4; SPR_update(sprites, MAX_DONUT); } }
void JOY_init() { vu8 *pb; u8 a, id; u16 i; joyEventCB = NULL; gport = 0xFFFF; // disable ints SYS_disableInts(); /* check for EA 4-Way Play */ pb = (vu8 *)0xa10009; *pb = 0x40; pb = (vu8 *)0xa1000b; *pb = 0x43; pb = (vu8 *)0xa10005; *pb = 0x7C; pb = (vu8 *)0xa1000b; *pb = 0x7F; pb = (vu8 *)0xa10005; *pb = 0x7C; pb = (vu8 *)0xa10003; a = *pb & 3; if (a == 0) { /* EA 4-Way Play detected */ portType[PORT_1] = PORT_TYPE_EA4WAYPLAY; portType[PORT_2] = PORT_TYPE_EA4WAYPLAY; portSupport[PORT_1] = JOY_SUPPORT_EA4WAYPLAY; portSupport[PORT_2] = JOY_SUPPORT_OFF; for (i=JOY_1; i<JOY_NUM; i++) { joyType[i] = JOY_TYPE_UNKNOWN; /* default to unknown */ joyState[i] = 0; joyAxisX[i] = 0; joyAxisY[i] = 0; } // restore ints SYS_enableInts(); /* wait a few vblanks for JOY_update() to get valid data */ VDP_waitVSync(); VDP_waitVSync(); VDP_waitVSync(); return; /* EA 4-Way Play is the only thing that can be plugged in as it takes both ports */ } /* * Initialize ports for peripheral interface protocol - default to * TH Control Method for pads */ /* set the port bits direction */ pb = (vu8 *)0xa10009; *pb = 0x40; pb += 2; *pb = 0x40; pb += 2; *pb = 0x40; /* set the port bits value */ pb = (vu8 *)0xa10003; *pb = 0x40; pb += 2; *pb = 0x40; pb += 2; *pb = 0x40; VDP_waitVSync(); VDP_waitVSync(); /* get ID port 1 */ pb = (vu8 *)0xa10003; a = *pb; *pb = 0x00; id = (a & 8) | (a & 4) ? 8 : 0; id |= (a & 2) | (a & 1) ? 4 : 0; a = *pb; *pb = 0x40; id |= (a & 8) | (a & 4) ? 2 : 0; id |= (a & 2) | (a & 1) ? 1 : 0; portType[PORT_1] = id; /* get ID port 2 */ pb = (vu8 *)0xa10005; a = *pb; *pb = 0x00; id = (a & 8) | (a & 4) ? 8 : 0; id |= (a & 2) | (a & 1) ? 4 : 0; a = *pb; *pb = 0x40; id |= (a & 8) | (a & 4) ? 2 : 0; id |= (a & 2) | (a & 1) ? 1 : 0; portType[PORT_2] = id; /* now set the port support */ portSupport[PORT_1] = JOY_SUPPORT_OFF; /* default to off */ portSupport[PORT_2] = JOY_SUPPORT_OFF; /* default to off */ for (i=JOY_1; i<JOY_NUM; i++) { joyType[i] = JOY_TYPE_UNKNOWN; /* default to unknown */ joyState[i] = 0; joyAxisX[i] = 0; joyAxisY[i] = 0; } switch (portType[PORT_1]) { case PORT_TYPE_MENACER: case PORT_TYPE_JUSTIFIER: /* init port for light gun control */ pb = (vu8 *)0xa10009; *pb = 0x30; pb = (vu8 *)0xa10003; *pb = 0x30; break; case PORT_TYPE_MOUSE: case PORT_TYPE_TEAMPLAYER: /* init port for Three Line Handshake Method */ pb = (vu8 *)0xa10009; *pb = 0x60; pb = (vu8 *)0xa10003; *pb = 0x60; break; case PORT_TYPE_PAD: portSupport[PORT_1] = JOY_SUPPORT_6BTN; /* default to on for pads */ break; } switch (portType[PORT_2]) { case PORT_TYPE_MENACER: case PORT_TYPE_JUSTIFIER: /* init port for light gun control */ pb = (vu8 *)0xa1000b; *pb = 0x30; pb = (vu8 *)0xa10005; *pb = 0x30; break; case PORT_TYPE_MOUSE: case PORT_TYPE_TEAMPLAYER: /* init port for Three Line Handshake Method */ pb = (vu8 *)0xa1000b; *pb = 0x60; pb = (vu8 *)0xa10005; *pb = 0x60; break; case PORT_TYPE_PAD: portSupport[PORT_2] = JOY_SUPPORT_6BTN; /* default to on for pads */ break; } /* check if need to turn on an input device */ if ((portType[PORT_1] != PORT_TYPE_PAD) && (portType[PORT_2] != PORT_TYPE_PAD)) { /* no pads - look for teamplayer or mouse */ if (portType[PORT_1] == PORT_TYPE_TEAMPLAYER) JOY_setSupport(PORT_1, JOY_SUPPORT_TEAMPLAYER); else if (portType[PORT_2] == PORT_TYPE_TEAMPLAYER) JOY_setSupport(PORT_2, JOY_SUPPORT_TEAMPLAYER); else if (portType[PORT_1] == PORT_TYPE_MOUSE) JOY_setSupport(PORT_1, JOY_SUPPORT_MOUSE); else if (portType[PORT_2] == PORT_TYPE_MOUSE) JOY_setSupport(PORT_2, JOY_SUPPORT_MOUSE); } // restore ints SYS_enableInts(); /* wait a few vblanks for JOY_update() to get valid data */ VDP_waitVSync(); VDP_waitVSync(); VDP_waitVSync(); /* now update pads to reflect true type (3 or 6 button) */ if (portType[PORT_1] == PORT_TYPE_PAD) if (joyType[JOY_1] == JOY_TYPE_PAD3) portSupport[PORT_1] = JOY_SUPPORT_3BTN; if (portType[PORT_2] == PORT_TYPE_PAD) if (joyType[JOY_2] == JOY_TYPE_PAD3) portSupport[PORT_2] = JOY_SUPPORT_3BTN; }
static void displayFullScreenPicture(){ s16 i,j,k; u16 tmp_tile_index; SYS_disableInts(); VDP_clearPlan(APLAN, 0); VDP_clearPlan(BPLAN, 0); /* Set a larger tileplan to be able to scroll */ VDP_setPlanSize(64, 32); /* Draw the background */ // VDP_drawImageEx(BPLAN, &pic00, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, vramIndex), 0, 0, TRUE, TRUE); // vramIndex += pic00.tileset->numTile; VDP_setScrollingMode(HSCROLL_PLANE, VSCROLL_PLANE); VDP_setVerticalScroll(PLAN_B, 0); VDP_setVerticalScroll(PLAN_A, 0); VDP_setHorizontalScroll(PLAN_B, 0); VDP_setHorizontalScroll(PLAN_A, 0); SYS_enableInts(); // vramIndex = 0; VDP_waitDMACompletion(); while (1){ /* Pic 0 */ // tmp_tile_index = curTileInd; SYS_disableInts(); VDP_drawImageEx(APLAN, &pic00, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, vramIndex), 0, 0, TRUE, TRUE); SYS_enableInts(); RSE_pause(RSE_FRAMES(1*60)); RSE_pause(RSE_FRAMES(2*60)); VDP_fadeOut(1, 63, 16, FALSE); RSE_turn_screen_to_black(); VDP_waitDMACompletion(); for(i = 0; i < 224 >> 3; i++) { VDP_waitVSync(); RSE_clearTileRowB(i); RSE_clearTileRowA(i); } /* Pic 1 */ // curTileInd = tmp_tile_index; SYS_disableInts(); VDP_drawImageEx(APLAN, &pic01a, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, vramIndex), 0, 12 >> 3, TRUE, TRUE); VDP_waitDMACompletion(); VDP_drawImageEx(BPLAN, &pic01b, TILE_ATTR_FULL(PAL1, TRUE, FALSE, FALSE, vramIndex + pic01a.tileset->numTile), 0, 12 >> 3, TRUE, TRUE); SYS_enableInts(); RSE_pause(RSE_FRAMES(3*60)); VDP_fadeOut(1, 63, 16, FALSE); RSE_turn_screen_to_black(); VDP_waitDMACompletion(); for(i = 0; i < 224 >> 3; i++) { VDP_waitVSync(); RSE_clearTileRowB(i); RSE_clearTileRowA(i); } /* Pic 2 */ // curTileInd = tmp_tile_index; SYS_disableInts(); VDP_drawImageEx(APLAN, &pic02a, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, vramIndex), (320 - 256) >> 4, 0, TRUE, TRUE); VDP_waitDMACompletion(); VDP_drawImageEx(BPLAN, &pic02b, TILE_ATTR_FULL(PAL1, TRUE, FALSE, FALSE, vramIndex + pic02a.tileset->numTile), (320 - 256) >> 4, 0, TRUE, TRUE); SYS_enableInts(); RSE_pause(RSE_FRAMES(3*60)); VDP_fadeOut(1, 63, 16, FALSE); RSE_turn_screen_to_black(); VDP_waitDMACompletion(); for(i = 0; i < 224 >> 3; i++) { VDP_waitVSync(); RSE_clearTileRowB(i); RSE_clearTileRowA(i); } /* Pic 9 */ // curTileInd = tmp_tile_index; SYS_disableInts(); VDP_drawImageEx(APLAN, &pic09, TILE_ATTR_FULL(PAL0, TRUE, FALSE, FALSE, vramIndex), 0, 0, TRUE, TRUE); SYS_enableInts(); RSE_pause(RSE_FRAMES(3*60)); VDP_fadeOut(1, 63, 16, FALSE); RSE_turn_screen_to_black(); VDP_waitDMACompletion(); for(i = 0; i < 224 >> 3; i++) { VDP_waitVSync(); RSE_clearTileRowB(i); RSE_clearTileRowA(i); } } }