From: Groepaz (groepaz_at_gmx.net)
Date: 2003-02-05 23:00:08
On Wednesday 05 February 2003 22:22, Marc 'BlackJack' Rintsch wrote:
> using anonymous structs (correct term?) but I remember vaguely that
> cc65 can't pass structs as function parameters. So maybe you want to
> rewrite it this way:
>
> typedef struct{
> char color1, color2;
> } ROYWINCOL_T;
>
> ROYWINCOL_T a;
>
> void setcharcolors(char c1, char c2) {
> a.color1 = c1;
> a.color2 = c2;
> }
>
> void main(void){
> setcharcolors(1,0);
> }
alternativly, pass a pointer to the struct (better if the struct has more than
2 members, since the argument stack wouldnt be used)
--
___ ___ .___________________ .___________ _______.
c=64 / | \| \__ ___/ \ \_ _____/ \ \ [groepaz]
gb / ' \ | | | / \ / \ | __)_ / | \ gp32
cgb \ . / | | |/ ' \| \/ | \ psx
gba \___|_ /|___| |____|\____|__ /_______ /\____|__ / dc
-----\/-----'---------------\/--------\/---------\/
http://www.hitmen-console.org Hitmen WWW Headquarters
http://fly.to/hitmen-groepaz my personal playground
http://rr.c64.org/silversurfer home of the RR debugger
ftp.musoftware.de/pub/groepaz cc65 dump site
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-02-05 22:58:33 CET