Last active
February 12, 2021 12:29
-
-
Save fu-sen/7274432 to your computer and use it in GitHub Desktop.
風船デモ ( balloons demo ) | MSX-BASIC https://msxjpn.jimdofree.com/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0/%E9%A2%A8%E8%88%B9%E3%83%87%E3%83%A2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' balloons demo | MSX-BASIC | |
' Copyright (c) 2012-2019 Keiichi Shiga (BALLOON | FU-SEN) | |
' The MIT License (MIT) - https://mit.balloon.net.eu.org/#2012-2019 | |
100 COLOR ,1,1:SCREEN 1,1 | |
110 KEY OFF:WIDTH 30 | |
120 T=RND(-TIME):DEFINT A-Z:B=0 | |
130 DIM X(31),Y(31),C(31),M(31) | |
140 LOCATE 1,2:PRINT "MSX-BASIC DEMO" | |
150 H$=CHR$(14)+CHR$(29) | |
160 H$=H$+CHR$(31)+CHR$(31) | |
170 H$=H$+CHR$(14)+CHR$(8) | |
180 H$=H$+CHR$(16)+CHR$(224) | |
190 SPRITE$(0)=H$ | |
200 FOR I=0 TO 31 | |
210 X(I)=RND(1)*256 | |
220 Y(I)=RND(1)*192 | |
230 C(I)=RND(1)*15 | |
240 M(I)=RND(1)*8+1 | |
250 NEXT I | |
260 FOR I=0 TO 31 | |
270 FOR J=0 TO 31 | |
280 PUT SPRITE J,(X(J),Y(J)),C(J),0 | |
290 ON M(J) GOSUB 370,370,410,380,380,380,410,370 | |
300 ON M(J) GOSUB 410,390,390,390,410,400,400,400 | |
310 NEXT J | |
320 M(I)=RND(1)*8+1 | |
330 IF I MOD 15<>14 GOTO 350 | |
340 B=(B+1)MOD 16:COLOR ,B | |
350 NEXT I | |
360 GOTO 260 | |
370 Y(J)=(Y(J)+4)MOD 192:RETURN | |
380 Y(J)=(Y(J)+188)MOD 192:RETURN | |
390 X(J)=(X(J)+252)MOD 256:RETURN | |
400 X(J)=(X(J)+4)MOD 256:RETURN | |
410 RETURN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment