demos/tinyfrac: Post-SVN tidy
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m32s
Build system / Build (pull_request) Successful in 6m59s

- Move source code from `trunk` into root directory.
- Update build files and ASM include paths.
This commit is contained in:
2025-05-31 21:35:02 +01:00
parent 47981cdb1e
commit e570d29f36
6 changed files with 17 additions and 14 deletions

View File

@@ -461,7 +461,7 @@ tup.append_table(img_files, {
{"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/movback"}, {"DEMOS/MOVBACK", VAR_PROGS .. "/demos/movback/movback"},
{"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"}, {"DEMOS/PLASMA", VAR_PROGS .. "/demos/plasma/plasma"},
{"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"}, {"DEMOS/SPIRAL", VAR_PROGS .. "/demos/spiral/spiral"},
{"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/trunk/tinyfrac"}, {"DEMOS/TINYFRAC", VAR_PROGS .. "/demos/tinyfrac/tinyfrac"},
{"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"}, {"DEMOS/TRANTEST", VAR_PROGS .. "/demos/trantest/trunk/trantest"},
{"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"}, {"DEMOS/TUBE", VAR_PROGS .. "/demos/tube/tube"},
{"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/unvwater"}, {"DEMOS/UNVWATER", VAR_PROGS .. "/demos/unvwater/unvwater"},

View File

@@ -221,7 +221,7 @@ fasm demos\magnify\trunk\magnify.asm %BIN%\magnify
fasm demos\movback\trunk\movback.asm %BIN%\demos\movback fasm demos\movback\trunk\movback.asm %BIN%\demos\movback
fasm demos\plasma\trunk\plasma.asm %BIN%\demos\plasma fasm demos\plasma\trunk\plasma.asm %BIN%\demos\plasma
fasm demos\timer\timer.asm %BIN%\demos\timer fasm demos\timer\timer.asm %BIN%\demos\timer
fasm demos\tinyfrac\trunk\tinyfrac.asm %BIN%\demos\tinyfrac fasm demos\tinyfrac\tinyfrac.asm %BIN%\demos\tinyfrac
fasm demos\transp\trunk\transp.asm %BIN%\demos\transp fasm demos\transp\trunk\transp.asm %BIN%\demos\transp
fasm demos\trantest\trunk\trantest.asm %BIN%\demos\trantest fasm demos\trantest\trunk\trantest.asm %BIN%\demos\trantest
fasm demos\tube\trunk\tube.asm %BIN%\demos\tube fasm demos\tube\trunk\tube.asm %BIN%\demos\tube

View File

@@ -1,5 +1,5 @@
if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua") tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir()) add_include(tup.getvariantdir())

View File

@@ -1,3 +1,6 @@
; SPDX-License-Identifier: NOASSERTION
;
; tinyfrac.asm ; tinyfrac.asm
; ;
; teeny program displays the Mandelbrot set. ; teeny program displays the Mandelbrot set.
@@ -82,7 +85,7 @@ use32
dd 0,0 dd 0,0
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include '..\..\macros.inc'
START: START:
call draw_fractal call draw_fractal
@@ -173,39 +176,39 @@ still:
call draw_fractal call draw_fractal
jmp still jmp still
no_right: no_right:
cmp al,19 ;'r' cmp al,19 ;'r'
jne no_red jne no_red
mov ah,3 mov ah,3
call colorize call colorize
jmp still jmp still
no_red: no_red:
cmp al,34 ;'g' cmp al,34 ;'g'
jne no_green jne no_green
mov ah,4 mov ah,4
call colorize call colorize
jmp still jmp still
no_green: no_green:
cmp al,48 ;'b' cmp al,48 ;'b'
jne no_blue jne no_blue
mov ah,5 mov ah,5
call colorize call colorize
jmp still jmp still
no_blue: no_blue:
cmp al,17 ;'w' cmp al,17 ;'w'
jne no_set_as_wallpaper jne no_set_as_wallpaper
mcall 15, 1, PIXWIDTH, PIXHEIGHT mcall 15, 1, PIXWIDTH, PIXHEIGHT
mcall 15, 4, 1 ;mode 1-tiled, 0-stretch mcall 15, 4, 1 ;mode 1-tiled, 0-stretch
mcall 15, 5, IMGBUF, 0, PIXWIDTH*3*PIXHEIGHT mcall 15, 5, IMGBUF, 0, PIXWIDTH*3*PIXHEIGHT
mcall 15, 3 mcall 15, 3
no_set_as_wallpaper: no_set_as_wallpaper:
jmp still jmp still
colorize: colorize:
shr eax,8 shr eax,8
sub eax,3 sub eax,3
imul eax,8 imul eax,8
@@ -392,13 +395,13 @@ scale db STARTSCALE
draw_window: draw_window:
pusha pusha
mcall 12, 1 mcall 12, 1
mcall 48, 4 ;get skin height mcall 48, 4 ;get skin height
lea ecx, [50*65536+PIXHEIGHT+4+eax] lea ecx, [50*65536+PIXHEIGHT+4+eax]
mcall 0,<50,PIXWIDTH+9>,,0x74000000,,header_txt ;draw window mcall 0,<50,PIXWIDTH+9>,,0x74000000,,header_txt ;draw window
call put_image call put_image
mcall 12, 2 mcall 12, 2
popa popa
ret ret
@@ -425,4 +428,4 @@ STARTY dd 120
scaleaddy dd 120 scaleaddy dd 120
scaleaddx dd 200 scaleaddx dd 200
I_END: I_END: