上段と下段は同じ色? or 違う色?

 投稿者:しばっち  投稿日:2013年12月15日(日)18時58分56秒
  CALL GINIT(600,600)
LET C1=1
LET C2=6
CALL DISPLAY(C1,C2,5)
PAUSE
CALL DISPLAY(C1,C2,50)
END

EXTERNAL  SUB DISPLAY(C1,C2,SIZE)
CALL TILE(0,0,599,599,C1,C2,SIZE)
CALL TILE(50,50,250,250,2,C2,SIZE)
CALL TILE(350,50,550,250,4,C2,SIZE)
CALL TILE(50,350,250,550,C1,2,SIZE)
CALL TILE(350,350,550,550,C1,4,SIZE)
END SUB

EXTERNAL  SUB TILE(XS,YS,XE,YE,C1,C2,SIZE)
FOR Y=YS TO YE
   FOR X=XS TO XE
      LET I=INT(X/SIZE)
      LET J=INT(Y/SIZE)
      IF MOD(I+J,2)=0 THEN LET C=C1 ELSE LET C=C2
      CALL PSET(X,Y,C)
   NEXT X
NEXT Y
END SUB

EXTERNAL SUB PSET(X,Y,C)
SET POINT COLOR C
PLOT POINTS:X,Y
END SUB

EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0,XSIZE,YSIZE,0
SET POINT STYLE 1
SET COLOR MODE "REGULAR"
SET COLOR MIX(0) 0,0,0
SET COLOR MIX(1) 0,0,1
SET COLOR MIX(2) 1,0,0
SET COLOR MIX(3) 1,0,1
SET COLOR MIX(4) 0,1,0
SET COLOR MIX(5) 0,1,1
SET COLOR MIX(6) 1,1,0
SET COLOR MIX(7) 1,1,1
CLEAR
END SUB
 

戻る