Пример #1
0
// GC : グラフィッククリア (T.Yui)
int isfcmd_53(SCR_OPE *op) {

	SINT32	num;
	BYTE	col[4];

	if ((scr_getval(op, &num) != SUCCESS) ||
		(scr_getbyte(op, &col[0]) != SUCCESS) ||
		(scr_getbyte(op, &col[1]) != SUCCESS) ||
		(scr_getbyte(op, &col[2]) != SUCCESS)) {
		return(GAMEEV_WRONGLENG);
	}
#if 1
	col[3] = 0;
#else
	// Lien->24bit 家族計画->32bit? (チェックする事)
	if (scr_getbyte(op, &col[3]) != SUCCESS) {
		col[3] = 0;
	}
#endif
	if ((num >= 0) && (num < GAMECORE_MAXVRAM)) {
		vram_fill(gamecore.vram[num], NULL,
							MAKEPALETTE(col[0], col[1], col[2]), col[3]);
		effect_vramdraw(num, NULL);
	}
	return(GAMEEV_SUCCESS);
}
Пример #2
0
void title_screen(void)
{
	scroll(-8,240);//title is aligned to the color attributes, so shift it a bit to the right
	unrle_vram(title_nam,0x2000);
	vram_adr(0x2800);//clear second nametable, as it is visible in the jumping effect
	vram_fill(0,1024);
	pal_bg(palTitle);
	pal_bright(4);
	ppu_on_bg();
	delay(20);//delay just to make it look better

	iy=240<<FP_BITS;
	dy=-8<<FP_BITS;
	frame_cnt=0;
	wait=160;
	bright=4;

	while(1)
	{
		ppu_waitnmi();
		scroll(-8,iy>>FP_BITS);

		if(pad_trigger(0)&PAD_START) break;

		iy+=dy;

		if(iy<0)
		{
			iy=0;
			dy=-dy>>1;
		}

		if(dy>(-8<<FP_BITS)) dy-=2;

		if(wait)
		{
			--wait;
		}
		else
		{
			pal_col(2,(frame_cnt&32)?0x0f:0x20);//blinking press start text
			++frame_cnt;
		}
	}
Пример #3
0
// GB : 矩形を描画 (T.Yui)
int isfcmd_58(SCR_OPE *op) {

	SINT32	num;
	BYTE	col[4];
	RECT_U	r;

	if ((scr_getval(op, &num) != SUCCESS) ||
		(scr_getbyte(op, &col[0]) != SUCCESS) ||
		(scr_getbyte(op, &col[1]) != SUCCESS) ||
		(scr_getbyte(op, &col[2]) != SUCCESS) ||
		(scr_getbyte(op, &col[3]) != SUCCESS) ||
		(scr_getrect(op, &r) != SUCCESS)) {
		return(GAMEEV_WRONGLENG);
	}
	if ((num >= 0) && (num < GAMECORE_MAXVRAM)) {
		vramdraw_scrn2rect(&r.s, &r.r);
		vram_fill(gamecore.vram[num], &r.r,
							MAKEPALETTE(col[0], col[1], col[2]), col[3]);
		effect_vramdraw(num, &r.r);
	}
	return(GAMEEV_SUCCESS);
}
Пример #4
0
void event_choicewindraw(TEXTWIN textwin, int num, int method) {

	CHO_T		*cho;
	VRAMHDL		dst;
	RECT_T		rct;
	POINT_T		pt;
	POINT_T		pfnt;
	TEXTCTRL	textctrl;
	DISPWIN		dispwin;
	BOOL		fntgetsize;
	int			pos;

	if ((num < 0) || (num >= textwin->cmdmax)) {
		return;
	}
	cho = textwin->cho + num;
	textctrl = &textwin->textctrl;
	textctrl_renewal(textctrl);
	dst = textwin->cmdvram;
	if (dst == NULL) {
		dst = textwin->textctrl.vram;
	}
	rct = cho->rct;
	fntgetsize = fontmng_getsize(textctrl->font, cho->str, &pfnt);
	if ((fntgetsize == SUCCESS) && (gamecore.sys.type & GAME_ENGSTYLE)) {
		// フォントの差を吸収
		pos = pfnt.x - (rct.right - rct.left);
		if (pos > 0) {
			rct.right += pos;
		}
#if 0
		pos = pfnt.y - (rct.bottom - rct.top);
		if (pos > 0) {
			rct.bottom += pos;
		}
#endif
	}
	if (gamecore.sys.version >= EXE_VER1) {
		if (method) {
			method = 3;
		}
		if (gamecore.sys.type & GAME_CMDWINNOBG) {
			dispwin = &gamecore.dispwin;
			if (dispwin->flag & DISPWIN_CLIPTEXT) {
#ifndef SIZE_QVGA
				rct.left += dispwin->txtclip.left;
				rct.top += dispwin->txtclip.top;
				rct.right += dispwin->txtclip.left;
				rct.bottom += dispwin->txtclip.top;
#else
				pt.x = dispwin->txtclip.left;
				pt.y = dispwin->txtclip.top;
				vramdraw_halfpoint(&pt);
				rct.left += pt.x;
				rct.top += pt.y;
				rct.right += pt.x;
				rct.bottom += pt.y;
#endif
			}
			vram_zerofill(dst, &rct);
		}
		else if (textwin->chocolor[method+2] == 0) {
			vram_zerofill(dst, &rct);
		}
		else {
			vram_fill(dst, &rct, textwin->chocolor[method+2], 0xff);
		}
		if (textctrl->fonttype & TEXTCTRL_SHADOW) {
			pt.x = rct.left + 1;
			pt.y = rct.top + 1;
			vrammix_textex(dst, textctrl->font, cho->str,
								textwin->chocolor[method+1], &pt, &rct);
		}
		pt.x = rct.left;
		pt.y = rct.top;
		vrammix_textex(dst, textctrl->font, cho->str,
								textwin->chocolor[method+0], &pt, &rct);
	}
	else {
		vram_zerofill(dst, &rct);
		pt.x = rct.left;
		pt.y = rct.top;
		if ((fntgetsize == SUCCESS) && (!(gamecore.sys.type & GAME_DRS))) {
			pt.x += (rct.right - rct.left - pfnt.x) / 2;
			pt.y += (rct.bottom - rct.top - pfnt.y) / 2;
		}
		vrammix_textex(dst, textctrl->font, cho->str,
								textwin->chocolor[method], &pt, &rct);
	}
	vramdraw_setrect(dst, &rct);
}