[Coco] Card game skeleton for development with CMOC compiler

Pierre Sarrazin sarrazip at sarrazip.com
Thu Aug 13 19:57:38 EDT 2015


Dixit Mark McDougall (2015-08-13 15:43):
> It's considered bad practice to put code in headers, unless it's to
> be compiled inline.
> 
> Though I also notice CMOC lacks support for "separate compilation",
> and suspect this si the reason it is done in this case.

Indeed, that's the reason.

> Perhaps you could move the code and local variables & preprocessor
> directives etc into a .c file and (gasp) #include that in the main
> skeleton file? At least it will be 'nicer' on more complete
> compilers or perhaps one day if/when CMOC gets enhanced? Or not.

I did not check if the code would compile with any other compiler,
because it is very CoCo-dependent, so the issue is academic for now.
Anyway, it won't be difficult to make the change when needed.

By the way, I forgot to provide links to the card bitmap and text
font header files, so here they are:

http://sarrazip.com/dev/compiled-cards.h
http://sarrazip.com/dev/8-bit-wide-font.h

I'm hoping someone will code a CoCo version of 52 Pickup.

-- 
Pierre Sarrazin <sarrazip @ sarrazip . com>


More information about the Coco mailing list