Foxglovz v0.3 released

Discussion about other targets
Post Reply
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Foxglovz v0.3 released

Post by WauloK »

v0.3: Support for proportional fonts. All font.h files must contain a charwidth[] int array with the width of each character to display - in pixels.
New Foxglovz version and font uploaded to the site below.
Foxglovz is a new Graphics Library for the VZ computer. Basically this name derives from Fox Graphics Library On VZ.

It was originally developed for the VZ 200 and VZ 300 computers but technically should work on any platform supported by the Z88DK development kit so long as it supports monochrome graphics sprites.

It was written by Jason "WauloK" Oakley.

You can read about it and download from: https://bluebilby.com/foxglovz/
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Cool, can I recommend getmaxx() and getmaxy() for getting hold of the screen dimensions?
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

Sounds good to me. Thanks!
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

Since the colours are out of order on z88dk here they are if you can update them please:

MODE(0) - text & blocky characters
extern int _vzgreen = 1;
extern int _vzyellow = 2;
extern int _vzblue = 3;
extern int _vzred = 4;
extern int _vzbuff = 5;
extern int _vzcyan = 6;
extern int _vzmagenta = 7;
extern int _vzorange = 8;
Now in MODE(1) there's the same green,yellow,blue,red. But if in BASIC you use COLOR x,1 the ",1" switches graphics mode to a different 4 colour set: buff,cyan,magenta,orange so you can only have 4 colours at a time. The green background changes to buff. Not sure how to call this graphics mode change in z88dk.
In the text/blocky chars mode the ,1 changes the background to an orange colour instead of green but the blocky-char colours are still 1-8.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Ah, colours, I've had a lot of "fun" with them over the past year or so.

Simple thing first, you can switch to the other set of colours in mode 1 by switching to mode 33 (that is 1 + 32), this matches the behaviour on the other 6847 machines which use bit 5 of the mode to set the CSS flag.

Colours that are used are defined in <conio.h> - the mapping will work correctly for mode 0. You can disable the mapping by adding -pragma-define:CLIB_CONIO_NATIVE_COLOUR=1 (just committed) which means you can use the vz_ colours.

I don't think I've done the mapping for mode 1 for any of the 6847 machines - I'll see if I can come up with something - there's 4 bits to play with so I should be able to encode the colours for the mode 1, and mode 1+CSS in that.
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

Cheers
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

I tested with MODE(1) and the textcolor(x) functions and they do work, tho.

Code: Select all

int mode = 1;
console_ioctl(IOCTL_GENCON_SET_MODE, &mode);
textcolor(4);
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

I see there are multiple putsprite routines. What would be the best way to call putsprite from Assembly?
I'd like to do a Tiles type routine but I think C would be to slow to draw a screen full of sprites.
It may be that since the VZ can only use the slowest putsprite I may have to just do it by hand with 4 pixels per byte and make all tiles a multiple of 4 on the X axis then write code similar to my vz_score or brick routine. But then it's not cross platform any more.
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

Both textcolor(x) and vz_color(x) seem to have stopped working.
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

Code: Select all

        int mode = 33;
        console_ioctl(IOCTL_GENCON_SET_MODE, &mode);
Using mode = 1 or mode =33 no longer changes modes. Only clg() changes modes but I cannot change the colour of anything
WauloK
Member
Posts: 63
Joined: Thu Oct 10, 2019 10:45 am

Post by WauloK »

oh sorry! Turns out I was downloading from SourceForge and not getting -latest nightly builds. I guess SF is way outta date.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Yes. Sourceforge just has the last release. I?m minded to do a new cut in the new year, but nightly builds are only available from the dedicated server.
Post Reply