Last modified on 17 December 2010, at 14:19

Format:Advanced OCP Art Studio internal structures

This article originally came from Kevin Thackers' archive at http://www.cpctech.org.uk.

Advanced OCP Art Studio internal data structures

This document describes some of the internal structures used by The Advanced OCP 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:

Offset Length Description
0 2 x position in pixels (0-639) (note 2)
1 1 Y position in lines (0-199)
2 2 width of element
4 1 height of element
5 2  ??
7 2 address of function to call when clicked
9 1  ?? if 0x02c draws horizontal lines in button
10 1 bit 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)
11 1  ??
12 1 bit 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
13 x 0x0ff 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.
  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