Page 1 of 1
Miniwood and constants
Posted: Thu Jan 15, 2026 6:14 pm
by amyren
I just installed HW11 and wanted to test the new Miniwood feature.
Then I notice that constants are not defined in Miniwood. I guess I could define ocnstants like colors using the Const command, but I am not sure how to define others like, #SANS, #SERIF, #BORDER, #FILLCOLOR, #NORMAL, #IMGFMT_ILBM, #IMGFMT_JPEG, #IMGFMT_PNG, #IMGFMT_BMP, #POINTER, #STDPTR_SYSTEM, #BRUSH, #ATTRWIDTH, #NOCOLOR ... and a bunch of others I have in that script.
Re: Miniwood and constants
Posted: Thu Jan 15, 2026 6:33 pm
by plouf
Have you use @USING "library"
Using library adds funtions AND constants
Which functions are these contants for?
Re: Miniwood and constants
Posted: Fri Jan 16, 2026 1:05 pm
by amyren
plouf wrote: ↑Thu Jan 15, 2026 6:33 pm
Have you use @USING "library"
Using library adds funtions AND constants
Which functions are these contants for?
Thanks for pointing me in the right direction. I was not sure where to start but I got it to work now after adding the required libraries.
Another Miniwood related question, I tried to reduce the executable filesize additionally by setting the Compress tag.
But the file output file size is the same. Is this the correct syntax?
Re: Miniwood and constants
Posted: Sun Jan 18, 2026 9:36 pm
by airsoftsoftwair
amyren wrote: ↑Fri Jan 16, 2026 1:05 pm
Another Miniwood related question, I tried to reduce the executable filesize additionally by setting the Compress tag.
But the file output file size is the same. Is this the correct syntax?
Is it *exactly* the same or roughly the same? For minimal test scripts that don't use external libraries it can happen that activating compression doesn't have a great effect because if you set "Compress" to TRUE, it means that the decompressor code has to be linked and that is around 30kb. So it could happen that you don't see any major change but only for very small projects. For bigger projects with many libraries executables should definitely be way smaller when setting "Compress" to TRUE.
Re: Miniwood and constants
Posted: Mon Jan 19, 2026 10:32 am
by amyren
The size is 2001KB with Miniwood regardles if I set that option.
Compiling it as Hollywood the 68k executable is 3222KB, so there is a good reduction with Miniwood.
Could it be that the standard compression already compresses the libraries when compiling from the windows IDE?
I always select to enable compression at the prompt when compiling.
I notice if I set Compress = FALSE, then the Miniwood executable gets 3140KB, with Hollywood 3528KB .
I have these libraries linked
Code: Select all
@IF #HW_MINI
@USING "brush"
@USING "dos"
@USING "display"
@USING "draw"
@USING "error"
@USING "event"
@USING "filters"
@USING "graphics"
@USING "icon"
@USING "imageio"
@USING "math"
@USING "object"
@USING "offscreen"
@USING "palette"
@USING "pointer"
@USING "requester"
@USING "sprite"
@USING "string"
@USING "system"
@USING "text"
@USING "time"
@ENDIF
@OPTIONS {Compress = True}
Re: Miniwood and constants
Posted: Mon Jan 19, 2026 3:50 pm
by jPV
amyren wrote: ↑Mon Jan 19, 2026 10:32 amCould it be that the standard compression already compresses the libraries when compiling from the windows IDE?
I always select to enable compression at the prompt when compiling.
Yes, it's the same.
From the documentation:
"if you activate compression, e.g. by setting the Compress tag to True in the
@OPTIONS preprocessor command or by passing the -compress console argument"
If you enable compression from an IDE, it uses the "-compress" argument, and the result is the same as with the
@OPTIONS preprocessor.