12-09-2024, 01:40 PM
I'm amazed the Naalaa 5 code to achieve the star wars crawling text effect is only 35 lines !
I still have Naalaa 5, Naalaa 6, and of course Naalaa 7 on my computer
I still have Naalaa 5, Naalaa 6, and of course Naalaa 7 on my computer
Code:
rem ==================================================================
rem Mode 7 - Bonus example.
rem
rem By Marcus.
rem ==================================================================
rem Import libraries.
import "Mode7.lib"
import "Speed.lib"
rem Set window.
set window 16, 16, 512, 384, false, 1
set redraw off
rem Init mode 7.
proc M7_Init width(primary), height(primary), 3.0
rem Load map.
flags[][] = M7_LoadMap("m7_data/starwars_map.txt")
if sizeof(flags) = 0 then end
rem Change fog.
proc M7_SetFog 0, 0, 0, 1.0, 3.0
z# = 0.5
do
z = z + 0.008
set color 0, 0, 0
cls
proc M7_Render 0.5, z, 0.4, 270.0, -128, 70.0
redraw
proc SPD_HoldFrame 10
until z > 5.5 or keydown(27) or not running()