15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <string.h>
#include "sqlite3.h"
#include "smallxrm.h"
#include "pcfont.h"
#include "quarks.h"
#include "heromesh.h"
#include "cursorshapes.h"
SDL_Surface*screen;
Uint16 picture_size;
int left_margin;
static SDL_Surface*picts;
static Uint8*curpic;
|
>
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <string.h>
#include "sqlite3.h"
#include "smallxrm.h"
#include "pcfont.h"
#include "quarks.h"
#include "heromesh.h"
#include "cursorshapes.h"
#include "keyicons.xbm"
SDL_Surface*screen;
Uint16 picture_size;
int left_margin;
static SDL_Surface*picts;
static Uint8*curpic;
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
++f;
}
t++;
if(!--len) return;
pix+=8;
}
}
const char*screen_prompt(const char*txt) {
static char*t=0;
int n=0;
SDL_Rect r={0,0,screen->w,16};
int m=r.w>>3;
SDL_Event ev;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
++f;
}
t++;
if(!--len) return;
pix+=8;
}
}
void draw_key(int x,int y,int k,int bg,int fg) {
// To be called only when screen is locked!
Uint8*p=screen->pixels;
Uint16 pitch=screen->pitch;
int xx,yy;
const unsigned char*f;
if(x<0 || y<0 || x+16>screen->w || y+16>screen->h) return;
p+=y*pitch+x;
f=keyicons_bits+(k<<5);
for(yy=0;yy<16;yy++) {
for(xx=0;xx<8;xx++) p[xx]=(*f>>xx)&1?fg:bg;
++f;
for(xx=0;xx<8;xx++) p[xx+8]=(*f>>xx)&1?fg:bg;
p+=pitch;
++f;
}
}
const char*screen_prompt(const char*txt) {
static char*t=0;
int n=0;
SDL_Rect r={0,0,screen->w,16};
int m=r.w>>3;
SDL_Event ev;
|