|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
Data Structures | |
| struct | bregs |
| struct | box |
| struct | page |
Macros | |
| #define | PAGE LIB_blitzoslib, BL_IA3|BL_PD0 /* a3 = page of param d0 */ |
| #define | UPAGE LIB_blitzoslib, BL_UA3 /* a3 = used page */ |
| #define | BCALL_(tok, form, r, regs) |
| #define | BCALL(tok, form, r) |
| #define | BCALL_A3(tok, form, r) |
| #define | T_RAWSTATUS 0x3102 /* blitzkeyslib: d0 = raw key -> Z = up */ |
| #define | T_BLITZKEY 0x3106 /* blitzkeyslib: -> d0 = key (<0 none) */ |
| #define | T_SCROLL 0x3202 /* scrolllib */ |
| #define | T_MOUSEX 0x3604 /* mouselib: -> d0 (Quick) */ |
| #define | T_MOUSEY 0x3605 |
| #define | T_MOUSEXSPEED 0x3606 |
| #define | T_POSITIONMOUSE 0x3608 |
| #define | T_BOXF 0x3b84 /* 2dlib: d0-d3, d4 = colour */ |
| #define | T_LINE 0x3b85 |
| #define | T_COLOUR 0x4703 /* fontlib, form 1: d0 = fg, d1 = bg */ |
| #define | T_LOCATE 0x4704 /* fontlib: d0 = column, d1 = row (y<<13) */ |
| #define | T_PRINTN 0x470e /* fontlib: a0 = text, d0 = length */ |
| #define | T_PRINT0 0x470f /* fontlib: a0 = null terminated text */ |
| #define | T_BLIT 0x4b01 /* d0 = shape, d1 = x, d2 = y */ |
| #define | T_JOYX 0x5f01 |
| #define | T_JOYY 0x5f02 |
| #define | T_JOYB 0x5f04 |
| #define | BCALL0(tok, value) |
| #define | BOXAT(p, n) |
| #define | PG ((struct page *)blitz_string) |
Functions | |
| void | _initpage (void) |
| void | _freepage (void) |
| void | _addbox (void) |
| void | _addbox1 (void) |
| void | _addbox2 (void) |
| void | _redrawpage (void) |
| void | _redrawbox (void) |
| void | _selectbox (void) |
| void | _selectbox2 (void) |
| void | _selectbox3 (void) |
| void | _deselectbox (void) |
| void | _activateselected (void) |
| void | _setbox (void) |
| void | _setbox2 (void) |
| void | _boxvalue (void) |
| void | _boxvalue2 (void) |
| void | _setboxstring (void) |
| void | _boxstring (void) |
| void | _boxstring2 (void) |
| void | _boxshow (void) |
| void | _boxshow2 (void) |
| void | _boxselected (void) |
| void | _boxprint (void) |
| void | _boxprint2 (void) |
| void | _setboxcolor (void) |
| void | _blitzevent (void) |
| void | _setboxtitle (void) |
| void | _disablebox (void) |
| void | _enablebox (void) |
| void | _mouseenabled (void) |
| void | _setpagepens (void) |
| void | _boxpropx (void) |
| void | _boxpropy (void) |
| void | _changebox (void) |
| void | _togglebox (void) |
| void | _spotbox (void) |
| void | spotboxchk (void) |
| void | selectboxchk (void) |
| void | initpagechk (void) |
| static void | boxf (WORD x1, WORD y1, WORD x2, WORD y2, ULONG c) |
| static void | line (WORD x1, WORD y1, WORD x2, WORD y2, ULONG c) |
| static void | locate (ULONG x, ULONG y) |
| static void | colour (ULONG fg, ULONG bg) |
| static void | printn (const UBYTE *s, ULONG len) |
| static void | scroll (ULONG sx, ULONG sy, ULONG dx, ULONG dy, UWORD w, UWORD h, void *src, void *dst) |
| static int | rawstatus (UWORD key) |
| static WORD | divs_sat (ULONG dividend, WORD divisor) |
| static void | waitblit (void) |
| static void * | globalloc (ULONG size, ULONG flags) |
| static void | globfree (void *mem, ULONG size) |
| static struct box * | getbox (struct page *p, ULONG n) |
| static void | chkpage (struct page *p) |
| static ULONG | locrow (WORD y) |
| static void | drawbox (struct page *p, struct box *box) |
| static void | freepage_ (struct page *p) |
| static void | initpage_c (ULONG n, UWORD *bm, ULONG used) |
| InitPage Page#,BitMap#,NumBoxes: a page of boxes drawn into a bitmap. | |
| BLITZ_ALIAS (_initpage, initpage_c) | |
| static void | freepage_c (void) |
| FreePage Page#: free the boxes of a page. | |
| BLITZ_ALIAS (_freepage, freepage_c) | |
| static void | setpagepens_c (ULONG dark, ULONG light, ULONG mid, ULONG txt) |
| SetPagePens Page#,c0,c1,c2,c3: the pens of a page. | |
| BLITZ_ALIAS (_setpagepens, setpagepens_c) | |
| static void | togglebox_c (ULONG n) |
| ToggleBox Box#: invert the bevel of a box (NOT of its colour). | |
| BLITZ_ALIAS (_togglebox, togglebox_c) | |
| static void | enablebox_c (ULONG n) |
| EnableBox Box#: enable a disabled box (a positive type). | |
| BLITZ_ALIAS (_enablebox, enablebox_c) | |
| static void | disablebox_c (ULONG n) |
| DisableBox Box#: disable a box (a negative type). | |
| BLITZ_ALIAS (_disablebox, disablebox_c) | |
| static ULONG | boxpropx_c (ULONG n) |
| BoxPropX Box#: the horizontal knob position of a prop box. | |
| BLITZ_ALIAS (_boxpropx, boxpropx_c) | |
| static ULONG | boxpropy_c (ULONG n) |
| BoxPropY Box#: the vertical knob position of a prop box. | |
| BLITZ_ALIAS (_boxpropy, boxpropy_c) | |
| static struct box * | addbox (struct page *p, ULONG n, ULONG x, ULONG y, ULONG w, ULONG h, WORD type) |
| static void | addbox_c (ULONG n, ULONG x, ULONG y, ULONG w, ULONG h, const UWORD *args) |
| AddBox Page#,Box#,x,y,w,h,type: define a box. | |
| BLITZ_ALIAS (_addbox, addbox_c) | |
| static void | addbox2_c (ULONG n, ULONG x, ULONG y, ULONG w, ULONG h, const UWORD *args) |
| AddBox Page#,Box#,x,y,w,h,type,shape,shape: a shape button. | |
| BLITZ_ALIAS (_addbox2, addbox2_c) | |
| static void | boxtext (struct box *b, ULONG len, const UBYTE *s) |
| static void | addbox1_c (ULONG n, ULONG x, ULONG y, ULONG w, ULONG h, const UBYTE *args) |
| AddBox Page#,Box#,x,y,w,h,type,text$: a box with a text. | |
| BLITZ_ALIAS (_addbox1, addbox1_c) | |
| static void | setboxtitle_c (ULONG n, const UBYTE *s, const ULONG *lens) |
| SetBoxTitle Box#,String$: the text of a box. | |
| BLITZ_ALIAS (_setboxtitle, setboxtitle_c) | |
| static void | setbox (ULONG n, ULONG v) |
| static void | setbox_c (ULONG n, ULONG v) |
| SetBox Box#,Value: the value of a box (the selected string). | |
| BLITZ_ALIAS (_setbox, setbox_c) | |
| static void | changebox_c (ULONG n, ULONG v) |
| ChangeBox Page#,Box#,Value: SetBox for the box of a page. | |
| BLITZ_ALIAS (_changebox, changebox_c) | |
| static void | setbox2_c (ULONG n, ULONG qx, ULONG qy) |
| SetBox Box#,xprop,yprop: the knob position of a prop box. | |
| BLITZ_ALIAS (_setbox2, setbox2_c) | |
| static void | setboxcolor_c (ULONG n, ULONG c) |
| SetBoxColor Box#,color: the background colour of a box. | |
| BLITZ_ALIAS (_setboxcolor, setboxcolor_c) | |
| static void | setboxstring_c (ULONG n, const UBYTE *s, const ULONG *lens) |
| SetBoxString Box#,String$: the answer of a string box. | |
| BLITZ_ALIAS (_setboxstring, setboxstring_c) | |
| static ULONG | boxvalue_c (ULONG n) |
| BoxValue(Box#): the value of a box of the used page. | |
| BLITZ_ALIAS (_boxvalue, boxvalue_c) | |
| static ULONG | boxvalue2_c (ULONG callerd0, ULONG n) |
| BoxValue(Page#,Box#): the value of a box of a page. | |
| BLITZ_ALIAS (_boxvalue2, boxvalue2_c) | |
| static ULONG | boxstring (struct page *p, ULONG n) |
| static ULONG | boxstring_c (ULONG n, struct page *p) |
| BoxString(Box#): the answer of a string box, without trailing spaces. | |
| BLITZ_ALIAS (_boxstring, boxstring_c) | |
| static ULONG | boxstring2_c (ULONG callerd0, ULONG n, struct page *p) |
| BoxString(Page#,Box#): BoxString of a box of a page. | |
| BLITZ_ALIAS (_boxstring2, boxstring2_c) | |
| static ULONG | boxselected_c (void) |
| BoxSelected: the selected box of the used page. | |
| BLITZ_ALIAS (_boxselected, boxselected_c) | |
| static void | redrawpage_c (void) |
| RedrawPage: draw all boxes of the used page. | |
| BLITZ_ALIAS (_redrawpage, redrawpage_c) | |
| static void | redrawbox_c (ULONG n) |
| RedrawBox Box#: draw a box of the used page. | |
| BLITZ_ALIAS (_redrawbox, redrawbox_c) | |
| static void | dobs (struct page *p, struct box *b) |
| static void | boxshow_c (ULONG n, UBYTE *bm, ULONG x, ULONG y) |
| BoxShow Box#,Bitmap#,x,y: show part of a bitmap in a view box. | |
| BLITZ_ALIAS (_boxshow, boxshow_c) | |
| static void | boxshow2_c (ULONG n, ULONG dx, ULONG dy) |
| BoxShow Box#,dx,dy: move the view of a view box. | |
| BLITZ_ALIAS (_boxshow2, boxshow2_c) | |
| static void | boxprint (struct page *p, ULONG n, const UBYTE *s, ULONG *lens) |
| static void | boxprint_c (ULONG n, const UBYTE *s, ULONG *lens) |
| BoxPrint Box#,String$: print a line into a view box. | |
| BLITZ_ALIAS (_boxprint, boxprint_c) | |
| static void | boxprint2_c (ULONG n, UBYTE **bank, ULONG ln) |
| BoxPrint Box#,Bank#,Line: print a line of a bank into a view box. | |
| BLITZ_ALIAS (_boxprint2, boxprint2_c) | |
| static void | selectbox_c (ULONG n) |
| SelectBox Box#: select a box (and draw it and the old one). | |
| BLITZ_ALIAS (_selectbox, selectbox_c) | |
| static int | inbox (struct box *b, WORD px, WORD py) |
| static LONG | selectbox3 (struct page *p, WORD x, WORD y) |
| static ULONG | selectbox3_c (ULONG x, ULONG y) |
| SelectBox 0,x,y: select the enabled box at x,y. | |
| BLITZ_ALIAS (_selectbox3, selectbox3_c) | |
| static void | selectbox2 (struct page *p, WORD dx, WORD dy) |
| static void | selectbox2_c (ULONG dx, ULONG dy) |
| SelectBox x+,y+: select the nearest box in a direction. | |
| BLITZ_ALIAS (_selectbox2, selectbox2_c) | |
| static void | deselectbox_c (void) |
| DeSelectBox: deselect the selected box and draw it as not pressed. | |
| BLITZ_ALIAS (_deselectbox, deselectbox_c) | |
| static void | docursor (struct page *p) |
| static void | edstring (struct page *p, struct box *b) |
| static void | activateselected (struct page *p) |
| static void | activateselected_c (void) |
| ActivateSelectedBox: activate the selected box. | |
| BLITZ_ALIAS (_activateselected, activateselected_c) | |
| static ULONG | spotbox_c (void) |
| SpotBox: the box that the mouse is over. | |
| BLITZ_ALIAS (_spotbox, spotbox_c) | |
| static ULONG | mouseenabled_c (ULONG callerd0) |
| MouseEnabled: whether BlitzEvent follows the mouse. | |
| BLITZ_ALIAS (_mouseenabled, mouseenabled_c) | |
| static LONG | blitzevent (struct page *p) |
| static ULONG | blitzevent_c (void) |
| BlitzEvent: handle the user input of the used page. | |
| BLITZ_ALIAS (_blitzevent, blitzevent_c) | |
| static void | spotboxchk_c (void) |
| The error check of SpotBox (debugger only). | |
| static void | selectboxchk_c (ULONG n) |
| The error check of SelectBox Box# (debugger only). | |
| static void | initpagechk_c (ULONG n) |
| The error check of InitPage (debugger only). | |
Variables | |
| static const char | mess1 [] = "UnInitialised Page" |
| static const char | mess2 [] = "Illegal Box# For Page" |
| static const char | mess3 [] = "Value Out of Range" |
| static const char | mess4 [] = "No Room For String" |
| static const char | mess5 [] = "Illegal Box Type" |
| static const char | mess6 [] = "Unitialised Bank" |
| static const char | mess7 [] = "Not a Prop Box" |
| static const char | mess8 [] = "Unitialised BitMap" |
| static WORD | xyxy [4] |
| static WORD | xyxy2 [4] |
| static ULONG | text [2] |
| static WORD | btype |
| static WORD | c0 |
| static WORD | c1 |
| static WORD | c2 |
| static WORD | c3 |
| static WORD | sel |
| static WORD | nable |
| static ULONG | xx |
| static ULONG | yy |
| static WORD | lines |
| static WORD | count |
| static UWORD | cx |
| static UWORD | cy |
| static ULONG | linelen [2] |
| static WORD | inprop |
| static WORD | inedit |
| static WORD | indrag |
| static WORD | edxyc [3] |
| static WORD | status |
| static WORD | delay |
| static WORD | button |
| static WORD | mo |
| static WORD | jx |
| static WORD | jy |
| static WORD | jb |
| static WORD | mx |
| static WORD | my |
| static WORD | mb |
| static WORD | ox |
| static WORD | oy |
| static constexpr WORD | dcon = 6 |
| static constexpr WORD | pspd = 1024 |
| static const WORD | delt [] = { 0, 0, 0, -1, -1, 0, 0, 1, 1, 0 } |
| #define BCALL | ( | tok, | |
| form, | |||
| r ) |
| #define BCALL0 | ( | tok, | |
| value ) |
| #define BOXAT | ( | p, | |
| n ) |
| #define PG ((struct page *)blitz_string) |
| #define T_BLITZKEY 0x3106 /* blitzkeyslib: -> d0 = key (<0 none) */ |
| #define T_BOXF 0x3b84 /* 2dlib: d0-d3, d4 = colour */ |
| #define T_COLOUR 0x4703 /* fontlib, form 1: d0 = fg, d1 = bg */ |
| #define T_JOYB 0x5f04 |
| #define T_JOYX 0x5f01 |
| #define T_JOYY 0x5f02 |
| #define T_LINE 0x3b85 |
| #define T_MOUSEX 0x3604 /* mouselib: -> d0 (Quick) */ |
| #define T_MOUSEXSPEED 0x3606 |
| #define T_MOUSEY 0x3605 |
| #define T_POSITIONMOUSE 0x3608 |
| #define T_PRINT0 0x470f /* fontlib: a0 = null terminated text */ |
| #define T_RAWSTATUS 0x3102 /* blitzkeyslib: d0 = raw key -> Z = up */ |
| #define T_SCROLL 0x3202 /* scrolllib */ |
| void _activateselected | ( | void | ) |
| void _addbox | ( | void | ) |
| void _addbox1 | ( | void | ) |
| void _addbox2 | ( | void | ) |
| void _blitzevent | ( | void | ) |
| void _boxprint | ( | void | ) |
| void _boxprint2 | ( | void | ) |
| void _boxpropx | ( | void | ) |
| void _boxpropy | ( | void | ) |
| void _boxselected | ( | void | ) |
| void _boxshow | ( | void | ) |
| void _boxshow2 | ( | void | ) |
| void _boxstring | ( | void | ) |
| void _boxstring2 | ( | void | ) |
| void _boxvalue | ( | void | ) |
| void _boxvalue2 | ( | void | ) |
| void _changebox | ( | void | ) |
| void _deselectbox | ( | void | ) |
| void _disablebox | ( | void | ) |
| void _enablebox | ( | void | ) |
| void _freepage | ( | void | ) |
| void _initpage | ( | void | ) |
| void _mouseenabled | ( | void | ) |
| void _redrawbox | ( | void | ) |
| void _redrawpage | ( | void | ) |
| void _selectbox | ( | void | ) |
| void _selectbox2 | ( | void | ) |
| void _selectbox3 | ( | void | ) |
| void _setbox | ( | void | ) |
| void _setbox2 | ( | void | ) |
| void _setboxcolor | ( | void | ) |
| void _setboxstring | ( | void | ) |
| void _setboxtitle | ( | void | ) |
| void _setpagepens | ( | void | ) |
| void _spotbox | ( | void | ) |
| void _togglebox | ( | void | ) |
|
static |
|
static |
ActivateSelectedBox: activate the selected box.
Button and list: redraw; string box: start editing (cursor after the prompt); prop: start moving the knob; drag: start dragging. Errors (always checked): "UnInitialised Page".
Reads a3: the used page.
|
static |
|
static |
AddBox Page#,Box#,x,y,w,h,type,text$: a box with a text.
As AddBox, then the text: for a string box the prompt (copied into the spaces; error "No Room For String" if it does not fit); otherwise a copy (memlib globalloc) with "|" as separator of several strings (a text starting with "|" is taken verbatim), view, button and list boxes get value 0 and range = the number of strings (list boxes: fixed, #989).
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
|
static |
AddBox Page#,Box#,x,y,w,h,type,shape,shape: a shape button.
As AddBox, then the box shows shapes (isshape -1): the first shape and the number of shapes (range = second - first + 1); the button's value selects the shape.
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
|
static |
AddBox Page#,Box#,x,y,w,h,type: define a box.
Frees the box's old text; type bit 0 = inverted bevel (NOT of the colour c2), type >> 1 = the box type (0 view, 1 button, 2 string, 3 prop, 4 shape/display, 5 list, 6 drag). A string box gets w/8 spaces, a prop box its knob (fixed axis -1 if the track is too short). Not drawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "No Room For String" (a string box narrower than 8 pixels). Fixed (#84): a string box 8..15 pixels wide gets the empty text (the original wrote 65536 spaces behind its 1 byte).
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
| BLITZ_ALIAS | ( | _activateselected | , |
| activateselected_c | ) |
| BLITZ_ALIAS | ( | _blitzevent | , |
| blitzevent_c | ) |
| BLITZ_ALIAS | ( | _boxprint | , |
| boxprint_c | ) |
| BLITZ_ALIAS | ( | _boxprint2 | , |
| boxprint2_c | ) |
| BLITZ_ALIAS | ( | _boxpropx | , |
| boxpropx_c | ) |
| BLITZ_ALIAS | ( | _boxpropy | , |
| boxpropy_c | ) |
| BLITZ_ALIAS | ( | _boxselected | , |
| boxselected_c | ) |
| BLITZ_ALIAS | ( | _boxshow2 | , |
| boxshow2_c | ) |
| BLITZ_ALIAS | ( | _boxstring | , |
| boxstring_c | ) |
| BLITZ_ALIAS | ( | _boxstring2 | , |
| boxstring2_c | ) |
| BLITZ_ALIAS | ( | _boxvalue | , |
| boxvalue_c | ) |
| BLITZ_ALIAS | ( | _boxvalue2 | , |
| boxvalue2_c | ) |
| BLITZ_ALIAS | ( | _changebox | , |
| changebox_c | ) |
| BLITZ_ALIAS | ( | _deselectbox | , |
| deselectbox_c | ) |
| BLITZ_ALIAS | ( | _disablebox | , |
| disablebox_c | ) |
| BLITZ_ALIAS | ( | _enablebox | , |
| enablebox_c | ) |
| BLITZ_ALIAS | ( | _freepage | , |
| freepage_c | ) |
| BLITZ_ALIAS | ( | _initpage | , |
| initpage_c | ) |
| BLITZ_ALIAS | ( | _mouseenabled | , |
| mouseenabled_c | ) |
| BLITZ_ALIAS | ( | _redrawbox | , |
| redrawbox_c | ) |
| BLITZ_ALIAS | ( | _redrawpage | , |
| redrawpage_c | ) |
| BLITZ_ALIAS | ( | _selectbox | , |
| selectbox_c | ) |
| BLITZ_ALIAS | ( | _selectbox2 | , |
| selectbox2_c | ) |
| BLITZ_ALIAS | ( | _selectbox3 | , |
| selectbox3_c | ) |
| BLITZ_ALIAS | ( | _setboxcolor | , |
| setboxcolor_c | ) |
| BLITZ_ALIAS | ( | _setboxstring | , |
| setboxstring_c | ) |
| BLITZ_ALIAS | ( | _setboxtitle | , |
| setboxtitle_c | ) |
| BLITZ_ALIAS | ( | _setpagepens | , |
| setpagepens_c | ) |
| BLITZ_ALIAS | ( | _togglebox | , |
| togglebox_c | ) |
|
static |
|
static |
BlitzEvent: handle the user input of the used page.
Reads joystick, mouse, cursor keys (Return as button, left Alt + left Amiga and right Amiga + right Alt as the mouse buttons) and the keyboard (BlitzKey): moves the selection, edits string boxes, moves list entries, prop knobs and drag boxes, presses and releases buttons. Fixed (#90): cursor up/down with nothing selected moves no list (the original read btype of selected = 0, at address 8). Fixed (#91): after Backspace at position 0 and the other control characters (Return, Esc, Tab, codes above 127) the cursor is on again (the original left it off). Not a bug (#92): the character cycle of the cursor keys uses BMI after CMP.b.
Reads a3: the used page.
|
static |
|
static |
|
static |
BoxPrint Box#,Bank#,Line: print a line of a bank into a view box.
The line (ended by LF or 0) is printed as BoxPrint Box#,String$. Errors (always checked): "Unitialised Bank", then those of BoxPrint. A line ends at LF or 0 (both count when the lines before it are skipped). Fixed (#87): the bank is not changed (the original replaced the line's LF in the bank by 0).
Reads a3: the used page.
|
static |
BoxPrint Box#,String$: print a line into a view box.
A box lower than 16 pixels scrolls its line left and prints at the right; otherwise the box scrolls up 8 pixels and the string goes into the last line. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "Illegal Box Type" (not a view box). Not a bug (#88): overwrites the string length at -4(a2) with Scroll's size.
Reads a3: the used page.
| n | d0.w: Box# |
| s | d1: the string |
| lens | a2: the argument stack, -4(a2) = the string's length |
|
static |
BoxPropX Box#: the horizontal knob position of a prop box.
Errors (always checked): "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
BoxPropY Box#: the vertical knob position of a prop box.
As BoxPropX.
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
BoxSelected: the selected box of the used page.
(selected - memloc) >> 5. Errors (always checked): "UnInitialised Page". Fixed (#81): shifted as a long (the original's LSR.w gave the wrong number from box 2048 on).
Reads a3: the used page.
|
static |
|
static |
BoxShow Box#,Bitmap#,x,y: show part of a bitmap in a view box.
Scrolls the bitmap from x,y (clipped to the bitmap) into the box. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "Illegal Box Type" (not a view box).
Reads a3: the used page.
|
static |
|
static |
BoxString(Page#,Box#): BoxString of a box of a page.
| callerd0 | d0: Page# (its upper word stays) |
| n | d1.w: Box# |
| p | a1: the page (!libs{blitzoslib,$1180} from Page#) |
|
static |
BoxString(Box#): the answer of a string box, without trailing spaces.
The answer after the prompt goes to a3; no 0 is written, a3 = the end (not a bug, #86: the compiler appends the 0 itself). Errors (always checked): "UnInitialised Page", "Illegal Box# For Page". Fixed (#85): the trailing spaces are stripped back to the start of the answer, an all-space answer is the empty string (the original ran on into the prompt and the memory before the text: a negative length copied up to 65535 bytes).
| n | d0.w: Box# |
| p | a1: the used page (!libs{blitzoslib,$1102}) |
|
static |
|
static |
BoxValue(Page#,Box#): the value of a box of a page.
As BoxValue(Box#) (MOVE d1,d0 first).
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
| callerd0 | d0: Page# (its upper word stays) |
| n | d1.w: Box# |
|
static |
BoxValue(Box#): the value of a box of the used page.
MOVE value,d0: a word function, the upper word of d0 is the caller's. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
|
static |
|
static |
|
static |
DeSelectBox: deselect the selected box and draw it as not pressed.
Restores an inverted bevel and ends editing, prop and drag. Errors (always checked): "UnInitialised Page". Fixed (#94): clears the selection (the original kept selected: BoxSelected still returned the box, BlitzEvent still acted on it).
Reads a3: the used page.
|
static |
DisableBox Box#: disable a box (a negative type).
Not redrawn; a disabled box is drawn as a plain c2 box and cannot be selected with the mouse. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
|
static |
|
static |
EnableBox Box#: enable a disabled box (a positive type).
Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
|
static |
FreePage Page#: free the boxes of a page.
Nothing for an unused page. The texts of the boxes are not freed (memlib's global memory, freed with the program).
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
|
static |
|
static |
|
static |
|
static |
InitPage Page#,BitMap#,NumBoxes: a page of boxes drawn into a bitmap.
Frees the page's old boxes, allocates NumBoxes cleared boxes (32 bytes each, MEMF_PUBLIC|MEMF_CLEAR), sets the pens 1,3,2,1 (the help text of SetPagePens says 3,1,2,3) and makes the page the used one. Errors (always checked): "Unitialised BitMap". Debugger only (initpagechk): "Illegal Number of Boxes" for NumBoxes of 32768 or more (fixed, #1043: the original has no check, the table size NumBoxes x 32 of the sign-extended word became negative).
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
| void initpagechk | ( | void | ) |
|
static |
The error check of InitPage (debugger only).
Fixed (#1043), not in the original (InitPage had no check): the size of the box table is NumBoxes x 32 of the word sign-extended, so NumBoxes of 32768 or more gives a negative size. 0 boxes stay valid (a page without boxes, #83).
Errors: "Illegal Number of Boxes".
| n | d2.w: NumBoxes |
|
static |
|
static |
|
static |
|
static |
MouseEnabled: whether BlitzEvent follows the mouse.
MOVE mo,d0 (low word): set when the mouse moved fast enough, cleared by a direction of the joystick or the cursor keys; 0 while dragging.
| callerd0 | d0: the caller's register (its upper word stays) |
|
static |
|
static |
|
static |
RedrawBox Box#: draw a box of the used page.
Errors (always checked): "UnInitialised Page", "Illegal Box# For Page". Fixed (#89): a box without a text prints nothing (the original printed from address 0 with an old text pointer as the length, in drawbox).
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
RedrawPage: draw all boxes of the used page.
Draws every box with a width. Errors (always checked): "UnInitialised Page".
Reads a3: the used page.
|
static |
|
static |
|
static |
SelectBox x+,y+: select the nearest box in a direction.
From the selected box, the nearest enabled box in direction dx,dy (signs); nothing without a selected box. Errors (always checked): "UnInitialised Page".
Reads a3: the used page.
|
static |
|
static |
SelectBox 0,x,y: select the enabled box at x,y.
Draws the new box and the old one. Errors (always checked): "UnInitialised Page". Not a bug (#93): redraws the old box also when it is the new one.
Reads a3: the used page.
|
static |
SelectBox Box#: select a box (and draw it and the old one).
A negative Box# only deselects. Errors (always checked): "UnInitialised Page". Fixed (#81): the offset is computed as a long (the original's ASL #5 as a word made the boxes 1024..2047 deselect only and wrapped from 2048 on). Errors (debugger only, selectboxchk): "Illegal Box# For Page" (fixed, #82: the original did not check Box#; without the debugger a number behind the table still selects what lies there, an invalid argument).
Reads a3: the used page.
| n | d0.w: Box# |
| void selectboxchk | ( | void | ) |
|
static |
The error check of SelectBox Box# (debugger only).
Fixed (#82), not in the original (SelectBox Box# did not check the number): a Box# from 0 on must be a box of the used page (a negative one deselects). The page is checked first, as SelectBox does.
Errors: "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
|
static |
SetBox Box#,xprop,yprop: the knob position of a prop box.
Quick values: (q-1 if q<>0).w >> 1; a fixed axis (-1) stays. Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "Not a Prop Box".
Reads a3: the used page.
| n | d0.w: Box# |
| qx | d1: xprop (Quick) |
| qy | d2: yprop (Quick) |
|
static |
SetBox Box#,Value: the value of a box (the selected string).
A negative value counts from the end (+ range). Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "Value Out of Range" (not 0 <= value < range).
Reads a3: the used page.
|
static |
|
static |
SetBoxString Box#,String$: the answer of a string box.
Written after the prompt, padded with spaces. Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "No Room For String".
Reads a3: the used page.
| n | d0.w: Box# |
| s | d1: the string |
| lens | a2: the argument stack, -4(a2) = the string's length |
|
static |
SetBoxTitle Box#,String$: the text of a box.
Frees the old text (not of a string box) and sets the new one as AddBox ...,text$. Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page", "No Room For String".
Reads a3: the used page.
| n | d0.w: Box# |
| s | d1: the string |
| lens | a2: the argument stack, -4(a2) = the string's length |
|
static |
SetPagePens Page#,c0,c1,c2,c3: the pens of a page.
Reads a3: the page (!libs{blitzoslib,$1380} from Page# in d0).
| dark | d1.w: c0, the dark bevel pen |
| light | d2.w: c1, the light bevel pen |
| mid | d3.w: c2, the background pen |
| txt | d4.w: c3, the text pen |
|
static |
SpotBox: the box that the mouse is over.
The first enabled box under (mx,my) of the last BlitzEvent. Errors (debugger only, spotboxchk): "UnInitialised Page" (fixed, #83: the original had no page check; without the debugger a page without boxes is still scanned 65536 entries far, an invalid argument).
Reads a3: the used page.
| void spotboxchk | ( | void | ) |
|
static |
The error check of SpotBox (debugger only).
Fixed (#83), not in the original (SpotBox had no page check): the used page must be initialised (a memory size, i.e. InitPage with at least one box), as the other commands check always.
Errors: "UnInitialised Page".
Reads a3: the used page.
|
static |
ToggleBox Box#: invert the bevel of a box (NOT of its colour).
Not redrawn. Errors (always checked): "UnInitialised Page", "Illegal Box# For Page".
Reads a3: the used page.
| n | d0.w: Box# |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticconstexpr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticconstexpr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |