'■ PS2だと、ベジェなポリゴンがつかえるのでこんなのは '■ 数点指定すれば表示できるんだよなぁ clear 1000 screen 0 '▼ 圧縮されたグラフィックを展開する gosub *grp_decode '▼ テクスチャを円筒形ポリゴンに貼りつける gosub *texture_paste '▼ 背景描画 cls 0 line (0,0)-(352,111),rgb(0,0,1),bf line (0,112)-(352,223),rgb(0,0,2),bf '▼ ポリゴン配置 poly = 4 for i=1 to poly objatr i,0,0 objtype i,4 objlink i,0 obj(i,@xp) = 300*xsin(i/poly), 0, 300*xcos(i/poly) obj(i,@yrv)= 0.002 obj(i,@xs)=3,3,3 next '▼ 視点切り替え r2 = 300 y = -80 *loop r = 300*(1.5+xcos(i/1000)) x1 = r*xcos(i/1000): z1 = r*xsin(i/1000) x2 = r2*xsin(j/4800): z2 = r2*xcos(j/4800) camera (x1,y,z1) to (x2,y,z2) vsync i = (i+1)mod 1000 j = (j+1)mod 4800 goto *loop end '----------------------------------------------------------- ' 32768色ビットマップを円筒形ポリゴンに貼りつける '----------------------------------------------------------- *texture_paste '▼ 頂点を計算 setvertex 0,g_width*2 r = g_width/6.28 for i=0 to g_width-1 x = r*xcos(i/g_width) y = -g_height z = r*xsin(i/g_width) setvertex (x,0,z),(x,y,z) next '▼ 面を定義 setpolygon 0,g_width,0 setatr 0,g_width g_height = fix(g_height/8)*8+8 for i=0 to g_width-1 gcopy (i,0)-(i,g_height) to tx$ settex i,g_height,1,32768,right$(tx$,g_height*2) setpolygon,(i*2,i*2+1,(i*2+3)mod (g_width*2),(i*2+2)mod (g_width*2)) setatr (1,1,3,i,0,8) next return '------------------------------------------------------------ ' グラフィック展開ルーチン ' Ishidaさんの GC2 を使って作成しました。感謝! ' Ishidaさんのページ-> http://homepage1.nifty.com/open-prog/ '----------------------------------------------------------- *grp_decode restore *texture_data g_width = 256 g_height= 99 lzss$ = readhex$(5525):gosub *lzss_decoder gcopy strw$(1,g_width)+STRW$(1,g_height)+PEEK$(0,4,g_width*g_height*2) to 0,(0,0) return '--------------------------------- 'LZSS Ver 2.0 DECODER '--------------------------------- *LZSS_decoder poke 768,0,lzss$:p=6:c=0:pt=0:num=peek(768,4)*256+peek(768,5) for t=0 to num-1:poke 512,t*8,right$(bin$(peek(768,p),1),8):p=p+1:next *lzss_loop if peek(512,c)=48 then poke 0,pt,peek(768,p):p=p+1:pt=pt+1 else n=peek(768,p)*256+peek(768,p+1):b=(n and &Hffe0)/32:n=(n and &H1f)+3 poke 0,pt,peek$(0,pt-b,n):p=p+2:pt=pt+n endif if p