Advanced OCP Art Studio internal data structures

This document describes some of the internal structures used by OCP Advanced Art Studio. Description of OCP Art Studio's resource data format: buttons, menu items etc are defined in this way:

These data structures are collected into a list:

  1. Horizontal coordinates are in the range 0-639. These define a "resolution" equivalent to CPC's mode 2. The vertical coordinates are in the range 0-199.
  2. If this value is -1, then this indicates the end of the list.
  3. If foreground and background are the same, then no button is displayed
OffsetLengthDescription
02x position in pixels (0-639) (note 2)
11Y position in lines (0-199)
22width of element
41height of element
52??
72address of function to call when clicked
91?? if 0x02c draws horizontal lines in button
101bit 7,6: if 0, no border is shown, if !=0 border is shown
bit 5,4: ??
bit 3,2: foreground colour (border & text)
bit 1,0: background colour (note 3)
111??
121bit 7,6: button type (bit 7=1, bit 6=1: toggle button)
bit 2: button state
0x0c4 = toggle button 0x0a0 = tick/cross aligned to right side
13x0x0ff or ascii characters. Last char has bit 7 set. codes>0x07f codes<0 0x0c0 control code? control code 0x02: text with position 2 bytes x position, 1 byte y position text last char of last string has bit 7 set.