3 some of X-BASIC compatible functions
5 Made by Studio Breeze. 1998, 2002
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 #include "sted_screen.h"
29 /* graphic functions */
32 fill( int in_x0, int in_y0, int in_x1, int in_y1, unsigned int in_col )
39 scr->GraphicsFill(in_x0, in_y0, in_x1, in_y1, in_col);
44 box( int in_x0, int in_y0, int in_x1, int in_y1, unsigned int in_col, unsigned int in_ls )
51 scr->GraphicsBox(in_x0, in_y0, in_x1, in_y1, in_col, in_ls);
56 point( int in_x, int in_y )
63 return scr->GraphicsPoint(in_x, in_y);
67 line( int in_x0, int in_y0, int in_x1, int in_y1, int in_col, int in_ls )
74 scr->GraphicsLine(in_x0, in_y0, in_x1, in_y1, in_col, in_ls);
79 symbol( int in_x, int in_y, char *in_st, char in_h, char in_v, char in_mo, int in_p, char in_an )
86 scr->SetGraphicsColor(in_p);
87 scr->GraphicsPuts(in_x, in_y, in_st);
94 /* returns string describing current day(?) */
95 char *dtasc( unsigned int j ) {
97 static char dtasc_name[10];
105 snprintf(dtasc_name, 10, "%02d-%02d-%02d", y, ((j>>5)&0x0f)+1, j&0x1f );
110 /* returns string describing current time(?) */
111 char *tmasc( unsigned int j ) {
113 static char tmasc_name[10];
115 snprintf(tmasc_name, 10, "%02d:%02d:%02d", (j>>11)&0x1f, (j>>5)&0x3f, (j&0x1f)*2 );
119 /* returns mouse positions */
121 mspos( int *out_x, int *out_y )
123 CSTedScreenBase* scr;
127 return scr->GetMousePos(out_x, out_y);
130 /* returns someting B-) */
131 void b_striS ( char * buf, int bufSize, int num ) {
134 r=snprintf( buf, bufSize, "%d", num );
141 /* set current Kanji mode */
142 void KNJCTRL( int i, int j ) {
144 /* not implemented */