sample16.hsp

sample\hspdsp\sample16.hsp » Plain Format

// sample16.hsp 緊急地震速報みたいな表示サンプル

#include "hspdsp.as"

	mmload "beep.wav",0,0
	dsp_Init
	dsp_CreateThread hwnd ,1
	dialog "*",16
	if stat=0:stop
	fname=refstr
	dsp_open fname,2,0,0,1
	x=dsp_info(0):y=dsp_info(1)
	screen 2,x,32,2:mhdc=hdc:font "",32,16
	dsp_play2
	dsp_setevhwnd dsp_GetThreadHWND()
	onexit *exit


	repeat 10
		if cnt\2=0{
			color 0,0,0:boxf
			pos x/2-96,0:color 5,5,5
			mes "緊急地震速報"
			pos x/2-94,2:color 255,0,0
			mes "緊急地震速報"
		}else{
			color 0,0,0:boxf
		}
		dsp_VMRMixImage mhdc, 0, 0, x, y, 1.0f,0.0f,0.0f,1.0f,1.0f,1,0,0,0
		
		if f=0:mmplay 0:f=1
		wait 30
	loop
	wait 50
	
*lp
		color 0,0,0:boxf
		pos x-i*6,0:color 5,5,5
		mes "神奈川県横浜市 震度7             東京都23区 震度7 "
		pos x-i*6+2,2:color 255,255,255
		mes "神奈川県横浜市 震度7             東京都23区 震度7 "
		dsp_VMRMixImage mhdc, 0, 0, x, y, 1.0f,0.0f,0.0f,1.0f,1.0f,1,0,0,0
		;gsel 0,0:title ""+stat
		i++
		if x=i:i=0
		wait 12
		goto *lp

*exit
	dsp_stop
		
	dsp_exit
	end