Hatena::Groupputikonclub

天郷思音(わぁぃ@)の日記 このページをアンテナに追加 RSSフィード

 | 

2017-11-11PRG:2SC

OPTION STRICT
OPTION DEFINT
VAR CSR_CHARS,CSR_XMAX
VAR A,C,H,I,L,S,W,X,Y
VAR CX,CY
VAR OX,OY
VAR _X,_Y
VAR BG_MAX=VAL(DIALOG("","BG_MAX(0-3)",3))
VAR CS'CHIP_SIZE
VAR PAGE

DEF GCOPYA PG,X,Y,W,PX,PY,A
 IF !A THEN
  GCOPY PG,X,Y,X+W-1,Y+W-1,_X,_Y,0
  RETURN
 ENDIF
 VAR COL,RX,RY,X2,Y2,ANG=A AND 3
 FOR Y2=0 TO W-1
  FOR X2=0 TO W-1
   RX=X2:RY=Y2
   IF ANG==1 THEN RX=Y2:RY=W-X2-1
   IF ANG==2 THEN RX=W-X2-1:RY=W-Y2-1
   IF ANG==3 THEN RX=W-Y2-1:RY=X2
   IF A AND 4 THEN RX=W-X2-1
   IF A AND 8 THEN RY=W-Y2-1
   GPAGE 0,PG:COL=GSPOIT(RX+X,RY+Y)
   IF !COL THEN CONTINUE
   GPAGE 0,0:GPSET PX+X2,PY+Y2,COL
  NEXT
 NEXT
 GPAGE 0,0
END

DISPLAY 0
GCLS

CSR_CHARS=(96000-19200*DISPLAY())/WIDTH()/WIDTH()
CSR_XMAX=(400-DISPLAY()*80)/WIDTH()
FOR I=0 TO CSR_CHARS-1
 X=I MOD CSR_XMAX
 Y=I DIV CSR_XMAX
 S=WIDTH()
 GPUTCHR X*S,Y*S,CHKCHR(X,Y),S>>3,S>>3
NEXT
'********************************************
PAGE=BGPAGE()
CS=16
'FOR L=3 TO 0 STEP -1
FOR L=0 TO BG_MAX
 BGOFS L OUT OX,OY
 FOR Y=0 TO 126
  FOR X=0 TO 126
   _X=X*CS-OX:_Y=Y*CS-OY
   IF _X<0 || _X>399 THEN CONTINUE
   IF _Y<0 || _Y>239 THEN BREAK
   A=BGGET(L,X,Y)>>12
   C=BGGET(L,X,Y) AND 1023
   CX=C MOD 32*CS:CY=C DIV 32*CS
   GCOPYA PAGE,CX,CY,CS,_X,_Y,A
  NEXT
 NEXT
NEXT
'********************************************
PAGE=SPPAGE()
FOR I=0 TO 127
 IF SPUSED(I) THEN
  SPCHR I OUT X,Y,W,H,A'?X,Y,W,H
  IF A AND 1 THEN
   IF SPLINK(I)+1 THEN
    SPOFS SPLINK(I) OUT CX,CY
   ELSE
    CX=0:CY=0
   ENDIF
   SPOFS I OUT _X,_Y
   _X=_X+CX
   _Y=_Y+CY
   GCOPYA PAGE,X,Y,W,_X,_Y,A>>1
  ENDIF
 ENDIF
NEXT

CLS:SPCLR:BGCLR
?"FINISH"
?"PUSH (X) TO END"
REPEAT:VSYNC:UNTIL BUTTON(2) AND #X
END

ゲスト



トラックバック - http://putikonclub.g.hatena.ne.jp/ken10ken/20171111
 |