sample\hspdx\TEST6.hsp » Plain Format
#include "hspdx.as"
#include "hsp3util.as"
#include "hsp261cmp.as"
;
; HSPDX.DLL sample6
; パレット設定のサンプル。
; [ESC]キーで終了
;
;------------------------------------------------------------------
wx=640:wy=480
es_ini ; system初期化
es_screen wx,wy,8 ; スクリーン初期化
if stat=1 : goto *dderr1
if stat=2 : goto *dderr2
goto *start ; 正常に完了
*dderr1
dialog {"DirectXの初期化に失敗しました。
"},1
end
*dderr2
dialog {"スクリーンの初期化に失敗しました。
"},1
end
*dderr3
es_bye
wait 100
dialog {"VRAMの容量が不足しています。
"},1
end
;------------------------------------------------------------------
*start
gsel 0,1
es_cls
es_sync
wait 100
es_palfade -256
es_palfade 0,1
pp=0:b=0
*main
es_cls
b=pp>>2
repeat 16
a=b+cnt&15*16
es_palset cnt,a,a,a
loop
pp+
gmode 0,16,16
repeat 16
x=cnt*16
es_fill x,0,cnt
loop
stick ky,$1f ; キーの情報を取得
if ky&$80 : goto *owari ; [ESC]中断チェック
es_sync
await 0
goto *main
*owari
es_bye
end