русский

Игры ч3, воспоминание 31.05.2024

31.05.24 17:16
Re: Игры ч3, воспоминание 31.05.2024
 
uscheswoi_82 коренной житель
uscheswoi_82

Улучшил код, теперь можно меня размер, и генерирует DATA:



Попробуем спрайт марио превратить в DATA:



Вот код:

DATA 15,15,15,15,15,7,12,12,12,12,12,12,12,15,15,15,15,15,15,15,0
DATA 15,15,15,15,8,12,12,12,12,12,12,12,12,12,12,12,12,15,15,15,0
DATA 15,15,15,15,6,4,6,6,6,12,12,12,6,12,8,8,8,15,15,15,0
DATA 15,15,15,15,6,6,6,6,6,6,14,14,6,14,7,15,15,15,15,15,0
DATA 15,15,15,6,6,6,14,6,14,14,14,14,6,14,14,14,14,15,15,15,0
DATA 15,15,15,6,6,6,14,6,6,6,14,14,14,6,6,14,14,6,7,15,0
DATA 15,15,15,6,6,6,6,6,6,14,14,14,6,6,6,6,6,15,15,15,0
DATA 15,15,15,8,7,8,6,14,14,14,14,14,6,6,6,6,8,15,15,15,0
DATA 15,15,15,15,15,7,6,6,6,6,6,6,6,7,7,7,15,15,15,15,0
DATA 15,15,15,15,6,6,6,6,12,6,6,6,6,15,15,15,15,15,15,15,0
DATA 15,15,15,6,6,6,6,6,12,6,6,6,12,6,6,6,6,15,15,15,0
DATA 15,7,6,6,6,6,6,6,12,12,12,12,12,6,6,6,6,6,7,15,0
DATA 15,7,6,6,6,6,6,6,12,12,12,12,12,6,6,6,6,6,7,15,0
DATA 15,15,14,14,14,6,6,12,14,12,12,12,14,12,6,6,14,14,15,15,0
DATA 15,15,14,14,14,14,14,12,12,12,12,12,12,12,12,14,14,14,15,15,0
DATA 15,15,14,14,14,12,12,12,12,12,12,12,12,12,12,12,14,14,15,15,0
DATA 15,15,15,15,12,12,12,12,12,7,7,12,12,12,12,12,15,15,15,15,0
DATA 15,15,15,8,6,6,6,6,7,15,15,7,6,6,6,6,8,15,15,15,0
DATA 15,15,7,6,6,6,6,6,15,15,15,15,6,6,6,6,6,7,15,15,0
DATA 15,7,6,6,6,6,6,6,15,15,15,15,6,6,6,6,6,6,7,15,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

SCREEN 7
FOR Y = 0 TO 20
  FOR X = 0 TO 20
    READ c
    PSET (X, Y), c
  NEXT X
NEXT Y


Результат:



Теперь пусть белый цвет будет прозрачным см.:

DATA 15,15,15,15,15,7,12,12,12,12,12,12,12,15,15,15,15,15,15,15,0
DATA 15,15,15,15,8,12,12,12,12,12,12,12,12,12,12,12,12,15,15,15,0
DATA 15,15,15,15,6,4,6,6,6,12,12,12,6,12,8,8,8,15,15,15,0
DATA 15,15,15,15,6,6,6,6,6,6,14,14,6,14,7,15,15,15,15,15,0
DATA 15,15,15,6,6,6,14,6,14,14,14,14,6,14,14,14,14,15,15,15,0
DATA 15,15,15,6,6,6,14,6,6,6,14,14,14,6,6,14,14,6,7,15,0
DATA 15,15,15,6,6,6,6,6,6,14,14,14,6,6,6,6,6,15,15,15,0
DATA 15,15,15,8,7,8,6,14,14,14,14,14,6,6,6,6,8,15,15,15,0
DATA 15,15,15,15,15,7,6,6,6,6,6,6,6,7,7,7,15,15,15,15,0
DATA 15,15,15,15,6,6,6,6,12,6,6,6,6,15,15,15,15,15,15,15,0
DATA 15,15,15,6,6,6,6,6,12,6,6,6,12,6,6,6,6,15,15,15,0
DATA 15,7,6,6,6,6,6,6,12,12,12,12,12,6,6,6,6,6,7,15,0
DATA 15,7,6,6,6,6,6,6,12,12,12,12,12,6,6,6,6,6,7,15,0
DATA 15,15,14,14,14,6,6,12,14,12,12,12,14,12,6,6,14,14,15,15,0
DATA 15,15,14,14,14,14,14,12,12,12,12,12,12,12,12,14,14,14,15,15,0
DATA 15,15,14,14,14,12,12,12,12,12,12,12,12,12,12,12,14,14,15,15,0
DATA 15,15,15,15,12,12,12,12,12,7,7,12,12,12,12,12,15,15,15,15,0
DATA 15,15,15,8,6,6,6,6,7,15,15,7,6,6,6,6,8,15,15,15,0
DATA 15,15,7,6,6,6,6,6,15,15,15,15,6,6,6,6,6,7,15,15,0
DATA 15,7,6,6,6,6,6,6,15,15,15,15,6,6,6,6,6,6,7,15,0
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

SCREEN 7
FOR Y = 0 TO 20
  FOR X = 0 TO 20
    READ c
    if c <> 15 then PSET (X, Y), c
  NEXT X
NEXT Y


Вуаля! А вот и результат, белый у нас теперь прозрачный:



Если я кому-то отвечаю, это не значит что я ему симпатизирую, каждый остаётся при своём мнение Tagebuch der schwerbehinderten Person
 

Sprung zu