Changes

Jump to: navigation, search

SMIDP2lib for SDCC

821 bytes added, 16:08, 20 December 2011
All loading of image and music into memory must of course be handled in some way. I am far from an expert on this area, but I imagine some kind of iterator, keeping track of where the next available memory is. Therefor we also need some way of freeing memory again, e.g. when we close a Player (for example to load a new tune).
This is far from worked out at this stage though.
 
=== RULES DECIDED SO FAR ===
 
There will be 4 assembler values called sMIDP2lib_clipX, sMIDP2lib_clipY, sMIDP2lib_clipWidth and sMIDP2lib_clipHeight. They'll contain the coordinates and dimensions set by setClip(int x, int y, int width, int height) method, so that all other assembler routines can retrieve them. Each of these 4 values will be 1 byte.
 
There will be 1 assembler value called sMIDP2lib_color which contains the current color set by setColor(int color), so that all other assembler routines can retrieve it. This value will be 1 byte.
 
<pre>
 
sMIDP2lib_clipX:
DB &00 ; Initial startup value
sMIDP2lib_clipY:
DB &00 ; Initial startup value
sMIDP2lib_clipWidth:
DB &ff ; Initial startup value
sMIDP2lib_clipHeight:
DB &ff ; Initial startup value
 
sMIDP2lib_color:
DB &01 ; Initial start value
</pre>
== Supported Methods ==
5
edits