sp1_cs, sp1_InitCharStruct, sp1_InsertCharStruct, sp1_RemoveCharStruct

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
amateus
Member
Posts: 46
Joined: Fri Nov 15, 2019 9:13 am

sp1_cs, sp1_InitCharStruct, sp1_InsertCharStruct, sp1_RemoveCharStruct

Post by amateus »

DEPRECATED!!!! SEE https://z88dk.org/forum/viewtopic.php?f=2&t=11456


Hi all,

Anyone knows how to use the these structs/methods? The idea is to create foreground objects (without going for removing strucs or validating areas).

I've tried the code bellow (only showing the related code) and nothing related appears on the screen

Code: Select all

struct sp1_cs *foreground_object;
struct sp1_update foreground_update;
extern unsigned char tilel_gfx[];

sp1_InitCharStruct(foreground_object, SP1_DRAW_LOAD1NR, SP1_TYPE_1BYTE, tilel_gfx, 0);
foreground_update = *sp1_GetUpdateStruct(15, 15); //row 15, col 15
sp1_InsertCharStruct(&foreground_update, foreground_object);
Thanks,
António
Last edited by amateus on Sat Jan 16, 2021 7:33 pm, edited 1 time in total.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: sp1_cs, sp1_InitCharStruct, sp1_InsertCharStruct, sp1_RemoveCharStruct

Post by stefano »

why not starting with a working example?
https://www.z88dk.org/wiki/doku.php?id= ... es:sp1_ex1

.. I'm not an expert but something like sp1_UpdateNow() sounds useful
amateus
Member
Posts: 46
Joined: Fri Nov 15, 2019 9:13 am

Re: sp1_cs, sp1_InitCharStruct, sp1_InsertCharStruct, sp1_RemoveCharStruct

Post by amateus »

stefano wrote: Sat Jan 16, 2021 2:17 pm why not starting with a working example?
https://www.z88dk.org/wiki/doku.php?id= ... es:sp1_ex1

.. I'm not an expert but something like sp1_UpdateNow() sounds useful
I guess you missed the text (only showing the related code) in my original message, or my breakout example a couple of posts bellow... :rolleyes:
Post Reply