Unified · Split
| @@ -3,10 +3,6 @@ include ../Make.config · 2 unmodified lines | ||
| 3 | 3 | LIB=libgui.a |
| 4 | 4 | |
| 5 | 5 | OFILES=\ |
| 6 | − alloc.$O\ | |
| 7 | − cload.$O\ | |
| 8 | − draw.$O\ | |
| 9 | − load.$O\ | |
| 10 | 6 | screen.$O\ |
| 11 | 7 | r16.$O |
| 12 | 8 | |
| @@ -1,23 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <draw.h> | |
| 4 | −#include <memdraw.h> | |
| 5 | − | |
| 6 | −Memimage* | |
| 7 | −allocmemimage(Rectangle r, ulong chan) | |
| 8 | −{ | |
| 9 | − return _allocmemimage(r, chan); | |
| 10 | −} | |
| 11 | − | |
| 12 | −void | |
| 13 | −freememimage(Memimage *i) | |
| 14 | −{ | |
| 15 | − _freememimage(i); | |
| 16 | −} | |
| 17 | − | |
| 18 | −void | |
| 19 | −memfillcolor(Memimage *i, ulong val) | |
| 20 | −{ | |
| 21 | − _memfillcolor(i, val); | |
| 22 | −} | |
| 23 | − | |
| @@ -1,10 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <draw.h> | |
| 4 | −#include <memdraw.h> | |
| 5 | − | |
| 6 | −int | |
| 7 | −cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 8 | −{ | |
| 9 | − return _cloadmemimage(i, r, data, ndata); | |
| 10 | −} | |
| @@ -1,22 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <draw.h> | |
| 4 | −#include <memdraw.h> | |
| 5 | − | |
| 6 | −void | |
| 7 | −memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point sp, Memimage *mask, Point mp, int op) | |
| 8 | −{ | |
| 9 | − _memimagedraw(_memimagedrawsetup(dst, r, src, sp, mask, mp, op)); | |
| 10 | −} | |
| 11 | − | |
| 12 | −ulong | |
| 13 | −pixelbits(Memimage *m, Point p) | |
| 14 | −{ | |
| 15 | − return _pixelbits(m, p); | |
| 16 | −} | |
| 17 | − | |
| 18 | −void | |
| 19 | −memimageinit(void) | |
| 20 | −{ | |
| 21 | − _memimageinit(); | |
| 22 | −} | |
| @@ -1,10 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <draw.h> | |
| 4 | −#include <memdraw.h> | |
| 5 | − | |
| 6 | −int | |
| 7 | −loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 8 | −{ | |
| 9 | − return _loadmemimage(i, r, data, ndata); | |
| 10 | −} | |
| @@ -88,7 +88,7 @@ screeninit(void) · 87 unmodified lines | ||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | uchar* |
| 91 | −attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen, void **X) | |
| 91 | +attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen) | |
| 92 | 92 | { |
| 93 | 93 | *r = gscreen->r; |
| 94 | 94 | *chan = gscreen->chan; |
| @@ -37,42 +37,16 @@ typedef struct Cursor Cursor; · 36 unmodified lines | ||
| 37 | 37 | /* perfect approximation to NTSC = .299r+.587g+.114b when 0 ≤ r,g,b < 256 */ |
| 38 | 38 | #define RGB2K(r,g,b) ((156763*(r)+307758*(g)+59769*(b))>>19) |
| 39 | 39 | |
| 40 | −enum | |
| 41 | −{ | |
| 42 | − PMundef = ~0 /* undefined pixmap id */ | |
| 43 | −}; | |
| 44 | − | |
| 45 | −/* | |
| 46 | − * Structure pointed to by X field of Memimage | |
| 47 | − */ | |
| 48 | −typedef struct Xmem Xmem; | |
| 49 | −struct Xmem | |
| 50 | −{ | |
| 51 | − int pmid; /* pixmap id for screen ldepth instance */ | |
| 52 | − XImage *xi; /* local image if we currenty have the data */ | |
| 53 | − int dirty; | |
| 54 | − Rectangle dirtyr; | |
| 55 | − Rectangle r; | |
| 56 | − uintptr pc; /* who wrote into xi */ | |
| 57 | −}; | |
| 58 | − | |
| 59 | −static int xgcfillcolor; | |
| 60 | −static int xgcfillcolor0; | |
| 61 | −static int xgcsimplecolor0; | |
| 62 | −static int xgcsimplepm0; | |
| 63 | − | |
| 64 | 40 | static XDisplay* xdisplay; /* used holding draw lock */ |
| 65 | −static int xtblbit; | |
| 66 | −static int plan9tox11[256]; /* Values for mapping between */ | |
| 67 | −static int x11toplan9[256]; /* X11 and Plan 9 */ | |
| 68 | −static GC xgcfill, xgccopy, xgcsimplesrc, xgczero, xgcreplsrc; | |
| 69 | −static GC xgcfill0, xgccopy0, xgcsimplesrc0, xgczero0, xgcreplsrc0; | |
| 41 | +static int xtblbit; | |
| 42 | +static int plan9tox11[256]; /* Values for mapping between */ | |
| 43 | +static int x11toplan9[256]; /* X11 and Plan 9 */ | |
| 44 | +static GC xgccopy; | |
| 70 | 45 | static ulong xscreenchan; |
| 71 | 46 | static Drawable xscreenid; |
| 47 | +static XImage* xscreenimage; | |
| 72 | 48 | static Visual *xvis; |
| 73 | 49 | |
| 74 | −static int xdraw(Memdrawparam*); | |
| 75 | − | |
| 76 | 50 | #define glenda_width 48 |
| 77 | 51 | #define glenda_height 48 |
| 78 | 52 | static unsigned short glenda_bits[] = { |
| @@ -94,133 +68,25 @@ static unsigned short glenda_bits[] = { · 15 unmodified lines | ||
| 94 | 68 | 0xffff, 0x8807, 0xffe0, 0xffff, 0x003f, 0xfff0, 0xffff, 0x1fff, 0xfffe |
| 95 | 69 | }; |
| 96 | 70 | |
| 97 | −/* | |
| 98 | − * Synchronize images between X bitmaps and in-memory bitmaps. | |
| 99 | − */ | |
| 100 | −static void | |
| 101 | −addrect(Rectangle *rp, Rectangle r) | |
| 102 | −{ | |
| 103 | − if(rp->min.x >= rp->max.x) | |
| 104 | − *rp = r; | |
| 105 | − else | |
| 106 | − combinerect(rp, r); | |
| 107 | −} | |
| 108 | − | |
| 109 | −static XImage* | |
| 110 | −getXdata(Memimage *m, Rectangle r) | |
| 111 | −{ | |
| 112 | − uchar *p; | |
| 113 | − int x, y; | |
| 114 | − Xmem *xm; | |
| 115 | − Point xdelta, delta; | |
| 116 | − Point tp; | |
| 117 | − | |
| 118 | − xm = m->X; | |
| 119 | − if(xm == nil) | |
| 120 | − return nil; | |
| 121 | − | |
| 122 | − assert(xm != nil && xm->xi != nil); | |
| 123 | − | |
| 124 | − if(xm->dirty == 0) | |
| 125 | − return xm->xi; | |
| 126 | − | |
| 127 | − r = xm->dirtyr; | |
| 128 | − if(Dx(r)==0 || Dy(r)==0) | |
| 129 | − return xm->xi; | |
| 130 | − | |
| 131 | − delta = subpt(r.min, m->r.min); | |
| 132 | − tp = xm->r.min; /* avoid unaligned access on digital unix */ | |
| 133 | − xdelta = subpt(r.min, tp); | |
| 134 | − | |
| 135 | − XGetSubImage(xdisplay, xm->pmid, delta.x, delta.y, Dx(r), Dy(r), | |
| 136 | − AllPlanes, ZPixmap, xm->xi, xdelta.x, xdelta.y); | |
| 137 | − | |
| 138 | − if(xtblbit && m->chan == CMAP8) | |
| 139 | − for(y=r.min.y; y<r.max.y; y++) | |
| 140 | − for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++) | |
| 141 | − *p = x11toplan9[*p]; | |
| 142 | − | |
| 143 | − xm->dirty = 0; | |
| 144 | − xm->dirtyr = Rect(0,0,0,0); | |
| 145 | − return xm->xi; | |
| 146 | −} | |
| 147 | − | |
| 148 | −static void | |
| 149 | −putXdata(Memimage *m, Rectangle r) | |
| 150 | −{ | |
| 151 | − Xmem *xm; | |
| 152 | − XImage *xi; | |
| 153 | − GC g; | |
| 154 | − Point xdelta, delta; | |
| 155 | − Point tp; | |
| 156 | − int x, y; | |
| 157 | − uchar *p; | |
| 158 | − | |
| 159 | − xm = m->X; | |
| 160 | − if(xm == nil) | |
| 161 | − return; | |
| 162 | − | |
| 163 | − assert(xm != nil); | |
| 164 | − assert(xm->xi != nil); | |
| 165 | − | |
| 166 | − xi = xm->xi; | |
| 167 | − | |
| 168 | − g = (m->chan == GREY1) ? xgccopy0 : xgccopy; | |
| 169 | − | |
| 170 | − delta = subpt(r.min, m->r.min); | |
| 171 | − tp = xm->r.min; /* avoid unaligned access on digital unix */ | |
| 172 | − xdelta = subpt(r.min, tp); | |
| 173 | − | |
| 174 | − if(xtblbit && m->chan == CMAP8) | |
| 175 | − for(y=r.min.y; y<r.max.y; y++) | |
| 176 | − for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++) | |
| 177 | − *p = plan9tox11[*p]; | |
| 178 | − | |
| 179 | − XPutImage(xdisplay, xm->pmid, g, xi, xdelta.x, xdelta.y, delta.x, delta.y, Dx(r), Dy(r)); | |
| 180 | − | |
| 181 | − if(xtblbit && m->chan == CMAP8) | |
| 182 | − for(y=r.min.y; y<r.max.y; y++) | |
| 183 | − for(x=r.min.x, p=byteaddr(m, Pt(x,y)); x<r.max.x; x++, p++) | |
| 184 | − *p = x11toplan9[*p]; | |
| 185 | −} | |
| 186 | − | |
| 187 | −static void | |
| 188 | −dirtyXdata(Memimage *m, Rectangle r) | |
| 189 | −{ | |
| 190 | − Xmem *xm; | |
| 191 | − | |
| 192 | − if((xm = m->X) != nil){ | |
| 193 | − xm->dirty = 1; | |
| 194 | − addrect(&xm->dirtyr, r); | |
| 195 | − } | |
| 196 | −} | |
| 197 | − | |
| 198 | 71 | Memimage* |
| 199 | −xallocmemimage(Rectangle r, ulong chan, int pmid) | |
| 72 | +xallocmemimage(Rectangle r, ulong chan, int pmid, XImage **X) | |
| 200 | 73 | { |
| 201 | 74 | Memimage *m; |
| 202 | − Xmem *xm; | |
| 203 | 75 | XImage *xi; |
| 204 | 76 | int offset; |
| 205 | 77 | int d; |
| 206 | − | |
| 207 | − m = _allocmemimage(r, chan); | |
| 78 | + | |
| 79 | + m = allocmemimage(r, chan); | |
| 208 | 80 | if(m == nil) |
| 209 | 81 | return nil; |
| 210 | 82 | if(chan != GREY1 && chan != xscreenchan) |
| 211 | 83 | return m; |
| 212 | 84 | |
| 213 | 85 | d = m->depth; |
| 214 | − xm = mallocz(sizeof(Xmem), 1); | |
| 215 | − if(pmid != PMundef) | |
| 216 | − xm->pmid = pmid; | |
| 217 | − else | |
| 218 | − xm->pmid = XCreatePixmap(xdisplay, xscreenid, Dx(r), Dy(r), (d==32) ? 24 : d); | |
| 219 | − | |
| 220 | − if(m->depth == 24) | |
| 86 | + if(d == 24) | |
| 221 | 87 | offset = r.min.x&(4-1); |
| 222 | 88 | else |
| 223 | − offset = r.min.x&(31/m->depth); | |
| 89 | + offset = r.min.x&(31/d); | |
| 224 | 90 | r.min.x -= offset; |
| 225 | 91 | |
| 226 | 92 | assert(wordsperline(r, m->depth) <= m->width); |
| @@ -229,14 +95,10 @@ xallocmemimage(Rectangle r, ulong chan, int pmid) · 2 unmodified lines | ||
| 229 | 95 | (char*)m->data->bdata, Dx(r), Dy(r), 32, m->width*sizeof(ulong)); |
| 230 | 96 | |
| 231 | 97 | if(xi == nil){ |
| 232 | − _freememimage(m); | |
| 98 | + freememimage(m); | |
| 233 | 99 | return nil; |
| 234 | 100 | } |
| 235 | 101 | |
| 236 | − xm->xi = xi; | |
| 237 | − xm->pc = getcallerpc(&r); | |
| 238 | − xm->r = r; | |
| 239 | − | |
| 240 | 102 | /* |
| 241 | 103 | * Set the parameters of the XImage so its memory looks exactly like a |
| 242 | 104 | * Memimage, so we can call _memimagedraw on the same data. All frame |
| @@ -247,256 +109,12 @@ xallocmemimage(Rectangle r, ulong chan, int pmid) · 4 unmodified lines | ||
| 247 | 109 | xi->byte_order = LSBFirst; |
| 248 | 110 | xi->bitmap_bit_order = MSBFirst; |
| 249 | 111 | xi->bitmap_pad = 32; |
| 250 | − xm->r = Rect(0,0,0,0); | |
| 251 | 112 | XInitImage(xi); |
| 252 | 113 | XFlush(xdisplay); |
| 253 | 114 | |
| 254 | − m->X = xm; | |
| 255 | − return m; | |
| 256 | −} | |
| 257 | − | |
| 258 | −void | |
| 259 | −xfillcolor(Memimage *m, Rectangle r, ulong v) | |
| 260 | −{ | |
| 261 | − GC gc; | |
| 262 | − Xmem *dxm; | |
| 263 | − | |
| 264 | − dxm = m->X; | |
| 265 | − assert(dxm != nil); | |
| 266 | − r = rectsubpt(r, m->r.min); | |
| 267 | − | |
| 268 | − if(m->chan == GREY1){ | |
| 269 | − gc = xgcfill0; | |
| 270 | − if(xgcfillcolor0 != v){ | |
| 271 | − XSetForeground(xdisplay, gc, v); | |
| 272 | − xgcfillcolor0 = v; | |
| 273 | − } | |
| 274 | − }else{ | |
| 275 | − if(m->chan == CMAP8 && xtblbit) | |
| 276 | − v = plan9tox11[v]; | |
| 277 | − | |
| 278 | − gc = xgcfill; | |
| 279 | − if(xgcfillcolor != v){ | |
| 280 | − XSetForeground(xdisplay, gc, v); | |
| 281 | − xgcfillcolor = v; | |
| 282 | − } | |
| 283 | − } | |
| 284 | − XFillRectangle(xdisplay, dxm->pmid, gc, r.min.x, r.min.y, Dx(r), Dy(r)); | |
| 285 | −} | |
| 115 | + *X = xi; | |
| 286 | 116 | |
| 287 | −/* | |
| 288 | − * Replacements for libmemdraw routines. | |
| 289 | − * (They've been underscored.) | |
| 290 | − */ | |
| 291 | −Memimage* | |
| 292 | −allocmemimage(Rectangle r, ulong chan) | |
| 293 | −{ | |
| 294 | − return xallocmemimage(r, chan, PMundef); | |
| 295 | −} | |
| 296 | − | |
| 297 | −void | |
| 298 | −freememimage(Memimage *m) | |
| 299 | −{ | |
| 300 | − Xmem *xm; | |
| 301 | − | |
| 302 | − if(m == nil) | |
| 303 | − return; | |
| 304 | − | |
| 305 | − if(m->data->ref == 1){ | |
| 306 | − if((xm = m->X) != nil){ | |
| 307 | − if(xm->xi){ | |
| 308 | − xm->xi->data = nil; | |
| 309 | − XFree(xm->xi); | |
| 310 | − } | |
| 311 | − XFreePixmap(xdisplay, xm->pmid); | |
| 312 | − free(xm); | |
| 313 | − m->X = nil; | |
| 314 | − } | |
| 315 | − } | |
| 316 | − _freememimage(m); | |
| 317 | −} | |
| 318 | − | |
| 319 | −void | |
| 320 | −memfillcolor(Memimage *m, ulong val) | |
| 321 | −{ | |
| 322 | − _memfillcolor(m, val); | |
| 323 | − if(m->X){ | |
| 324 | − if((val & 0xFF) == 0xFF) | |
| 325 | − xfillcolor(m, m->r, _rgbatoimg(m, val)); | |
| 326 | − else | |
| 327 | − putXdata(m, m->r); | |
| 328 | − } | |
| 329 | −} | |
| 330 | − | |
| 331 | −int | |
| 332 | −loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 333 | −{ | |
| 334 | − int n; | |
| 335 | − | |
| 336 | − n = _loadmemimage(i, r, data, ndata); | |
| 337 | − if(n > 0 && i->X) | |
| 338 | − putXdata(i, r); | |
| 339 | − return n; | |
| 340 | −} | |
| 341 | − | |
| 342 | −int | |
| 343 | −cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 344 | −{ | |
| 345 | − int n; | |
| 346 | − | |
| 347 | − n = _cloadmemimage(i, r, data, ndata); | |
| 348 | − if(n > 0 && i->X) | |
| 349 | − putXdata(i, r); | |
| 350 | − return n; | |
| 351 | −} | |
| 352 | − | |
| 353 | −ulong | |
| 354 | −pixelbits(Memimage *m, Point p) | |
| 355 | −{ | |
| 356 | − if(m->X) | |
| 357 | − getXdata(m, Rect(p.x, p.y, p.x+1, p.y+1)); | |
| 358 | − return _pixelbits(m, p); | |
| 359 | −} | |
| 360 | − | |
| 361 | −void | |
| 362 | −memimageinit(void) | |
| 363 | −{ | |
| 364 | − static int didinit = 0; | |
| 365 | − | |
| 366 | − if(didinit) | |
| 367 | − return; | |
| 368 | − | |
| 369 | − didinit = 1; | |
| 370 | − _memimageinit(); | |
| 371 | − | |
| 372 | − xfillcolor(memblack, memblack->r, 0); | |
| 373 | − xfillcolor(memwhite, memwhite->r, 1); | |
| 374 | −} | |
| 375 | − | |
| 376 | −void | |
| 377 | −memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point sp, Memimage *mask, Point mp, int op) | |
| 378 | −{ | |
| 379 | − Memdrawparam *par; | |
| 380 | − | |
| 381 | − if((par = _memimagedrawsetup(dst, r, src, sp, mask, mp, op)) == nil) | |
| 382 | − return; | |
| 383 | − _memimagedraw(par); | |
| 384 | − if(!xdraw(par)) | |
| 385 | − putXdata(dst, par->r); | |
| 386 | −} | |
| 387 | − | |
| 388 | −static int | |
| 389 | −xdraw(Memdrawparam *par) | |
| 390 | −{ | |
| 391 | − return 0; | |
| 392 | −} | |
| 393 | − | |
| 394 | −static int | |
| 395 | −xdraw_broken(Memdrawparam *par) | |
| 396 | −{ | |
| 397 | − int dy, dx; | |
| 398 | − unsigned m; | |
| 399 | − Memimage *src, *dst, *mask; | |
| 400 | − Xmem *dxm, *sxm, *mxm; | |
| 401 | − GC gc; | |
| 402 | − Rectangle r, sr, mr; | |
| 403 | − ulong sdval; | |
| 404 | − | |
| 405 | − dx = Dx(par->r); | |
| 406 | − dy = Dy(par->r); | |
| 407 | − src = par->src; | |
| 408 | − dst = par->dst; | |
| 409 | − mask = par->mask; | |
| 410 | − r = par->r; | |
| 411 | − sr = par->sr; | |
| 412 | − mr = par->mr; | |
| 413 | − sdval = par->sdval; | |
| 414 | − | |
| 415 | − /* | |
| 416 | − * drawterm was distributed for years with | |
| 417 | − * "return 0;" right here. | |
| 418 | − * maybe we should give up on all this? | |
| 419 | − */ | |
| 420 | − | |
| 421 | − if((dxm = dst->X) == nil) | |
| 422 | − return 0; | |
| 423 | − | |
| 424 | − /* | |
| 425 | − * If we have an opaque mask and source is one opaque pixel we can convert to the | |
| 426 | − * destination format and just XFillRectangle. | |
| 427 | − */ | |
| 428 | − m = Simplesrc|Simplemask|Fullmask; | |
| 429 | − if((par->state&m)==m){ | |
| 430 | − xfillcolor(dst, r, sdval); | |
| 431 | − dirtyXdata(dst, par->r); | |
| 432 | − return 1; | |
| 433 | − } | |
| 434 | − | |
| 435 | − /* | |
| 436 | − * If no source alpha, an opaque mask, we can just copy the | |
| 437 | − * source onto the destination. If the channels are the same and | |
| 438 | − * the source is not replicated, XCopyArea suffices. | |
| 439 | − */ | |
| 440 | − m = Simplemask|Fullmask; | |
| 441 | − if((par->state&(m|Replsrc))==m && src->chan == dst->chan && src->X){ | |
| 442 | − sxm = src->X; | |
| 443 | − r = rectsubpt(r, dst->r.min); | |
| 444 | − sr = rectsubpt(sr, src->r.min); | |
| 445 | − if(dst->chan == GREY1) | |
| 446 | − gc = xgccopy0; | |
| 447 | − else | |
| 448 | − gc = xgccopy; | |
| 449 | − XCopyArea(xdisplay, sxm->pmid, dxm->pmid, gc, | |
| 450 | − sr.min.x, sr.min.y, dx, dy, r.min.x, r.min.y); | |
| 451 | − dirtyXdata(dst, par->r); | |
| 452 | − return 1; | |
| 453 | − } | |
| 454 | − | |
| 455 | − /* | |
| 456 | − * If no source alpha, a 1-bit mask, and a simple source | |
| 457 | − * we can just copy through the mask onto the destination. | |
| 458 | − */ | |
| 459 | − if(dst->X && mask->X && !(mask->flags&Frepl) | |
| 460 | − && mask->chan == GREY1 && (par->state&Simplesrc)){ | |
| 461 | − Point p; | |
| 462 | − | |
| 463 | − mxm = mask->X; | |
| 464 | − r = rectsubpt(r, dst->r.min); | |
| 465 | − mr = rectsubpt(mr, mask->r.min); | |
| 466 | − p = subpt(r.min, mr.min); | |
| 467 | − if(dst->chan == GREY1){ | |
| 468 | − gc = xgcsimplesrc0; | |
| 469 | − if(xgcsimplecolor0 != sdval){ | |
| 470 | − XSetForeground(xdisplay, gc, sdval); | |
| 471 | − xgcsimplecolor0 = sdval; | |
| 472 | − } | |
| 473 | − if(xgcsimplepm0 != mxm->pmid){ | |
| 474 | − XSetStipple(xdisplay, gc, mxm->pmid); | |
| 475 | − xgcsimplepm0 = mxm->pmid; | |
| 476 | − } | |
| 477 | − }else{ | |
| 478 | − /* somehow this doesn't work on rob's mac | |
| 479 | − gc = xgcsimplesrc; | |
| 480 | − if(dst->chan == CMAP8 && xtblbit) | |
| 481 | − sdval = plan9tox11[sdval]; | |
| 482 | − | |
| 483 | − if(xgcsimplecolor != sdval){ | |
| 484 | − XSetForeground(xdisplay, gc, sdval); | |
| 485 | − xgcsimplecolor = sdval; | |
| 486 | − } | |
| 487 | − if(xgcsimplepm != mxm->pmid){ | |
| 488 | − XSetStipple(xdisplay, gc, mxm->pmid); | |
| 489 | − xgcsimplepm = mxm->pmid; | |
| 490 | − } | |
| 491 | − */ | |
| 492 | − return 0; | |
| 493 | − } | |
| 494 | − XSetTSOrigin(xdisplay, gc, p.x, p.y); | |
| 495 | − XFillRectangle(xdisplay, dxm->pmid, gc, r.min.x, r.min.y, dx, dy); | |
| 496 | − dirtyXdata(dst, par->r); | |
| 497 | − return 1; | |
| 498 | − } | |
| 499 | − return 0; | |
| 117 | + return m; | |
| 500 | 118 | } |
| 501 | 119 | |
| 502 | 120 | /* |
| @@ -507,7 +125,7 @@ xdraw_broken(Memdrawparam *par) · 4 unmodified lines | ||
| 507 | 125 | static XColor map[256]; /* Plan 9 colormap array */ |
| 508 | 126 | static XColor map7[128]; /* Plan 9 colormap array */ |
| 509 | 127 | static uchar map7to8[128][2]; |
| 510 | −static Colormap xcmap; /* Default shared colormap */ | |
| 128 | +static Colormap xcmap; /* Default shared colormap */ | |
| 511 | 129 | |
| 512 | 130 | extern int mousequeue; |
| 513 | 131 | |
| @@ -533,20 +151,34 @@ static void graphicscmap(XColor*); · 19 unmodified lines | ||
| 533 | 151 | static int xscreendepth; |
| 534 | 152 | static XDisplay* xkmcon; /* used only in xproc */ |
| 535 | 153 | static XDisplay* xsnarfcon; /* used holding clip.lk */ |
| 536 | −static ulong xblack; | |
| 537 | −static ulong xwhite; | |
| 538 | 154 | |
| 539 | 155 | static int putsnarf, assertsnarf; |
| 540 | 156 | |
| 541 | − Memimage *gscreen; | |
| 542 | − Screeninfo screen; | |
| 157 | +Memimage *gscreen; | |
| 158 | +Screeninfo screen; | |
| 543 | 159 | |
| 544 | 160 | void |
| 545 | 161 | flushmemscreen(Rectangle r) |
| 546 | 162 | { |
| 163 | + int x, y; | |
| 164 | + uchar *p; | |
| 165 | + | |
| 547 | 166 | assert(!drawcanqlock()); |
| 548 | 167 | if(r.min.x >= r.max.x || r.min.y >= r.max.y) |
| 549 | 168 | return; |
| 169 | + | |
| 170 | + if(xtblbit && gscreen->chan == CMAP8) | |
| 171 | + for(y=r.min.y; y<r.max.y; y++) | |
| 172 | + for(x=r.min.x, p=byteaddr(gscreen, Pt(x,y)); x<r.max.x; x++, p++) | |
| 173 | + *p = plan9tox11[*p]; | |
| 174 | + | |
| 175 | + XPutImage(xdisplay, xscreenid, xgccopy, xscreenimage, r.min.x, r.min.y, r.min.x, r.min.y, Dx(r), Dy(r)); | |
| 176 | + | |
| 177 | + if(xtblbit && gscreen->chan == CMAP8) | |
| 178 | + for(y=r.min.y; y<r.max.y; y++) | |
| 179 | + for(x=r.min.x, p=byteaddr(gscreen, Pt(x,y)); x<r.max.x; x++, p++) | |
| 180 | + *p = x11toplan9[*p]; | |
| 181 | + | |
| 550 | 182 | XCopyArea(xdisplay, xscreenid, xdrawable, xgccopy, r.min.x, r.min.y, Dx(r), Dy(r), r.min.x, r.min.y); |
| 551 | 183 | XFlush(xdisplay); |
| 552 | 184 | } |
| @@ -567,14 +199,12 @@ screeninit(void) · 14 unmodified lines | ||
| 567 | 199 | } |
| 568 | 200 | |
| 569 | 201 | uchar* |
| 570 | −attachscreen(Rectangle *r, ulong *chan, int *depth, | |
| 571 | − int *width, int *softscreen, void **X) | |
| 202 | +attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen) | |
| 572 | 203 | { |
| 573 | 204 | *r = gscreen->r; |
| 574 | 205 | *chan = gscreen->chan; |
| 575 | 206 | *depth = gscreen->depth; |
| 576 | 207 | *width = gscreen->width; |
| 577 | − *X = gscreen->X; | |
| 578 | 208 | *softscreen = 1; |
| 579 | 209 | |
| 580 | 210 | return gscreen->data->bdata; |
| @@ -708,7 +338,7 @@ static Memimage* · 127 unmodified lines | ||
| 708 | 338 | xinitscreen(void) |
| 709 | 339 | { |
| 710 | 340 | Memimage *gscreen; |
| 711 | − int i, xsize, ysize, pmid; | |
| 341 | + int i, xsize, ysize; | |
| 712 | 342 | char *argv[2]; |
| 713 | 343 | char *disp_val; |
| 714 | 344 | Window rootwin; |
| @@ -868,31 +498,8 @@ xinitscreen(void) · 153 unmodified lines | ||
| 868 | 498 | XFlush(xdisplay); |
| 869 | 499 | |
| 870 | 500 | xscreenid = XCreatePixmap(xdisplay, xdrawable, Dx(r), Dy(r), xscreendepth); |
| 871 | − gscreen = xallocmemimage(r, xscreenchan, xscreenid); | |
| 872 | − | |
| 873 | − xgcfill = creategc(xscreenid); | |
| 874 | − XSetFillStyle(xdisplay, xgcfill, FillSolid); | |
| 501 | + gscreen = xallocmemimage(r, xscreenchan, xscreenid, &xscreenimage); | |
| 875 | 502 | xgccopy = creategc(xscreenid); |
| 876 | − xgcsimplesrc = creategc(xscreenid); | |
| 877 | − XSetFillStyle(xdisplay, xgcsimplesrc, FillStippled); | |
| 878 | − xgczero = creategc(xscreenid); | |
| 879 | − xgcreplsrc = creategc(xscreenid); | |
| 880 | − XSetFillStyle(xdisplay, xgcreplsrc, FillTiled); | |
| 881 | − | |
| 882 | − pmid = XCreatePixmap(xdisplay, xdrawable, 1, 1, 1); | |
| 883 | − xgcfill0 = creategc(pmid); | |
| 884 | − XSetForeground(xdisplay, xgcfill0, 0); | |
| 885 | − XSetFillStyle(xdisplay, xgcfill0, FillSolid); | |
| 886 | − xgccopy0 = creategc(pmid); | |
| 887 | − xgcsimplesrc0 = creategc(pmid); | |
| 888 | − XSetFillStyle(xdisplay, xgcsimplesrc0, FillStippled); | |
| 889 | − xgczero0 = creategc(pmid); | |
| 890 | − xgcreplsrc0 = creategc(pmid); | |
| 891 | − XSetFillStyle(xdisplay, xgcreplsrc0, FillTiled); | |
| 892 | − XFreePixmap(xdisplay, pmid); | |
| 893 | − | |
| 894 | − XSetForeground(xdisplay, xgccopy, plan9tox11[0]); | |
| 895 | − XFillRectangle(xdisplay, xscreenid, xgccopy, 0, 0, xsize, ysize); | |
| 896 | 503 | |
| 897 | 504 | xkmcon = XOpenDisplay(NULL); |
| 898 | 505 | if(xkmcon == 0){ |
| @@ -917,8 +524,6 @@ xinitscreen(void) · 18 unmodified lines | ||
| 917 | 524 | text = XInternAtom(xkmcon, "TEXT", False); |
| 918 | 525 | compoundtext = XInternAtom(xkmcon, "COMPOUND_TEXT", False); |
| 919 | 526 | |
| 920 | − xblack = screen->black_pixel; | |
| 921 | − xwhite = screen->white_pixel; | |
| 922 | 527 | return gscreen; |
| 923 | 528 | } |
| 924 | 529 | |
| @@ -1,8 +1,3 @@ | ||
| 1 | −#ifdef PLAN9 | |
| 2 | −#pragma src "/sys/src/libdraw" | |
| 3 | −#pragma lib "libdraw.a" | |
| 4 | −#endif | |
| 5 | − | |
| 6 | 1 | typedef struct Cachefont Cachefont; |
| 7 | 2 | typedef struct Cacheinfo Cacheinfo; |
| 8 | 3 | typedef struct Cachesubf Cachesubf; |
| @@ -17,10 +12,6 @@ typedef struct RGB RGB; · 8 unmodified lines | ||
| 17 | 12 | typedef struct Screen Screen; |
| 18 | 13 | typedef struct Subfont Subfont; |
| 19 | 14 | |
| 20 | −#ifdef VARARGCK | |
| 21 | −#pragma varargck type "R" Rectangle | |
| 22 | −#pragma varargck type "P" Point | |
| 23 | −#endif | |
| 24 | 15 | extern int Rfmt(Fmt*); |
| 25 | 16 | extern int Pfmt(Fmt*); |
| 26 | 17 | |
| @@ -140,11 +131,12 @@ enum { · 113 unmodified lines | ||
| 140 | 131 | RGB15 = CHAN4(CIgnore, 1, CRed, 5, CGreen, 5, CBlue, 5), |
| 141 | 132 | RGB16 = CHAN3(CRed, 5, CGreen, 6, CBlue, 5), |
| 142 | 133 | RGB24 = CHAN3(CRed, 8, CGreen, 8, CBlue, 8), |
| 143 | − BGR24 = CHAN3(CBlue, 8, CGreen, 8, CRed, 8), | |
| 144 | 134 | RGBA32 = CHAN4(CRed, 8, CGreen, 8, CBlue, 8, CAlpha, 8), |
| 145 | 135 | ARGB32 = CHAN4(CAlpha, 8, CRed, 8, CGreen, 8, CBlue, 8), /* stupid VGAs */ |
| 146 | − XRGB32 = CHAN4(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8), | |
| 147 | − XBGR32 = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8), | |
| 136 | + XRGB32 = CHAN4(CIgnore, 8, CRed, 8, CGreen, 8, CBlue, 8), | |
| 137 | + BGR24 = CHAN3(CBlue, 8, CGreen, 8, CRed, 8), | |
| 138 | + ABGR32 = CHAN4(CAlpha, 8, CBlue, 8, CGreen, 8, CRed, 8), | |
| 139 | + XBGR32 = CHAN4(CIgnore, 8, CBlue, 8, CGreen, 8, CRed, 8), | |
| 148 | 140 | }; |
| 149 | 141 | |
| 150 | 142 | extern char* chantostr(char*, ulong); |
| @@ -175,7 +167,7 @@ struct Screen · 24 unmodified lines | ||
| 175 | 167 | |
| 176 | 168 | struct Display |
| 177 | 169 | { |
| 178 | − QLock qlock; | |
| 170 | + QLock qlock; | |
| 179 | 171 | int locking; /*program is using lockdisplay */ |
| 180 | 172 | int dirno; |
| 181 | 173 | int fd; |
| @@ -194,13 +186,13 @@ struct Display · 12 unmodified lines | ||
| 194 | 186 | Image *transparent; |
| 195 | 187 | Image *image; |
| 196 | 188 | uchar *buf; |
| 197 | − int bufsize; | |
| 189 | + int bufsize; | |
| 198 | 190 | uchar *bufp; |
| 199 | 191 | Font *defaultfont; |
| 200 | 192 | Subfont *defaultsubfont; |
| 201 | 193 | Image *windows; |
| 202 | 194 | Image *screenimage; |
| 203 | − int _isnewdisplay; | |
| 195 | + int _isnewdisplay; | |
| 204 | 196 | }; |
| 205 | 197 | |
| 206 | 198 | struct Image |
| @@ -210,7 +202,7 @@ struct Image · 3 unmodified lines | ||
| 210 | 202 | Rectangle r; /* rectangle in data area, local coords */ |
| 211 | 203 | Rectangle clipr; /* clipping region */ |
| 212 | 204 | int depth; /* number of bits per pixel */ |
| 213 | − ulong chan; | |
| 205 | + ulong chan; | |
| 214 | 206 | int repl; /* flag: data replicates to tile clipr */ |
| 215 | 207 | Screen *screen; /* 0 if not a window */ |
| 216 | 208 | Image *next; /* next in list of windows */ |
| @@ -397,6 +389,7 @@ extern int cmap2rgb(int); · 180 unmodified lines | ||
| 397 | 389 | extern int cmap2rgba(int); |
| 398 | 390 | extern void icossin(int, int*, int*); |
| 399 | 391 | extern void icossin2(int, int, int*, int*); |
| 392 | +extern int badrect(Rectangle); | |
| 400 | 393 | |
| 401 | 394 | /* |
| 402 | 395 | * Graphics |
| @@ -480,7 +473,6 @@ extern Subfont* _getsubfont(Display*, char*); · 77 unmodified lines | ||
| 480 | 473 | extern Subfont* getdefont(Display*); |
| 481 | 474 | extern void lockdisplay(Display*); |
| 482 | 475 | extern void unlockdisplay(Display*); |
| 483 | −extern int drawlsetrefresh(ulong, int, void*, void*); | |
| 484 | 476 | |
| 485 | 477 | /* |
| 486 | 478 | * Predefined |
| @@ -495,7 +487,7 @@ extern Rectangle ZR; · 8 unmodified lines | ||
| 495 | 487 | */ |
| 496 | 488 | extern Display *display; |
| 497 | 489 | extern Font *font; |
| 498 | −/* extern Image *screen; */ | |
| 490 | +// extern Image *screen; | |
| 499 | 491 | extern Screen *_screen; |
| 500 | 492 | extern int _cursorfd; |
| 501 | 493 | extern int _drawdebug; /* set to 1 to see errors from flushimage */ |
| @@ -518,6 +510,6 @@ extern void _twiddlecompressed(uchar*, int); · 16 unmodified lines | ||
| 518 | 510 | extern int _compblocksize(Rectangle, int); |
| 519 | 511 | |
| 520 | 512 | /* XXX backwards helps; should go */ |
| 521 | −extern int log2[]; | |
| 513 | +// extern int log2[]; /* was used by libmemlayer/line.c */ | |
| 522 | 514 | extern ulong drawld2chan[]; |
| 523 | 515 | extern void drawsetdebug(int); |
| @@ -1,8 +1,3 @@ | ||
| 1 | −#ifdef PLAN9 | |
| 2 | −#pragma src "/sys/src/libmemdraw" | |
| 3 | −#pragma lib "libmemdraw.a" | |
| 4 | −#endif | |
| 5 | − | |
| 6 | 1 | typedef struct Memimage Memimage; |
| 7 | 2 | typedef struct Memdata Memdata; |
| 8 | 3 | typedef struct Memsubfont Memsubfont; |
| @@ -54,8 +49,6 @@ struct Memimage · 45 unmodified lines | ||
| 54 | 49 | int shift[NChan]; |
| 55 | 50 | int mask[NChan]; |
| 56 | 51 | int nbits[NChan]; |
| 57 | − | |
| 58 | − void *X; | |
| 59 | 52 | }; |
| 60 | 53 | |
| 61 | 54 | struct Memcmap |
| @@ -119,26 +112,20 @@ struct Memdrawparam · 57 unmodified lines | ||
| 119 | 112 | */ |
| 120 | 113 | |
| 121 | 114 | extern Memimage* allocmemimage(Rectangle, ulong); |
| 122 | −extern Memimage* _allocmemimage(Rectangle, ulong); | |
| 123 | −extern Memimage* allocmemimaged(Rectangle, ulong, Memdata*, void*); | |
| 115 | +extern Memimage* allocmemimaged(Rectangle, ulong, Memdata*); | |
| 124 | 116 | extern Memimage* readmemimage(int); |
| 125 | 117 | extern Memimage* creadmemimage(int); |
| 126 | 118 | extern int writememimage(int, Memimage*); |
| 127 | 119 | extern void freememimage(Memimage*); |
| 128 | −extern void _freememimage(Memimage*); | |
| 129 | −extern int _loadmemimage(Memimage*, Rectangle, uchar*, int); | |
| 130 | −extern int _cloadmemimage(Memimage*, Rectangle, uchar*, int); | |
| 131 | −extern int _unloadmemimage(Memimage*, Rectangle, uchar*, int); | |
| 132 | 120 | extern int loadmemimage(Memimage*, Rectangle, uchar*, int); |
| 133 | 121 | extern int cloadmemimage(Memimage*, Rectangle, uchar*, int); |
| 134 | 122 | extern int unloadmemimage(Memimage*, Rectangle, uchar*, int); |
| 135 | 123 | extern ulong* wordaddr(Memimage*, Point); |
| 136 | 124 | extern uchar* byteaddr(Memimage*, Point); |
| 125 | +extern int drawclipnorepl(Memimage*, Rectangle*, Memimage*, Point*, Memimage*, Point*, Rectangle*, Rectangle*); | |
| 137 | 126 | extern int drawclip(Memimage*, Rectangle*, Memimage*, Point*, Memimage*, Point*, Rectangle*, Rectangle*); |
| 138 | 127 | extern void memfillcolor(Memimage*, ulong); |
| 139 | −extern void _memfillcolor(Memimage*, ulong); | |
| 140 | 128 | extern int memsetchan(Memimage*, ulong); |
| 141 | −extern ulong _rgbatoimg(Memimage*, ulong); | |
| 142 | 129 | |
| 143 | 130 | /* |
| 144 | 131 | * Graphics |
| @@ -148,8 +135,6 @@ extern void memline(Memimage*, Point, Point, int, int, int, Memimage*, Point, in · 3 unmodified lines | ||
| 148 | 135 | extern void mempoly(Memimage*, Point*, int, int, int, int, Memimage*, Point, int); |
| 149 | 136 | extern void memfillpoly(Memimage*, Point*, int, int, Memimage*, Point, int); |
| 150 | 137 | extern void _memfillpolysc(Memimage*, Point*, int, int, Memimage*, Point, int, int, int, int); |
| 151 | −extern Memdrawparam* _memimagedrawsetup(Memimage*, Rectangle, Memimage*, Point, Memimage*, Point, int); | |
| 152 | −extern void _memimagedraw(Memdrawparam*); | |
| 153 | 138 | extern void memimagedraw(Memimage*, Rectangle, Memimage*, Point, Memimage*, Point, int); |
| 154 | 139 | extern int hwdraw(Memdrawparam*); |
| 155 | 140 | extern void memimageline(Memimage*, Point, Point, int, int, int, Memimage*, Point, int); |
| @@ -160,8 +145,7 @@ extern void memarc(Memimage*, Point, int, int, int, Memimage*, Point, int, int, · 4 unmodified lines | ||
| 160 | 145 | extern Rectangle memlinebbox(Point, Point, int, int, int); |
| 161 | 146 | extern int memlineendsize(int); |
| 162 | 147 | extern void _memmkcmap(void); |
| 163 | −extern void _memimageinit(void); | |
| 164 | −extern void memimageinit(void); | |
| 148 | +extern int memimageinit(void); | |
| 165 | 149 | |
| 166 | 150 | /* |
| 167 | 151 | * Subfont management |
| @@ -193,18 +177,4 @@ extern void rdb(void); · 25 unmodified lines | ||
| 193 | 177 | extern int iprint(char*, ...); |
| 194 | 178 | extern int drawdebug; |
| 195 | 179 | |
| 196 | −/* | |
| 197 | − * doprint interface: numbconv bit strings | |
| 198 | − */ | |
| 199 | −#ifdef VARARGCK | |
| 200 | −#pragma varargck argpos iprint 1 | |
| 201 | −#pragma varargck type "llb" vlong | |
| 202 | −#pragma varargck type "llb" uvlong | |
| 203 | −#pragma varargck type "lb" long | |
| 204 | −#pragma varargck type "lb" ulong | |
| 205 | −#pragma varargck type "b" int | |
| 206 | −#pragma varargck type "b" uint | |
| 207 | −#endif | |
| 208 | − | |
| 209 | −extern ulong _pixelbits(Memimage*,Point); | |
| 210 | −extern ulong pixelbits(Memimage*, Point); | |
| 180 | +extern ulong pixelbits(Memimage*, Point); | |
| @@ -921,19 +921,18 @@ initscreenimage(void) · 920 unmodified lines | ||
| 921 | 921 | { |
| 922 | 922 | int width, depth; |
| 923 | 923 | ulong chan; |
| 924 | − void *X; | |
| 925 | 924 | Rectangle r; |
| 926 | 925 | |
| 927 | 926 | if(screenimage != nil) |
| 928 | 927 | return 1; |
| 929 | 928 | |
| 930 | 929 | screendata.base = nil; |
| 931 | − screendata.bdata = attachscreen(&r, &chan, &depth, &width, &sdraw.softscreen, &X); | |
| 932 | − if(screendata.bdata == nil && X == nil) | |
| 930 | + screendata.bdata = attachscreen(&r, &chan, &depth, &width, &sdraw.softscreen); | |
| 931 | + if(screendata.bdata == nil) | |
| 933 | 932 | return 0; |
| 934 | 933 | screendata.ref = 1; |
| 935 | 934 | |
| 936 | − screenimage = allocmemimaged(r, chan, &screendata, X); | |
| 935 | + screenimage = allocmemimaged(r, chan, &screendata); | |
| 937 | 936 | if(screenimage == nil){ |
| 938 | 937 | /* RSC: BUG: detach screen */ |
| 939 | 938 | return 0; |
| @@ -117,6 +117,7 @@ kbdwrite(Chan *c, void *va, long n, vlong off) · 116 unmodified lines | ||
| 117 | 117 | USED(n); |
| 118 | 118 | USED(off); |
| 119 | 119 | error(Eperm); |
| 120 | + return -1; /* never reached */ | |
| 120 | 121 | } |
| 121 | 122 | |
| 122 | 123 | Dev kbddevtab = { |
| @@ -55,7 +55,7 @@ void setcursor(void); · 54 unmodified lines | ||
| 55 | 55 | void mouseset(Point); |
| 56 | 56 | void drawflushr(Rectangle); |
| 57 | 57 | void flushmemscreen(Rectangle); |
| 58 | −uchar *attachscreen(Rectangle*, ulong*, int*, int*, int*, void**); | |
| 58 | +uchar *attachscreen(Rectangle*, ulong*, int*, int*, int*); | |
| 59 | 59 | |
| 60 | 60 | void drawqlock(void); |
| 61 | 61 | void drawqunlock(void); |
| @@ -5,10 +5,12 @@ LIB=libdraw.a · 4 unmodified lines | ||
| 5 | 5 | OFILES=\ |
| 6 | 6 | alloc.$O\ |
| 7 | 7 | arith.$O\ |
| 8 | + badrect.$O\ | |
| 8 | 9 | bytesperline.$O\ |
| 9 | 10 | chan.$O\ |
| 10 | 11 | defont.$O\ |
| 11 | 12 | drawrepl.$O\ |
| 13 | + fmt.$O\ | |
| 12 | 14 | icossin.$O\ |
| 13 | 15 | icossin2.$O\ |
| 14 | 16 | rectclip.$O\ |
| @@ -3,13 +3,18 @@ · 2 unmodified lines | ||
| 3 | 3 | #include <draw.h> |
| 4 | 4 | |
| 5 | 5 | Image* |
| 6 | −allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong val) | |
| 6 | +allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong col) | |
| 7 | 7 | { |
| 8 | − return _allocimage(nil, d, r, chan, repl, val, 0, 0); | |
| 8 | + Image *i; | |
| 9 | + | |
| 10 | + i = _allocimage(nil, d, r, chan, repl, col, 0, 0); | |
| 11 | + if(i != nil) | |
| 12 | + setmalloctag(i, getcallerpc(&d)); | |
| 13 | + return i; | |
| 9 | 14 | } |
| 10 | 15 | |
| 11 | 16 | Image* |
| 12 | −_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, int screenid, int refresh) | |
| 17 | +_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong col, int screenid, int refresh) | |
| 13 | 18 | { |
| 14 | 19 | uchar *a; |
| 15 | 20 | char *err; |
| @@ -18,9 +23,13 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 2 unmodified lines | ||
| 18 | 23 | int id; |
| 19 | 24 | int depth; |
| 20 | 25 | |
| 21 | − err = 0; | |
| 22 | − i = 0; | |
| 26 | + err = nil; | |
| 27 | + i = nil; | |
| 23 | 28 | |
| 29 | + if(badrect(r)){ | |
| 30 | + werrstr("bad rectangle"); | |
| 31 | + return nil; | |
| 32 | + } | |
| 24 | 33 | if(chan == 0){ |
| 25 | 34 | werrstr("bad channel descriptor"); |
| 26 | 35 | return nil; |
| @@ -30,18 +39,18 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 3 unmodified lines | ||
| 30 | 39 | if(depth == 0){ |
| 31 | 40 | err = "bad channel descriptor"; |
| 32 | 41 | Error: |
| 33 | − if(err) | |
| 42 | + if(err != nil) | |
| 34 | 43 | werrstr("allocimage: %s", err); |
| 35 | 44 | else |
| 36 | 45 | werrstr("allocimage: %r"); |
| 37 | 46 | free(i); |
| 38 | − return 0; | |
| 47 | + return nil; | |
| 39 | 48 | } |
| 40 | 49 | |
| 41 | 50 | /* flush pending data so we don't get error allocating the image */ |
| 42 | 51 | flushimage(d, 0); |
| 43 | 52 | a = bufimage(d, 1+4+4+1+4+1+4*4+4*4+4); |
| 44 | − if(a == 0) | |
| 53 | + if(a == nil) | |
| 45 | 54 | goto Error; |
| 46 | 55 | d->imageid++; |
| 47 | 56 | id = d->imageid; |
| @@ -64,17 +73,17 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 16 unmodified lines | ||
| 64 | 73 | BPLONG(a+35, clipr.min.y); |
| 65 | 74 | BPLONG(a+39, clipr.max.x); |
| 66 | 75 | BPLONG(a+43, clipr.max.y); |
| 67 | − BPLONG(a+47, val); | |
| 76 | + BPLONG(a+47, col); | |
| 68 | 77 | if(flushimage(d, 0) < 0) |
| 69 | 78 | goto Error; |
| 70 | 79 | |
| 71 | − if(ai) | |
| 80 | + if(ai != nil) | |
| 72 | 81 | i = ai; |
| 73 | 82 | else{ |
| 74 | 83 | i = malloc(sizeof(Image)); |
| 75 | 84 | if(i == nil){ |
| 76 | 85 | a = bufimage(d, 1+4); |
| 77 | − if(a){ | |
| 86 | + if(a != nil){ | |
| 78 | 87 | a[0] = 'f'; |
| 79 | 88 | BPLONG(a+1, id); |
| 80 | 89 | flushimage(d, 0); |
| @@ -89,8 +98,8 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, · 8 unmodified lines | ||
| 89 | 98 | i->r = r; |
| 90 | 99 | i->clipr = clipr; |
| 91 | 100 | i->repl = repl; |
| 92 | − i->screen = 0; | |
| 93 | − i->next = 0; | |
| 101 | + i->screen = nil; | |
| 102 | + i->next = nil; | |
| 94 | 103 | return i; |
| 95 | 104 | } |
| 96 | 105 | |
| @@ -103,25 +112,24 @@ namedimage(Display *d, char *name) · 6 unmodified lines | ||
| 103 | 112 | int id, n; |
| 104 | 113 | ulong chan; |
| 105 | 114 | |
| 106 | − err = 0; | |
| 107 | − i = 0; | |
| 115 | + err = nil; | |
| 116 | + i = nil; | |
| 108 | 117 | |
| 109 | 118 | n = strlen(name); |
| 110 | 119 | if(n >= 256){ |
| 111 | 120 | err = "name too long"; |
| 112 | 121 | Error: |
| 113 | − if(err) | |
| 122 | + if(err != nil) | |
| 114 | 123 | werrstr("namedimage: %s", err); |
| 115 | 124 | else |
| 116 | 125 | werrstr("namedimage: %r"); |
| 117 | − if(i) | |
| 118 | − free(i); | |
| 119 | − return 0; | |
| 126 | + free(i); | |
| 127 | + return nil; | |
| 120 | 128 | } |
| 121 | 129 | /* flush pending data so we don't get error allocating the image */ |
| 122 | 130 | flushimage(d, 0); |
| 123 | 131 | a = bufimage(d, 1+4+1+n); |
| 124 | − if(a == 0) | |
| 132 | + if(a == nil) | |
| 125 | 133 | goto Error; |
| 126 | 134 | d->imageid++; |
| 127 | 135 | id = d->imageid; |
| @@ -140,7 +148,7 @@ namedimage(Display *d, char *name) · 12 unmodified lines | ||
| 140 | 148 | if(i == nil){ |
| 141 | 149 | Error1: |
| 142 | 150 | a = bufimage(d, 1+4); |
| 143 | − if(a){ | |
| 151 | + if(a != nil){ | |
| 144 | 152 | a[0] = 'f'; |
| 145 | 153 | BPLONG(a+1, id); |
| 146 | 154 | flushimage(d, 0); |
| @@ -164,8 +172,8 @@ namedimage(Display *d, char *name) · 17 unmodified lines | ||
| 164 | 172 | i->clipr.min.y = atoi(buf+9*12); |
| 165 | 173 | i->clipr.max.x = atoi(buf+10*12); |
| 166 | 174 | i->clipr.max.y = atoi(buf+11*12); |
| 167 | − i->screen = 0; | |
| 168 | − i->next = 0; | |
| 175 | + i->screen = nil; | |
| 176 | + i->next = nil; | |
| 169 | 177 | return i; |
| 170 | 178 | } |
| 171 | 179 | |
| @@ -177,7 +185,7 @@ nameimage(Image *i, char *name, int in) · 5 unmodified lines | ||
| 177 | 185 | |
| 178 | 186 | n = strlen(name); |
| 179 | 187 | a = bufimage(i->display, 1+4+1+1+n); |
| 180 | − if(a == 0) | |
| 188 | + if(a == nil) | |
| 181 | 189 | return 0; |
| 182 | 190 | a[0] = 'N'; |
| 183 | 191 | BPLONG(a+1, i->id); |
| @@ -196,23 +204,16 @@ _freeimage1(Image *i) · 12 unmodified lines | ||
| 196 | 204 | Display *d; |
| 197 | 205 | Image *w; |
| 198 | 206 | |
| 199 | − if(i == 0) | |
| 207 | + if(i == nil || i->display == nil) | |
| 200 | 208 | return 0; |
| 201 | − /* make sure no refresh events occur on this if we block in the write */ | |
| 202 | 209 | d = i->display; |
| 203 | − /* flush pending data so we don't get error deleting the image */ | |
| 204 | 210 | flushimage(d, 0); |
| 205 | − a = bufimage(d, 1+4); | |
| 206 | − if(a == 0) | |
| 207 | − return -1; | |
| 208 | − a[0] = 'f'; | |
| 209 | − BPLONG(a+1, i->id); | |
| 210 | − if(i->screen){ | |
| 211 | + if(i->screen != nil){ | |
| 211 | 212 | w = d->windows; |
| 212 | 213 | if(w == i) |
| 213 | 214 | d->windows = i->next; |
| 214 | 215 | else |
| 215 | − while(w){ | |
| 216 | + while(w != nil){ | |
| 216 | 217 | if(w->next == i){ |
| 217 | 218 | w->next = i->next; |
| 218 | 219 | break; |
| @@ -220,7 +221,12 @@ _freeimage1(Image *i) · 1 unmodified line | ||
| 220 | 221 | w = w->next; |
| 221 | 222 | } |
| 222 | 223 | } |
| 223 | − if(flushimage(d, i->screen!=0) < 0) | |
| 224 | + a = bufimage(d, 1+4); | |
| 225 | + if(a == nil) | |
| 226 | + return -1; | |
| 227 | + a[0] = 'f'; | |
| 228 | + BPLONG(a+1, i->id); | |
| 229 | + if(flushimage(d, i->screen!=nil) < 0) | |
| 224 | 230 | return -1; |
| 225 | 231 | |
| 226 | 232 | return 0; |
| @@ -159,15 +159,18 @@ combinerect(Rectangle *r1, Rectangle r2) · 158 unmodified lines | ||
| 159 | 159 | r1->max.y = r2.max.y; |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | −ulong | |
| 163 | −drawld2chan[] = { | |
| 162 | +ulong drawld2chan[] = { | |
| 164 | 163 | GREY1, |
| 165 | 164 | GREY2, |
| 166 | 165 | GREY4, |
| 167 | 166 | CMAP8, |
| 168 | 167 | }; |
| 169 | 168 | |
| 170 | −int log2[] = { -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, 4 /* BUG */, -1, -1, -1, -1, -1, -1, -1, 5 }; | |
| 169 | +/* | |
| 170 | + * was used by libmemlayer/line.c; made static, instead of deleting it, | |
| 171 | + * to avoid updating many binaries on sources. | |
| 172 | + */ | |
| 173 | +static int log2[] = { -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, 4 /* BUG */, -1, -1, -1, -1, -1, -1, -1, 5 }; | |
| 171 | 174 | |
| 172 | 175 | ulong |
| 173 | 176 | setalpha(ulong color, uchar alpha) |
| @@ -186,21 +189,3 @@ setalpha(ulong color, uchar alpha) · 12 unmodified lines | ||
| 186 | 189 | |
| 187 | 190 | Point ZP; |
| 188 | 191 | Rectangle ZR; |
| 189 | −int | |
| 190 | −Rfmt(Fmt *f) | |
| 191 | −{ | |
| 192 | − Rectangle r; | |
| 193 | − | |
| 194 | − r = va_arg(f->args, Rectangle); | |
| 195 | − return fmtprint(f, "%P %P", r.min, r.max); | |
| 196 | −} | |
| 197 | − | |
| 198 | −int | |
| 199 | −Pfmt(Fmt *f) | |
| 200 | −{ | |
| 201 | − Point p; | |
| 202 | − | |
| 203 | − p = va_arg(f->args, Point); | |
| 204 | − return fmtprint(f, "[%d %d]", p.x, p.y); | |
| 205 | −} | |
| 206 | − | |
| @@ -0,0 +1,22 @@ | ||
| 1 | +#include <u.h> | |
| 2 | +#include <libc.h> | |
| 3 | +#include <draw.h> | |
| 4 | + | |
| 5 | +/* | |
| 6 | + * check for zero, negative size or insanely huge rectangle. | |
| 7 | + */ | |
| 8 | +int | |
| 9 | +badrect(Rectangle r) | |
| 10 | +{ | |
| 11 | + int x, y; | |
| 12 | + uint z; | |
| 13 | + | |
| 14 | + x = Dx(r); | |
| 15 | + y = Dy(r); | |
| 16 | + if(x > 0 && y > 0){ | |
| 17 | + z = x*y; | |
| 18 | + if(z/x == y && z < 0x10000000) | |
| 19 | + return 0; | |
| 20 | + } | |
| 21 | + return 1; | |
| 22 | +} | |
| @@ -41,9 +41,10 @@ strtochan(char *s) · 40 unmodified lines | ||
| 41 | 41 | { |
| 42 | 42 | char *p, *q; |
| 43 | 43 | ulong c; |
| 44 | − int t, n; | |
| 44 | + int t, n, d; | |
| 45 | 45 | |
| 46 | 46 | c = 0; |
| 47 | + d = 0; | |
| 47 | 48 | p=s; |
| 48 | 49 | while(*p && xisspace(*p)) |
| 49 | 50 | p++; |
| @@ -55,9 +56,12 @@ strtochan(char *s) · 5 unmodified lines | ||
| 55 | 56 | if(p[1] < '0' || p[1] > '9') |
| 56 | 57 | return 0; |
| 57 | 58 | n = p[1]-'0'; |
| 59 | + d += n; | |
| 58 | 60 | c = (c<<8) | __DC(t, n); |
| 59 | 61 | p += 2; |
| 60 | 62 | } |
| 63 | + if(d==0 || (d>8 && d%8) || (d<8 && 8%d)) | |
| 64 | + return 0; | |
| 61 | 65 | return c; |
| 62 | 66 | } |
| 63 | 67 | |
| @@ -3,384 +3,370 @@ · 2 unmodified lines | ||
| 3 | 3 | #include <draw.h> |
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | − * lucm/latin1.9, in uncompressed form | |
| 6 | + * vga/vga00, in uncompressed form | |
| 7 | 7 | */ |
| 8 | 8 | uchar |
| 9 | 9 | defontdata[] = |
| 10 | 10 | { |
| 11 | 11 | 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20, |
| 12 | 12 | 0x20,0x20,0x20,0x20,0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, |
| 13 | −0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x33,0x30,0x34,0x20, | |
| 14 | −0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x35,0x20,0x00,0x00,0x00,0x00, | |
| 15 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 16 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 17 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 18 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 19 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 20 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 21 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 22 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 23 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff, | |
| 24 | −0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, | |
| 25 | −0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, | |
| 26 | −0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 27 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 28 | −0x00,0x00,0x00,0x00,0x30,0x06,0x06,0x03,0x42,0x40,0x00,0x00,0x00,0x18,0x03,0x03, | |
| 29 | −0x02,0x43,0x00,0x60,0x60,0x48,0x00,0x0d,0x0c,0x01,0x81,0x80,0xd0,0x90,0x00,0x00, | |
| 30 | −0x18,0x01,0x81,0x81,0x40,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 31 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 32 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x7f,0x9c,0x1c, | |
| 33 | −0x0e,0x07,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x70, | |
| 34 | −0x38,0x1c,0x0e,0x04,0x81,0xc1,0xc0,0x70,0x00,0x1c,0x1c,0x00,0x00,0x00,0x00,0x00, | |
| 35 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 36 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 37 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 38 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 39 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 40 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 41 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x80,0xc0,0x63,0xe3, | |
| 42 | −0xf1,0xf8,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0xff,0xff,0x1f,0x8f, | |
| 43 | −0xc7,0xe3,0xf1,0xfb,0x7e,0x3e,0x3f,0x8f,0xff,0xe3,0xe3,0xff,0xff,0xff,0xff,0xff, | |
| 44 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 45 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 46 | −0x00,0x00,0x00,0x00,0x0c,0x18,0x09,0x05,0x82,0x40,0xc0,0x00,0x00,0x06,0x0c,0x04, | |
| 47 | −0x82,0x40,0xc1,0x80,0x90,0x48,0x00,0x16,0x03,0x06,0x02,0x41,0x60,0x90,0x00,0x00, | |
| 48 | −0x06,0x06,0x02,0x41,0x41,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 49 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 50 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x7f,0xa0,0x10, | |
| 51 | −0x08,0x04,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x48, | |
| 52 | −0x24,0x12,0x09,0x06,0x82,0x01,0x00,0x90,0x00,0x20,0x10,0x00,0x00,0x00,0x00,0x00, | |
| 53 | −0x00,0x00,0x04,0x80,0x00,0x40,0x00,0x00,0x38,0x06,0x18,0x00,0x00,0x00,0x00,0x00, | |
| 54 | −0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 55 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 56 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 57 | −0x00,0x00,0x07,0xc6,0x01,0xf0,0x00,0x00,0x0c,0x00,0x18,0x00,0x00,0x30,0x00,0x3c, | |
| 58 | −0x00,0x60,0x06,0x01,0x8c,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 59 | −0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe0,0xc3,0xc0,0x01,0x54,0x9c,0xc0,0x5f,0xef, | |
| 60 | −0xf7,0xfb,0xfd,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0x7f,0xff,0xff,0x6f,0xb7, | |
| 61 | −0xdb,0xed,0xf6,0xf9,0x7d,0xfe,0xff,0x6f,0xff,0xdf,0xef,0xff,0xff,0xff,0xff,0xff, | |
| 62 | −0xff,0x00,0x01,0x00,0x00,0x00,0x00,0x30,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 63 | −0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 64 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x00,0x00, | |
| 65 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 66 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x30,0x06,0x06,0x06,0x82,0x80,0xc0,0x00, | |
| 67 | −0x00,0x18,0x03,0x03,0x02,0x41,0x80,0x30,0x30,0x24,0x76,0x0d,0x0c,0x00,0xc0,0xc0, | |
| 68 | −0xd0,0x50,0x00,0x00,0x18,0x01,0x81,0x81,0x40,0x30,0x00,0x28,0x0f,0x7f,0xbc,0x1c, | |
| 69 | −0x0e,0x07,0x03,0xc0,0x10,0x70,0x24,0x10,0x09,0x07,0x03,0x80,0xe0,0x70,0x90,0x48, | |
| 70 | −0x24,0x12,0x09,0x05,0x81,0x81,0xc0,0x80,0x70,0x18,0x1c,0x07,0x01,0xc1,0xc0,0x90, | |
| 71 | −0x00,0x0c,0x04,0x84,0x83,0xe1,0xc0,0xe0,0x38,0x0c,0x0c,0x02,0x00,0x00,0x00,0x00, | |
| 72 | −0x00,0x06,0x1c,0x06,0x0f,0x87,0xc0,0x63,0xf8,0x78,0xfe,0x3e,0x0e,0x00,0x00,0x00, | |
| 73 | −0x00,0x00,0x00,0x7c,0x1c,0x0c,0x1f,0x03,0xc7,0xc3,0xf1,0xf8,0x3c,0x63,0x3f,0x0f, | |
| 74 | −0x8c,0x66,0x06,0x19,0x84,0x78,0x7e,0x1e,0x1f,0x07,0xcf,0xf3,0x1b,0x0d,0x86,0x63, | |
| 75 | −0x61,0x9f,0xc6,0x06,0x00,0x30,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x30,0x00,0x60, | |
| 76 | −0x00,0x60,0x06,0x01,0x8c,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80, | |
| 77 | −0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xc0,0x60,0x00,0xaa,0xb6,0xc0,0x43,0xe3, | |
| 78 | −0xf1,0xf8,0xfc,0x3f,0xef,0x8f,0xdb,0xef,0xf6,0xf8,0xfb,0xff,0x1f,0x8f,0x6f,0xb7, | |
| 79 | −0xdb,0xed,0xf6,0xfa,0x7e,0x7e,0x3f,0x7f,0x8f,0xe7,0xe3,0xf8,0xfe,0x3e,0x3f,0x6f, | |
| 80 | −0x00,0x00,0x01,0x01,0xc8,0x0b,0x0c,0x30,0x7c,0x14,0x0f,0x0f,0x00,0x00,0x00,0x00, | |
| 81 | −0x78,0x00,0x1c,0x00,0x0f,0x07,0x81,0x80,0x00,0x7c,0x00,0x00,0x1c,0x0f,0x80,0x04, | |
| 82 | −0x42,0x23,0x90,0x00,0x18,0x0c,0x06,0x03,0x01,0x80,0xc0,0x3c,0x3c,0x3f,0x1f,0x8f, | |
| 83 | −0xc7,0xe7,0xe3,0xf1,0xf8,0xfc,0x7c,0x30,0x8f,0x07,0x83,0xc1,0xe0,0xf0,0x00,0x3d, | |
| 84 | −0x31,0x98,0xcc,0x66,0x36,0x19,0x80,0xcc,0x0c,0x18,0x09,0x0b,0x02,0x81,0x20,0x00, | |
| 85 | −0x00,0x06,0x0c,0x04,0x82,0x40,0x60,0xc0,0x48,0x24,0x18,0x16,0x03,0x03,0x01,0x21, | |
| 86 | −0x60,0x50,0x00,0x00,0x06,0x06,0x02,0x41,0x40,0xc1,0x80,0x28,0x87,0x7f,0x84,0x10, | |
| 87 | −0x08,0x04,0x02,0x40,0x38,0x48,0x24,0x10,0x09,0x04,0x04,0x81,0x00,0x80,0x90,0x48, | |
| 88 | −0x24,0x12,0x09,0x04,0x80,0x41,0x00,0x80,0x40,0x04,0x10,0x04,0x02,0x01,0x20,0x90, | |
| 89 | −0x00,0x0c,0x04,0x84,0x86,0x53,0x65,0xb0,0x08,0x18,0x06,0x0a,0x80,0x00,0x00,0x00, | |
| 90 | −0x00,0x0c,0x36,0x0e,0x19,0xcc,0xe0,0xe3,0xf8,0xcc,0xfe,0x63,0x1b,0x00,0x00,0x00, | |
| 91 | −0x00,0x00,0x00,0xc6,0x62,0x0c,0x19,0x86,0x66,0x63,0x01,0x80,0x66,0x63,0x0c,0x01, | |
| 92 | −0x8c,0xc6,0x06,0x19,0xc4,0xcc,0x63,0x33,0x19,0x8c,0x61,0x83,0x1b,0x0d,0x86,0x63, | |
| 93 | −0x61,0x80,0xc6,0x03,0x00,0x30,0x30,0x00,0x1c,0x00,0x18,0x00,0x00,0x30,0x00,0x60, | |
| 94 | −0x00,0x60,0x00,0x00,0x0c,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80, | |
| 95 | −0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xc0,0x60,0x01,0x54,0x86,0xc0,0x7b,0xef, | |
| 96 | −0xf7,0xfb,0xfd,0xbf,0xc7,0xb7,0xdb,0xef,0xf6,0xfb,0xfb,0x7e,0xff,0x7f,0x6f,0xb7, | |
| 97 | −0xdb,0xed,0xf6,0xfb,0x7f,0xbe,0xff,0x7f,0xbf,0xfb,0xef,0xfb,0xfd,0xfe,0xdf,0x6f, | |
| 98 | −0xff,0x00,0x07,0x83,0x24,0x13,0x0c,0x30,0xc6,0x00,0x10,0x81,0x80,0x00,0x00,0x00, | |
| 99 | −0x84,0x00,0x22,0x00,0x01,0x80,0xc0,0x00,0x00,0xf4,0x00,0x00,0x2c,0x18,0xc0,0x0c, | |
| 100 | −0x46,0x20,0x90,0x00,0x18,0x0c,0x06,0x03,0x01,0x80,0xc0,0x70,0x66,0x30,0x18,0x0c, | |
| 101 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x66,0x38,0x99,0x8c,0xc6,0x63,0x31,0x98,0x00,0x66, | |
| 102 | −0x31,0x98,0xcc,0x66,0x36,0x19,0x80,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00, | |
| 103 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x00,0x00, | |
| 104 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0xff,0x7f,0xb8,0x1c, | |
| 105 | −0x0e,0x07,0x02,0x40,0x7c,0x70,0x3c,0x10,0x09,0x07,0x04,0x00,0xc0,0x60,0xe0,0x70, | |
| 106 | −0x38,0x1c,0x0e,0x04,0x83,0x81,0xc0,0x70,0x70,0x38,0x1c,0x07,0x02,0xc1,0xc0,0x90, | |
| 107 | −0x00,0x0c,0x00,0x04,0x86,0x43,0x69,0xb0,0x30,0x18,0x06,0x07,0x01,0x00,0x00,0x00, | |
| 108 | −0x00,0x0c,0x63,0x16,0x00,0xc0,0x61,0x62,0x01,0x80,0x06,0x63,0x31,0x80,0x00,0x00, | |
| 109 | −0x60,0x00,0xc0,0x06,0x43,0x16,0x19,0x8c,0x06,0x33,0x01,0x80,0xc0,0x63,0x0c,0x01, | |
| 110 | −0x8c,0x86,0x07,0x39,0xc5,0x86,0x63,0x61,0x99,0x8c,0x01,0x83,0x1b,0x0d,0xb6,0x63, | |
| 111 | −0x31,0x01,0x86,0x03,0x00,0x30,0x30,0x00,0x1c,0x3e,0x1b,0x03,0xc1,0xf0,0xf0,0x60, | |
| 112 | −0x3e,0x6e,0x3e,0x0f,0x8c,0x60,0xc5,0xb1,0xb8,0x38,0x6c,0x0f,0x8c,0xc7,0xc1,0x83, | |
| 113 | −0x19,0x8d,0x82,0x63,0x31,0x9f,0xc1,0x80,0xc0,0xc0,0x00,0xaa,0x86,0xc0,0x47,0xe3, | |
| 114 | −0xf1,0xf8,0xfd,0xbf,0x83,0x8f,0xc3,0xef,0xf6,0xf8,0xfc,0xff,0x3f,0x9f,0x1f,0x8f, | |
| 115 | −0xc7,0xe3,0xf1,0xfb,0x7c,0x7e,0x3f,0x8f,0x8f,0xc7,0xe3,0xf8,0xfd,0x3e,0x3f,0x6f, | |
| 116 | −0x00,0x0c,0x0d,0x43,0x03,0xe1,0x88,0x30,0xc0,0x00,0x27,0x41,0x80,0x00,0x00,0x01, | |
| 117 | −0x72,0x00,0x22,0x04,0x01,0x80,0xc0,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xc0,0x04, | |
| 118 | −0x82,0x43,0x20,0x18,0x2c,0x16,0x0b,0x05,0x82,0xc1,0x60,0xb0,0xc0,0x30,0x18,0x0c, | |
| 119 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x38,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x00,0xc7, | |
| 120 | −0x31,0x98,0xcc,0x66,0x33,0x11,0xf8,0xc8,0x7c,0x3e,0x1f,0x0f,0x87,0xc3,0xe1,0xd8, | |
| 121 | −0x3c,0x1e,0x0f,0x07,0x83,0xc7,0xc3,0xe1,0xf0,0xf8,0x06,0x37,0x07,0x03,0x81,0xc0, | |
| 122 | −0xe0,0x70,0x10,0x1d,0x31,0x98,0xcc,0x66,0x33,0x19,0xb0,0xc6,0x8f,0x7f,0x87,0x03, | |
| 123 | −0x81,0x80,0x90,0x30,0x6c,0x48,0x24,0x10,0x06,0x04,0x04,0x80,0x20,0x10,0x10,0x0e, | |
| 124 | −0x07,0x03,0x81,0xc0,0x60,0x88,0x38,0x0c,0x40,0x09,0x03,0x84,0x02,0x41,0x40,0x90, | |
| 125 | −0x00,0x0c,0x00,0x1f,0xe7,0x41,0xd1,0xa0,0x00,0x30,0x03,0x0a,0x81,0x00,0x00,0x00, | |
| 126 | −0x00,0x18,0x63,0x06,0x00,0xc0,0xc2,0x62,0x01,0xb0,0x0c,0x72,0x31,0x86,0x03,0x00, | |
| 127 | −0xc0,0x00,0x60,0x06,0x8f,0x16,0x19,0x0c,0x06,0x33,0x01,0x80,0xc0,0x63,0x0c,0x01, | |
| 128 | −0x8d,0x06,0x07,0x39,0x65,0x86,0x63,0x61,0x99,0x0e,0x01,0x83,0x19,0x89,0xb6,0x32, | |
| 129 | −0x33,0x03,0x06,0x01,0x80,0x30,0x78,0x00,0x00,0x03,0x1d,0x86,0x23,0x31,0x99,0xfc, | |
| 130 | −0x66,0x77,0x06,0x01,0x8c,0x40,0xc6,0xd9,0xdc,0x6c,0x76,0x19,0x8d,0xcc,0x27,0xf3, | |
| 131 | −0x19,0x8d,0x82,0x63,0x31,0x80,0xc0,0x80,0xc0,0x80,0x01,0x54,0x8c,0xc0,0x78,0xfc, | |
| 132 | −0x7e,0x7f,0x6f,0xcf,0x93,0xb7,0xdb,0xef,0xf9,0xfb,0xff,0xff,0xdf,0xef,0xef,0xf1, | |
| 133 | −0xf8,0xfc,0x7e,0x3f,0x9f,0x77,0xc7,0xf3,0xbf,0xf6,0xfc,0x7b,0xfd,0xbe,0xbf,0x6f, | |
| 134 | −0xff,0x0c,0x19,0x03,0x03,0x61,0x98,0x30,0x78,0x00,0x28,0x4f,0x83,0x30,0x00,0x01, | |
| 135 | −0x4a,0x00,0x1c,0x04,0x03,0x03,0x80,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xd9,0x84, | |
| 136 | −0x82,0x40,0xa0,0x18,0x2c,0x16,0x0b,0x05,0x82,0xc1,0x60,0xb0,0xc0,0x30,0x18,0x0c, | |
| 137 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x2c,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x64,0xcb, | |
| 138 | −0x31,0x98,0xcc,0x66,0x33,0x31,0x8c,0xd8,0x06,0x03,0x01,0x80,0xc0,0x60,0x30,0x6c, | |
| 139 | −0x62,0x33,0x19,0x8c,0xc6,0x60,0xc0,0x60,0x30,0x18,0x1e,0x3b,0x8d,0x86,0xc3,0x61, | |
| 140 | −0xb0,0xd8,0x10,0x36,0x31,0x98,0xcc,0x66,0x33,0x19,0xd8,0xc6,0x0f,0x7f,0x82,0x01, | |
| 141 | −0x02,0x40,0xd0,0x40,0x6c,0x70,0x24,0x1c,0x06,0x04,0x03,0x01,0xc0,0xe0,0x10,0x12, | |
| 142 | −0x09,0x04,0x82,0x40,0x90,0x50,0x10,0x12,0x70,0x09,0x04,0x04,0x01,0xc1,0x20,0x60, | |
| 143 | −0x00,0x0c,0x00,0x04,0x83,0xc0,0x20,0xcc,0x00,0x30,0x03,0x02,0x01,0x00,0x00,0x00, | |
| 144 | −0x00,0x18,0x63,0x06,0x01,0x83,0x84,0x63,0xf1,0xd8,0x18,0x3c,0x31,0x86,0x03,0x01, | |
| 145 | −0x83,0xf8,0x30,0x1c,0x9b,0x33,0x1e,0x0c,0x06,0x33,0xe1,0x80,0xc0,0x7f,0x0c,0x01, | |
| 146 | −0x8f,0x06,0x07,0x79,0x65,0x86,0x66,0x61,0x9e,0x07,0x81,0x83,0x19,0x89,0xb6,0x1c, | |
| 147 | −0x1a,0x03,0x06,0x01,0x80,0x30,0x48,0x00,0x00,0x03,0x18,0xcc,0x06,0x33,0x18,0x60, | |
| 148 | −0xc6,0x63,0x06,0x01,0x8c,0x80,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8e,0x4c,0x01,0x83, | |
| 149 | −0x19,0x8d,0x92,0x32,0x31,0x81,0x87,0x00,0xc0,0x70,0xe4,0xaa,0x98,0xc0,0x7d,0xfe, | |
| 150 | −0xfd,0xbf,0x2f,0xbf,0x93,0x8f,0xdb,0xe3,0xf9,0xfb,0xff,0x1e,0x3f,0x1f,0xef,0xed, | |
| 151 | −0xf6,0xfb,0x7d,0xbf,0x6f,0xaf,0xef,0xed,0x8f,0xf6,0xfb,0xfb,0xfe,0x3e,0xdf,0x9f, | |
| 152 | −0x00,0x00,0x19,0x0f,0xc6,0x30,0xd0,0x00,0xcc,0x00,0x28,0x59,0x86,0x67,0xf0,0x01, | |
| 153 | −0x72,0x00,0x00,0x3f,0x86,0x00,0xc0,0x03,0x18,0xf4,0x00,0x00,0x0c,0x18,0xcc,0xc5, | |
| 154 | −0x32,0x83,0x4c,0x00,0x66,0x33,0x19,0x8c,0xc6,0x63,0x31,0xbc,0xc0,0x3e,0x1f,0x0f, | |
| 155 | −0x87,0xc1,0x80,0xc0,0x60,0x30,0xfb,0x2c,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x38,0xcb, | |
| 156 | −0x31,0x98,0xcc,0x66,0x31,0xa1,0x8c,0xcc,0x06,0x03,0x01,0x80,0xc0,0x60,0x30,0x6c, | |
| 157 | −0xc0,0x63,0x31,0x98,0xcc,0x60,0xc0,0x60,0x30,0x18,0x37,0x31,0x98,0xcc,0x66,0x33, | |
| 158 | −0x19,0x8c,0x00,0x67,0x31,0x98,0xcc,0x66,0x33,0x19,0x8c,0xc6,0x1f,0x7f,0x82,0x01, | |
| 159 | −0x02,0x40,0xb0,0x40,0x6c,0x07,0x03,0x83,0x80,0xe0,0xe0,0x00,0x18,0x0e,0x10,0x10, | |
| 160 | −0x08,0x04,0x02,0x00,0xf0,0x20,0x10,0x1e,0x08,0x89,0x03,0x00,0xe0,0x38,0x1c,0x0e, | |
| 161 | −0x00,0x0c,0x00,0x04,0x81,0xe0,0x41,0x6c,0x00,0x30,0x03,0x00,0x0f,0xe0,0x03,0xf8, | |
| 162 | −0x00,0x30,0x63,0x06,0x03,0x00,0xc7,0xf0,0x39,0x8c,0x30,0x3e,0x1b,0x80,0x00,0x03, | |
| 163 | −0x00,0x00,0x18,0x30,0x9b,0x23,0x19,0x0c,0x06,0x33,0x01,0xf8,0xc6,0x63,0x0c,0x01, | |
| 164 | −0x8d,0x86,0x05,0xd9,0x35,0x86,0x7c,0x61,0x9b,0x01,0xc1,0x83,0x19,0x99,0xb4,0x1c, | |
| 165 | −0x0c,0x06,0x06,0x00,0xc0,0x30,0xcc,0x00,0x00,0x3f,0x18,0xcc,0x06,0x33,0xf8,0x60, | |
| 166 | −0xc6,0x63,0x06,0x01,0x8f,0x00,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x0f,0x81,0x83, | |
| 167 | −0x18,0xd9,0xba,0x1c,0x1b,0x03,0x00,0x80,0xc0,0x81,0x75,0x54,0x98,0xc0,0x7d,0xfe, | |
| 168 | −0xfd,0xbf,0x4f,0xbf,0x93,0xf8,0xfc,0x7c,0x7f,0x1f,0x1f,0x6f,0xe7,0xf1,0xef,0xef, | |
| 169 | −0xf7,0xfb,0xfd,0xff,0x0f,0xdf,0xef,0xe1,0xf7,0x76,0xfc,0xff,0x1f,0xc7,0xe3,0xf1, | |
| 170 | −0xff,0x08,0x19,0x03,0x06,0x31,0xf8,0x00,0xc6,0x00,0x28,0x5b,0x8c,0xc0,0x11,0xf1, | |
| 171 | −0x4a,0x00,0x00,0x04,0x0c,0x00,0xc0,0x03,0x18,0x74,0x38,0x00,0x0c,0x18,0xc6,0x65, | |
| 172 | −0x52,0xb8,0x54,0x18,0x46,0x23,0x11,0x88,0xc4,0x62,0x31,0x30,0xc0,0x30,0x18,0x0c, | |
| 173 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x26,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x10,0xd3, | |
| 174 | −0x31,0x98,0xcc,0x66,0x30,0xc1,0x8c,0xc6,0x7e,0x3f,0x1f,0x8f,0xc7,0xe3,0xf1,0xfc, | |
| 175 | −0xc0,0x7f,0x3f,0x9f,0xcf,0xe0,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33, | |
| 176 | −0x19,0x8c,0xfe,0x6b,0x31,0x98,0xcc,0x66,0x31,0xb1,0x8c,0x6c,0x0e,0x7f,0x82,0x01, | |
| 177 | −0x01,0x80,0x90,0x30,0xc6,0x08,0x01,0x02,0x00,0x40,0x80,0xe0,0x24,0x04,0x1c,0x10, | |
| 178 | −0x08,0x04,0x02,0x00,0x90,0x20,0x10,0x12,0x0d,0x86,0x00,0x81,0x00,0x40,0x20,0x10, | |
| 179 | −0x00,0x04,0x00,0x1f,0xe1,0x70,0xbb,0x28,0x00,0x30,0x03,0x00,0x01,0x00,0x00,0x00, | |
| 180 | −0x00,0x30,0x63,0x06,0x06,0x00,0x67,0xf0,0x19,0x8c,0x30,0x67,0x0d,0x80,0x00,0x01, | |
| 181 | −0x83,0xf8,0x30,0x30,0x9b,0x7f,0x19,0x8c,0x06,0x33,0x01,0x80,0xc6,0x63,0x0c,0x01, | |
| 182 | −0x8c,0xc6,0x05,0xd9,0x35,0x86,0x60,0x61,0x99,0x80,0xe1,0x83,0x18,0xd0,0xdc,0x26, | |
| 183 | −0x0c,0x0c,0x06,0x00,0xc0,0x30,0x84,0x00,0x00,0x63,0x18,0xcc,0x06,0x33,0x00,0x60, | |
| 184 | −0xc6,0x63,0x06,0x01,0x8d,0x80,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x03,0xe1,0x83, | |
| 185 | −0x18,0xd9,0xba,0x1c,0x1b,0x06,0x01,0x80,0xc0,0xc1,0x38,0xaa,0x80,0xc0,0x7d,0xfe, | |
| 186 | −0xfe,0x7f,0x6f,0xcf,0x39,0xf7,0xfe,0xfd,0xff,0xbf,0x7f,0x0f,0xdb,0xfb,0xe3,0xef, | |
| 187 | −0xf7,0xfb,0xfd,0xff,0x6f,0xdf,0xef,0xed,0xf2,0x79,0xff,0x7e,0xff,0xbf,0xdf,0xef, | |
| 188 | −0x00,0x0c,0x19,0x03,0x03,0x60,0x60,0x30,0x66,0x00,0x28,0x4d,0xc6,0x60,0x10,0x00, | |
| 189 | −0x84,0x00,0x00,0x04,0x0f,0x87,0x80,0x03,0x18,0x14,0x38,0x00,0x3f,0x0f,0x8c,0xc2, | |
| 190 | −0x90,0x84,0xa4,0x18,0xfe,0x7f,0x3f,0x9f,0xcf,0xe7,0xf1,0xf0,0xc0,0x30,0x18,0x0c, | |
| 191 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x26,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x38,0xd3, | |
| 192 | −0x31,0x98,0xcc,0x66,0x30,0xc1,0x98,0xc6,0xc6,0x63,0x31,0x98,0xcc,0x66,0x33,0x60, | |
| 193 | −0xc0,0x60,0x30,0x18,0x0c,0x00,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33, | |
| 194 | −0x19,0x8c,0x00,0x6b,0x31,0x98,0xcc,0x66,0x31,0xb1,0x8c,0x6c,0x1c,0x7f,0x81,0x20, | |
| 195 | −0x90,0x38,0x18,0x0b,0x83,0x06,0x01,0x03,0x80,0x40,0xe0,0x90,0x24,0x04,0x03,0x8e, | |
| 196 | −0x86,0xc3,0x61,0x90,0x24,0x12,0x0e,0x04,0x8a,0x81,0xc7,0x70,0xc0,0x30,0x18,0x0c, | |
| 197 | −0x00,0x00,0x00,0x04,0x81,0x31,0x6f,0x30,0x00,0x18,0x06,0x00,0x01,0x00,0x00,0x00, | |
| 198 | −0x00,0x60,0x63,0x06,0x0c,0x00,0x60,0x60,0x19,0x8c,0x60,0x63,0x01,0x80,0x00,0x00, | |
| 199 | −0xc0,0x00,0x60,0x00,0x4d,0xe1,0x99,0x8c,0x06,0x33,0x01,0x80,0xc6,0x63,0x0c,0x01, | |
| 200 | −0x8c,0xc6,0x04,0x99,0x1d,0x86,0x60,0x61,0x99,0x80,0x61,0x83,0x18,0xd0,0xdc,0x63, | |
| 201 | −0x0c,0x0c,0x06,0x00,0x60,0x30,0x84,0x00,0x00,0x63,0x18,0xcc,0x06,0x33,0x00,0x60, | |
| 202 | −0x6e,0x63,0x06,0x01,0x8c,0xc0,0xc6,0xd9,0x8c,0xc6,0x63,0x31,0x8c,0x00,0x61,0x83, | |
| 203 | −0x18,0xd0,0xcc,0x26,0x0e,0x0c,0x03,0x00,0xc0,0x60,0x01,0x54,0x98,0xc0,0x7e,0xdf, | |
| 204 | −0x6f,0xc7,0xe7,0xf4,0x7c,0xf9,0xfe,0xfc,0x7f,0xbf,0x1f,0x5f,0xdb,0xfb,0xfc,0x71, | |
| 205 | −0x79,0x3c,0x9e,0x6f,0xdb,0xed,0xf1,0xfb,0x75,0x7e,0x38,0x8f,0x3f,0xcf,0xe7,0xf3, | |
| 206 | −0xff,0x0c,0x0d,0x03,0x03,0xe1,0xf8,0x30,0x3c,0x00,0x27,0x40,0x03,0x30,0x00,0x00, | |
| 207 | −0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x18,0x14,0x00,0x00,0x00,0x00,0x19,0x82, | |
| 208 | −0xf8,0x98,0xbe,0x70,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x30,0xc0,0x30,0x18,0x0c, | |
| 209 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x63,0x23,0xb0,0xd8,0x6c,0x36,0x1b,0x0c,0x4c,0xe3, | |
| 210 | −0x31,0x98,0xcc,0x66,0x30,0xc1,0xf0,0xc6,0xc6,0x63,0x31,0x98,0xcc,0x66,0x33,0x60, | |
| 211 | −0xc0,0x60,0x30,0x18,0x0c,0x00,0xc0,0x60,0x30,0x18,0x63,0x31,0x98,0xcc,0x66,0x33, | |
| 212 | −0x19,0x8c,0x10,0x73,0x31,0x98,0xcc,0x66,0x30,0xe1,0x8c,0x38,0x1c,0x7f,0x80,0xa0, | |
| 213 | −0x50,0x10,0x24,0x0d,0xff,0x01,0x01,0x02,0x00,0x40,0x80,0xf0,0x24,0x04,0x02,0x01, | |
| 214 | −0x81,0x20,0x10,0x30,0x28,0x1a,0x09,0x06,0x8a,0x81,0x20,0x90,0x20,0x08,0x04,0x02, | |
| 215 | −0x00,0x0c,0x00,0x04,0x85,0x32,0x6f,0xb8,0x00,0x18,0x06,0x00,0x01,0x01,0xc0,0x00, | |
| 216 | −0x70,0x60,0x36,0x06,0x1f,0xcc,0xe0,0x63,0x30,0xd8,0x60,0x63,0x33,0x06,0x03,0x00, | |
| 217 | −0x60,0x00,0xc0,0x30,0x60,0x61,0x99,0x86,0x66,0x63,0x01,0x80,0x66,0x63,0x0c,0x03, | |
| 218 | −0x0c,0x66,0x04,0x19,0x1c,0xcc,0x60,0x33,0x18,0xcc,0x61,0x81,0xb0,0x60,0xcc,0x63, | |
| 219 | −0x0c,0x18,0x06,0x00,0x60,0x30,0x00,0x00,0x00,0x67,0x19,0x86,0x23,0x71,0x88,0x60, | |
| 220 | −0x36,0x63,0x06,0x01,0x8c,0x60,0xc6,0xd9,0x8c,0x6c,0x66,0x1b,0x8c,0x08,0x61,0x83, | |
| 221 | −0xb8,0x70,0xcc,0x63,0x0c,0x18,0x03,0x00,0xc0,0x60,0x00,0xaa,0x98,0xc0,0x7f,0x5f, | |
| 222 | −0xaf,0xef,0xdb,0xf2,0x00,0xfe,0xfe,0xfd,0xff,0xbf,0x7f,0x6f,0xdb,0xfb,0xfd,0xfe, | |
| 223 | −0x7e,0xdf,0xef,0xcf,0xd7,0xe5,0xf6,0xf9,0x75,0x7e,0xdf,0x6f,0xdf,0xf7,0xfb,0xfd, | |
| 224 | −0x00,0x0c,0x07,0xc6,0x04,0x10,0x60,0x30,0x06,0x00,0x10,0x80,0x00,0x00,0x00,0x00, | |
| 225 | −0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x03,0xb8,0x14,0x00,0x00,0x00,0x00,0x00,0x04, | |
| 226 | −0x11,0x21,0x04,0xc0,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x30,0x66,0x30,0x18,0x0c, | |
| 227 | −0x06,0x01,0x80,0xc0,0x60,0x30,0x66,0x23,0x99,0x8c,0xc6,0x63,0x31,0x98,0x00,0x66, | |
| 228 | −0x1b,0x0d,0x86,0xc3,0x60,0xc1,0x80,0xc6,0xce,0x67,0x33,0x99,0xcc,0xe6,0x73,0x74, | |
| 229 | −0x62,0x31,0x18,0x8c,0x46,0x20,0xc0,0x60,0x30,0x18,0x36,0x31,0x8d,0x86,0xc3,0x61, | |
| 230 | −0xb0,0xd8,0x10,0x36,0x3b,0x9d,0xce,0xe7,0x70,0xc1,0x98,0x30,0x00,0x7f,0x80,0xc0, | |
| 231 | −0x60,0x10,0x24,0x0c,0x38,0x0e,0x01,0x02,0x00,0x40,0x80,0xa0,0x18,0x0e,0x03,0x00, | |
| 232 | −0x80,0x40,0x60,0x50,0x30,0x16,0x0e,0x05,0x88,0x81,0xc0,0x81,0xc0,0x70,0x38,0x1c, | |
| 233 | −0x00,0x0c,0x00,0x04,0x83,0xe0,0x39,0xcc,0x00,0x0c,0x0c,0x00,0x00,0x01,0xc0,0x00, | |
| 234 | −0x70,0xc0,0x1c,0x06,0x1f,0xc7,0xc0,0x61,0xe0,0x70,0x60,0x3e,0x1e,0x06,0x03,0x00, | |
| 235 | −0x00,0x00,0x00,0x30,0x1e,0x61,0x9f,0x03,0xc7,0xc3,0xf1,0x80,0x3e,0x63,0x3f,0x1e, | |
| 236 | −0x0c,0x67,0xe4,0x19,0x0c,0x78,0x60,0x1e,0x18,0xc7,0xc1,0x80,0xe0,0x60,0xcc,0x63, | |
| 237 | −0x0c,0x1f,0xc6,0x00,0x30,0x30,0x00,0x00,0x00,0x3b,0x9f,0x03,0xc1,0xb0,0xf0,0x60, | |
| 238 | −0x06,0x63,0x06,0x01,0x8c,0x70,0xc6,0xd9,0x8c,0x38,0x7c,0x0d,0x8c,0x07,0xc0,0xf1, | |
| 239 | −0xd8,0x60,0xcc,0x63,0x0c,0x1f,0xc3,0x00,0xc0,0x60,0x01,0x54,0x80,0xc0,0x7f,0x3f, | |
| 240 | −0x9f,0xef,0xdb,0xf3,0xc7,0xf1,0xfe,0xfd,0xff,0xbf,0x7f,0xff,0xe7,0xf1,0xfc,0xff, | |
| 241 | −0x7f,0xbf,0x9f,0xaf,0xcf,0xe9,0xf1,0xfa,0x77,0x7e,0x3f,0x7e,0x3f,0x8f,0xc7,0xe3, | |
| 242 | −0xff,0x0c,0x01,0x0f,0xe8,0x08,0x60,0x30,0xc6,0x00,0x0f,0x00,0x00,0x00,0x00,0x00, | |
| 243 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xd8,0x14,0x00,0x00,0x00,0x00,0x00,0x04, | |
| 244 | −0x11,0x3d,0x04,0xc0,0xc3,0x61,0xb0,0xd8,0x6c,0x36,0x1b,0x3c,0x3c,0x3f,0x1f,0x8f, | |
| 245 | −0xc7,0xe7,0xe3,0xf1,0xf8,0xfc,0x7c,0x21,0x8f,0x07,0x83,0xc1,0xe0,0xf0,0x00,0xbc, | |
| 246 | −0x0e,0x07,0x03,0x81,0xc0,0xc1,0x80,0xcc,0x77,0x3b,0x9d,0xce,0xe7,0x73,0xb9,0x98, | |
| 247 | −0x3c,0x1e,0x0f,0x07,0x83,0xc0,0xc0,0x60,0x30,0x18,0x1c,0x31,0x87,0x03,0x81,0xc0, | |
| 248 | −0xe0,0x70,0x00,0x5c,0x1d,0x8e,0xc7,0x63,0xb0,0xc1,0xf0,0x30,0x00,0x7f,0x81,0x40, | |
| 249 | −0xa0,0x10,0x28,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x00,0x02,0x00, | |
| 250 | −0x80,0x80,0x10,0xf8,0x28,0x12,0x09,0x04,0x80,0x01,0x20,0x80,0x00,0x00,0x00,0x00, | |
| 251 | −0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x40,0x00, | |
| 252 | −0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00, | |
| 253 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 254 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 255 | −0x00,0x00,0x07,0xc0,0x31,0xf0,0x01,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 256 | −0xcc,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x80,0x00,0x00,0x00, | |
| 257 | −0x00,0x00,0x00,0x00,0x18,0x00,0x01,0xe0,0xc3,0xc0,0x00,0x00,0xff,0xc0,0x7e,0xbf, | |
| 258 | −0x5f,0xef,0xd7,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xff, | |
| 259 | −0x7f,0x7f,0xef,0x07,0xd7,0xed,0xf6,0xfb,0x7f,0xfe,0xdf,0x7f,0xff,0xff,0xff,0xff, | |
| 260 | −0x00,0x0c,0x01,0x00,0x00,0x00,0x00,0x30,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 261 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x14,0x00,0x08,0x00,0x00,0x00,0x00, | |
| 262 | −0x00,0x00,0x00,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00, | |
| 263 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 264 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 265 | −0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 266 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x80,0x60,0x00,0x7f,0x81,0x20, | |
| 267 | −0x90,0x10,0x1c,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80, | |
| 268 | −0x81,0xe0,0x60,0x10,0x24,0x12,0x0e,0x04,0x80,0x01,0xc0,0x70,0x00,0x00,0x00,0x00, | |
| 269 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00, | |
| 270 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00, | |
| 271 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 272 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 273 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 274 | −0x78,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x80,0x00,0x00,0x00, | |
| 275 | −0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xfe,0xdf, | |
| 276 | −0x6f,0xef,0xe3,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f, | |
| 277 | −0x7e,0x1f,0x9f,0xef,0xdb,0xed,0xf1,0xfb,0x7f,0xfe,0x3f,0x8f,0xff,0xff,0xff,0xff, | |
| 278 | −0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 279 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00, | |
| 280 | −0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00, | |
| 281 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 282 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 283 | −0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 284 | −0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x81,0x80,0x60,0x20,0x20,0x20,0x20, | |
| 285 | −0x20,0x20,0x20,0x20,0x32,0x35,0x36,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, | |
| 286 | −0x20,0x31,0x35,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x33,0x20, | |
| 287 | −0x00,0x00,0x01,0x0c,0x00,0x09,0x09,0x00,0x01,0x0f,0x00,0x09,0x12,0x00,0x01,0x0f, | |
| 288 | −0x00,0x09,0x1b,0x00,0x01,0x0f,0x00,0x09,0x24,0x00,0x01,0x0f,0x00,0x09,0x2d,0x00, | |
| 289 | −0x01,0x0f,0x00,0x09,0x36,0x00,0x01,0x0f,0x00,0x09,0x3f,0x00,0x03,0x0d,0x00,0x09, | |
| 290 | −0x48,0x00,0x03,0x0d,0x00,0x09,0x51,0x00,0x03,0x0d,0x00,0x09,0x5a,0x00,0x03,0x0d, | |
| 291 | −0x00,0x09,0x63,0x00,0x03,0x0d,0x00,0x09,0x6c,0x00,0x03,0x0d,0x00,0x09,0x75,0x00, | |
| 292 | −0x03,0x0e,0x00,0x09,0x7e,0x00,0x03,0x0d,0x00,0x09,0x87,0x00,0x03,0x0d,0x00,0x09, | |
| 293 | −0x90,0x00,0x01,0x0f,0x00,0x09,0x99,0x00,0x01,0x0f,0x00,0x09,0xa2,0x00,0x01,0x0f, | |
| 294 | −0x00,0x09,0xab,0x00,0x01,0x0f,0x00,0x09,0xb4,0x00,0x01,0x0f,0x00,0x09,0xbd,0x00, | |
| 295 | −0x01,0x0f,0x00,0x09,0xc6,0x00,0x01,0x0f,0x00,0x09,0xcf,0x00,0x01,0x0f,0x00,0x09, | |
| 296 | −0xd8,0x00,0x01,0x0f,0x00,0x09,0xe1,0x00,0x03,0x0d,0x00,0x09,0xea,0x00,0x01,0x0f, | |
| 297 | −0x00,0x09,0xf3,0x00,0x01,0x0f,0x00,0x09,0xfc,0x00,0x03,0x0d,0x00,0x09,0x05,0x01, | |
| 298 | −0x03,0x0d,0x00,0x09,0x0e,0x01,0x03,0x0d,0x00,0x09,0x17,0x01,0x03,0x0d,0x00,0x09, | |
| 299 | −0x20,0x01,0x00,0x00,0x00,0x09,0x29,0x01,0x03,0x0d,0x00,0x09,0x32,0x01,0x02,0x05, | |
| 300 | −0x00,0x09,0x3b,0x01,0x03,0x0d,0x00,0x09,0x44,0x01,0x02,0x0e,0x00,0x09,0x4d,0x01, | |
| 301 | −0x03,0x0d,0x00,0x09,0x56,0x01,0x03,0x0d,0x00,0x09,0x5f,0x01,0x02,0x06,0x00,0x09, | |
| 302 | −0x68,0x01,0x02,0x0e,0x00,0x09,0x71,0x01,0x02,0x0e,0x00,0x09,0x7a,0x01,0x03,0x08, | |
| 303 | −0x00,0x09,0x83,0x01,0x05,0x0c,0x00,0x09,0x8c,0x01,0x0b,0x0f,0x00,0x09,0x95,0x01, | |
| 304 | −0x08,0x09,0x00,0x09,0x9e,0x01,0x0b,0x0d,0x00,0x09,0xa7,0x01,0x02,0x0e,0x00,0x09, | |
| 305 | −0xb0,0x01,0x03,0x0d,0x00,0x09,0xb9,0x01,0x03,0x0d,0x00,0x09,0xc2,0x01,0x03,0x0d, | |
| 306 | −0x00,0x09,0xcb,0x01,0x03,0x0d,0x00,0x09,0xd4,0x01,0x03,0x0d,0x00,0x09,0xdd,0x01, | |
| 307 | −0x03,0x0d,0x00,0x09,0xe6,0x01,0x03,0x0d,0x00,0x09,0xef,0x01,0x03,0x0d,0x00,0x09, | |
| 308 | −0xf8,0x01,0x03,0x0d,0x00,0x09,0x01,0x02,0x03,0x0d,0x00,0x09,0x0a,0x02,0x06,0x0d, | |
| 309 | −0x00,0x09,0x13,0x02,0x06,0x0f,0x00,0x09,0x1c,0x02,0x05,0x0c,0x00,0x09,0x25,0x02, | |
| 310 | −0x07,0x0a,0x00,0x09,0x2e,0x02,0x05,0x0c,0x00,0x09,0x37,0x02,0x03,0x0d,0x00,0x09, | |
| 311 | −0x40,0x02,0x03,0x0d,0x00,0x09,0x49,0x02,0x03,0x0d,0x00,0x09,0x52,0x02,0x03,0x0d, | |
| 312 | −0x00,0x09,0x5b,0x02,0x03,0x0d,0x00,0x09,0x64,0x02,0x03,0x0d,0x00,0x09,0x6d,0x02, | |
| 313 | −0x03,0x0d,0x00,0x09,0x76,0x02,0x03,0x0d,0x00,0x09,0x7f,0x02,0x03,0x0d,0x00,0x09, | |
| 314 | −0x88,0x02,0x03,0x0d,0x00,0x09,0x91,0x02,0x03,0x0d,0x00,0x09,0x9a,0x02,0x03,0x0d, | |
| 315 | −0x00,0x09,0xa3,0x02,0x03,0x0d,0x00,0x09,0xac,0x02,0x03,0x0d,0x00,0x09,0xb5,0x02, | |
| 316 | −0x03,0x0d,0x00,0x09,0xbe,0x02,0x03,0x0d,0x00,0x09,0xc7,0x02,0x03,0x0d,0x00,0x09, | |
| 317 | −0xd0,0x02,0x03,0x0d,0x00,0x09,0xd9,0x02,0x03,0x0f,0x00,0x09,0xe2,0x02,0x03,0x0d, | |
| 318 | −0x00,0x09,0xeb,0x02,0x03,0x0d,0x00,0x09,0xf4,0x02,0x03,0x0d,0x00,0x09,0xfd,0x02, | |
| 319 | −0x03,0x0d,0x00,0x09,0x06,0x03,0x03,0x0d,0x00,0x09,0x0f,0x03,0x03,0x0d,0x00,0x09, | |
| 320 | −0x18,0x03,0x03,0x0d,0x00,0x09,0x21,0x03,0x03,0x0d,0x00,0x09,0x2a,0x03,0x03,0x0d, | |
| 321 | −0x00,0x09,0x33,0x03,0x02,0x0e,0x00,0x09,0x3c,0x03,0x02,0x0e,0x00,0x09,0x45,0x03, | |
| 322 | −0x02,0x0e,0x00,0x09,0x4e,0x03,0x04,0x0b,0x00,0x09,0x57,0x03,0x0d,0x0e,0x00,0x09, | |
| 323 | −0x60,0x03,0x02,0x06,0x00,0x09,0x69,0x03,0x05,0x0d,0x00,0x09,0x72,0x03,0x02,0x0d, | |
| 324 | −0x00,0x09,0x7b,0x03,0x05,0x0d,0x00,0x09,0x84,0x03,0x02,0x0d,0x00,0x09,0x8d,0x03, | |
| 325 | −0x05,0x0d,0x00,0x09,0x96,0x03,0x02,0x0d,0x00,0x09,0x9f,0x03,0x05,0x0f,0x00,0x09, | |
| 326 | −0xa8,0x03,0x02,0x0d,0x00,0x09,0xb1,0x03,0x02,0x0d,0x00,0x09,0xba,0x03,0x02,0x0f, | |
| 327 | −0x00,0x09,0xc3,0x03,0x02,0x0d,0x00,0x09,0xcc,0x03,0x02,0x0d,0x00,0x09,0xd5,0x03, | |
| 328 | −0x05,0x0d,0x00,0x09,0xde,0x03,0x05,0x0d,0x00,0x09,0xe7,0x03,0x05,0x0d,0x00,0x09, | |
| 329 | −0xf0,0x03,0x05,0x0f,0x00,0x09,0xf9,0x03,0x05,0x0f,0x00,0x09,0x02,0x04,0x05,0x0d, | |
| 330 | −0x00,0x09,0x0b,0x04,0x05,0x0d,0x00,0x09,0x14,0x04,0x03,0x0d,0x00,0x09,0x1d,0x04, | |
| 331 | −0x05,0x0d,0x00,0x09,0x26,0x04,0x05,0x0d,0x00,0x09,0x2f,0x04,0x05,0x0d,0x00,0x09, | |
| 332 | −0x38,0x04,0x05,0x0d,0x00,0x09,0x41,0x04,0x05,0x0f,0x00,0x09,0x4a,0x04,0x05,0x0d, | |
| 333 | −0x00,0x09,0x53,0x04,0x02,0x0e,0x00,0x09,0x5c,0x04,0x02,0x0e,0x00,0x09,0x65,0x04, | |
| 334 | −0x02,0x0e,0x00,0x09,0x6e,0x04,0x07,0x0a,0x00,0x09,0x77,0x04,0x01,0x0d,0x00,0x09, | |
| 335 | −0x80,0x04,0x00,0x0e,0x00,0x09,0x89,0x04,0x00,0x0f,0x00,0x09,0x92,0x04,0x00,0x0f, | |
| 336 | −0x00,0x09,0x9b,0x04,0x00,0x0f,0x00,0x09,0xa4,0x04,0x00,0x0f,0x00,0x09,0xad,0x04, | |
| 337 | −0x00,0x0f,0x00,0x09,0xb6,0x04,0x00,0x0f,0x00,0x09,0xbf,0x04,0x00,0x0f,0x00,0x09, | |
| 338 | −0xc8,0x04,0x00,0x0f,0x00,0x09,0xd1,0x04,0x00,0x0f,0x00,0x09,0xda,0x04,0x00,0x0f, | |
| 339 | −0x00,0x09,0xe3,0x04,0x00,0x0f,0x00,0x09,0xec,0x04,0x00,0x0f,0x00,0x09,0xf5,0x04, | |
| 340 | −0x00,0x0f,0x00,0x09,0xfe,0x04,0x00,0x0f,0x00,0x09,0x07,0x05,0x00,0x0f,0x00,0x09, | |
| 341 | −0x10,0x05,0x00,0x0f,0x00,0x09,0x19,0x05,0x00,0x0f,0x00,0x09,0x22,0x05,0x00,0x0f, | |
| 342 | −0x00,0x09,0x2b,0x05,0x00,0x0f,0x00,0x09,0x34,0x05,0x00,0x0f,0x00,0x09,0x3d,0x05, | |
| 343 | −0x00,0x0f,0x00,0x09,0x46,0x05,0x00,0x0f,0x00,0x09,0x4f,0x05,0x00,0x0f,0x00,0x09, | |
| 344 | −0x58,0x05,0x00,0x0f,0x00,0x09,0x61,0x05,0x00,0x0f,0x00,0x09,0x6a,0x05,0x00,0x0f, | |
| 345 | −0x00,0x09,0x73,0x05,0x00,0x0f,0x00,0x09,0x7c,0x05,0x00,0x0f,0x00,0x09,0x85,0x05, | |
| 346 | −0x00,0x0f,0x00,0x09,0x8e,0x05,0x00,0x0f,0x00,0x09,0x97,0x05,0x00,0x0f,0x00,0x09, | |
| 347 | −0xa0,0x05,0x00,0x0d,0x00,0x09,0xa9,0x05,0x05,0x0f,0x00,0x09,0xb2,0x05,0x02,0x0e, | |
| 348 | −0x00,0x09,0xbb,0x05,0x03,0x0d,0x00,0x09,0xc4,0x05,0x03,0x0d,0x00,0x09,0xcd,0x05, | |
| 349 | −0x03,0x0d,0x00,0x09,0xd6,0x05,0x02,0x0e,0x00,0x09,0xdf,0x05,0x03,0x0e,0x00,0x09, | |
| 350 | −0xe8,0x05,0x02,0x04,0x00,0x09,0xf1,0x05,0x03,0x0d,0x00,0x09,0xfa,0x05,0x03,0x0a, | |
| 351 | −0x00,0x09,0x03,0x06,0x06,0x0b,0x00,0x09,0x0c,0x06,0x07,0x0a,0x00,0x09,0x15,0x06, | |
| 352 | −0x08,0x09,0x00,0x09,0x1e,0x06,0x03,0x0b,0x00,0x09,0x27,0x06,0x02,0x03,0x00,0x09, | |
| 353 | −0x30,0x06,0x03,0x07,0x00,0x09,0x39,0x06,0x05,0x0c,0x00,0x09,0x42,0x06,0x03,0x0a, | |
| 354 | −0x00,0x09,0x4b,0x06,0x03,0x0a,0x00,0x09,0x54,0x06,0x02,0x04,0x00,0x09,0x5d,0x06, | |
| 355 | −0x05,0x0f,0x00,0x09,0x66,0x06,0x03,0x0e,0x00,0x09,0x6f,0x06,0x08,0x0a,0x00,0x09, | |
| 356 | −0x78,0x06,0x0d,0x0f,0x00,0x09,0x81,0x06,0x03,0x0a,0x00,0x09,0x8a,0x06,0x03,0x0a, | |
| 357 | −0x00,0x09,0x93,0x06,0x06,0x0b,0x00,0x09,0x9c,0x06,0x03,0x0d,0x00,0x09,0xa5,0x06, | |
| 358 | −0x03,0x0d,0x00,0x09,0xae,0x06,0x03,0x0d,0x00,0x09,0xb7,0x06,0x05,0x0f,0x00,0x09, | |
| 359 | −0xc0,0x06,0x00,0x0d,0x00,0x09,0xc9,0x06,0x00,0x0d,0x00,0x09,0xd2,0x06,0x00,0x0d, | |
| 360 | −0x00,0x09,0xdb,0x06,0x00,0x0d,0x00,0x09,0xe4,0x06,0x00,0x0d,0x00,0x09,0xed,0x06, | |
| 361 | −0x01,0x0d,0x00,0x09,0xf6,0x06,0x03,0x0d,0x00,0x09,0xff,0x06,0x03,0x0f,0x00,0x09, | |
| 362 | −0x08,0x07,0x00,0x0d,0x00,0x09,0x11,0x07,0x00,0x0d,0x00,0x09,0x1a,0x07,0x00,0x0d, | |
| 363 | −0x00,0x09,0x23,0x07,0x00,0x0d,0x00,0x09,0x2c,0x07,0x00,0x0d,0x00,0x09,0x35,0x07, | |
| 364 | −0x00,0x0d,0x00,0x09,0x3e,0x07,0x00,0x0d,0x00,0x09,0x47,0x07,0x00,0x0d,0x00,0x09, | |
| 365 | −0x50,0x07,0x03,0x0d,0x00,0x09,0x59,0x07,0x00,0x0d,0x00,0x09,0x62,0x07,0x00,0x0d, | |
| 366 | −0x00,0x09,0x6b,0x07,0x00,0x0d,0x00,0x09,0x74,0x07,0x00,0x0d,0x00,0x09,0x7d,0x07, | |
| 367 | −0x00,0x0d,0x00,0x09,0x86,0x07,0x00,0x0d,0x00,0x09,0x8f,0x07,0x06,0x0b,0x00,0x09, | |
| 368 | −0x98,0x07,0x03,0x0d,0x00,0x09,0xa1,0x07,0x00,0x0d,0x00,0x09,0xaa,0x07,0x00,0x0d, | |
| 369 | −0x00,0x09,0xb3,0x07,0x00,0x0d,0x00,0x09,0xbc,0x07,0x00,0x0d,0x00,0x09,0xc5,0x07, | |
| 370 | −0x00,0x0d,0x00,0x09,0xce,0x07,0x03,0x0d,0x00,0x09,0xd7,0x07,0x02,0x0d,0x00,0x09, | |
| 371 | −0xe0,0x07,0x02,0x0d,0x00,0x09,0xe9,0x07,0x02,0x0d,0x00,0x09,0xf2,0x07,0x02,0x0d, | |
| 372 | −0x00,0x09,0xfb,0x07,0x02,0x0d,0x00,0x09,0x04,0x08,0x02,0x0d,0x00,0x09,0x0d,0x08, | |
| 373 | −0x02,0x0d,0x00,0x09,0x16,0x08,0x05,0x0d,0x00,0x09,0x1f,0x08,0x05,0x0f,0x00,0x09, | |
| 374 | −0x28,0x08,0x02,0x0d,0x00,0x09,0x31,0x08,0x02,0x0d,0x00,0x09,0x3a,0x08,0x02,0x0d, | |
| 375 | −0x00,0x09,0x43,0x08,0x02,0x0d,0x00,0x09,0x4c,0x08,0x02,0x0d,0x00,0x09,0x55,0x08, | |
| 376 | −0x02,0x0d,0x00,0x09,0x5e,0x08,0x02,0x0d,0x00,0x09,0x67,0x08,0x02,0x0d,0x00,0x09, | |
| 377 | −0x70,0x08,0x02,0x0d,0x00,0x09,0x79,0x08,0x02,0x0d,0x00,0x09,0x82,0x08,0x02,0x0d, | |
| 378 | −0x00,0x09,0x8b,0x08,0x02,0x0d,0x00,0x09,0x94,0x08,0x02,0x0d,0x00,0x09,0x9d,0x08, | |
| 379 | −0x02,0x0d,0x00,0x09,0xa6,0x08,0x02,0x0d,0x00,0x09,0xaf,0x08,0x05,0x0c,0x00,0x09, | |
| 380 | −0xb8,0x08,0x05,0x0d,0x00,0x09,0xc1,0x08,0x02,0x0d,0x00,0x09,0xca,0x08,0x02,0x0d, | |
| 381 | −0x00,0x09,0xd3,0x08,0x02,0x0d,0x00,0x09,0xdc,0x08,0x02,0x0d,0x00,0x09,0xe5,0x08, | |
| 382 | −0x02,0x0f,0x00,0x09,0xee,0x08,0x03,0x0f,0x00,0x09,0xf7,0x08,0x02,0x0f,0x00,0x09, | |
| 383 | −0x00,0x09,0x00,0x00,0x00,0x00, | |
| 13 | +0x20,0x20,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x32,0x30,0x34,0x38,0x20, | |
| 14 | +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x36,0x20,0x00,0x00,0x00,0x00, | |
| 15 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 16 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 17 | +0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 18 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 19 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 20 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x30,0x00,0x00,0x00, | |
| 21 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 22 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 23 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 24 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 25 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 26 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x10,0x76, | |
| 27 | +0x6c,0x38,0x00,0x00,0x30,0x0c,0x10,0x6c,0x30,0x0c,0x18,0x66,0x00,0x76,0x60,0x0c, | |
| 28 | +0x10,0x76,0x6c,0x00,0x00,0x60,0x0c,0x10,0x6c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 29 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 30 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xe0, | |
| 31 | +0xe0,0xe0,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xe0,0xe0,0xe0, | |
| 32 | +0xe0,0x90,0x70,0xe0,0x70,0x00,0x70,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x00, | |
| 33 | +0x18,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 34 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 35 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 36 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x30,0x00,0x00,0x00, | |
| 37 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 38 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 39 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 40 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x38, | |
| 41 | +0x00,0x00,0x00,0x7c,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x70,0x70, | |
| 42 | +0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x00,0xc0,0xc0,0xe0,0x00,0x30,0x18,0x38,0xdc, | |
| 43 | +0x6c,0x6c,0x00,0x00,0x18,0x18,0x38,0x6c,0x18,0x18,0x3c,0x66,0x00,0xdc,0x30,0x18, | |
| 44 | +0x38,0xdc,0x6c,0x00,0x00,0x30,0x18,0x38,0x6c,0x18,0x00,0x00,0x00,0x00,0x10,0x00, | |
| 45 | +0x00,0x38,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00, | |
| 46 | +0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0xda,0x00,0x80,0x80, | |
| 47 | +0x80,0x80,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x90,0x90, | |
| 48 | +0x90,0xd0,0x80,0x80,0x90,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x18,0x66,0x00, | |
| 49 | +0x7c,0x00,0x38,0x30,0x0c,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x18,0x7c,0x7c, | |
| 50 | +0x0c,0xfe,0x38,0xfe,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x10,0xfc,0x3c, | |
| 51 | +0xf8,0xfe,0xfe,0x3c,0xc6,0x3c,0x1e,0xe6,0xf0,0xc6,0xc6,0x7c,0xfc,0x7c,0xfc,0x7c, | |
| 52 | +0x7e,0xc6,0xc6,0xc6,0xc6,0x66,0xfe,0x3c,0x00,0x3c,0x6c,0x00,0x18,0x00,0xe0,0x00, | |
| 53 | +0x1c,0x00,0x38,0x00,0xe0,0x18,0x06,0xe0,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 54 | +0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x18,0x70,0x76,0x00,0x00,0x00,0x00,0x00, | |
| 55 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 56 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x6c, | |
| 57 | +0x00,0x66,0x18,0xc6,0x6c,0x3c,0x6c,0x00,0x00,0x00,0x38,0x00,0x6c,0x00,0xd8,0xd8, | |
| 58 | +0x0c,0x00,0x7f,0x00,0x00,0x70,0x6c,0x00,0xc0,0xc0,0x30,0x30,0x00,0x00,0x6c,0x00, | |
| 59 | +0x00,0x38,0x3e,0x3c,0x00,0x00,0x44,0x00,0x00,0x00,0x42,0x00,0xf8,0x00,0x00,0x00, | |
| 60 | +0x44,0x00,0x00,0x00,0x7a,0x00,0x00,0x44,0x00,0x00,0xf0,0x3c,0x60,0x18,0x38,0x76, | |
| 61 | +0x6c,0x6c,0x00,0x00,0x60,0x0c,0x38,0x6c,0x30,0x0c,0x38,0x66,0x76,0x76,0x60,0x0c, | |
| 62 | +0x38,0x76,0x6c,0x00,0x00,0x60,0x18,0x38,0xcc,0x0c,0xe0,0x6c,0x02,0x00,0xe0,0xe0, | |
| 63 | +0xe0,0xe0,0xf0,0x18,0x70,0x48,0x20,0x48,0x70,0x38,0x38,0x38,0x90,0x90,0x90,0x90, | |
| 64 | +0x90,0xb0,0x60,0xe0,0x80,0xe0,0x60,0xe0,0x70,0x38,0x70,0x48,0x00,0x3c,0x66,0x6c, | |
| 65 | +0xc6,0x00,0x6c,0x30,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x6c,0x38,0xc6,0xc6, | |
| 66 | +0x1c,0xc0,0x60,0xc6,0xc6,0xc6,0x00,0x00,0x06,0x00,0x60,0xc6,0x7c,0x38,0x66,0x66, | |
| 67 | +0x6c,0x66,0x66,0x66,0xc6,0x18,0x0c,0x66,0x60,0xee,0xe6,0xc6,0x66,0xc6,0x66,0xc6, | |
| 68 | +0x7e,0xc6,0xc6,0xc6,0xc6,0x66,0xc6,0x30,0x80,0x0c,0xc6,0x00,0x00,0x00,0x60,0x00, | |
| 69 | +0x0c,0x00,0x6c,0x00,0x60,0x18,0x06,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 70 | +0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0xdc,0x00,0x00,0x00,0x00,0x00, | |
| 71 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 72 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x64, | |
| 73 | +0x00,0x66,0x18,0x60,0x6c,0x42,0x6c,0x00,0x00,0x00,0x44,0x7c,0x6c,0x00,0x30,0x30, | |
| 74 | +0x18,0x00,0xdb,0x00,0x00,0x30,0x6c,0x00,0xc2,0xc2,0x62,0x30,0x10,0x10,0x10,0x10, | |
| 75 | +0x10,0x10,0x6c,0x66,0xfe,0xfe,0xfe,0xfe,0x3c,0x3c,0x3c,0x3c,0x6c,0xc6,0x7c,0x7c, | |
| 76 | +0x7c,0x7c,0x7c,0x00,0xc4,0xc6,0xc6,0xc6,0xc6,0x66,0x60,0x66,0x30,0x30,0x6c,0xdc, | |
| 77 | +0x6c,0x38,0x00,0x00,0x30,0x18,0x6c,0x6c,0x18,0x18,0x6c,0x66,0x1c,0xdc,0x30,0x18, | |
| 78 | +0x6c,0xdc,0x6c,0x00,0x00,0x30,0x30,0x6c,0xcc,0x18,0x60,0x6c,0x80,0x00,0x10,0x80, | |
| 79 | +0x80,0x80,0x90,0x3c,0x48,0x48,0x20,0x48,0x40,0x48,0x40,0x40,0x90,0x90,0x90,0x90, | |
| 80 | +0x90,0x90,0x10,0x80,0x80,0x80,0x10,0x80,0x40,0x40,0x48,0x48,0x00,0x3c,0x24,0x6c, | |
| 81 | +0xc2,0xc2,0x6c,0x20,0x30,0x0c,0x00,0x00,0x00,0x00,0x00,0x02,0xc6,0x78,0x06,0x06, | |
| 82 | +0x3c,0xc0,0xc0,0x06,0xc6,0xc6,0x18,0x18,0x0c,0x00,0x30,0xc6,0xc6,0x6c,0x66,0xc2, | |
| 83 | +0x66,0x62,0x62,0xc2,0xc6,0x18,0x0c,0x66,0x60,0xfe,0xf6,0xc6,0x66,0xc6,0x66,0xc6, | |
| 84 | +0x5a,0xc6,0xc6,0xc6,0x6c,0x66,0x86,0x30,0xc0,0x0c,0x00,0x00,0x00,0x00,0x60,0x00, | |
| 85 | +0x0c,0x00,0x64,0x00,0x60,0x00,0x00,0x60,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 86 | +0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x00,0x10,0x00,0x00,0x00,0x00, | |
| 87 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 88 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x60, | |
| 89 | +0x66,0x3c,0x18,0x38,0x00,0x99,0x3e,0x00,0x00,0x00,0xba,0x00,0x38,0x18,0x60,0x18, | |
| 90 | +0x00,0x00,0xdb,0x00,0x00,0x30,0x38,0x00,0xc6,0xc6,0x36,0x00,0x38,0x38,0x38,0x38, | |
| 91 | +0x38,0x38,0xcc,0xc2,0x66,0x66,0x66,0x66,0x18,0x18,0x18,0x18,0x66,0xe6,0xc6,0xc6, | |
| 92 | +0xc6,0xc6,0xc6,0x00,0xce,0xc6,0xc6,0xc6,0xc6,0x66,0x7c,0x66,0x00,0x00,0x00,0x00, | |
| 93 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00, | |
| 94 | +0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x82,0x00,0xe0,0xe0, | |
| 95 | +0xe0,0xe0,0x90,0x3c,0x70,0x78,0x20,0x48,0x70,0x40,0x30,0x30,0xe0,0xe0,0xe0,0xe0, | |
| 96 | +0xe0,0x90,0xe0,0xe0,0x70,0xe0,0xe0,0xe0,0x70,0x58,0x70,0x48,0x00,0x3c,0x00,0xfe, | |
| 97 | +0xc0,0xc6,0x38,0x00,0x30,0x0c,0x66,0x18,0x00,0x00,0x00,0x06,0xc6,0x18,0x0c,0x06, | |
| 98 | +0x6c,0xc0,0xc0,0x06,0xc6,0xc6,0x18,0x18,0x18,0x7e,0x18,0x0c,0xc6,0xc6,0x66,0xc0, | |
| 99 | +0x66,0x68,0x68,0xc0,0xc6,0x18,0x0c,0x6c,0x60,0xfe,0xfe,0xc6,0x66,0xc6,0x66,0x60, | |
| 100 | +0x18,0xc6,0xc6,0xc6,0x7c,0x66,0x0c,0x30,0xe0,0x0c,0x00,0x00,0x00,0x78,0x78,0x7c, | |
| 101 | +0x3c,0x7c,0x60,0x76,0x6c,0x38,0x0e,0x66,0x18,0xec,0xdc,0x7c,0xdc,0x76,0xdc,0x7c, | |
| 102 | +0xfc,0xcc,0x66,0xc6,0xc6,0xc6,0xfe,0x18,0x18,0x18,0x00,0x38,0x00,0x00,0x00,0x00, | |
| 103 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 104 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0xf0, | |
| 105 | +0x3c,0x18,0x18,0x6c,0x00,0xa5,0x00,0x36,0x00,0x00,0xb2,0x00,0x00,0x18,0xc8,0xd8, | |
| 106 | +0x00,0xcc,0xdb,0x00,0x00,0x30,0x00,0xd8,0xcc,0xcc,0xec,0x30,0x6c,0x6c,0x6c,0x6c, | |
| 107 | +0x6c,0x6c,0xcc,0xc0,0x62,0x62,0x62,0x62,0x18,0x18,0x18,0x18,0x66,0xf6,0xc6,0xc6, | |
| 108 | +0xc6,0xc6,0xc6,0x66,0xce,0xc6,0xc6,0xc6,0xc6,0x66,0x66,0x66,0x78,0x78,0x78,0x78, | |
| 109 | +0x78,0x78,0xcc,0x7c,0x7c,0x7c,0x7c,0x7c,0x38,0x38,0x38,0x38,0x06,0xdc,0x7c,0x7c, | |
| 110 | +0x7c,0x7c,0x7c,0x18,0x7a,0xcc,0xcc,0xcc,0xcc,0xc6,0x7c,0xc6,0x02,0x00,0x1c,0x1c, | |
| 111 | +0x18,0x24,0x1c,0x3c,0x48,0x48,0x20,0x30,0x40,0x40,0x08,0x08,0x10,0x1c,0x1c,0x1c, | |
| 112 | +0x1c,0x0c,0x44,0x1c,0x0c,0x80,0x24,0x1c,0x40,0x48,0x50,0x48,0x00,0x18,0x00,0x6c, | |
| 113 | +0x7c,0x0c,0x76,0x00,0x30,0x0c,0x3c,0x18,0x00,0x00,0x00,0x0c,0xd6,0x18,0x18,0x3c, | |
| 114 | +0xcc,0xfc,0xfc,0x0c,0x7c,0x7e,0x00,0x00,0x30,0x00,0x0c,0x18,0xde,0xc6,0x7c,0xc0, | |
| 115 | +0x66,0x78,0x78,0xc0,0xfe,0x18,0x0c,0x78,0x60,0xd6,0xde,0xc6,0x7c,0xc6,0x7c,0x38, | |
| 116 | +0x18,0xc6,0xc6,0xd6,0x38,0x3c,0x18,0x30,0x70,0x0c,0x00,0x00,0x00,0x0c,0x6c,0xc6, | |
| 117 | +0x6c,0xc6,0xf0,0xcc,0x76,0x18,0x06,0x6c,0x18,0xfe,0x66,0xc6,0x66,0xcc,0x76,0xc6, | |
| 118 | +0x30,0xcc,0x66,0xc6,0x6c,0xc6,0xcc,0x70,0x00,0x0e,0x00,0x6c,0x00,0x00,0x00,0x00, | |
| 119 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 120 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0x60, | |
| 121 | +0x66,0x7e,0x00,0xc6,0x00,0xa1,0x7e,0x6c,0xfe,0x00,0xaa,0x00,0x00,0x7e,0xf8,0x70, | |
| 122 | +0x00,0xcc,0x7b,0x00,0x00,0x78,0x7c,0x6c,0x18,0x18,0x18,0x30,0xc6,0xc6,0xc6,0xc6, | |
| 123 | +0xc6,0xc6,0xfe,0xc0,0x68,0x68,0x68,0x68,0x18,0x18,0x18,0x18,0xf6,0xfe,0xc6,0xc6, | |
| 124 | +0xc6,0xc6,0xc6,0x3c,0xd6,0xc6,0xc6,0xc6,0xc6,0x3c,0x66,0x6c,0x0c,0x0c,0x0c,0x0c, | |
| 125 | +0x0c,0x0c,0x76,0xc6,0xc6,0xc6,0xc6,0xc6,0x18,0x18,0x18,0x18,0x7e,0x66,0xc6,0xc6, | |
| 126 | +0xc6,0xc6,0xc6,0x00,0xc4,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x80,0x00,0x08,0x08, | |
| 127 | +0x24,0x34,0x24,0x3c,0x70,0x48,0x38,0x30,0x40,0x38,0x70,0x70,0x10,0x24,0x24,0x24, | |
| 128 | +0x24,0x12,0x28,0x08,0x12,0xe0,0x24,0x20,0x40,0x38,0x48,0x30,0x00,0x18,0x00,0x6c, | |
| 129 | +0x06,0x18,0xdc,0x00,0x30,0x0c,0xff,0x7e,0x00,0xfe,0x00,0x18,0xd6,0x18,0x30,0x06, | |
| 130 | +0xfe,0x06,0xc6,0x18,0xc6,0x06,0x00,0x00,0x60,0x00,0x06,0x18,0xde,0xfe,0x66,0xc0, | |
| 131 | +0x66,0x68,0x68,0xde,0xc6,0x18,0x0c,0x78,0x60,0xc6,0xce,0xc6,0x60,0xc6,0x6c,0x0c, | |
| 132 | +0x18,0xc6,0xc6,0xd6,0x38,0x18,0x30,0x30,0x38,0x0c,0x00,0x00,0x00,0x7c,0x66,0xc0, | |
| 133 | +0xcc,0xfe,0x60,0xcc,0x66,0x18,0x06,0x78,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x66,0x60, | |
| 134 | +0x30,0xcc,0x66,0xd6,0x38,0xc6,0x18,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00, | |
| 135 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 136 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0x60, | |
| 137 | +0x66,0x18,0x18,0xc6,0x00,0xa1,0x00,0xd8,0x06,0x3c,0x44,0x00,0x00,0x18,0x00,0x00, | |
| 138 | +0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0x36,0x30,0x30,0x30,0x60,0xc6,0xc6,0xc6,0xc6, | |
| 139 | +0xc6,0xc6,0xcc,0xc0,0x78,0x78,0x78,0x78,0x18,0x18,0x18,0x18,0x66,0xde,0xc6,0xc6, | |
| 140 | +0xc6,0xc6,0xc6,0x18,0xd6,0xc6,0xc6,0xc6,0xc6,0x18,0x66,0x66,0x7c,0x7c,0x7c,0x7c, | |
| 141 | +0x7c,0x7c,0x36,0xc0,0xfe,0xfe,0xfe,0xfe,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6, | |
| 142 | +0xc6,0xc6,0xc6,0x7e,0xce,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x82,0x00,0x08,0x08, | |
| 143 | +0x24,0x2c,0x20,0x66,0x07,0x07,0x07,0x07,0x0e,0x00,0x06,0x07,0x10,0x20,0x20,0x20, | |
| 144 | +0x20,0x1e,0x10,0x08,0x1e,0x11,0x24,0x18,0x0e,0x07,0x07,0x07,0x00,0x18,0x00,0x6c, | |
| 145 | +0x06,0x30,0xcc,0x00,0x30,0x0c,0x3c,0x18,0x00,0x00,0x00,0x30,0xc6,0x18,0x60,0x06, | |
| 146 | +0x0c,0x06,0xc6,0x30,0xc6,0x06,0x00,0x00,0x30,0x7e,0x0c,0x18,0xde,0xc6,0x66,0xc0, | |
| 147 | +0x66,0x60,0x60,0xc6,0xc6,0x18,0xcc,0x6c,0x60,0xc6,0xc6,0xc6,0x60,0xc6,0x66,0x06, | |
| 148 | +0x18,0xc6,0xc6,0xd6,0x7c,0x18,0x60,0x30,0x1c,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc0, | |
| 149 | +0xcc,0xc0,0x60,0xcc,0x66,0x18,0x06,0x78,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0x38, | |
| 150 | +0x30,0xcc,0x66,0xd6,0x38,0xc6,0x30,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00, | |
| 151 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 152 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x60, | |
| 153 | +0x66,0x7e,0x18,0x6c,0x00,0xa5,0x00,0x6c,0x06,0x00,0x38,0x00,0x00,0x18,0x00,0x00, | |
| 154 | +0x00,0xcc,0x1b,0x18,0x00,0x00,0x00,0x6c,0x66,0x60,0x66,0xc0,0xfe,0xfe,0xfe,0xfe, | |
| 155 | +0xfe,0xfe,0xcc,0xc0,0x68,0x68,0x68,0x68,0x18,0x18,0x18,0x18,0x66,0xce,0xc6,0xc6, | |
| 156 | +0xc6,0xc6,0xc6,0x3c,0xe6,0xc6,0xc6,0xc6,0xc6,0x18,0x66,0x66,0xcc,0xcc,0xcc,0xcc, | |
| 157 | +0xcc,0xcc,0x7e,0xc0,0xc0,0xc0,0xc0,0xc0,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6, | |
| 158 | +0xc6,0xc6,0xc6,0x00,0xd6,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x02,0x00,0x08,0x08, | |
| 159 | +0x24,0x24,0x20,0xc3,0x08,0x02,0x04,0x02,0x08,0x0e,0x09,0x02,0x10,0x20,0x20,0x20, | |
| 160 | +0x20,0x12,0x10,0x08,0x12,0x1b,0x24,0x04,0x10,0x08,0x08,0x08,0x00,0x00,0x00,0xfe, | |
| 161 | +0x86,0x60,0xcc,0x00,0x30,0x0c,0x66,0x18,0x18,0x00,0x00,0x60,0xc6,0x18,0xc0,0x06, | |
| 162 | +0x0c,0x06,0xc6,0x30,0xc6,0x06,0x18,0x18,0x18,0x00,0x18,0x00,0xdc,0xc6,0x66,0xc2, | |
| 163 | +0x66,0x62,0x60,0xc6,0xc6,0x18,0xcc,0x66,0x62,0xc6,0xc6,0xc6,0x60,0xd6,0x66,0xc6, | |
| 164 | +0x18,0xc6,0x6c,0xfe,0x6c,0x18,0xc2,0x30,0x0e,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc0, | |
| 165 | +0xcc,0xc0,0x60,0xcc,0x66,0x18,0x06,0x6c,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0x0c, | |
| 166 | +0x30,0xcc,0x66,0xd6,0x38,0xc6,0x60,0x18,0x18,0x18,0x00,0xc6,0x00,0x00,0x00,0x00, | |
| 167 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 168 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x60, | |
| 169 | +0x3c,0x18,0x18,0x38,0x00,0x99,0x00,0x36,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 170 | +0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0xd8,0xce,0xdc,0xce,0xc6,0xc6,0xc6,0xc6,0xc6, | |
| 171 | +0xc6,0xc6,0xcc,0xc2,0x62,0x62,0x62,0x62,0x18,0x18,0x18,0x18,0x66,0xc6,0xc6,0xc6, | |
| 172 | +0xc6,0xc6,0xc6,0x66,0xe6,0xc6,0xc6,0xc6,0xc6,0x18,0x7c,0x66,0xcc,0xcc,0xcc,0xcc, | |
| 173 | +0xcc,0xcc,0xd8,0xc0,0xc0,0xc0,0xc0,0xc0,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6, | |
| 174 | +0xc6,0xc6,0xc6,0x18,0xe6,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0x80,0x00,0x08,0x08, | |
| 175 | +0x18,0x24,0x1c,0xff,0x06,0x02,0x07,0x02,0x0e,0x09,0x09,0x02,0x1c,0x1c,0x1c,0x1c, | |
| 176 | +0x1c,0x12,0x10,0x08,0x12,0x15,0x18,0x38,0x0c,0x06,0x06,0x06,0x00,0x18,0x00,0x6c, | |
| 177 | +0xc6,0xc6,0xcc,0x00,0x18,0x18,0x00,0x00,0x18,0x00,0x18,0xc0,0x6c,0x18,0xc6,0xc6, | |
| 178 | +0x0c,0xc6,0xc6,0x30,0xc6,0x0c,0x18,0x18,0x0c,0x00,0x30,0x18,0xc0,0xc6,0x66,0x66, | |
| 179 | +0x6c,0x66,0x60,0x66,0xc6,0x18,0xcc,0x66,0x66,0xc6,0xc6,0xc6,0x60,0xde,0x66,0xc6, | |
| 180 | +0x18,0xc6,0x38,0xee,0xc6,0x18,0xc6,0x30,0x06,0x0c,0x00,0x00,0x00,0xcc,0x66,0xc6, | |
| 181 | +0xcc,0xc6,0x60,0xcc,0x66,0x18,0x06,0x66,0x18,0xd6,0x66,0xc6,0x66,0xcc,0x60,0xc6, | |
| 182 | +0x36,0xcc,0x3c,0xfe,0x6c,0xc6,0xc6,0x18,0x18,0x18,0x00,0xfe,0x00,0x00,0x00,0x00, | |
| 183 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 184 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x18,0xe6, | |
| 185 | +0x66,0x18,0x18,0x0c,0x00,0x42,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x7e,0x00,0x00, | |
| 186 | +0x00,0xcc,0x1b,0x00,0x00,0x00,0x00,0x00,0x9e,0x86,0x9e,0xc6,0xc6,0xc6,0xc6,0xc6, | |
| 187 | +0xc6,0xc6,0xcc,0x66,0x66,0x66,0x66,0x66,0x18,0x18,0x18,0x18,0x6c,0xc6,0xc6,0xc6, | |
| 188 | +0xc6,0xc6,0xc6,0x00,0x46,0xc6,0xc6,0xc6,0xc6,0x18,0x60,0x66,0xcc,0xcc,0xcc,0xcc, | |
| 189 | +0xcc,0xcc,0xd8,0xc6,0xc6,0xc6,0xc6,0xc6,0x18,0x18,0x18,0x18,0xc6,0x66,0xc6,0xc6, | |
| 190 | +0xc6,0xc6,0xc6,0x18,0x46,0xcc,0xcc,0xcc,0xcc,0xc6,0x66,0xc6,0xb6,0x00,0x05,0x05, | |
| 191 | +0x07,0x0c,0x09,0x18,0x01,0x02,0x04,0x02,0x08,0x0e,0x09,0x02,0x07,0x02,0x06,0x06, | |
| 192 | +0x02,0x09,0x09,0x0e,0x09,0x15,0x0e,0x07,0x02,0x01,0x01,0x01,0x00,0x18,0x00,0x6c, | |
| 193 | +0x7c,0x86,0x76,0x00,0x0c,0x30,0x00,0x00,0x18,0x00,0x18,0x80,0x38,0x7e,0xfe,0x7c, | |
| 194 | +0x1e,0x7c,0x7c,0x30,0x7c,0x78,0x00,0x30,0x06,0x00,0x60,0x18,0x7c,0xc6,0xfc,0x3c, | |
| 195 | +0xf8,0xfe,0xf0,0x3a,0xc6,0x3c,0x78,0xe6,0xfe,0xc6,0xc6,0x7c,0xf0,0x7c,0xe6,0x7c, | |
| 196 | +0x3c,0x7c,0x10,0x6c,0xc6,0x3c,0xfe,0x3c,0x02,0x3c,0x00,0x00,0x00,0x76,0x7c,0x7c, | |
| 197 | +0x76,0x7c,0xf0,0x7c,0xe6,0x3c,0x06,0xe6,0x3c,0xc6,0x66,0x7c,0x7c,0x7c,0xf0,0x7c, | |
| 198 | +0x1c,0x76,0x18,0x6c,0xc6,0x7e,0xfe,0x0e,0x18,0x70,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 199 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 200 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0xfc, | |
| 201 | +0x00,0x18,0x18,0xc6,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 202 | +0x00,0xf6,0x1b,0x00,0x00,0x00,0x00,0x00,0x3e,0x0c,0x3e,0x7c,0xc6,0xc6,0xc6,0xc6, | |
| 203 | +0xc6,0xc6,0xce,0x3c,0xfe,0xfe,0xfe,0xfe,0x3c,0x3c,0x3c,0x3c,0xf8,0xc6,0x7c,0x7c, | |
| 204 | +0x7c,0x7c,0x7c,0x00,0xbc,0x7c,0x7c,0x7c,0x7c,0x3c,0xf0,0xec,0x76,0x76,0x76,0x76, | |
| 205 | +0x76,0x76,0x6e,0x7c,0x7c,0x7c,0x7c,0x7c,0x3c,0x3c,0x3c,0x3c,0x7c,0x66,0x7c,0x7c, | |
| 206 | +0x7c,0x7c,0x7c,0x00,0xbc,0x76,0x76,0x76,0x76,0x7e,0x7c,0x7e,0x00,0x00,0x05,0x05, | |
| 207 | +0x02,0x12,0x0a,0x00,0x0e,0x02,0x04,0x02,0x08,0x0a,0x06,0x07,0x04,0x06,0x09,0x01, | |
| 208 | +0x06,0x0a,0x0d,0x09,0x0d,0x11,0x09,0x09,0x1c,0x0e,0x0e,0x0e,0x00,0x00,0x00,0x00, | |
| 209 | +0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 210 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 211 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00, | |
| 212 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 213 | +0x00,0x00,0x00,0x0c,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x00, | |
| 214 | +0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 215 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 216 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 217 | +0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 218 | +0x00,0xc0,0x00,0x00,0x18,0x00,0x00,0x00,0x06,0x18,0x06,0x00,0x00,0x00,0x00,0x00, | |
| 219 | +0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 220 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 221 | +0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 222 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x00,0x00,0x02,0x02, | |
| 223 | +0x02,0x12,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x07,0x02,0x02,0x06, | |
| 224 | +0x0a,0x0c,0x0b,0x0e,0x0b,0x00,0x0e,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 225 | +0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 226 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 227 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00, | |
| 228 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, | |
| 229 | +0x00,0x00,0x00,0xcc,0x00,0x00,0x66,0x00,0x00,0x00,0x00,0x00,0x60,0x0c,0x00,0x00, | |
| 230 | +0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 231 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 232 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 233 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 234 | +0x00,0xc0,0x00,0x00,0x0c,0x00,0x00,0x00,0x06,0x3e,0x06,0x00,0x00,0x00,0x00,0x00, | |
| 235 | +0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 236 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 237 | +0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 238 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x60,0x0c,0x00,0x00,0x05,0x05, | |
| 239 | +0x02,0x16,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x02,0x04,0x01, | |
| 240 | +0x1f,0x0a,0x09,0x09,0x09,0x00,0x09,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 241 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 242 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 243 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 244 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 245 | +0x00,0x00,0x00,0x78,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xf0,0x1e,0x00,0x00, | |
| 246 | +0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 247 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 248 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 249 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 250 | +0x00,0xc0,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 251 | +0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 252 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 253 | +0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 254 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xf0,0xf8,0x00,0x00,0x05,0x05, | |
| 255 | +0x02,0x0d,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x0f,0x06, | |
| 256 | +0x02,0x09,0x09,0x0e,0x09,0x00,0x0e,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 257 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 258 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 259 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 260 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 261 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 262 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 263 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 264 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 265 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 266 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 267 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 268 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 269 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 270 | +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x35,0x36,0x20, | |
| 271 | +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x31,0x36,0x20,0x20,0x20,0x20,0x20,0x20, | |
| 272 | +0x20,0x20,0x20,0x20,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, | |
| 273 | +0x00,0x00,0x00,0x0f,0x00,0x08,0x08,0x00,0x00,0x0f,0x00,0x08,0x10,0x00,0x00,0x0f, | |
| 274 | +0x00,0x08,0x18,0x00,0x00,0x0f,0x00,0x08,0x20,0x00,0x00,0x0f,0x00,0x08,0x28,0x00, | |
| 275 | +0x00,0x0f,0x00,0x08,0x30,0x00,0x00,0x0f,0x00,0x08,0x38,0x00,0x00,0x0f,0x00,0x08, | |
| 276 | +0x40,0x00,0x00,0x0f,0x00,0x08,0x48,0x00,0x00,0x0f,0x00,0x08,0x50,0x00,0x00,0x0f, | |
| 277 | +0x00,0x08,0x58,0x00,0x00,0x0f,0x00,0x08,0x60,0x00,0x00,0x0f,0x00,0x08,0x68,0x00, | |
| 278 | +0x00,0x0f,0x00,0x08,0x70,0x00,0x00,0x0f,0x00,0x08,0x78,0x00,0x00,0x0f,0x00,0x08, | |
| 279 | +0x80,0x00,0x00,0x0f,0x00,0x08,0x88,0x00,0x00,0x0f,0x00,0x08,0x90,0x00,0x00,0x0f, | |
| 280 | +0x00,0x08,0x98,0x00,0x00,0x0f,0x00,0x08,0xa0,0x00,0x00,0x0f,0x00,0x08,0xa8,0x00, | |
| 281 | +0x00,0x0f,0x00,0x08,0xb0,0x00,0x00,0x0f,0x00,0x08,0xb8,0x00,0x00,0x0f,0x00,0x08, | |
| 282 | +0xc0,0x00,0x00,0x0f,0x00,0x08,0xc8,0x00,0x00,0x0f,0x00,0x08,0xd0,0x00,0x00,0x0f, | |
| 283 | +0x00,0x08,0xd8,0x00,0x00,0x0f,0x00,0x08,0xe0,0x00,0x00,0x0f,0x00,0x08,0xe8,0x00, | |
| 284 | +0x00,0x0f,0x00,0x08,0xf0,0x00,0x00,0x0f,0x00,0x08,0xf8,0x00,0x00,0x0f,0x00,0x08, | |
| 285 | +0x00,0x01,0x00,0x0f,0x00,0x08,0x08,0x01,0x00,0x0f,0x00,0x08,0x10,0x01,0x00,0x0f, | |
| 286 | +0x00,0x08,0x18,0x01,0x00,0x0f,0x00,0x08,0x20,0x01,0x00,0x0f,0x00,0x08,0x28,0x01, | |
| 287 | +0x00,0x0f,0x00,0x08,0x30,0x01,0x00,0x0f,0x00,0x08,0x38,0x01,0x00,0x0f,0x00,0x08, | |
| 288 | +0x40,0x01,0x00,0x0f,0x00,0x08,0x48,0x01,0x00,0x0f,0x00,0x08,0x50,0x01,0x00,0x0f, | |
| 289 | +0x00,0x08,0x58,0x01,0x00,0x0f,0x00,0x08,0x60,0x01,0x00,0x0f,0x00,0x08,0x68,0x01, | |
| 290 | +0x00,0x0f,0x00,0x08,0x70,0x01,0x00,0x0f,0x00,0x08,0x78,0x01,0x00,0x0f,0x00,0x08, | |
| 291 | +0x80,0x01,0x00,0x0f,0x00,0x08,0x88,0x01,0x00,0x0f,0x00,0x08,0x90,0x01,0x00,0x0f, | |
| 292 | +0x00,0x08,0x98,0x01,0x00,0x0f,0x00,0x08,0xa0,0x01,0x00,0x0f,0x00,0x08,0xa8,0x01, | |
| 293 | +0x00,0x0f,0x00,0x08,0xb0,0x01,0x00,0x0f,0x00,0x08,0xb8,0x01,0x00,0x0f,0x00,0x08, | |
| 294 | +0xc0,0x01,0x00,0x0f,0x00,0x08,0xc8,0x01,0x00,0x0f,0x00,0x08,0xd0,0x01,0x00,0x0f, | |
| 295 | +0x00,0x08,0xd8,0x01,0x00,0x0f,0x00,0x08,0xe0,0x01,0x00,0x0f,0x00,0x08,0xe8,0x01, | |
| 296 | +0x00,0x0f,0x00,0x08,0xf0,0x01,0x00,0x0f,0x00,0x08,0xf8,0x01,0x00,0x0f,0x00,0x08, | |
| 297 | +0x00,0x02,0x00,0x0f,0x00,0x08,0x08,0x02,0x00,0x0f,0x00,0x08,0x10,0x02,0x00,0x0f, | |
| 298 | +0x00,0x08,0x18,0x02,0x00,0x0f,0x00,0x08,0x20,0x02,0x00,0x0f,0x00,0x08,0x28,0x02, | |
| 299 | +0x00,0x0f,0x00,0x08,0x30,0x02,0x00,0x0f,0x00,0x08,0x38,0x02,0x00,0x0f,0x00,0x08, | |
| 300 | +0x40,0x02,0x00,0x0f,0x00,0x08,0x48,0x02,0x00,0x0f,0x00,0x08,0x50,0x02,0x00,0x0f, | |
| 301 | +0x00,0x08,0x58,0x02,0x00,0x0f,0x00,0x08,0x60,0x02,0x00,0x0f,0x00,0x08,0x68,0x02, | |
| 302 | +0x00,0x0f,0x00,0x08,0x70,0x02,0x00,0x0f,0x00,0x08,0x78,0x02,0x00,0x0f,0x00,0x08, | |
| 303 | +0x80,0x02,0x00,0x0f,0x00,0x08,0x88,0x02,0x00,0x0f,0x00,0x08,0x90,0x02,0x00,0x0f, | |
| 304 | +0x00,0x08,0x98,0x02,0x00,0x0f,0x00,0x08,0xa0,0x02,0x00,0x0f,0x00,0x08,0xa8,0x02, | |
| 305 | +0x00,0x0f,0x00,0x08,0xb0,0x02,0x00,0x0f,0x00,0x08,0xb8,0x02,0x00,0x0f,0x00,0x08, | |
| 306 | +0xc0,0x02,0x00,0x0f,0x00,0x08,0xc8,0x02,0x00,0x0f,0x00,0x08,0xd0,0x02,0x00,0x0f, | |
| 307 | +0x00,0x08,0xd8,0x02,0x00,0x0f,0x00,0x08,0xe0,0x02,0x00,0x0f,0x00,0x08,0xe8,0x02, | |
| 308 | +0x00,0x0f,0x00,0x08,0xf0,0x02,0x00,0x0f,0x00,0x08,0xf8,0x02,0x00,0x0f,0x00,0x08, | |
| 309 | +0x00,0x03,0x00,0x0f,0x00,0x08,0x08,0x03,0x00,0x0f,0x00,0x08,0x10,0x03,0x00,0x0f, | |
| 310 | +0x00,0x08,0x18,0x03,0x00,0x0f,0x00,0x08,0x20,0x03,0x00,0x0f,0x00,0x08,0x28,0x03, | |
| 311 | +0x00,0x0f,0x00,0x08,0x30,0x03,0x00,0x0f,0x00,0x08,0x38,0x03,0x00,0x0f,0x00,0x08, | |
| 312 | +0x40,0x03,0x00,0x0f,0x00,0x08,0x48,0x03,0x00,0x0f,0x00,0x08,0x50,0x03,0x00,0x0f, | |
| 313 | +0x00,0x08,0x58,0x03,0x00,0x0f,0x00,0x08,0x60,0x03,0x00,0x0f,0x00,0x08,0x68,0x03, | |
| 314 | +0x00,0x0f,0x00,0x08,0x70,0x03,0x00,0x0f,0x00,0x08,0x78,0x03,0x00,0x0f,0x00,0x08, | |
| 315 | +0x80,0x03,0x00,0x0f,0x00,0x08,0x88,0x03,0x00,0x0f,0x00,0x08,0x90,0x03,0x00,0x0f, | |
| 316 | +0x00,0x08,0x98,0x03,0x00,0x0f,0x00,0x08,0xa0,0x03,0x00,0x0f,0x00,0x08,0xa8,0x03, | |
| 317 | +0x00,0x0f,0x00,0x08,0xb0,0x03,0x00,0x0f,0x00,0x08,0xb8,0x03,0x00,0x0f,0x00,0x08, | |
| 318 | +0xc0,0x03,0x00,0x0f,0x00,0x08,0xc8,0x03,0x00,0x0f,0x00,0x08,0xd0,0x03,0x00,0x0f, | |
| 319 | +0x00,0x08,0xd8,0x03,0x00,0x0f,0x00,0x08,0xe0,0x03,0x00,0x0f,0x00,0x08,0xe8,0x03, | |
| 320 | +0x00,0x0f,0x00,0x08,0xf0,0x03,0x00,0x0f,0x00,0x08,0xf8,0x03,0x00,0x0f,0x00,0x08, | |
| 321 | +0x00,0x04,0x00,0x0f,0x00,0x08,0x08,0x04,0x00,0x0f,0x00,0x08,0x10,0x04,0x00,0x0f, | |
| 322 | +0x00,0x08,0x18,0x04,0x00,0x0f,0x00,0x08,0x20,0x04,0x00,0x0f,0x00,0x08,0x28,0x04, | |
| 323 | +0x00,0x0f,0x00,0x08,0x30,0x04,0x00,0x0f,0x00,0x08,0x38,0x04,0x00,0x0f,0x00,0x08, | |
| 324 | +0x40,0x04,0x00,0x0f,0x00,0x08,0x48,0x04,0x00,0x0f,0x00,0x08,0x50,0x04,0x00,0x0f, | |
| 325 | +0x00,0x08,0x58,0x04,0x00,0x0f,0x00,0x08,0x60,0x04,0x00,0x0f,0x00,0x08,0x68,0x04, | |
| 326 | +0x00,0x0f,0x00,0x08,0x70,0x04,0x00,0x0f,0x00,0x08,0x78,0x04,0x00,0x0f,0x00,0x08, | |
| 327 | +0x80,0x04,0x00,0x0f,0x00,0x08,0x88,0x04,0x00,0x0f,0x00,0x08,0x90,0x04,0x00,0x0f, | |
| 328 | +0x00,0x08,0x98,0x04,0x00,0x0f,0x00,0x08,0xa0,0x04,0x00,0x0f,0x00,0x08,0xa8,0x04, | |
| 329 | +0x00,0x0f,0x00,0x08,0xb0,0x04,0x00,0x0f,0x00,0x08,0xb8,0x04,0x00,0x0f,0x00,0x08, | |
| 330 | +0xc0,0x04,0x00,0x0f,0x00,0x08,0xc8,0x04,0x00,0x0f,0x00,0x08,0xd0,0x04,0x00,0x0f, | |
| 331 | +0x00,0x08,0xd8,0x04,0x00,0x0f,0x00,0x08,0xe0,0x04,0x00,0x0f,0x00,0x08,0xe8,0x04, | |
| 332 | +0x00,0x0f,0x00,0x08,0xf0,0x04,0x00,0x0f,0x00,0x08,0xf8,0x04,0x00,0x0f,0x00,0x08, | |
| 333 | +0x00,0x05,0x00,0x0f,0x00,0x08,0x08,0x05,0x00,0x0f,0x00,0x08,0x10,0x05,0x00,0x0f, | |
| 334 | +0x00,0x08,0x18,0x05,0x00,0x0f,0x00,0x08,0x20,0x05,0x00,0x0f,0x00,0x08,0x28,0x05, | |
| 335 | +0x00,0x0f,0x00,0x08,0x30,0x05,0x00,0x0f,0x00,0x08,0x38,0x05,0x00,0x0f,0x00,0x08, | |
| 336 | +0x40,0x05,0x00,0x0f,0x00,0x08,0x48,0x05,0x00,0x0f,0x00,0x08,0x50,0x05,0x00,0x0f, | |
| 337 | +0x00,0x08,0x58,0x05,0x00,0x0f,0x00,0x08,0x60,0x05,0x00,0x0f,0x00,0x08,0x68,0x05, | |
| 338 | +0x00,0x0f,0x00,0x08,0x70,0x05,0x00,0x0f,0x00,0x08,0x78,0x05,0x00,0x0f,0x00,0x08, | |
| 339 | +0x80,0x05,0x00,0x0f,0x00,0x08,0x88,0x05,0x00,0x0f,0x00,0x08,0x90,0x05,0x00,0x0f, | |
| 340 | +0x00,0x08,0x98,0x05,0x00,0x0f,0x00,0x08,0xa0,0x05,0x00,0x0f,0x00,0x08,0xa8,0x05, | |
| 341 | +0x00,0x0f,0x00,0x08,0xb0,0x05,0x00,0x0f,0x00,0x08,0xb8,0x05,0x00,0x0f,0x00,0x08, | |
| 342 | +0xc0,0x05,0x00,0x0f,0x00,0x08,0xc8,0x05,0x00,0x0f,0x00,0x08,0xd0,0x05,0x00,0x0f, | |
| 343 | +0x00,0x08,0xd8,0x05,0x00,0x0f,0x00,0x08,0xe0,0x05,0x00,0x0f,0x00,0x08,0xe8,0x05, | |
| 344 | +0x00,0x0f,0x00,0x08,0xf0,0x05,0x00,0x0f,0x00,0x08,0xf8,0x05,0x00,0x0f,0x00,0x08, | |
| 345 | +0x00,0x06,0x00,0x0f,0x00,0x08,0x08,0x06,0x00,0x0f,0x00,0x08,0x10,0x06,0x00,0x0f, | |
| 346 | +0x00,0x08,0x18,0x06,0x00,0x0f,0x00,0x08,0x20,0x06,0x00,0x0f,0x00,0x08,0x28,0x06, | |
| 347 | +0x00,0x0f,0x00,0x08,0x30,0x06,0x00,0x0f,0x00,0x08,0x38,0x06,0x00,0x0f,0x00,0x08, | |
| 348 | +0x40,0x06,0x00,0x0f,0x00,0x08,0x48,0x06,0x00,0x0f,0x00,0x08,0x50,0x06,0x00,0x0f, | |
| 349 | +0x00,0x08,0x58,0x06,0x00,0x0f,0x00,0x08,0x60,0x06,0x00,0x0f,0x00,0x08,0x68,0x06, | |
| 350 | +0x00,0x0f,0x00,0x08,0x70,0x06,0x00,0x0f,0x00,0x08,0x78,0x06,0x00,0x0f,0x00,0x08, | |
| 351 | +0x80,0x06,0x00,0x0f,0x00,0x08,0x88,0x06,0x00,0x0f,0x00,0x08,0x90,0x06,0x00,0x0f, | |
| 352 | +0x00,0x08,0x98,0x06,0x00,0x0f,0x00,0x08,0xa0,0x06,0x00,0x0f,0x00,0x08,0xa8,0x06, | |
| 353 | +0x00,0x0f,0x00,0x08,0xb0,0x06,0x00,0x0f,0x00,0x08,0xb8,0x06,0x00,0x0f,0x00,0x08, | |
| 354 | +0xc0,0x06,0x00,0x0f,0x00,0x08,0xc8,0x06,0x00,0x0f,0x00,0x08,0xd0,0x06,0x00,0x0f, | |
| 355 | +0x00,0x08,0xd8,0x06,0x00,0x0f,0x00,0x08,0xe0,0x06,0x00,0x0f,0x00,0x08,0xe8,0x06, | |
| 356 | +0x00,0x0f,0x00,0x08,0xf0,0x06,0x00,0x0f,0x00,0x08,0xf8,0x06,0x00,0x0f,0x00,0x08, | |
| 357 | +0x00,0x07,0x00,0x0f,0x00,0x08,0x08,0x07,0x00,0x0f,0x00,0x08,0x10,0x07,0x00,0x0f, | |
| 358 | +0x00,0x08,0x18,0x07,0x00,0x0f,0x00,0x08,0x20,0x07,0x00,0x0f,0x00,0x08,0x28,0x07, | |
| 359 | +0x00,0x0f,0x00,0x08,0x30,0x07,0x00,0x0f,0x00,0x08,0x38,0x07,0x00,0x0f,0x00,0x08, | |
| 360 | +0x40,0x07,0x00,0x0f,0x00,0x08,0x48,0x07,0x00,0x0f,0x00,0x08,0x50,0x07,0x00,0x0f, | |
| 361 | +0x00,0x08,0x58,0x07,0x00,0x0f,0x00,0x08,0x60,0x07,0x00,0x0f,0x00,0x08,0x68,0x07, | |
| 362 | +0x00,0x0f,0x00,0x08,0x70,0x07,0x00,0x0f,0x00,0x08,0x78,0x07,0x00,0x0f,0x00,0x08, | |
| 363 | +0x80,0x07,0x00,0x0f,0x00,0x08,0x88,0x07,0x00,0x0f,0x00,0x08,0x90,0x07,0x00,0x0f, | |
| 364 | +0x00,0x08,0x98,0x07,0x00,0x0f,0x00,0x08,0xa0,0x07,0x00,0x0f,0x00,0x08,0xa8,0x07, | |
| 365 | +0x00,0x0f,0x00,0x08,0xb0,0x07,0x00,0x0f,0x00,0x08,0xb8,0x07,0x00,0x0f,0x00,0x08, | |
| 366 | +0xc0,0x07,0x00,0x0f,0x00,0x08,0xc8,0x07,0x00,0x0f,0x00,0x08,0xd0,0x07,0x00,0x0f, | |
| 367 | +0x00,0x08,0xd8,0x07,0x00,0x0f,0x00,0x08,0xe0,0x07,0x00,0x0f,0x00,0x08,0xe8,0x07, | |
| 368 | +0x00,0x0f,0x00,0x08,0xf0,0x07,0x00,0x0f,0x00,0x08,0xf8,0x07,0x00,0x0f,0x00,0x08, | |
| 369 | +0x00,0x08,0x00,0x0f,0x00,0x08, | |
| 384 | 370 | }; |
| 385 | 371 | |
| 386 | 372 | int sizeofdefont = sizeof defontdata; |
| @@ -0,0 +1,22 @@ | ||
| 1 | +#include <u.h> | |
| 2 | +#include <libc.h> | |
| 3 | +#include <draw.h> | |
| 4 | + | |
| 5 | +int | |
| 6 | +Rfmt(Fmt *f) | |
| 7 | +{ | |
| 8 | + Rectangle r; | |
| 9 | + | |
| 10 | + r = va_arg(f->args, Rectangle); | |
| 11 | + return fmtprint(f, "%P %P", r.min, r.max); | |
| 12 | +} | |
| 13 | + | |
| 14 | +int | |
| 15 | +Pfmt(Fmt *f) | |
| 16 | +{ | |
| 17 | + Point p; | |
| 18 | + | |
| 19 | + p = va_arg(f->args, Point); | |
| 20 | + return fmtprint(f, "[%d %d]", p.x, p.y); | |
| 21 | +} | |
| 22 | + | |
| @@ -23,20 +23,20 @@ memimagemove(void *from, void *to) · 22 unmodified lines | ||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | Memimage* |
| 26 | −allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X) | |
| 26 | +allocmemimaged(Rectangle r, ulong chan, Memdata *md) | |
| 27 | 27 | { |
| 28 | 28 | int d; |
| 29 | 29 | ulong l; |
| 30 | 30 | Memimage *i; |
| 31 | 31 | |
| 32 | − if(Dx(r) <= 0 || Dy(r) <= 0){ | |
| 33 | − werrstr("bad rectangle %R", r); | |
| 34 | − return nil; | |
| 35 | − } | |
| 36 | 32 | if((d = chantodepth(chan)) == 0) { |
| 37 | 33 | werrstr("bad channel descriptor %.8lux", chan); |
| 38 | 34 | return nil; |
| 39 | 35 | } |
| 36 | + if(badrect(r)){ | |
| 37 | + werrstr("bad rectangle %R", r); | |
| 38 | + return nil; | |
| 39 | + } | |
| 40 | 40 | |
| 41 | 41 | l = wordsperline(r, d); |
| 42 | 42 | |
| @@ -44,7 +44,6 @@ allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X) · 1 unmodified line | ||
| 44 | 44 | if(i == nil) |
| 45 | 45 | return nil; |
| 46 | 46 | |
| 47 | − i->X = X; | |
| 48 | 47 | i->data = md; |
| 49 | 48 | i->zero = sizeof(ulong)*l*r.min.y; |
| 50 | 49 | |
| @@ -67,11 +66,11 @@ allocmemimaged(Rectangle r, ulong chan, Memdata *md, void *X) · 16 unmodified lines | ||
| 67 | 66 | } |
| 68 | 67 | |
| 69 | 68 | Memimage* |
| 70 | −_allocmemimage(Rectangle r, ulong chan) | |
| 69 | +allocmemimage(Rectangle r, ulong chan) | |
| 71 | 70 | { |
| 72 | 71 | int d; |
| 73 | − u32int l, nw; | |
| 74 | 72 | uchar *p; |
| 73 | + ulong l, nw; | |
| 75 | 74 | Memdata *md; |
| 76 | 75 | Memimage *i; |
| 77 | 76 | |
| @@ -79,8 +78,13 @@ _allocmemimage(Rectangle r, ulong chan) · 1 unmodified line | ||
| 79 | 78 | werrstr("bad channel descriptor %.8lux", chan); |
| 80 | 79 | return nil; |
| 81 | 80 | } |
| 81 | + if(badrect(r)){ | |
| 82 | + werrstr("bad rectangle %R", r); | |
| 83 | + return nil; | |
| 84 | + } | |
| 82 | 85 | |
| 83 | 86 | l = wordsperline(r, d); |
| 87 | + | |
| 84 | 88 | nw = l*Dy(r); |
| 85 | 89 | md = malloc(sizeof(Memdata)); |
| 86 | 90 | if(md == nil) |
| @@ -104,7 +108,7 @@ _allocmemimage(Rectangle r, ulong chan) · 17 unmodified lines | ||
| 104 | 108 | md->bdata = p; |
| 105 | 109 | md->allocd = 1; |
| 106 | 110 | |
| 107 | − i = allocmemimaged(r, chan, md, nil); | |
| 111 | + i = allocmemimaged(r, chan, md); | |
| 108 | 112 | if(i == nil){ |
| 109 | 113 | poolfree(imagmem, md->base); |
| 110 | 114 | free(md); |
| @@ -115,11 +119,11 @@ _allocmemimage(Rectangle r, ulong chan) · 4 unmodified lines | ||
| 115 | 119 | } |
| 116 | 120 | |
| 117 | 121 | void |
| 118 | −_freememimage(Memimage *i) | |
| 122 | +freememimage(Memimage *i) | |
| 119 | 123 | { |
| 120 | 124 | if(i == nil) |
| 121 | 125 | return; |
| 122 | − if(i->data->ref-- == 1 && i->data->allocd){ | |
| 126 | + if(--i->data->ref == 0 && i->data->allocd){ | |
| 123 | 127 | if(i->data->base) |
| 124 | 128 | poolfree(imagmem, i->data->base); |
| 125 | 129 | free(i->data); |
| @@ -141,8 +145,7 @@ byteaddr(Memimage *i, Point p) · 15 unmodified lines | ||
| 141 | 145 | { |
| 142 | 146 | uchar *a; |
| 143 | 147 | |
| 144 | − a = i->data->bdata+i->zero+sizeof(ulong)*p.y*i->width; | |
| 145 | − | |
| 148 | + a = i->data->bdata+i->zero+(int)(sizeof(ulong)*p.y*i->width); | |
| 146 | 149 | if(i->depth < 8){ |
| 147 | 150 | /* |
| 148 | 151 | * We need to always round down, |
| @@ -1,62 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <draw.h> | |
| 4 | −#include <memdraw.h> | |
| 5 | −#include <memlayer.h> | |
| 6 | − | |
| 7 | −extern int drawdebug; | |
| 8 | −void | |
| 9 | −main(int argc, char **argv) | |
| 10 | −{ | |
| 11 | − char cc; | |
| 12 | − Memimage *x; | |
| 13 | − Point c = {208,871}; | |
| 14 | − int a = 441; | |
| 15 | − int b = 441; | |
| 16 | − int thick = 0; | |
| 17 | − Point sp = {0,0}; | |
| 18 | − int alpha = 51; | |
| 19 | − int phi = 3; | |
| 20 | − vlong t0, t1; | |
| 21 | − int i, n; | |
| 22 | − vlong del; | |
| 23 | − | |
| 24 | − memimageinit(); | |
| 25 | − | |
| 26 | − x = allocmemimage(Rect(0,0,1000,1000), CMAP8); | |
| 27 | − n = atoi(argv[1]); | |
| 28 | − | |
| 29 | − t0 = nsec(); | |
| 30 | − t0 = nsec(); | |
| 31 | − t0 = nsec(); | |
| 32 | − t1 = nsec(); | |
| 33 | − del = t1-t0; | |
| 34 | − t0 = nsec(); | |
| 35 | − for(i=0; i<n; i++) | |
| 36 | − memarc(x, c, a, b, thick, memblack, sp, alpha, phi, SoverD); | |
| 37 | − t1 = nsec(); | |
| 38 | − print("%lld %lld\n", t1-t0-del, del); | |
| 39 | −} | |
| 40 | − | |
| 41 | −int drawdebug = 0; | |
| 42 | − | |
| 43 | −void | |
| 44 | −rdb(void) | |
| 45 | −{ | |
| 46 | −} | |
| 47 | − | |
| 48 | −int | |
| 49 | −iprint(char *fmt, ...) | |
| 50 | −{ | |
| 51 | − int n; | |
| 52 | − va_list va; | |
| 53 | − char buf[1024]; | |
| 54 | − | |
| 55 | − va_start(va, fmt); | |
| 56 | − n = doprint(buf, buf+sizeof buf, fmt, va) - buf; | |
| 57 | − va_end(va); | |
| 58 | − | |
| 59 | − write(1,buf,n); | |
| 60 | − return 1; | |
| 61 | −} | |
| 62 | − | |
| @@ -4,12 +4,12 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <memdraw.h> |
| 5 | 5 | |
| 6 | 6 | int |
| 7 | −_cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 7 | +cloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 8 | 8 | { |
| 9 | 9 | int y, bpl, c, cnt, offs; |
| 10 | 10 | uchar mem[NMEM], *memp, *omemp, *emem, *linep, *elinep, *u, *eu; |
| 11 | 11 | |
| 12 | − if(!rectinrect(r, i->r)) | |
| 12 | + if(badrect(r) || !rectinrect(r, i->r)) | |
| 13 | 13 | return -1; |
| 14 | 14 | bpl = bytesperline(r, i->depth); |
| 15 | 15 | u = data; |
| @@ -43,7 +43,7 @@ getmemdefont(void) · 42 unmodified lines | ||
| 43 | 43 | md->ref = 1; |
| 44 | 44 | md->allocd = 1; /* so freememimage does free md */ |
| 45 | 45 | |
| 46 | − i = allocmemimaged(r, drawld2chan[ld], md, nil); | |
| 46 | + i = allocmemimaged(r, drawld2chan[ld], md); | |
| 47 | 47 | if(i == nil){ |
| 48 | 48 | free(md); |
| 49 | 49 | return nil; |
| @@ -4,7 +4,6 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <memdraw.h> |
| 5 | 5 | |
| 6 | 6 | int drawdebug; |
| 7 | −static int tablesbuilt; | |
| 8 | 7 | |
| 9 | 8 | /* perfect approximation to NTSC = .299r+.587g+.114b when 0 ≤ r,g,b < 256 */ |
| 10 | 9 | #define RGB2K(r,g,b) ((156763*(r)+307758*(g)+59769*(b))>>19) |
| @@ -52,15 +51,13 @@ Memimage *memopaque; · 41 unmodified lines | ||
| 52 | 51 | |
| 53 | 52 | int _ifmt(Fmt*); |
| 54 | 53 | |
| 55 | −void | |
| 56 | −_memimageinit(void) | |
| 54 | +int | |
| 55 | +memimageinit(void) | |
| 57 | 56 | { |
| 58 | 57 | static int didinit = 0; |
| 59 | 58 | |
| 60 | 59 | if(didinit) |
| 61 | − return; | |
| 62 | − | |
| 63 | − didinit = 1; | |
| 60 | + return 0; | |
| 64 | 61 | |
| 65 | 62 | mktables(); |
| 66 | 63 | _memmkcmap(); |
| @@ -69,34 +66,36 @@ _memimageinit(void) · 2 unmodified lines | ||
| 69 | 66 | fmtinstall('P', Pfmt); |
| 70 | 67 | |
| 71 | 68 | memones = allocmemimage(Rect(0,0,1,1), GREY1); |
| 69 | + memzeros = allocmemimage(Rect(0,0,1,1), GREY1); | |
| 70 | + if(memones == nil || memzeros == nil) | |
| 71 | + return -1; | |
| 72 | + | |
| 72 | 73 | memones->flags |= Frepl; |
| 73 | 74 | memones->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF); |
| 74 | 75 | *byteaddr(memones, ZP) = ~0; |
| 75 | 76 | |
| 76 | − memzeros = allocmemimage(Rect(0,0,1,1), GREY1); | |
| 77 | 77 | memzeros->flags |= Frepl; |
| 78 | 78 | memzeros->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF); |
| 79 | 79 | *byteaddr(memzeros, ZP) = 0; |
| 80 | 80 | |
| 81 | − if(memones == nil || memzeros == nil) | |
| 82 | − assert(0 /*cannot initialize memimage library */); /* RSC BUG */ | |
| 83 | − | |
| 84 | 81 | memwhite = memones; |
| 85 | 82 | memblack = memzeros; |
| 86 | 83 | memopaque = memones; |
| 87 | 84 | memtransparent = memzeros; |
| 85 | + | |
| 86 | + didinit = 1; | |
| 87 | + return 0; | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | −ulong _imgtorgba(Memimage*, ulong); | |
| 91 | −ulong _rgbatoimg(Memimage*, ulong); | |
| 92 | −ulong _pixelbits(Memimage*, Point); | |
| 90 | +static ulong imgtorgba(Memimage*, ulong); | |
| 91 | +static ulong rgbatoimg(Memimage*, ulong); | |
| 93 | 92 | |
| 94 | 93 | #define DBG if(0) |
| 95 | −static Memdrawparam par; | |
| 96 | − | |
| 97 | −Memdrawparam* | |
| 98 | −_memimagedrawsetup(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Point p1, int op) | |
| 94 | +void | |
| 95 | +memimagedraw(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Point p1, int op) | |
| 99 | 96 | { |
| 97 | + static int n = 0; | |
| 98 | + Memdrawparam par; | |
| 100 | 99 | |
| 101 | 100 | if(mask == nil) |
| 102 | 101 | mask = memopaque; |
| @@ -106,13 +105,13 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 3 unmodified lines | ||
| 106 | 105 | if(drawclip(dst, &r, src, &p0, mask, &p1, &par.sr, &par.mr) == 0){ |
| 107 | 106 | // if(drawdebug) |
| 108 | 107 | // iprint("empty clipped rectangle\n"); |
| 109 | − return nil; | |
| 108 | + return; | |
| 110 | 109 | } |
| 111 | 110 | |
| 112 | 111 | if(op < Clear || op > SoverD){ |
| 113 | 112 | // if(drawdebug) |
| 114 | 113 | // iprint("op out of range: %d\n", op); |
| 115 | − return nil; | |
| 114 | + return; | |
| 116 | 115 | } |
| 117 | 116 | |
| 118 | 117 | par.op = op; |
| @@ -127,13 +126,13 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 8 unmodified lines | ||
| 127 | 126 | if(src->flags&Frepl){ |
| 128 | 127 | par.state |= Replsrc; |
| 129 | 128 | if(Dx(src->r)==1 && Dy(src->r)==1){ |
| 130 | − par.sval = _pixelbits(src, src->r.min); | |
| 129 | + par.sval = pixelbits(src, src->r.min); | |
| 131 | 130 | par.state |= Simplesrc; |
| 132 | − par.srgba = _imgtorgba(src, par.sval); | |
| 133 | − par.sdval = _rgbatoimg(dst, par.srgba); | |
| 131 | + par.srgba = imgtorgba(src, par.sval); | |
| 132 | + par.sdval = rgbatoimg(dst, par.srgba); | |
| 134 | 133 | if((par.srgba&0xFF) == 0 && (op&DoutS)){ |
| 135 | 134 | // if (drawdebug) iprint("fill with transparent source\n"); |
| 136 | − return nil; /* no-op successfully handled */ | |
| 135 | + return; /* no-op successfully handled */ | |
| 137 | 136 | } |
| 138 | 137 | } |
| 139 | 138 | } |
| @@ -141,15 +140,15 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 1 unmodified line | ||
| 141 | 140 | if(mask->flags & Frepl){ |
| 142 | 141 | par.state |= Replmask; |
| 143 | 142 | if(Dx(mask->r)==1 && Dy(mask->r)==1){ |
| 144 | − par.mval = _pixelbits(mask, mask->r.min); | |
| 143 | + par.mval = pixelbits(mask, mask->r.min); | |
| 145 | 144 | if(par.mval == 0 && (op&DoutS)){ |
| 146 | 145 | // if(drawdebug) iprint("fill with zero mask\n"); |
| 147 | − return nil; /* no-op successfully handled */ | |
| 146 | + return; /* no-op successfully handled */ | |
| 148 | 147 | } |
| 149 | 148 | par.state |= Simplemask; |
| 150 | 149 | if(par.mval == ~0) |
| 151 | 150 | par.state |= Fullmask; |
| 152 | − par.mrgba = _imgtorgba(mask, par.mval); | |
| 151 | + par.mrgba = imgtorgba(mask, par.mval); | |
| 153 | 152 | } |
| 154 | 153 | } |
| 155 | 154 | |
| @@ -157,15 +156,6 @@ DBG print("memimagedraw %p/%luX %R @ %p %p/%luX %P %p/%luX %P... ", dst, dst->ch · 1 unmodified line | ||
| 157 | 156 | // iprint("dr %R sr %R mr %R...", r, par.sr, par.mr); |
| 158 | 157 | DBG print("draw dr %R sr %R mr %R %lux\n", r, par.sr, par.mr, par.state); |
| 159 | 158 | |
| 160 | − return ∥ | |
| 161 | −} | |
| 162 | − | |
| 163 | −void | |
| 164 | −_memimagedraw(Memdrawparam *par) | |
| 165 | −{ | |
| 166 | − if (par == nil) | |
| 167 | − return; | |
| 168 | − | |
| 169 | 159 | /* |
| 170 | 160 | * Now that we've clipped the parameters down to be consistent, we |
| 171 | 161 | * simply try sub-drawing routines in order until we find one that was able |
| @@ -179,7 +169,7 @@ _memimagedraw(Memdrawparam *par) · 7 unmodified lines | ||
| 179 | 169 | * There could be an if around this checking to see if dst is in video memory. |
| 180 | 170 | */ |
| 181 | 171 | DBG print("test hwdraw\n"); |
| 182 | − if(hwdraw(par)){ | |
| 172 | + if(hwdraw(&par)){ | |
| 183 | 173 | //if(drawdebug) iprint("hw handled\n"); |
| 184 | 174 | DBG print("hwdraw handled\n"); |
| 185 | 175 | return; |
| @@ -188,7 +178,7 @@ DBG print("hwdraw handled\n"); · 2 unmodified lines | ||
| 188 | 178 | * Optimizations using memmove and memset. |
| 189 | 179 | */ |
| 190 | 180 | DBG print("test memoptdraw\n"); |
| 191 | − if(memoptdraw(par)){ | |
| 181 | + if(memoptdraw(&par)){ | |
| 192 | 182 | //if(drawdebug) iprint("memopt handled\n"); |
| 193 | 183 | DBG print("memopt handled\n"); |
| 194 | 184 | return; |
| @@ -199,7 +189,7 @@ DBG print("memopt handled\n"); · 4 unmodified lines | ||
| 199 | 189 | * Solid source color being painted through a boolean mask onto a high res image. |
| 200 | 190 | */ |
| 201 | 191 | DBG print("test chardraw\n"); |
| 202 | − if(chardraw(par)){ | |
| 192 | + if(chardraw(&par)){ | |
| 203 | 193 | //if(drawdebug) iprint("chardraw handled\n"); |
| 204 | 194 | DBG print("chardraw handled\n"); |
| 205 | 195 | return; |
| @@ -209,29 +199,28 @@ DBG print("chardraw handled\n"); · 3 unmodified lines | ||
| 209 | 199 | * General calculation-laden case that does alpha for each pixel. |
| 210 | 200 | */ |
| 211 | 201 | DBG print("do alphadraw\n"); |
| 212 | − alphadraw(par); | |
| 202 | + alphadraw(&par); | |
| 213 | 203 | //if(drawdebug) iprint("alphadraw handled\n"); |
| 214 | 204 | DBG print("alphadraw handled\n"); |
| 215 | 205 | } |
| 216 | 206 | #undef DBG |
| 217 | 207 | |
| 208 | + | |
| 218 | 209 | /* |
| 219 | 210 | * Clip the destination rectangle further based on the properties of the |
| 220 | 211 | * source and mask rectangles. Once the destination rectangle is properly |
| 221 | 212 | * clipped, adjust the source and mask rectangles to be the same size. |
| 222 | − * Then if source or mask is replicated, move its clipped rectangle | |
| 223 | − * so that its minimum point falls within the repl rectangle. | |
| 224 | 213 | * |
| 225 | 214 | * Return zero if the final rectangle is null. |
| 226 | 215 | */ |
| 227 | 216 | int |
| 228 | −drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr) | |
| 217 | +drawclipnorepl(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr) | |
| 229 | 218 | { |
| 230 | 219 | Point rmin, delta; |
| 231 | 220 | int splitcoords; |
| 232 | 221 | Rectangle omr; |
| 233 | 222 | |
| 234 | − if(r->min.x>=r->max.x || r->min.y>=r->max.y) | |
| 223 | + if(badrect(*r)) | |
| 235 | 224 | return 0; |
| 236 | 225 | splitcoords = (p0->x!=p1->x) || (p0->y!=p1->y); |
| 237 | 226 | /* clip to destination */ |
| @@ -272,15 +261,13 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 34 unmodified lines | ||
| 272 | 261 | sr->min.y += mr->min.y-omr.min.y; |
| 273 | 262 | sr->max.x += mr->max.x-omr.max.x; |
| 274 | 263 | sr->max.y += mr->max.y-omr.max.y; |
| 275 | − *p1 = mr->min; | |
| 276 | 264 | }else{ |
| 277 | 265 | if(!(mask->flags&Frepl) && !rectclip(sr, mask->r)) |
| 278 | 266 | return 0; |
| 279 | 267 | if(!rectclip(sr, mask->clipr)) |
| 280 | 268 | return 0; |
| 281 | − *p1 = sr->min; | |
| 269 | + *mr = *sr; | |
| 282 | 270 | } |
| 283 | − | |
| 284 | 271 | /* move source clipping back to destination */ |
| 285 | 272 | delta.x = r->min.x - p0->x; |
| 286 | 273 | delta.y = r->min.y - p0->y; |
| @@ -288,6 +275,30 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 1 unmodified line | ||
| 288 | 275 | r->min.y = sr->min.y + delta.y; |
| 289 | 276 | r->max.x = sr->max.x + delta.x; |
| 290 | 277 | r->max.y = sr->max.y + delta.y; |
| 278 | + *p0 = sr->min; | |
| 279 | + *p1 = mr->min; | |
| 280 | + | |
| 281 | + assert(Dx(*sr) == Dx(*mr) && Dx(*mr) == Dx(*r)); | |
| 282 | + assert(Dy(*sr) == Dy(*mr) && Dy(*mr) == Dy(*r)); | |
| 283 | + assert(ptinrect(r->min, dst->r)); | |
| 284 | + | |
| 285 | + return 1; | |
| 286 | +} | |
| 287 | + | |
| 288 | +/* | |
| 289 | + * like drawclipnorepl() above, but if source or mask is replicated, | |
| 290 | + * move its clipped rectangle so that its minimum point falls within | |
| 291 | + * the repl rectangle. | |
| 292 | + * | |
| 293 | + * Return zero if the final rectangle is null. | |
| 294 | + */ | |
| 295 | +int | |
| 296 | +drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, Point *p1, Rectangle *sr, Rectangle *mr) | |
| 297 | +{ | |
| 298 | + Point delta; | |
| 299 | + | |
| 300 | + if(!drawclipnorepl(dst, r, src, p0, mask, p1, sr, mr)) | |
| 301 | + return 0; | |
| 291 | 302 | |
| 292 | 303 | /* move source rectangle so sr->min is in src->r */ |
| 293 | 304 | if(src->flags&Frepl) { |
| @@ -297,8 +308,8 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 3 unmodified lines | ||
| 297 | 308 | sr->min.y += delta.y; |
| 298 | 309 | sr->max.x += delta.x; |
| 299 | 310 | sr->max.y += delta.y; |
| 311 | + *p0 = sr->min; | |
| 300 | 312 | } |
| 301 | − *p0 = sr->min; | |
| 302 | 313 | |
| 303 | 314 | /* move mask point so it is in mask->r */ |
| 304 | 315 | *p1 = drawrepl(mask->r, *p1); |
| @@ -306,11 +317,8 @@ drawclip(Memimage *dst, Rectangle *r, Memimage *src, Point *p0, Memimage *mask, · 1 unmodified line | ||
| 306 | 317 | mr->max.x = p1->x+Dx(*sr); |
| 307 | 318 | mr->max.y = p1->y+Dy(*sr); |
| 308 | 319 | |
| 309 | − assert(Dx(*sr) == Dx(*mr) && Dx(*mr) == Dx(*r)); | |
| 310 | − assert(Dy(*sr) == Dy(*mr) && Dy(*mr) == Dy(*r)); | |
| 311 | 320 | assert(ptinrect(*p0, src->r)); |
| 312 | 321 | assert(ptinrect(*p1, mask->r)); |
| 313 | − assert(ptinrect(r->min, dst->r)); | |
| 314 | 322 | |
| 315 | 323 | return 1; |
| 316 | 324 | } |
| @@ -357,13 +365,6 @@ mktables(void) · 40 unmodified lines | ||
| 357 | 365 | { |
| 358 | 366 | int i, j, mask, sh, small; |
| 359 | 367 | |
| 360 | − if(tablesbuilt) | |
| 361 | − return; | |
| 362 | − | |
| 363 | − fmtinstall('R', Rfmt); | |
| 364 | − fmtinstall('P', Pfmt); | |
| 365 | − tablesbuilt = 1; | |
| 366 | − | |
| 367 | 368 | /* bit replication up to 8 bits */ |
| 368 | 369 | for(i=0; i<256; i++){ |
| 369 | 370 | for(j=0; j<=8; j++){ /* j <= 8 [sic] */ |
| @@ -396,7 +397,7 @@ struct Buffer { · 26 unmodified lines | ||
| 396 | 397 | uchar *red; |
| 397 | 398 | uchar *grn; |
| 398 | 399 | uchar *blu; |
| 399 | − uchar *alpha; | |
| 400 | + uchar *alpha; /* is &ones when unused, never nil */ | |
| 400 | 401 | uchar *grey; |
| 401 | 402 | ulong *rgba; |
| 402 | 403 | int delta; /* number of bytes to add to pointer to get next pixel to the right */ |
| @@ -456,7 +457,6 @@ struct Param { · 53 unmodified lines | ||
| 456 | 457 | static uchar *drawbuf; |
| 457 | 458 | static int ndrawbuf; |
| 458 | 459 | static int mdrawbuf; |
| 459 | −static Param spar, mpar, dpar; /* easier on the stacks */ | |
| 460 | 460 | static Readfn greymaskread, replread, readptr; |
| 461 | 461 | static Writefn nullwrite; |
| 462 | 462 | static Calcfn alphacalc0, alphacalc14, alphacalc2810, alphacalc3679, alphacalc5, alphacalc11, alphacalcS; |
| @@ -467,7 +467,8 @@ static Readfn* readalphafn(Memimage*); · 4 unmodified lines | ||
| 467 | 467 | static Writefn* writefn(Memimage*); |
| 468 | 468 | |
| 469 | 469 | static Calcfn* boolcopyfn(Memimage*, Memimage*); |
| 470 | −static Readfn* convfn(Memimage*, Param*, Memimage*, Param*); | |
| 470 | +static Readfn* convfn(Memimage*, Param*, Memimage*, Param*, int*); | |
| 471 | +static Readfn* ptrfn(Memimage*); | |
| 471 | 472 | |
| 472 | 473 | static Calcfn *alphacalc[Ncomp] = |
| 473 | 474 | { |
| @@ -501,59 +502,66 @@ static Calcfn *boolcalc[Ncomp] = · 27 unmodified lines | ||
| 501 | 502 | boolcalc1011, /* SoverD */ |
| 502 | 503 | }; |
| 503 | 504 | |
| 504 | −static int | |
| 505 | −allocdrawbuf(void) | |
| 505 | +/* | |
| 506 | + * Avoid standard Lock, QLock so that can be used in kernel. | |
| 507 | + */ | |
| 508 | +typedef struct Dbuf Dbuf; | |
| 509 | +struct Dbuf | |
| 506 | 510 | { |
| 507 | 511 | uchar *p; |
| 512 | + int n; | |
| 513 | + Param spar, mpar, dpar; | |
| 514 | + int inuse; | |
| 515 | +}; | |
| 516 | +static Dbuf dbuf[10]; | |
| 508 | 517 | |
| 509 | − if(ndrawbuf > mdrawbuf){ | |
| 510 | − p = realloc(drawbuf, ndrawbuf); | |
| 511 | − if(p == nil){ | |
| 512 | − werrstr("memimagedraw out of memory"); | |
| 513 | − return -1; | |
| 514 | − } | |
| 515 | − drawbuf = p; | |
| 516 | − mdrawbuf = ndrawbuf; | |
| 518 | +static Dbuf* | |
| 519 | +allocdbuf(void) | |
| 520 | +{ | |
| 521 | + int i; | |
| 522 | + | |
| 523 | + for(i=0; i<nelem(dbuf); i++){ | |
| 524 | + if(dbuf[i].inuse) | |
| 525 | + continue; | |
| 526 | + if(!tas(&dbuf[i].inuse)) | |
| 527 | + return &dbuf[i]; | |
| 517 | 528 | } |
| 518 | − return 0; | |
| 529 | + return nil; | |
| 519 | 530 | } |
| 520 | 531 | |
| 521 | −static Param | |
| 522 | −getparam(Memimage *img, Rectangle r, int convgrey, int needbuf) | |
| 532 | +static void | |
| 533 | +getparam(Param *p, Memimage *img, Rectangle r, int convgrey, int needbuf, int *ndrawbuf) | |
| 523 | 534 | { |
| 524 | − Param p; | |
| 525 | 535 | int nbuf; |
| 526 | 536 | |
| 527 | − memset(&p, 0, sizeof p); | |
| 537 | + memset(p, 0, sizeof *p); | |
| 528 | 538 | |
| 529 | − p.img = img; | |
| 530 | − p.r = r; | |
| 531 | − p.dx = Dx(r); | |
| 532 | − p.needbuf = needbuf; | |
| 533 | − p.convgrey = convgrey; | |
| 539 | + p->img = img; | |
| 540 | + p->r = r; | |
| 541 | + p->dx = Dx(r); | |
| 542 | + p->needbuf = needbuf; | |
| 543 | + p->convgrey = convgrey; | |
| 534 | 544 | |
| 535 | 545 | assert(img->r.min.x <= r.min.x && r.min.x < img->r.max.x); |
| 536 | 546 | |
| 537 | − p.bytey0s = byteaddr(img, Pt(img->r.min.x, img->r.min.y)); | |
| 538 | − p.bytermin = byteaddr(img, Pt(r.min.x, img->r.min.y)); | |
| 539 | − p.bytey0e = byteaddr(img, Pt(img->r.max.x, img->r.min.y)); | |
| 540 | − p.bwidth = sizeof(ulong)*img->width; | |
| 547 | + p->bytey0s = byteaddr(img, Pt(img->r.min.x, img->r.min.y)); | |
| 548 | + p->bytermin = byteaddr(img, Pt(r.min.x, img->r.min.y)); | |
| 549 | + p->bytey0e = byteaddr(img, Pt(img->r.max.x, img->r.min.y)); | |
| 550 | + p->bwidth = sizeof(ulong)*img->width; | |
| 541 | 551 | |
| 542 | − assert(p.bytey0s <= p.bytermin && p.bytermin <= p.bytey0e); | |
| 552 | + assert(p->bytey0s <= p->bytermin && p->bytermin <= p->bytey0e); | |
| 543 | 553 | |
| 544 | − if(p.r.min.x == p.img->r.min.x) | |
| 545 | − assert(p.bytermin == p.bytey0s); | |
| 554 | + if(p->r.min.x == p->img->r.min.x) | |
| 555 | + assert(p->bytermin == p->bytey0s); | |
| 546 | 556 | |
| 547 | 557 | nbuf = 1; |
| 548 | 558 | if((img->flags&Frepl) && Dy(img->r) <= MAXBCACHE && Dy(img->r) < Dy(r)){ |
| 549 | − p.replcache = 1; | |
| 559 | + p->replcache = 1; | |
| 550 | 560 | nbuf = Dy(img->r); |
| 551 | 561 | } |
| 552 | − p.bufdelta = 4*p.dx; | |
| 553 | − p.bufoff = ndrawbuf; | |
| 554 | − ndrawbuf += p.bufdelta*nbuf; | |
| 555 | − | |
| 556 | − return p; | |
| 562 | + p->bufdelta = 4*p->dx; | |
| 563 | + p->bufoff = *ndrawbuf; | |
| 564 | + *ndrawbuf += p->bufdelta*nbuf; | |
| 557 | 565 | } |
| 558 | 566 | |
| 559 | 567 | static void |
| @@ -578,19 +586,19 @@ dumpbuf(char *s, Buffer b, int n) · 18 unmodified lines | ||
| 578 | 586 | print("%s", s); |
| 579 | 587 | for(i=0; i<n; i++){ |
| 580 | 588 | print(" "); |
| 581 | − if((p=b.grey)){ | |
| 589 | + if(p=b.grey){ | |
| 582 | 590 | print(" k%.2uX", *p); |
| 583 | 591 | b.grey += b.delta; |
| 584 | 592 | }else{ |
| 585 | − if((p=b.red)){ | |
| 593 | + if(p=b.red){ | |
| 586 | 594 | print(" r%.2uX", *p); |
| 587 | 595 | b.red += b.delta; |
| 588 | 596 | } |
| 589 | − if((p=b.grn)){ | |
| 597 | + if(p=b.grn){ | |
| 590 | 598 | print(" g%.2uX", *p); |
| 591 | 599 | b.grn += b.delta; |
| 592 | 600 | } |
| 593 | − if((p=b.blu)){ | |
| 601 | + if(p=b.blu){ | |
| 594 | 602 | print(" b%.2uX", *p); |
| 595 | 603 | b.blu += b.delta; |
| 596 | 604 | } |
| @@ -624,19 +632,23 @@ alphadraw(Memdrawparam *par) · 27 unmodified lines | ||
| 624 | 632 | { |
| 625 | 633 | int isgrey, starty, endy, op; |
| 626 | 634 | int needbuf, dsty, srcy, masky; |
| 627 | − int y, dir, dx, dy; | |
| 635 | + int y, dir, dx, dy, ndrawbuf; | |
| 636 | + uchar *drawbuf; | |
| 628 | 637 | Buffer bsrc, bdst, bmask; |
| 629 | 638 | Readfn *rdsrc, *rdmask, *rddst; |
| 630 | 639 | Calcfn *calc; |
| 631 | 640 | Writefn *wrdst; |
| 632 | 641 | Memimage *src, *mask, *dst; |
| 633 | 642 | Rectangle r, sr, mr; |
| 643 | + Dbuf *z; | |
| 634 | 644 | |
| 635 | 645 | r = par->r; |
| 636 | 646 | dx = Dx(r); |
| 637 | 647 | dy = Dy(r); |
| 638 | 648 | |
| 639 | − ndrawbuf = 0; | |
| 649 | + z = allocdbuf(); | |
| 650 | + if(z == nil) | |
| 651 | + return 0; | |
| 640 | 652 | |
| 641 | 653 | src = par->src; |
| 642 | 654 | mask = par->mask; |
| @@ -655,12 +667,13 @@ alphadraw(Memdrawparam *par) · 12 unmodified lines | ||
| 655 | 667 | */ |
| 656 | 668 | needbuf = (src->data == dst->data); |
| 657 | 669 | |
| 658 | − spar = getparam(src, sr, isgrey, needbuf); | |
| 659 | − dpar = getparam(dst, r, isgrey, needbuf); | |
| 660 | − mpar = getparam(mask, mr, 0, needbuf); | |
| 670 | + ndrawbuf = 0; | |
| 671 | + getparam(&z->spar, src, sr, isgrey, needbuf, &ndrawbuf); | |
| 672 | + getparam(&z->dpar, dst, r, isgrey, needbuf, &ndrawbuf); | |
| 673 | + getparam(&z->mpar, mask, mr, 0, needbuf, &ndrawbuf); | |
| 661 | 674 | |
| 662 | 675 | dir = (needbuf && byteaddr(dst, r.min) > byteaddr(src, sr.min)) ? -1 : 1; |
| 663 | − spar.dir = mpar.dir = dpar.dir = dir; | |
| 676 | + z->spar.dir = z->mpar.dir = z->dpar.dir = dir; | |
| 664 | 677 | |
| 665 | 678 | /* |
| 666 | 679 | * If the mask is purely boolean, we can convert from src to dst format |
| @@ -680,7 +693,7 @@ alphadraw(Memdrawparam *par) · 13 unmodified lines | ||
| 680 | 693 | //if(drawdebug) iprint("flag %lud mchan %lux=?%x dd %d\n", src->flags&Falpha, mask->chan, GREY1, dst->depth); |
| 681 | 694 | if(!(src->flags&Falpha) && mask->chan == GREY1 && dst->depth >= 8 && op == SoverD){ |
| 682 | 695 | //if(drawdebug) iprint("boolcopy..."); |
| 683 | − rdsrc = convfn(dst, &dpar, src, &spar); | |
| 696 | + rdsrc = convfn(dst, &z->dpar, src, &z->spar, &ndrawbuf); | |
| 684 | 697 | rddst = readptr; |
| 685 | 698 | rdmask = readfn(mask); |
| 686 | 699 | calc = boolcopyfn(dst, mask); |
| @@ -698,10 +711,10 @@ alphadraw(Memdrawparam *par) · 11 unmodified lines | ||
| 698 | 711 | */ |
| 699 | 712 | if(mask->flags&Falpha){ |
| 700 | 713 | rdmask = readalphafn(mask); |
| 701 | − mpar.alphaonly = 1; | |
| 714 | + z->mpar.alphaonly = 1; | |
| 702 | 715 | }else{ |
| 703 | − mpar.greymaskcall = readfn(mask); | |
| 704 | − mpar.convgrey = 1; | |
| 716 | + z->mpar.greymaskcall = readfn(mask); | |
| 717 | + z->mpar.convgrey = 1; | |
| 705 | 718 | rdmask = greymaskread; |
| 706 | 719 | |
| 707 | 720 | /* |
| @@ -723,27 +736,34 @@ alphadraw(Memdrawparam *par) · 15 unmodified lines | ||
| 723 | 736 | * If the image has a small enough repl rectangle, |
| 724 | 737 | * we can just read each line once and cache them. |
| 725 | 738 | */ |
| 726 | − if(spar.replcache){ | |
| 727 | − spar.replcall = rdsrc; | |
| 739 | + if(z->spar.replcache){ | |
| 740 | + z->spar.replcall = rdsrc; | |
| 728 | 741 | rdsrc = replread; |
| 729 | 742 | } |
| 730 | − if(mpar.replcache){ | |
| 731 | − mpar.replcall = rdmask; | |
| 743 | + if(z->mpar.replcache){ | |
| 744 | + z->mpar.replcall = rdmask; | |
| 732 | 745 | rdmask = replread; |
| 733 | 746 | } |
| 734 | 747 | |
| 735 | − if(allocdrawbuf() < 0) | |
| 736 | − return 0; | |
| 748 | + if(z->n < ndrawbuf){ | |
| 749 | + free(z->p); | |
| 750 | + if((z->p = mallocz(ndrawbuf, 0)) == nil){ | |
| 751 | + z->inuse = 0; | |
| 752 | + return 0; | |
| 753 | + } | |
| 754 | + z->n = ndrawbuf; | |
| 755 | + } | |
| 756 | + drawbuf = z->p; | |
| 737 | 757 | |
| 738 | 758 | /* |
| 739 | 759 | * Before we were saving only offsets from drawbuf in the parameter |
| 740 | 760 | * structures; now that drawbuf has been grown to accomodate us, |
| 741 | 761 | * we can fill in the pointers. |
| 742 | 762 | */ |
| 743 | − spar.bufbase = drawbuf+spar.bufoff; | |
| 744 | − mpar.bufbase = drawbuf+mpar.bufoff; | |
| 745 | − dpar.bufbase = drawbuf+dpar.bufoff; | |
| 746 | − spar.convbuf = drawbuf+spar.convbufoff; | |
| 763 | + z->spar.bufbase = drawbuf+z->spar.bufoff; | |
| 764 | + z->mpar.bufbase = drawbuf+z->mpar.bufoff; | |
| 765 | + z->dpar.bufbase = drawbuf+z->dpar.bufoff; | |
| 766 | + z->spar.convbuf = drawbuf+z->spar.convbufoff; | |
| 747 | 767 | |
| 748 | 768 | if(dir == 1){ |
| 749 | 769 | starty = 0; |
| @@ -771,18 +791,19 @@ alphadraw(Memdrawparam *par) · 21 unmodified lines | ||
| 771 | 791 | clipy(dst, &dsty); |
| 772 | 792 | clipy(mask, &masky); |
| 773 | 793 | |
| 774 | − bsrc = rdsrc(&spar, spar.bufbase, srcy); | |
| 794 | + bsrc = rdsrc(&z->spar, z->spar.bufbase, srcy); | |
| 775 | 795 | DBG print("["); |
| 776 | − bmask = rdmask(&mpar, mpar.bufbase, masky); | |
| 796 | + bmask = rdmask(&z->mpar, z->mpar.bufbase, masky); | |
| 777 | 797 | DBG print("]\n"); |
| 778 | − bdst = rddst(&dpar, dpar.bufbase, dsty); | |
| 798 | + bdst = rddst(&z->dpar, z->dpar.bufbase, dsty); | |
| 779 | 799 | DBG dumpbuf("src", bsrc, dx); |
| 780 | 800 | DBG dumpbuf("mask", bmask, dx); |
| 781 | 801 | DBG dumpbuf("dst", bdst, dx); |
| 782 | 802 | bdst = calc(bdst, bsrc, bmask, dx, isgrey, op); |
| 783 | − wrdst(&dpar, dpar.bytermin+dsty*dpar.bwidth, bdst); | |
| 803 | + wrdst(&z->dpar, z->dpar.bytermin+dsty*z->dpar.bwidth, bdst); | |
| 784 | 804 | } |
| 785 | 805 | |
| 806 | + z->inuse = 0; | |
| 786 | 807 | return 1; |
| 787 | 808 | } |
| 788 | 809 | #undef DBG |
| @@ -1344,7 +1365,7 @@ readnbit(Param *p, uchar *buf, int y) · 555 unmodified lines | ||
| 1344 | 1365 | DBG print("readnbit dx %d %p=%p+%d*%d, *r=%d fetch %d ", dx, r, p->bytermin, y, p->bwidth, *r, n); |
| 1345 | 1366 | bits = *r++; |
| 1346 | 1367 | nbits = 8; |
| 1347 | − if((i=x&(npack-1))){ | |
| 1368 | + if(i=x&(npack-1)){ | |
| 1348 | 1369 | DBG print("throwaway %d...", i); |
| 1349 | 1370 | bits <<= depth*i; |
| 1350 | 1371 | nbits -= depth*i; |
| @@ -1376,7 +1397,7 @@ DBG print("bit %x...", repl[bits>>sh]); · 25 unmodified lines | ||
| 1376 | 1397 | DBG print("x=%d r=%p...", x, r); |
| 1377 | 1398 | bits = *r++; |
| 1378 | 1399 | nbits = 8; |
| 1379 | − if((i=x&(npack-1))){ | |
| 1400 | + if(i=x&(npack-1)){ | |
| 1380 | 1401 | bits <<= depth*i; |
| 1381 | 1402 | nbits -= depth*i; |
| 1382 | 1403 | } |
| @@ -1461,7 +1482,7 @@ readcmap(Param *p, uchar *buf, int y) · 78 unmodified lines | ||
| 1461 | 1482 | end = p->bytey0e + y*p->bwidth; |
| 1462 | 1483 | cmap = p->img->cmap->cmap2rgb; |
| 1463 | 1484 | convgrey = p->convgrey; |
| 1464 | − copyalpha = (p->img->flags&Falpha) ? 1 : 0; | |
| 1485 | + copyalpha = (p->img->flags&Falpha) != 0; | |
| 1465 | 1486 | |
| 1466 | 1487 | w = buf; |
| 1467 | 1488 | dx = p->dx; |
| @@ -1518,8 +1539,8 @@ readcmap(Param *p, uchar *buf, int y) · 50 unmodified lines | ||
| 1518 | 1539 | static void |
| 1519 | 1540 | writecmap(Param *p, uchar *w, Buffer src) |
| 1520 | 1541 | { |
| 1521 | − uchar *cmap, *red, *grn, *blu; | |
| 1522 | − int i, dx, delta; | |
| 1542 | + uchar *cmap, *red, *grn, *blu, *alpha; | |
| 1543 | + int i, dx, delta, a, m; | |
| 1523 | 1544 | |
| 1524 | 1545 | cmap = p->img->cmap->rgb2cmap; |
| 1525 | 1546 | |
| @@ -1529,8 +1550,20 @@ writecmap(Param *p, uchar *w, Buffer src) · 3 unmodified lines | ||
| 1529 | 1550 | blu = src.blu; |
| 1530 | 1551 | |
| 1531 | 1552 | dx = p->dx; |
| 1532 | − for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta) | |
| 1533 | − *w++ = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)]; | |
| 1553 | + if(p->img->flags&Falpha){ | |
| 1554 | + alpha = src.alpha; | |
| 1555 | + m = p->img->shift[CMap]/8; | |
| 1556 | + a = p->img->shift[CAlpha]/8; | |
| 1557 | + for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta, w+=2){ | |
| 1558 | + w[a] = *alpha; | |
| 1559 | + if(alpha != &ones) | |
| 1560 | + alpha+=delta; | |
| 1561 | + w[m] = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)]; | |
| 1562 | + } | |
| 1563 | + } else { | |
| 1564 | + for(i=0; i<dx; i++, red+=delta, grn+=delta, blu+=delta) | |
| 1565 | + *w++ = cmap[(*red>>4)*256+(*grn>>4)*16+(*blu>>4)]; | |
| 1566 | + } | |
| 1534 | 1567 | } |
| 1535 | 1568 | |
| 1536 | 1569 | #define DBG if(0) |
| @@ -1556,7 +1589,7 @@ readbyte(Param *p, uchar *buf, int y) · 19 unmodified lines | ||
| 1556 | 1589 | convgrey = p->convgrey; /* convert rgb to grey */ |
| 1557 | 1590 | isgrey = img->flags&Fgrey; |
| 1558 | 1591 | alphaonly = p->alphaonly; |
| 1559 | − copyalpha = (img->flags&Falpha) ? 1 : 0; | |
| 1592 | + copyalpha = (img->flags&Falpha) != 0; | |
| 1560 | 1593 | |
| 1561 | 1594 | DBG print("copyalpha %d alphaonly %d convgrey %d isgrey %d\n", copyalpha, alphaonly, convgrey, isgrey); |
| 1562 | 1595 | /* if we can, avoid processing everything */ |
| @@ -1608,16 +1641,17 @@ DBG print("g %x %x %x\n", ured, ugrn, ublu); · 45 unmodified lines | ||
| 1608 | 1641 | *w++ = RGB2K(ured, ugrn, ublu); |
| 1609 | 1642 | DBG print("%x\n", w[-1]); |
| 1610 | 1643 | }else{ |
| 1611 | − *w++ = brepl[(u >> img->shift[CBlue]) & img->mask[CBlue]]; | |
| 1612 | − *w++ = grepl[(u >> img->shift[CGreen]) & img->mask[CGreen]]; | |
| 1613 | − *w++ = rrepl[(u >> img->shift[CRed]) & img->mask[CRed]]; | |
| 1644 | + w[0] = ublu; | |
| 1645 | + w[1] = ugrn; | |
| 1646 | + w[2] = ured; | |
| 1647 | + w += 3; | |
| 1614 | 1648 | } |
| 1615 | 1649 | } |
| 1616 | 1650 | r += nb; |
| 1617 | 1651 | if(r == end) |
| 1618 | 1652 | r = begin; |
| 1619 | 1653 | } |
| 1620 | − | |
| 1654 | + | |
| 1621 | 1655 | b.alpha = copyalpha ? buf : &ones; |
| 1622 | 1656 | b.rgba = (ulong*)buf; |
| 1623 | 1657 | if(alphaonly){ |
| @@ -1629,7 +1663,7 @@ DBG print("%x\n", w[-1]); · 5 unmodified lines | ||
| 1629 | 1663 | b.grey = buf+copyalpha; |
| 1630 | 1664 | b.red = b.grn = b.blu = buf+copyalpha; |
| 1631 | 1665 | b.delta = copyalpha+1; |
| 1632 | −DBG print("alpha %x grey %x\n", b.alpha ? *b.alpha : 0xFF, *b.grey); | |
| 1666 | +DBG print("alpha %x grey %x\n", *b.alpha, *b.grey); | |
| 1633 | 1667 | }else{ |
| 1634 | 1668 | b.blu = buf+copyalpha; |
| 1635 | 1669 | b.grn = buf+copyalpha+1; |
| @@ -1647,7 +1681,7 @@ writebyte(Param *p, uchar *w, Buffer src) · 11 unmodified lines | ||
| 1647 | 1681 | { |
| 1648 | 1682 | Memimage *img; |
| 1649 | 1683 | int i, isalpha, isgrey, nb, delta, dx, adelta; |
| 1650 | − uchar ff, *red, *grn, *blu, *grey, *alpha; | |
| 1684 | + uchar *red, *grn, *blu, *grey, *alpha; | |
| 1651 | 1685 | ulong u, mask; |
| 1652 | 1686 | |
| 1653 | 1687 | img = p->img; |
| @@ -1661,18 +1695,45 @@ writebyte(Param *p, uchar *w, Buffer src) · 7 unmodified lines | ||
| 1661 | 1695 | dx = p->dx; |
| 1662 | 1696 | |
| 1663 | 1697 | nb = img->depth/8; |
| 1664 | − mask = (nb==4) ? 0 : ~((1<<img->depth)-1); | |
| 1665 | 1698 | |
| 1666 | 1699 | isalpha = img->flags&Falpha; |
| 1667 | 1700 | isgrey = img->flags&Fgrey; |
| 1668 | 1701 | adelta = src.delta; |
| 1669 | 1702 | |
| 1670 | − if(isalpha && (alpha == nil || alpha == &ones)){ | |
| 1671 | − ff = 0xFF; | |
| 1672 | − alpha = &ff; | |
| 1703 | + if(isalpha && alpha == &ones) | |
| 1673 | 1704 | adelta = 0; |
| 1705 | + | |
| 1706 | + if((img->flags&Fbytes) != 0){ | |
| 1707 | + int ogry, ored, ogrn, oblu, oalp; | |
| 1708 | + | |
| 1709 | + ogry = img->shift[CGrey]/8; | |
| 1710 | + ored = img->shift[CRed]/8; | |
| 1711 | + ogrn = img->shift[CGreen]/8; | |
| 1712 | + oblu = img->shift[CBlue]/8; | |
| 1713 | + oalp = img->shift[CAlpha]/8; | |
| 1714 | + | |
| 1715 | + for(i=0; i<dx; i++){ | |
| 1716 | + if(isgrey){ | |
| 1717 | + w[ogry] = *grey; | |
| 1718 | + grey += delta; | |
| 1719 | + } else { | |
| 1720 | + w[ored] = *red; | |
| 1721 | + w[ogrn] = *grn; | |
| 1722 | + w[oblu] = *blu; | |
| 1723 | + red += delta; | |
| 1724 | + grn += delta; | |
| 1725 | + blu += delta; | |
| 1726 | + } | |
| 1727 | + if(isalpha){ | |
| 1728 | + w[oalp] = *alpha; | |
| 1729 | + alpha += adelta; | |
| 1730 | + } | |
| 1731 | + w += nb; | |
| 1732 | + } | |
| 1733 | + return; | |
| 1674 | 1734 | } |
| 1675 | 1735 | |
| 1736 | + mask = (nb==4) ? 0 : ~((1<<img->depth)-1); | |
| 1676 | 1737 | for(i=0; i<dx; i++){ |
| 1677 | 1738 | u = w[0] | (w[1]<<8) | (w[2]<<16) | (w[3]<<24); |
| 1678 | 1739 | DBG print("u %.8lux...", u); |
| @@ -1729,7 +1790,7 @@ writefn(Memimage *img) · 50 unmodified lines | ||
| 1729 | 1790 | { |
| 1730 | 1791 | if(img->depth < 8) |
| 1731 | 1792 | return writenbit; |
| 1732 | − if(img->chan == CMAP8) | |
| 1793 | + if(img->nbits[CMap] == 8) | |
| 1733 | 1794 | return writecmap; |
| 1734 | 1795 | return writebyte; |
| 1735 | 1796 | } |
| @@ -1750,7 +1811,8 @@ readptr(Param *p, uchar *s, int y) · 14 unmodified lines | ||
| 1750 | 1811 | USED(s); |
| 1751 | 1812 | q = p->bytermin + y*p->bwidth; |
| 1752 | 1813 | b.red = q; /* ptr to data */ |
| 1753 | − b.grn = b.blu = b.grey = b.alpha = nil; | |
| 1814 | + b.grn = b.blu = b.grey = nil; | |
| 1815 | + b.alpha = &ones; | |
| 1754 | 1816 | b.rgba = (ulong*)q; |
| 1755 | 1817 | b.delta = p->img->depth/8; |
| 1756 | 1818 | return b; |
| @@ -1866,7 +1928,8 @@ genconv(Param *p, uchar *buf, int y) · 109 unmodified lines | ||
| 1866 | 1928 | } |
| 1867 | 1929 | |
| 1868 | 1930 | b.red = buf; |
| 1869 | − b.blu = b.grn = b.grey = b.alpha = nil; | |
| 1931 | + b.blu = b.grn = b.grey = nil; | |
| 1932 | + b.alpha = &ones; | |
| 1870 | 1933 | b.rgba = (ulong*)buf; |
| 1871 | 1934 | b.delta = 0; |
| 1872 | 1935 | |
| @@ -1874,7 +1937,7 @@ genconv(Param *p, uchar *buf, int y) · 1 unmodified line | ||
| 1874 | 1937 | } |
| 1875 | 1938 | |
| 1876 | 1939 | static Readfn* |
| 1877 | −convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar) | |
| 1940 | +convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar, int *ndrawbuf) | |
| 1878 | 1941 | { |
| 1879 | 1942 | if(dst->chan == src->chan && !(src->flags&Frepl)){ |
| 1880 | 1943 | //if(drawdebug) iprint("readptr..."); |
| @@ -1892,8 +1955,8 @@ convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar) · 11 unmodified lines | ||
| 1892 | 1955 | spar->convdpar = dpar; |
| 1893 | 1956 | |
| 1894 | 1957 | /* allocate a conversion buffer */ |
| 1895 | − spar->convbufoff = ndrawbuf; | |
| 1896 | − ndrawbuf += spar->dx*4; | |
| 1958 | + spar->convbufoff = *ndrawbuf; | |
| 1959 | + *ndrawbuf += spar->dx*4; | |
| 1897 | 1960 | |
| 1898 | 1961 | if(spar->dx > Dx(spar->img->r)){ |
| 1899 | 1962 | spar->convdx = spar->dx; |
| @@ -1905,7 +1968,7 @@ convfn(Memimage *dst, Param *dpar, Memimage *src, Param *spar) · 5 unmodified lines | ||
| 1905 | 1968 | } |
| 1906 | 1969 | |
| 1907 | 1970 | ulong |
| 1908 | −_pixelbits(Memimage *i, Point pt) | |
| 1971 | +pixelbits(Memimage *i, Point pt) | |
| 1909 | 1972 | { |
| 1910 | 1973 | uchar *p; |
| 1911 | 1974 | ulong val; |
| @@ -1965,23 +2028,17 @@ boolcopyfn(Memimage *img, Memimage *mask) · 53 unmodified lines | ||
| 1965 | 2028 | |
| 1966 | 2029 | /* |
| 1967 | 2030 | * Optimized draw for filling and scrolling; uses memset and memmove. |
| 1968 | − * | |
| 1969 | −static void | |
| 1970 | −memsetb(void *vp, uchar val, int n) | |
| 1971 | −{ | |
| 1972 | − uchar *p, *ep; | |
| 1973 | − | |
| 1974 | − p = vp; | |
| 1975 | − ep = p+n; | |
| 1976 | − while(p<ep) | |
| 1977 | − *p++ = val; | |
| 1978 | −} | |
| 1979 | −*/ | |
| 1980 | − | |
| 2031 | + */ | |
| 1981 | 2032 | static void |
| 1982 | 2033 | memsets(void *vp, ushort val, int n) |
| 1983 | 2034 | { |
| 1984 | 2035 | ushort *p, *ep; |
| 2036 | + uchar b[2]; | |
| 2037 | + | |
| 2038 | + /* make little endian */ | |
| 2039 | + b[0] = val; | |
| 2040 | + b[1] = val>>8; | |
| 2041 | + val = *(ushort*)b; | |
| 1985 | 2042 | |
| 1986 | 2043 | p = vp; |
| 1987 | 2044 | ep = p+n; |
| @@ -1993,6 +2050,14 @@ static void · 5 unmodified lines | ||
| 1993 | 2050 | memsetl(void *vp, ulong val, int n) |
| 1994 | 2051 | { |
| 1995 | 2052 | ulong *p, *ep; |
| 2053 | + uchar b[4]; | |
| 2054 | + | |
| 2055 | + /* make little endian */ | |
| 2056 | + b[0] = val; | |
| 2057 | + b[1] = val>>8; | |
| 2058 | + b[2] = val>>16; | |
| 2059 | + b[3] = val>>24; | |
| 2060 | + val = *(ulong*)b; | |
| 1996 | 2061 | |
| 1997 | 2062 | p = vp; |
| 1998 | 2063 | ep = p+n; |
| @@ -2006,20 +2071,22 @@ memset24(void *vp, ulong val, int n) · 7 unmodified lines | ||
| 2006 | 2071 | uchar *p, *ep; |
| 2007 | 2072 | uchar a,b,c; |
| 2008 | 2073 | |
| 2009 | − p = vp; | |
| 2010 | − ep = p+3*n; | |
| 2011 | 2074 | a = val; |
| 2012 | 2075 | b = val>>8; |
| 2013 | 2076 | c = val>>16; |
| 2077 | + | |
| 2078 | + p = vp; | |
| 2079 | + ep = p+3*n; | |
| 2014 | 2080 | while(p<ep){ |
| 2015 | − *p++ = a; | |
| 2016 | − *p++ = b; | |
| 2017 | − *p++ = c; | |
| 2081 | + p[0] = a; | |
| 2082 | + p[1] = b; | |
| 2083 | + p[2] = c; | |
| 2084 | + p += 3; | |
| 2018 | 2085 | } |
| 2019 | 2086 | } |
| 2020 | 2087 | |
| 2021 | −ulong | |
| 2022 | −_imgtorgba(Memimage *img, ulong val) | |
| 2088 | +static ulong | |
| 2089 | +imgtorgba(Memimage *img, ulong val) | |
| 2023 | 2090 | { |
| 2024 | 2091 | uchar r, g, b, a; |
| 2025 | 2092 | int nb, ov, v; |
| @@ -2057,17 +2124,17 @@ _imgtorgba(Memimage *img, ulong val) · 31 unmodified lines | ||
| 2057 | 2124 | break; |
| 2058 | 2125 | case CMap: |
| 2059 | 2126 | p = img->cmap->cmap2rgb+3*ov; |
| 2060 | − r = *p++; | |
| 2061 | − g = *p++; | |
| 2062 | − b = *p; | |
| 2127 | + r = p[0]; | |
| 2128 | + g = p[1]; | |
| 2129 | + b = p[2]; | |
| 2063 | 2130 | break; |
| 2064 | 2131 | } |
| 2065 | 2132 | } |
| 2066 | 2133 | return (r<<24)|(g<<16)|(b<<8)|a; |
| 2067 | 2134 | } |
| 2068 | 2135 | |
| 2069 | −ulong | |
| 2070 | −_rgbatoimg(Memimage *img, ulong rgba) | |
| 2136 | +static ulong | |
| 2137 | +rgbatoimg(Memimage *img, ulong rgba) | |
| 2071 | 2138 | { |
| 2072 | 2139 | ulong chan; |
| 2073 | 2140 | int d, nb; |
| @@ -2133,9 +2200,8 @@ DBG print("state %lux mval %lux dd %d\n", par->state, par->mval, dst->depth); · 59 unmodified lines | ||
| 2133 | 2200 | */ |
| 2134 | 2201 | m = Simplesrc|Simplemask|Fullmask; |
| 2135 | 2202 | if((par->state&m)==m && (par->srgba&0xFF) == 0xFF && (op ==S || op == SoverD)){ |
| 2136 | − uchar *dp, p[4]; | |
| 2137 | 2203 | int d, dwid, ppb, np, nb; |
| 2138 | − uchar lm, rm; | |
| 2204 | + uchar *dp, lm, rm; | |
| 2139 | 2205 | |
| 2140 | 2206 | DBG print("memopt, dst %p, dst->data->bdata %p\n", dst, dst->data->bdata); |
| 2141 | 2207 | dwid = dst->width*sizeof(ulong); |
| @@ -2204,11 +2270,6 @@ DBG print("dp %p v %lux lm %ux (v ^ *dp) & lm %lux\n", dp, v, lm, (v^*dp)&lm); · 62 unmodified lines | ||
| 2204 | 2270 | memset(dp, v, dx); |
| 2205 | 2271 | return 1; |
| 2206 | 2272 | case 16: |
| 2207 | − p[0] = v; /* make little endian */ | |
| 2208 | − p[1] = v>>8; | |
| 2209 | − v = *(ushort*)p; | |
| 2210 | −DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n", | |
| 2211 | − dp, dx, dy, dwid); | |
| 2212 | 2273 | for(y=0; y<dy; y++, dp+=dwid) |
| 2213 | 2274 | memsets(dp, v, dx); |
| 2214 | 2275 | return 1; |
| @@ -2217,11 +2278,6 @@ DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n", · 2 unmodified lines | ||
| 2217 | 2278 | memset24(dp, v, dx); |
| 2218 | 2279 | return 1; |
| 2219 | 2280 | case 32: |
| 2220 | − p[0] = v; /* make little endian */ | |
| 2221 | − p[1] = v>>8; | |
| 2222 | − p[2] = v>>16; | |
| 2223 | − p[3] = v>>24; | |
| 2224 | − v = *(ulong*)p; | |
| 2225 | 2281 | for(y=0; y<dy; y++, dp+=dwid) |
| 2226 | 2282 | memsetl(dp, v, dx); |
| 2227 | 2283 | return 1; |
| @@ -2370,9 +2426,8 @@ DBG print("dp=%p; dx=%d; for(y=0; y<%d; y++, dp+=%d)\nmemsets(dp, v, dx);\n", · 142 unmodified lines | ||
| 2370 | 2426 | static int |
| 2371 | 2427 | chardraw(Memdrawparam *par) |
| 2372 | 2428 | { |
| 2373 | − ulong bits; | |
| 2374 | 2429 | int i, ddepth, dy, dx, x, bx, ex, y, npack, bsh, depth, op; |
| 2375 | − ulong v, maskwid, dstwid; | |
| 2430 | + ulong bits, v, maskwid, dstwid; | |
| 2376 | 2431 | uchar *wp, *rp, *q, *wc; |
| 2377 | 2432 | ushort *ws; |
| 2378 | 2433 | ulong *wl; |
| @@ -2513,7 +2568,7 @@ membyteval(Memimage *src) · 134 unmodified lines | ||
| 2513 | 2568 | bpp = src->depth; |
| 2514 | 2569 | uc <<= (src->r.min.x&(7/src->depth))*src->depth; |
| 2515 | 2570 | uc &= ~(0xFF>>bpp); |
| 2516 | − // pixel value is now in high part of byte. repeat throughout byte | |
| 2571 | + /* pixel value is now in high part of byte. repeat throughout byte | |
| 2517 | 2572 | val = uc; |
| 2518 | 2573 | for(i=bpp; i<8; i<<=1) |
| 2519 | 2574 | val |= val>>i; |
| @@ -2523,7 +2578,7 @@ membyteval(Memimage *src) · 3 unmodified lines | ||
| 2523 | 2578 | */ |
| 2524 | 2579 | |
| 2525 | 2580 | void |
| 2526 | −_memfillcolor(Memimage *i, ulong val) | |
| 2581 | +memfillcolor(Memimage *i, ulong val) | |
| 2527 | 2582 | { |
| 2528 | 2583 | ulong bits; |
| 2529 | 2584 | int d, y; |
| @@ -2531,7 +2586,7 @@ _memfillcolor(Memimage *i, ulong val) · 1 unmodified line | ||
| 2531 | 2586 | if(val == DNofill) |
| 2532 | 2587 | return; |
| 2533 | 2588 | |
| 2534 | − bits = _rgbatoimg(i, val); | |
| 2589 | + bits = rgbatoimg(i, val); | |
| 2535 | 2590 | switch(i->depth){ |
| 2536 | 2591 | case 24: /* 24-bit images suck */ |
| 2537 | 2592 | for(y=i->r.min.y; y<i->r.max.y; y++) |
| @@ -1,1004 +0,0 @@ | ||
| 1 | −#include <u.h> | |
| 2 | −#include <libc.h> | |
| 3 | −#include <bio.h> | |
| 4 | −#include <draw.h> | |
| 5 | −#include <memdraw.h> | |
| 6 | − | |
| 7 | −#define DBG if(0) | |
| 8 | −#define RGB2K(r,g,b) ((299*((ulong)(r))+587*((ulong)(g))+114*((ulong)(b)))/1000) | |
| 9 | − | |
| 10 | −/* | |
| 11 | − * This program tests the 'memimagedraw' primitive stochastically. | |
| 12 | − * It tests the combination aspects of it thoroughly, but since the | |
| 13 | − * three images it uses are disjoint, it makes no check of the | |
| 14 | − * correct behavior when images overlap. That is, however, much | |
| 15 | − * easier to get right and to test. | |
| 16 | − */ | |
| 17 | − | |
| 18 | −void drawonepixel(Memimage*, Point, Memimage*, Point, Memimage*, Point); | |
| 19 | −void verifyone(void); | |
| 20 | −void verifyline(void); | |
| 21 | −void verifyrect(void); | |
| 22 | −void verifyrectrepl(int, int); | |
| 23 | −void putpixel(Memimage *img, Point pt, ulong nv); | |
| 24 | −ulong rgbatopix(uchar, uchar, uchar, uchar); | |
| 25 | − | |
| 26 | −char *dchan, *schan, *mchan; | |
| 27 | −int dbpp, sbpp, mbpp; | |
| 28 | − | |
| 29 | −int drawdebug=0; | |
| 30 | −int seed; | |
| 31 | −int niters = 100; | |
| 32 | −int dbpp; /* bits per pixel in destination */ | |
| 33 | −int sbpp; /* bits per pixel in src */ | |
| 34 | −int mbpp; /* bits per pixel in mask */ | |
| 35 | −int dpm; /* pixel mask at high part of byte, in destination */ | |
| 36 | −int nbytes; /* in destination */ | |
| 37 | − | |
| 38 | −int Xrange = 64; | |
| 39 | −int Yrange = 8; | |
| 40 | − | |
| 41 | −Memimage *dst; | |
| 42 | −Memimage *src; | |
| 43 | −Memimage *mask; | |
| 44 | −Memimage *stmp; | |
| 45 | −Memimage *mtmp; | |
| 46 | −Memimage *ones; | |
| 47 | −uchar *dstbits; | |
| 48 | −uchar *srcbits; | |
| 49 | −uchar *maskbits; | |
| 50 | −ulong *savedstbits; | |
| 51 | − | |
| 52 | −void | |
| 53 | −rdb(void) | |
| 54 | −{ | |
| 55 | −} | |
| 56 | − | |
| 57 | −int | |
| 58 | −iprint(char *fmt, ...) | |
| 59 | −{ | |
| 60 | − int n; | |
| 61 | − va_list va; | |
| 62 | − char buf[1024]; | |
| 63 | − | |
| 64 | − va_start(va, fmt); | |
| 65 | − n = doprint(buf, buf+sizeof buf, fmt, va) - buf; | |
| 66 | − va_end(va); | |
| 67 | − | |
| 68 | − write(1,buf,n); | |
| 69 | − return 1; | |
| 70 | −} | |
| 71 | − | |
| 72 | −void | |
| 73 | −main(int argc, char *argv[]) | |
| 74 | −{ | |
| 75 | − memimageinit(); | |
| 76 | − seed = time(0); | |
| 77 | − | |
| 78 | − ARGBEGIN{ | |
| 79 | − case 'x': | |
| 80 | − Xrange = atoi(ARGF()); | |
| 81 | − break; | |
| 82 | − case 'y': | |
| 83 | − Yrange = atoi(ARGF()); | |
| 84 | − break; | |
| 85 | − case 'n': | |
| 86 | − niters = atoi(ARGF()); | |
| 87 | − break; | |
| 88 | − case 's': | |
| 89 | − seed = atoi(ARGF()); | |
| 90 | − break; | |
| 91 | − }ARGEND | |
| 92 | − | |
| 93 | − dchan = "r8g8b8"; | |
| 94 | − schan = "r8g8b8"; | |
| 95 | − mchan = "r8g8b8"; | |
| 96 | − switch(argc){ | |
| 97 | − case 3: mchan = argv[2]; | |
| 98 | − case 2: schan = argv[1]; | |
| 99 | − case 1: dchan = argv[0]; | |
| 100 | − case 0: break; | |
| 101 | − default: goto Usage; | |
| 102 | − Usage: | |
| 103 | − fprint(2, "usage: dtest [dchan [schan [mchan]]]\n"); | |
| 104 | − exits("usage"); | |
| 105 | − } | |
| 106 | − | |
| 107 | − fmtinstall('b', numbconv); /* binary! */ | |
| 108 | − | |
| 109 | − fprint(2, "%s -x %d -y %d -s 0x%x %s %s %s\n", argv0, Xrange, Yrange, seed, dchan, schan, mchan); | |
| 110 | − srand(seed); | |
| 111 | − | |
| 112 | − dst = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(dchan)); | |
| 113 | − src = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan)); | |
| 114 | − mask = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan)); | |
| 115 | − stmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(schan)); | |
| 116 | − mtmp = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan)); | |
| 117 | − ones = allocmemimage(Rect(0, 0, Xrange, Yrange), strtochan(mchan)); | |
| 118 | −// print("chan %lux %lux %lux %lux %lux %lux\n", dst->chan, src->chan, mask->chan, stmp->chan, mtmp->chan, ones->chan); | |
| 119 | − if(dst==0 || src==0 || mask==0 || mtmp==0 || ones==0) { | |
| 120 | − Alloc: | |
| 121 | − fprint(2, "dtest: allocation failed: %r\n"); | |
| 122 | − exits("alloc"); | |
| 123 | − } | |
| 124 | − nbytes = (4*Xrange+4)*Yrange; | |
| 125 | − srcbits = malloc(nbytes); | |
| 126 | − dstbits = malloc(nbytes); | |
| 127 | − maskbits = malloc(nbytes); | |
| 128 | − savedstbits = malloc(nbytes); | |
| 129 | − if(dstbits==0 || srcbits==0 || maskbits==0 || savedstbits==0) | |
| 130 | − goto Alloc; | |
| 131 | − dbpp = dst->depth; | |
| 132 | − sbpp = src->depth; | |
| 133 | − mbpp = mask->depth; | |
| 134 | − dpm = 0xFF ^ (0xFF>>dbpp); | |
| 135 | − memset(ones->data->bdata, 0xFF, ones->width*sizeof(ulong)*Yrange); | |
| 136 | − | |
| 137 | − | |
| 138 | − fprint(2, "dtest: verify single pixel operation\n"); | |
| 139 | − verifyone(); | |
| 140 | − | |
| 141 | − fprint(2, "dtest: verify full line non-replicated\n"); | |
| 142 | − verifyline(); | |
| 143 | − | |
| 144 | − fprint(2, "dtest: verify full rectangle non-replicated\n"); | |
| 145 | − verifyrect(); | |
| 146 | − | |
| 147 | − fprint(2, "dtest: verify full rectangle source replicated\n"); | |
| 148 | − verifyrectrepl(1, 0); | |
| 149 | − | |
| 150 | − fprint(2, "dtest: verify full rectangle mask replicated\n"); | |
| 151 | − verifyrectrepl(0, 1); | |
| 152 | − | |
| 153 | − fprint(2, "dtest: verify full rectangle source and mask replicated\n"); | |
| 154 | − verifyrectrepl(1, 1); | |
| 155 | − | |
| 156 | − exits(0); | |
| 157 | −} | |
| 158 | − | |
| 159 | −/* | |
| 160 | − * Dump out an ASCII representation of an image. The label specifies | |
| 161 | − * a list of characters to put at various points in the picture. | |
| 162 | − */ | |
| 163 | −static void | |
| 164 | −Bprintr5g6b5(Biobuf *bio, char*, ulong v) | |
| 165 | −{ | |
| 166 | − int r,g,b; | |
| 167 | − r = (v>>11)&31; | |
| 168 | − g = (v>>5)&63; | |
| 169 | − b = v&31; | |
| 170 | − Bprint(bio, "%.2x%.2x%.2x", r,g,b); | |
| 171 | −} | |
| 172 | − | |
| 173 | −static void | |
| 174 | −Bprintr5g5b5a1(Biobuf *bio, char*, ulong v) | |
| 175 | −{ | |
| 176 | − int r,g,b,a; | |
| 177 | − r = (v>>11)&31; | |
| 178 | − g = (v>>6)&31; | |
| 179 | − b = (v>>1)&31; | |
| 180 | − a = v&1; | |
| 181 | − Bprint(bio, "%.2x%.2x%.2x%.2x", r,g,b,a); | |
| 182 | −} | |
| 183 | − | |
| 184 | −void | |
| 185 | −dumpimage(char *name, Memimage *img, void *vdata, Point labelpt) | |
| 186 | −{ | |
| 187 | − Biobuf b; | |
| 188 | − uchar *data; | |
| 189 | − uchar *p; | |
| 190 | − char *arg; | |
| 191 | − void (*fmt)(Biobuf*, char*, ulong); | |
| 192 | − int npr, x, y, nb, bpp; | |
| 193 | − ulong v, mask; | |
| 194 | − Rectangle r; | |
| 195 | − | |
| 196 | − fmt = nil; | |
| 197 | − arg = nil; | |
| 198 | − switch(img->depth){ | |
| 199 | − case 1: | |
| 200 | − case 2: | |
| 201 | − case 4: | |
| 202 | − fmt = (void(*)(Biobuf*,char*,ulong))Bprint; | |
| 203 | − arg = "%.1ux"; | |
| 204 | − break; | |
| 205 | − case 8: | |
| 206 | − fmt = (void(*)(Biobuf*,char*,ulong))Bprint; | |
| 207 | − arg = "%.2ux"; | |
| 208 | − break; | |
| 209 | − case 16: | |
| 210 | − arg = nil; | |
| 211 | − if(img->chan == RGB16) | |
| 212 | − fmt = Bprintr5g6b5; | |
| 213 | − else{ | |
| 214 | − fmt = (void(*)(Biobuf*,char*,ulong))Bprint; | |
| 215 | − arg = "%.4ux"; | |
| 216 | − } | |
| 217 | − break; | |
| 218 | − case 24: | |
| 219 | − fmt = (void(*)(Biobuf*,char*,ulong))Bprint; | |
| 220 | − arg = "%.6lux"; | |
| 221 | − break; | |
| 222 | − case 32: | |
| 223 | − fmt = (void(*)(Biobuf*,char*,ulong))Bprint; | |
| 224 | − arg = "%.8lux"; | |
| 225 | − break; | |
| 226 | − } | |
| 227 | − if(fmt == nil){ | |
| 228 | − fprint(2, "bad format\n"); | |
| 229 | − abort(); | |
| 230 | − } | |
| 231 | − | |
| 232 | − r = img->r; | |
| 233 | − Binit(&b, 2, OWRITE); | |
| 234 | − data = vdata; | |
| 235 | − bpp = img->depth; | |
| 236 | − Bprint(&b, "%s\t%d\tr %R clipr %R repl %d data %p *%P\n", name, r.min.x, r, img->clipr, (img->flags&Frepl) ? 1 : 0, vdata, labelpt); | |
| 237 | − mask = (1ULL<<bpp)-1; | |
| 238 | −// for(y=r.min.y; y<r.max.y; y++){ | |
| 239 | − for(y=0; y<Yrange; y++){ | |
| 240 | − nb = 0; | |
| 241 | − v = 0; | |
| 242 | − p = data+(byteaddr(img, Pt(0,y))-(uchar*)img->data->bdata); | |
| 243 | − Bprint(&b, "%-4d\t", y); | |
| 244 | −// for(x=r.min.x; x<r.max.x; x++){ | |
| 245 | − for(x=0; x<Xrange; x++){ | |
| 246 | − if(x==0) | |
| 247 | − Bprint(&b, "\t"); | |
| 248 | − | |
| 249 | − if(x != 0 && (x%8)==0) | |
| 250 | − Bprint(&b, " "); | |
| 251 | − | |
| 252 | − npr = 0; | |
| 253 | − if(x==labelpt.x && y==labelpt.y){ | |
| 254 | − Bprint(&b, "*"); | |
| 255 | − npr++; | |
| 256 | − } | |
| 257 | − if(npr == 0) | |
| 258 | − Bprint(&b, " "); | |
| 259 | − | |
| 260 | − while(nb < bpp){ | |
| 261 | − v &= (1<<nb)-1; | |
| 262 | − v |= (ulong)(*p++) << nb; | |
| 263 | − nb += 8; | |
| 264 | − } | |
| 265 | − nb -= bpp; | |
| 266 | −// print("bpp %d v %.8lux mask %.8lux nb %d\n", bpp, v, mask, nb); | |
| 267 | − fmt(&b, arg, (v>>nb)&mask); | |
| 268 | − } | |
| 269 | − Bprint(&b, "\n"); | |
| 270 | − } | |
| 271 | − Bterm(&b); | |
| 272 | −} | |
| 273 | − | |
| 274 | −/* | |
| 275 | − * Verify that the destination pixel has the specified value. | |
| 276 | − * The value is in the high bits of v, suitably masked, but must | |
| 277 | − * be extracted from the destination Memimage. | |
| 278 | − */ | |
| 279 | −void | |
| 280 | −checkone(Point p, Point sp, Point mp) | |
| 281 | −{ | |
| 282 | − int delta; | |
| 283 | − uchar *dp, *sdp; | |
| 284 | − | |
| 285 | − delta = (uchar*)byteaddr(dst, p)-(uchar*)dst->data->bdata; | |
| 286 | − dp = (uchar*)dst->data->bdata+delta; | |
| 287 | − sdp = (uchar*)savedstbits+delta; | |
| 288 | − | |
| 289 | − if(memcmp(dp, sdp, (dst->depth+7)/8) != 0) { | |
| 290 | − fprint(2, "dtest: one bad pixel drawing at dst %P from source %P mask %P\n", p, sp, mp); | |
| 291 | − fprint(2, " %.2ux %.2ux %.2ux %.2ux should be %.2ux %.2ux %.2ux %.2ux\n", | |
| 292 | − dp[0], dp[1], dp[2], dp[3], sdp[0], sdp[1], sdp[2], sdp[3]); | |
| 293 | − fprint(2, "addresses dst %p src %p mask %p\n", dp, byteaddr(src, sp), byteaddr(mask, mp)); | |
| 294 | − dumpimage("src", src, src->data->bdata, sp); | |
| 295 | − dumpimage("mask", mask, mask->data->bdata, mp); | |
| 296 | − dumpimage("origdst", dst, dstbits, p); | |
| 297 | − dumpimage("dst", dst, dst->data->bdata, p); | |
| 298 | − dumpimage("gooddst", dst, savedstbits, p); | |
| 299 | − abort(); | |
| 300 | − } | |
| 301 | −} | |
| 302 | − | |
| 303 | −/* | |
| 304 | − * Verify that the destination line has the same value as the saved line. | |
| 305 | − */ | |
| 306 | −#define RECTPTS(r) (r).min.x, (r).min.y, (r).max.x, (r).max.y | |
| 307 | −void | |
| 308 | −checkline(Rectangle r, Point sp, Point mp, int y, Memimage *stmp, Memimage *mtmp) | |
| 309 | −{ | |
| 310 | − ulong *dp; | |
| 311 | − int nb; | |
| 312 | − ulong *saved; | |
| 313 | − | |
| 314 | − dp = wordaddr(dst, Pt(0, y)); | |
| 315 | − saved = savedstbits + y*dst->width; | |
| 316 | − if(dst->depth < 8) | |
| 317 | − nb = Xrange/(8/dst->depth); | |
| 318 | − else | |
| 319 | − nb = Xrange*(dst->depth/8); | |
| 320 | − if(memcmp(dp, saved, nb) != 0){ | |
| 321 | − fprint(2, "dtest: bad line at y=%d; saved %p dp %p\n", y, saved, dp); | |
| 322 | − fprint(2, "draw dst %R src %P mask %P\n", r, sp, mp); | |
| 323 | − dumpimage("src", src, src->data->bdata, sp); | |
| 324 | − if(stmp) dumpimage("stmp", stmp, stmp->data->bdata, sp); | |
| 325 | − dumpimage("mask", mask, mask->data->bdata, mp); | |
| 326 | − if(mtmp) dumpimage("mtmp", mtmp, mtmp->data->bdata, mp); | |
| 327 | − dumpimage("origdst", dst, dstbits, r.min); | |
| 328 | − dumpimage("dst", dst, dst->data->bdata, r.min); | |
| 329 | − dumpimage("gooddst", dst, savedstbits, r.min); | |
| 330 | − abort(); | |
| 331 | − } | |
| 332 | −} | |
| 333 | − | |
| 334 | −/* | |
| 335 | − * Fill the bits of an image with random data. | |
| 336 | − * The Memimage parameter is used only to make sure | |
| 337 | − * the data is well formatted: only ucbits is written. | |
| 338 | − */ | |
| 339 | −void | |
| 340 | −fill(Memimage *img, uchar *ucbits) | |
| 341 | −{ | |
| 342 | − int i, x, y; | |
| 343 | − ushort *up; | |
| 344 | − uchar alpha, r, g, b; | |
| 345 | − void *data; | |
| 346 | − | |
| 347 | − if((img->flags&Falpha) == 0){ | |
| 348 | − up = (ushort*)ucbits; | |
| 349 | − for(i=0; i<nbytes/2; i++) | |
| 350 | − *up++ = lrand() >> 7; | |
| 351 | − if(i+i != nbytes) | |
| 352 | − *(uchar*)up = lrand() >> 7; | |
| 353 | − }else{ | |
| 354 | − data = img->data->bdata; | |
| 355 | − img->data->bdata = ucbits; | |
| 356 | − | |
| 357 | − for(x=img->r.min.x; x<img->r.max.x; x++) | |
| 358 | − for(y=img->r.min.y; y<img->r.max.y; y++){ | |
| 359 | − alpha = rand() >> 4; | |
| 360 | − r = rand()%(alpha+1); | |
| 361 | − g = rand()%(alpha+1); | |
| 362 | − b = rand()%(alpha+1); | |
| 363 | − putpixel(img, Pt(x,y), rgbatopix(r,g,b,alpha)); | |
| 364 | − } | |
| 365 | − img->data->bdata = data; | |
| 366 | − } | |
| 367 | − | |
| 368 | −} | |
| 369 | − | |
| 370 | −/* | |
| 371 | − * Mask is preset; do the rest | |
| 372 | − */ | |
| 373 | −void | |
| 374 | −verifyonemask(void) | |
| 375 | −{ | |
| 376 | − Point dp, sp, mp; | |
| 377 | − | |
| 378 | − fill(dst, dstbits); | |
| 379 | − fill(src, srcbits); | |
| 380 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 381 | − memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange); | |
| 382 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 383 | − | |
| 384 | − dp.x = nrand(Xrange); | |
| 385 | − dp.y = nrand(Yrange); | |
| 386 | − | |
| 387 | − sp.x = nrand(Xrange); | |
| 388 | − sp.y = nrand(Yrange); | |
| 389 | − | |
| 390 | − mp.x = nrand(Xrange); | |
| 391 | − mp.y = nrand(Yrange); | |
| 392 | − | |
| 393 | − drawonepixel(dst, dp, src, sp, mask, mp); | |
| 394 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 395 | − memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange); | |
| 396 | − | |
| 397 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 398 | − memimagedraw(dst, Rect(dp.x, dp.y, dp.x+1, dp.y+1), src, sp, mask, mp, SoverD); | |
| 399 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 400 | − | |
| 401 | − checkone(dp, sp, mp); | |
| 402 | −} | |
| 403 | − | |
| 404 | −void | |
| 405 | −verifyone(void) | |
| 406 | −{ | |
| 407 | − int i; | |
| 408 | − | |
| 409 | − /* mask all zeros */ | |
| 410 | − memset(maskbits, 0, nbytes); | |
| 411 | − for(i=0; i<niters; i++) | |
| 412 | − verifyonemask(); | |
| 413 | − | |
| 414 | − /* mask all ones */ | |
| 415 | − memset(maskbits, 0xFF, nbytes); | |
| 416 | − for(i=0; i<niters; i++) | |
| 417 | − verifyonemask(); | |
| 418 | − | |
| 419 | − /* random mask */ | |
| 420 | − for(i=0; i<niters; i++){ | |
| 421 | − fill(mask, maskbits); | |
| 422 | − verifyonemask(); | |
| 423 | − } | |
| 424 | −} | |
| 425 | − | |
| 426 | −/* | |
| 427 | − * Mask is preset; do the rest | |
| 428 | − */ | |
| 429 | −void | |
| 430 | −verifylinemask(void) | |
| 431 | −{ | |
| 432 | − Point sp, mp, tp, up; | |
| 433 | − Rectangle dr; | |
| 434 | − int x; | |
| 435 | − | |
| 436 | − fill(dst, dstbits); | |
| 437 | − fill(src, srcbits); | |
| 438 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 439 | − memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange); | |
| 440 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 441 | − | |
| 442 | − dr.min.x = nrand(Xrange-1); | |
| 443 | − dr.min.y = nrand(Yrange-1); | |
| 444 | − dr.max.x = dr.min.x + 1 + nrand(Xrange-1-dr.min.x); | |
| 445 | − dr.max.y = dr.min.y + 1; | |
| 446 | − | |
| 447 | − sp.x = nrand(Xrange); | |
| 448 | − sp.y = nrand(Yrange); | |
| 449 | − | |
| 450 | − mp.x = nrand(Xrange); | |
| 451 | − mp.y = nrand(Yrange); | |
| 452 | − | |
| 453 | − tp = sp; | |
| 454 | − up = mp; | |
| 455 | − for(x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++) | |
| 456 | − memimagedraw(dst, Rect(x, dr.min.y, x+1, dr.min.y+1), src, tp, mask, up, SoverD); | |
| 457 | − memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange); | |
| 458 | − | |
| 459 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 460 | − | |
| 461 | − memimagedraw(dst, dr, src, sp, mask, mp, SoverD); | |
| 462 | − checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), dr.min.y, nil, nil); | |
| 463 | −} | |
| 464 | − | |
| 465 | −void | |
| 466 | −verifyline(void) | |
| 467 | −{ | |
| 468 | − int i; | |
| 469 | − | |
| 470 | − /* mask all ones */ | |
| 471 | − memset(maskbits, 0xFF, nbytes); | |
| 472 | − for(i=0; i<niters; i++) | |
| 473 | − verifylinemask(); | |
| 474 | − | |
| 475 | − /* mask all zeros */ | |
| 476 | − memset(maskbits, 0, nbytes); | |
| 477 | − for(i=0; i<niters; i++) | |
| 478 | − verifylinemask(); | |
| 479 | − | |
| 480 | − /* random mask */ | |
| 481 | − for(i=0; i<niters; i++){ | |
| 482 | − fill(mask, maskbits); | |
| 483 | − verifylinemask(); | |
| 484 | − } | |
| 485 | −} | |
| 486 | − | |
| 487 | −/* | |
| 488 | − * Mask is preset; do the rest | |
| 489 | − */ | |
| 490 | −void | |
| 491 | −verifyrectmask(void) | |
| 492 | −{ | |
| 493 | − Point sp, mp, tp, up; | |
| 494 | − Rectangle dr; | |
| 495 | − int x, y; | |
| 496 | − | |
| 497 | − fill(dst, dstbits); | |
| 498 | − fill(src, srcbits); | |
| 499 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 500 | − memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange); | |
| 501 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 502 | − | |
| 503 | − dr.min.x = nrand(Xrange-1); | |
| 504 | − dr.min.y = nrand(Yrange-1); | |
| 505 | − dr.max.x = dr.min.x + 1 + nrand(Xrange-1-dr.min.x); | |
| 506 | − dr.max.y = dr.min.y + 1 + nrand(Yrange-1-dr.min.y); | |
| 507 | − | |
| 508 | − sp.x = nrand(Xrange); | |
| 509 | − sp.y = nrand(Yrange); | |
| 510 | − | |
| 511 | − mp.x = nrand(Xrange); | |
| 512 | − mp.y = nrand(Yrange); | |
| 513 | − | |
| 514 | − tp = sp; | |
| 515 | − up = mp; | |
| 516 | − for(y=dr.min.y; y<dr.max.y && tp.y<Yrange && up.y<Yrange; y++,tp.y++,up.y++){ | |
| 517 | − for(x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++) | |
| 518 | − memimagedraw(dst, Rect(x, y, x+1, y+1), src, tp, mask, up, SoverD); | |
| 519 | − tp.x = sp.x; | |
| 520 | − up.x = mp.x; | |
| 521 | − } | |
| 522 | − memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange); | |
| 523 | − | |
| 524 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 525 | − | |
| 526 | − memimagedraw(dst, dr, src, sp, mask, mp, SoverD); | |
| 527 | − for(y=0; y<Yrange; y++) | |
| 528 | − checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), y, nil, nil); | |
| 529 | −} | |
| 530 | − | |
| 531 | −void | |
| 532 | −verifyrect(void) | |
| 533 | −{ | |
| 534 | − int i; | |
| 535 | − | |
| 536 | − /* mask all zeros */ | |
| 537 | − memset(maskbits, 0, nbytes); | |
| 538 | − for(i=0; i<niters; i++) | |
| 539 | − verifyrectmask(); | |
| 540 | − | |
| 541 | − /* mask all ones */ | |
| 542 | − memset(maskbits, 0xFF, nbytes); | |
| 543 | − for(i=0; i<niters; i++) | |
| 544 | − verifyrectmask(); | |
| 545 | − | |
| 546 | − /* random mask */ | |
| 547 | − for(i=0; i<niters; i++){ | |
| 548 | − fill(mask, maskbits); | |
| 549 | − verifyrectmask(); | |
| 550 | − } | |
| 551 | −} | |
| 552 | − | |
| 553 | −Rectangle | |
| 554 | −randrect(void) | |
| 555 | −{ | |
| 556 | − Rectangle r; | |
| 557 | − | |
| 558 | − r.min.x = nrand(Xrange-1); | |
| 559 | − r.min.y = nrand(Yrange-1); | |
| 560 | − r.max.x = r.min.x + 1 + nrand(Xrange-1-r.min.x); | |
| 561 | − r.max.y = r.min.y + 1 + nrand(Yrange-1-r.min.y); | |
| 562 | − return r; | |
| 563 | −} | |
| 564 | − | |
| 565 | −/* | |
| 566 | − * Return coordinate corresponding to x withing range [minx, maxx) | |
| 567 | − */ | |
| 568 | −int | |
| 569 | −tilexy(int minx, int maxx, int x) | |
| 570 | −{ | |
| 571 | − int sx; | |
| 572 | − | |
| 573 | − sx = (x-minx) % (maxx-minx); | |
| 574 | − if(sx < 0) | |
| 575 | − sx += maxx-minx; | |
| 576 | − return sx+minx; | |
| 577 | −} | |
| 578 | − | |
| 579 | −void | |
| 580 | −replicate(Memimage *i, Memimage *tmp) | |
| 581 | −{ | |
| 582 | − Rectangle r, r1; | |
| 583 | − int x, y, nb; | |
| 584 | − | |
| 585 | − /* choose the replication window (i->r) */ | |
| 586 | − r.min.x = nrand(Xrange-1); | |
| 587 | − r.min.y = nrand(Yrange-1); | |
| 588 | − /* make it trivial more often than pure chance allows */ | |
| 589 | − switch(lrand()&0){ | |
| 590 | − case 1: | |
| 591 | − r.max.x = r.min.x + 2; | |
| 592 | − r.max.y = r.min.y + 2; | |
| 593 | − if(r.max.x < Xrange && r.max.y < Yrange) | |
| 594 | − break; | |
| 595 | − /* fall through */ | |
| 596 | − case 0: | |
| 597 | − r.max.x = r.min.x + 1; | |
| 598 | − r.max.y = r.min.y + 1; | |
| 599 | − break; | |
| 600 | − default: | |
| 601 | − if(r.min.x+3 >= Xrange) | |
| 602 | − r.max.x = Xrange; | |
| 603 | − else | |
| 604 | − r.max.x = r.min.x+3 + nrand(Xrange-(r.min.x+3)); | |
| 605 | − | |
| 606 | − if(r.min.y+3 >= Yrange) | |
| 607 | − r.max.y = Yrange; | |
| 608 | − else | |
| 609 | − r.max.y = r.min.y+3 + nrand(Yrange-(r.min.y+3)); | |
| 610 | − } | |
| 611 | − assert(r.min.x >= 0); | |
| 612 | − assert(r.max.x <= Xrange); | |
| 613 | − assert(r.min.y >= 0); | |
| 614 | − assert(r.max.y <= Yrange); | |
| 615 | − /* copy from i to tmp so we have just the replicated bits */ | |
| 616 | − nb = tmp->width*sizeof(ulong)*Yrange; | |
| 617 | − memset(tmp->data->bdata, 0, nb); | |
| 618 | − memimagedraw(tmp, r, i, r.min, ones, r.min, SoverD); | |
| 619 | − memmove(i->data->bdata, tmp->data->bdata, nb); | |
| 620 | − /* i is now a non-replicated instance of the replication */ | |
| 621 | − /* replicate it by hand through tmp */ | |
| 622 | − memset(tmp->data->bdata, 0, nb); | |
| 623 | − x = -(tilexy(r.min.x, r.max.x, 0)-r.min.x); | |
| 624 | − for(; x<Xrange; x+=Dx(r)){ | |
| 625 | − y = -(tilexy(r.min.y, r.max.y, 0)-r.min.y); | |
| 626 | − for(; y<Yrange; y+=Dy(r)){ | |
| 627 | − /* set r1 to instance of tile by translation */ | |
| 628 | − r1.min.x = x; | |
| 629 | − r1.min.y = y; | |
| 630 | − r1.max.x = r1.min.x+Dx(r); | |
| 631 | − r1.max.y = r1.min.y+Dy(r); | |
| 632 | − memimagedraw(tmp, r1, i, r.min, ones, r.min, SoverD); | |
| 633 | − } | |
| 634 | − } | |
| 635 | − i->flags |= Frepl; | |
| 636 | − i->r = r; | |
| 637 | − i->clipr = randrect(); | |
| 638 | −// fprint(2, "replicate [[%d %d] [%d %d]] [[%d %d][%d %d]]\n", r.min.x, r.min.y, r.max.x, r.max.y, | |
| 639 | −// i->clipr.min.x, i->clipr.min.y, i->clipr.max.x, i->clipr.max.y); | |
| 640 | − tmp->clipr = i->clipr; | |
| 641 | −} | |
| 642 | − | |
| 643 | −/* | |
| 644 | − * Mask is preset; do the rest | |
| 645 | − */ | |
| 646 | −void | |
| 647 | −verifyrectmaskrepl(int srcrepl, int maskrepl) | |
| 648 | −{ | |
| 649 | − Point sp, mp, tp, up; | |
| 650 | − Rectangle dr; | |
| 651 | − int x, y; | |
| 652 | − Memimage *s, *m; | |
| 653 | − | |
| 654 | −// print("verfrect %d %d\n", srcrepl, maskrepl); | |
| 655 | − src->flags &= ~Frepl; | |
| 656 | − src->r = Rect(0, 0, Xrange, Yrange); | |
| 657 | − src->clipr = src->r; | |
| 658 | − stmp->flags &= ~Frepl; | |
| 659 | − stmp->r = Rect(0, 0, Xrange, Yrange); | |
| 660 | − stmp->clipr = src->r; | |
| 661 | − mask->flags &= ~Frepl; | |
| 662 | − mask->r = Rect(0, 0, Xrange, Yrange); | |
| 663 | − mask->clipr = mask->r; | |
| 664 | − mtmp->flags &= ~Frepl; | |
| 665 | − mtmp->r = Rect(0, 0, Xrange, Yrange); | |
| 666 | − mtmp->clipr = mask->r; | |
| 667 | − | |
| 668 | − fill(dst, dstbits); | |
| 669 | − fill(src, srcbits); | |
| 670 | − | |
| 671 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 672 | − memmove(src->data->bdata, srcbits, src->width*sizeof(ulong)*Yrange); | |
| 673 | − memmove(mask->data->bdata, maskbits, mask->width*sizeof(ulong)*Yrange); | |
| 674 | − | |
| 675 | − if(srcrepl){ | |
| 676 | − replicate(src, stmp); | |
| 677 | − s = stmp; | |
| 678 | − }else | |
| 679 | − s = src; | |
| 680 | − if(maskrepl){ | |
| 681 | − replicate(mask, mtmp); | |
| 682 | − m = mtmp; | |
| 683 | − }else | |
| 684 | − m = mask; | |
| 685 | − | |
| 686 | − dr = randrect(); | |
| 687 | − | |
| 688 | − sp.x = nrand(Xrange); | |
| 689 | − sp.y = nrand(Yrange); | |
| 690 | − | |
| 691 | − mp.x = nrand(Xrange); | |
| 692 | − mp.y = nrand(Yrange); | |
| 693 | − | |
| 694 | −DBG print("smalldraws\n"); | |
| 695 | − for(tp.y=sp.y,up.y=mp.y,y=dr.min.y; y<dr.max.y && tp.y<Yrange && up.y<Yrange; y++,tp.y++,up.y++) | |
| 696 | − for(tp.x=sp.x,up.x=mp.x,x=dr.min.x; x<dr.max.x && tp.x<Xrange && up.x<Xrange; x++,tp.x++,up.x++) | |
| 697 | − memimagedraw(dst, Rect(x, y, x+1, y+1), s, tp, m, up, SoverD); | |
| 698 | − memmove(savedstbits, dst->data->bdata, dst->width*sizeof(ulong)*Yrange); | |
| 699 | − | |
| 700 | − memmove(dst->data->bdata, dstbits, dst->width*sizeof(ulong)*Yrange); | |
| 701 | − | |
| 702 | −DBG print("bigdraw\n"); | |
| 703 | − memimagedraw(dst, dr, src, sp, mask, mp, SoverD); | |
| 704 | − for(y=0; y<Yrange; y++) | |
| 705 | − checkline(dr, drawrepl(src->r, sp), drawrepl(mask->r, mp), y, srcrepl?stmp:nil, maskrepl?mtmp:nil); | |
| 706 | −} | |
| 707 | − | |
| 708 | −void | |
| 709 | −verifyrectrepl(int srcrepl, int maskrepl) | |
| 710 | −{ | |
| 711 | − int i; | |
| 712 | − | |
| 713 | − /* mask all ones */ | |
| 714 | − memset(maskbits, 0xFF, nbytes); | |
| 715 | − for(i=0; i<niters; i++) | |
| 716 | − verifyrectmaskrepl(srcrepl, maskrepl); | |
| 717 | − | |
| 718 | − /* mask all zeros */ | |
| 719 | − memset(maskbits, 0, nbytes); | |
| 720 | − for(i=0; i<niters; i++) | |
| 721 | − verifyrectmaskrepl(srcrepl, maskrepl); | |
| 722 | − | |
| 723 | − /* random mask */ | |
| 724 | − for(i=0; i<niters; i++){ | |
| 725 | − fill(mask, maskbits); | |
| 726 | − verifyrectmaskrepl(srcrepl, maskrepl); | |
| 727 | − } | |
| 728 | −} | |
| 729 | − | |
| 730 | −/* | |
| 731 | − * Trivial draw implementation. | |
| 732 | − * Color values are passed around as ulongs containing ααRRGGBB | |
| 733 | − */ | |
| 734 | − | |
| 735 | −/* | |
| 736 | − * Convert v, which is nhave bits wide, into its nwant bits wide equivalent. | |
| 737 | − * Replicates to widen the value, truncates to narrow it. | |
| 738 | − */ | |
| 739 | −ulong | |
| 740 | −replbits(ulong v, int nhave, int nwant) | |
| 741 | −{ | |
| 742 | − v &= (1<<nhave)-1; | |
| 743 | − for(; nhave<nwant; nhave*=2) | |
| 744 | − v |= v<<nhave; | |
| 745 | − v >>= (nhave-nwant); | |
| 746 | − return v & ((1<<nwant)-1); | |
| 747 | −} | |
| 748 | − | |
| 749 | −/* | |
| 750 | − * Decode a pixel into the uchar* values. | |
| 751 | − */ | |
| 752 | −void | |
| 753 | −pixtorgba(ulong v, uchar *r, uchar *g, uchar *b, uchar *a) | |
| 754 | −{ | |
| 755 | − *a = v>>24; | |
| 756 | − *r = v>>16; | |
| 757 | − *g = v>>8; | |
| 758 | − *b = v; | |
| 759 | −} | |
| 760 | − | |
| 761 | −/* | |
| 762 | − * Convert uchar channels into ulong pixel. | |
| 763 | − */ | |
| 764 | −ulong | |
| 765 | −rgbatopix(uchar r, uchar g, uchar b, uchar a) | |
| 766 | −{ | |
| 767 | − return (a<<24)|(r<<16)|(g<<8)|b; | |
| 768 | −} | |
| 769 | − | |
| 770 | −/* | |
| 771 | − * Retrieve the pixel value at pt in the image. | |
| 772 | − */ | |
| 773 | −ulong | |
| 774 | −getpixel(Memimage *img, Point pt) | |
| 775 | −{ | |
| 776 | − uchar r, g, b, a, *p; | |
| 777 | − int nbits, npack, bpp; | |
| 778 | − ulong v, c, rbits, bits; | |
| 779 | − | |
| 780 | − r = g = b = 0; | |
| 781 | − a = ~0; /* default alpha is full */ | |
| 782 | − | |
| 783 | − p = byteaddr(img, pt); | |
| 784 | − v = p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24); | |
| 785 | − bpp = img->depth; | |
| 786 | − if(bpp<8){ | |
| 787 | − /* | |
| 788 | − * Sub-byte greyscale pixels. | |
| 789 | − * | |
| 790 | − * We want to throw away the top pt.x%npack pixels and then use the next bpp bits | |
| 791 | − * in the bottom byte of v. This madness is due to having big endian bits | |
| 792 | − * but little endian bytes. | |
| 793 | − */ | |
| 794 | − npack = 8/bpp; | |
| 795 | − v >>= 8 - bpp*(pt.x%npack+1); | |
| 796 | − v &= (1<<bpp)-1; | |
| 797 | − r = g = b = replbits(v, bpp, 8); | |
| 798 | − }else{ | |
| 799 | − /* | |
| 800 | − * General case. We need to parse the channel descriptor and do what it says. | |
| 801 | − * In all channels but the color map, we replicate to 8 bits because that's the | |
| 802 | − * precision that all calculations are done at. | |
| 803 | − * | |
| 804 | − * In the case of the color map, we leave the bits alone, in case a color map | |
| 805 | − * with less than 8 bits of index is used. This is currently disallowed, so it's | |
| 806 | − * sort of silly. | |
| 807 | − */ | |
| 808 | − | |
| 809 | − for(c=img->chan; c; c>>=8){ | |
| 810 | − nbits = NBITS(c); | |
| 811 | − bits = v & ((1<<nbits)-1); | |
| 812 | − rbits = replbits(bits, nbits, 8); | |
| 813 | − v >>= nbits; | |
| 814 | − switch(TYPE(c)){ | |
| 815 | − case CRed: | |
| 816 | − r = rbits; | |
| 817 | − break; | |
| 818 | − case CGreen: | |
| 819 | − g = rbits; | |
| 820 | − break; | |
| 821 | − case CBlue: | |
| 822 | − b = rbits; | |
| 823 | − break; | |
| 824 | − case CGrey: | |
| 825 | − r = g = b = rbits; | |
| 826 | − break; | |
| 827 | − case CAlpha: | |
| 828 | − a = rbits; | |
| 829 | − break; | |
| 830 | − case CMap: | |
| 831 | − p = img->cmap->cmap2rgb + 3*bits; | |
| 832 | − r = p[0]; | |
| 833 | − g = p[1]; | |
| 834 | − b = p[2]; | |
| 835 | − break; | |
| 836 | − case CIgnore: | |
| 837 | − break; | |
| 838 | − default: | |
| 839 | − fprint(2, "unknown channel type %lud\n", TYPE(c)); | |
| 840 | − abort(); | |
| 841 | − } | |
| 842 | − } | |
| 843 | − } | |
| 844 | − return rgbatopix(r, g, b, a); | |
| 845 | −} | |
| 846 | − | |
| 847 | −/* | |
| 848 | − * Return the greyscale equivalent of a pixel. | |
| 849 | − */ | |
| 850 | −uchar | |
| 851 | −getgrey(Memimage *img, Point pt) | |
| 852 | −{ | |
| 853 | − uchar r, g, b, a; | |
| 854 | − pixtorgba(getpixel(img, pt), &r, &g, &b, &a); | |
| 855 | − return RGB2K(r, g, b); | |
| 856 | −} | |
| 857 | − | |
| 858 | −/* | |
| 859 | − * Return the value at pt in image, if image is interpreted | |
| 860 | − * as a mask. This means the alpha channel if present, else | |
| 861 | − * the greyscale or its computed equivalent. | |
| 862 | − */ | |
| 863 | −uchar | |
| 864 | −getmask(Memimage *img, Point pt) | |
| 865 | −{ | |
| 866 | − if(img->flags&Falpha) | |
| 867 | − return getpixel(img, pt)>>24; | |
| 868 | − else | |
| 869 | − return getgrey(img, pt); | |
| 870 | −} | |
| 871 | −#undef DBG | |
| 872 | − | |
| 873 | −#define DBG if(0) | |
| 874 | −/* | |
| 875 | − * Write a pixel to img at point pt. | |
| 876 | − * | |
| 877 | − * We do this by reading a 32-bit little endian | |
| 878 | − * value from p and then writing it back | |
| 879 | − * after tweaking the appropriate bits. Because | |
| 880 | − * the data is little endian, we don't have to worry | |
| 881 | − * about what the actual depth is, as long as it is | |
| 882 | − * less than 32 bits. | |
| 883 | − */ | |
| 884 | −void | |
| 885 | −putpixel(Memimage *img, Point pt, ulong nv) | |
| 886 | −{ | |
| 887 | − uchar r, g, b, a, *p, *q; | |
| 888 | − ulong c, mask, bits, v; | |
| 889 | − int bpp, sh, npack, nbits; | |
| 890 | − | |
| 891 | − pixtorgba(nv, &r, &g, &b, &a); | |
| 892 | − | |
| 893 | − p = byteaddr(img, pt); | |
| 894 | − v = p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24); | |
| 895 | − bpp = img->depth; | |
| 896 | −DBG print("v %.8lux...", v); | |
| 897 | − if(bpp < 8){ | |
| 898 | − /* | |
| 899 | − * Sub-byte greyscale pixels. We need to skip the leftmost pt.x%npack pixels, | |
| 900 | − * which is equivalent to skipping the rightmost npack - pt.x%npack - 1 pixels. | |
| 901 | − */ | |
| 902 | − npack = 8/bpp; | |
| 903 | − sh = bpp*(npack - pt.x%npack - 1); | |
| 904 | − bits = RGB2K(r,g,b); | |
| 905 | −DBG print("repl %lux 8 %d = %lux...", bits, bpp, replbits(bits, 8, bpp)); | |
| 906 | − bits = replbits(bits, 8, bpp); | |
| 907 | − mask = (1<<bpp)-1; | |
| 908 | −DBG print("bits %lux mask %lux sh %d...", bits, mask, sh); | |
| 909 | − mask <<= sh; | |
| 910 | − bits <<= sh; | |
| 911 | −DBG print("(%lux & %lux) | (%lux & %lux)", v, ~mask, bits, mask); | |
| 912 | − v = (v & ~mask) | (bits & mask); | |
| 913 | − } else { | |
| 914 | − /* | |
| 915 | − * General case. We need to parse the channel descriptor again. | |
| 916 | − */ | |
| 917 | − sh = 0; | |
| 918 | − for(c=img->chan; c; c>>=8){ | |
| 919 | − nbits = NBITS(c); | |
| 920 | − switch(TYPE(c)){ | |
| 921 | − case CRed: | |
| 922 | − bits = r; | |
| 923 | − break; | |
| 924 | − case CGreen: | |
| 925 | − bits = g; | |
| 926 | − break; | |
| 927 | − case CBlue: | |
| 928 | − bits = b; | |
| 929 | − break; | |
| 930 | − case CGrey: | |
| 931 | − bits = RGB2K(r, g, b); | |
| 932 | − break; | |
| 933 | − case CAlpha: | |
| 934 | − bits = a; | |
| 935 | − break; | |
| 936 | − case CIgnore: | |
| 937 | − bits = 0; | |
| 938 | − break; | |
| 939 | − case CMap: | |
| 940 | − q = img->cmap->rgb2cmap; | |
| 941 | − bits = q[(r>>4)*16*16+(g>>4)*16+(b>>4)]; | |
| 942 | − break; | |
| 943 | − default: | |
| 944 | − SET(bits); | |
| 945 | − fprint(2, "unknown channel type %lud\n", TYPE(c)); | |
| 946 | − abort(); | |
| 947 | − } | |
| 948 | − | |
| 949 | −DBG print("repl %lux 8 %d = %lux...", bits, nbits, replbits(bits, 8, nbits)); | |
| 950 | − if(TYPE(c) != CMap) | |
| 951 | − bits = replbits(bits, 8, nbits); | |
| 952 | − mask = (1<<nbits)-1; | |
| 953 | −DBG print("bits %lux mask %lux sh %d...", bits, mask, sh); | |
| 954 | − bits <<= sh; | |
| 955 | − mask <<= sh; | |
| 956 | − v = (v & ~mask) | (bits & mask); | |
| 957 | − sh += nbits; | |
| 958 | − } | |
| 959 | − } | |
| 960 | −DBG print("v %.8lux\n", v); | |
| 961 | − p[0] = v; | |
| 962 | − p[1] = v>>8; | |
| 963 | − p[2] = v>>16; | |
| 964 | − p[3] = v>>24; | |
| 965 | −} | |
| 966 | −#undef DBG | |
| 967 | − | |
| 968 | −#define DBG if(0) | |
| 969 | −void | |
| 970 | −drawonepixel(Memimage *dst, Point dp, Memimage *src, Point sp, Memimage *mask, Point mp) | |
| 971 | −{ | |
| 972 | − uchar m, M, sr, sg, sb, sa, sk, dr, dg, db, da, dk; | |
| 973 | − | |
| 974 | − pixtorgba(getpixel(dst, dp), &dr, &dg, &db, &da); | |
| 975 | − pixtorgba(getpixel(src, sp), &sr, &sg, &sb, &sa); | |
| 976 | − m = getmask(mask, mp); | |
| 977 | − M = 255-(sa*m)/255; | |
| 978 | − | |
| 979 | −DBG print("dst %x %x %x %x src %x %x %x %x m %x = ", dr,dg,db,da, sr,sg,sb,sa, m); | |
| 980 | − if(dst->flags&Fgrey){ | |
| 981 | − /* | |
| 982 | − * We need to do the conversion to grey before the alpha calculation | |
| 983 | − * because the draw operator does this, and we need to be operating | |
| 984 | − * at the same precision so we get exactly the same answers. | |
| 985 | − */ | |
| 986 | − sk = RGB2K(sr, sg, sb); | |
| 987 | − dk = RGB2K(dr, dg, db); | |
| 988 | − dk = (sk*m + dk*M)/255; | |
| 989 | − dr = dg = db = dk; | |
| 990 | − da = (sa*m + da*M)/255; | |
| 991 | − }else{ | |
| 992 | − /* | |
| 993 | − * True color alpha calculation treats all channels (including alpha) | |
| 994 | − * the same. It might have been nice to use an array, but oh well. | |
| 995 | − */ | |
| 996 | − dr = (sr*m + dr*M)/255; | |
| 997 | − dg = (sg*m + dg*M)/255; | |
| 998 | − db = (sb*m + db*M)/255; | |
| 999 | − da = (sa*m + da*M)/255; | |
| 1000 | − } | |
| 1001 | − | |
| 1002 | −DBG print("%x %x %x %x\n", dr,dg,db,da); | |
| 1003 | − putpixel(dst, dp, rgbatopix(dr, dg, db, da)); | |
| 1004 | −} | |
| @@ -124,7 +124,7 @@ memellipse(Memimage *dst, Point c, int a, int b, int t, Memimage *src, Point sp, · 123 unmodified lines | ||
| 124 | 124 | p.op = op; |
| 125 | 125 | |
| 126 | 126 | u = (t<<1)*(a-b); |
| 127 | − if((b<a && u>b*b) || (a<b && -u>a*a)) { | |
| 127 | + if(b<a && u>b*b || a<b && -u>a*a) { | |
| 128 | 128 | /* if(b<a&&(t<<1)>b*b/a || a<b&&(t<<1)>a*a/b) # very thick */ |
| 129 | 129 | bellipse(b, newstate(&in, a, b), &p); |
| 130 | 130 | return; |
| @@ -209,7 +209,7 @@ erect(int x0, int y0, int x1, int y1, Param *p) · 78 unmodified lines | ||
| 209 | 209 | { |
| 210 | 210 | Rectangle r; |
| 211 | 211 | |
| 212 | −/* print("R %d,%d %d,%d\n", x0, y0, x1, y1); */ | |
| 212 | +/* print("R %d,%d %d,%d\n", x0, y0, x1, y1); /**/ | |
| 213 | 213 | r = Rect(p->c.x+x0, p->c.y+y0, p->c.x+x1+1, p->c.y+y1+1); |
| 214 | 214 | memdraw(p->dst, r, p->src, addpt(p->sp, r.min), memopaque, p00, p->op); |
| 215 | 215 | } |
| @@ -224,7 +224,7 @@ epoint(int x, int y, Param *p) · 8 unmodified lines | ||
| 224 | 224 | Point p0; |
| 225 | 225 | Rectangle r; |
| 226 | 226 | |
| 227 | −/* print("P%d %d,%d\n", p->t, x, y); */ | |
| 227 | +/* print("P%d %d,%d\n", p->t, x, y); /**/ | |
| 228 | 228 | p0 = Pt(p->c.x+x, p->c.y+y); |
| 229 | 229 | r = Rpt(addpt(p0, p->disc->r.min), addpt(p0, p->disc->r.max)); |
| 230 | 230 | memdraw(p->dst, r, p->src, addpt(p->sp, r.min), p->disc, p->disc->r.min, p->op); |
| @@ -237,7 +237,7 @@ static · 6 unmodified lines | ||
| 237 | 237 | void |
| 238 | 238 | eline(int x0, int y0, int x1, int y1, Param *p) |
| 239 | 239 | { |
| 240 | −/* print("L%d %d,%d %d,%d\n", p->t, x0, y0, x1, y1); */ | |
| 240 | +/* print("L%d %d,%d %d,%d\n", p->t, x0, y0, x1, y1); /**/ | |
| 241 | 241 | if(x1 > x0+1) |
| 242 | 242 | erect(x0+1, y0-p->t, x1-1, y1+p->t, p); |
| 243 | 243 | else if(y1 > y0+1) |
| @@ -26,7 +26,6 @@ static int zcompare(const void*, const void*); · 25 unmodified lines | ||
| 26 | 26 | static void xscan(Memimage *dst, Seg **seg, Seg *segtab, int nseg, int wind, Memimage *src, Point sp, int, int, int, int); |
| 27 | 27 | static void yscan(Memimage *dst, Seg **seg, Seg *segtab, int nseg, int wind, Memimage *src, Point sp, int, int); |
| 28 | 28 | |
| 29 | −#ifdef NOT | |
| 30 | 29 | static void |
| 31 | 30 | fillcolor(Memimage *dst, int left, int right, int y, Memimage *src, Point p) |
| 32 | 31 | { |
| @@ -38,7 +37,6 @@ fillcolor(Memimage *dst, int left, int right, int y, Memimage *src, Point p) · 5 unmodified lines | ||
| 38 | 37 | p.y = y; |
| 39 | 38 | memset(byteaddr(dst, p), srcval, right-left); |
| 40 | 39 | } |
| 41 | −#endif | |
| 42 | 40 | |
| 43 | 41 | static void |
| 44 | 42 | fillline(Memimage *dst, int left, int right, int y, Memimage *src, Point p, int op) |
| @@ -81,7 +79,7 @@ _memfillpolysc(Memimage *dst, Point *vert, int nvert, int w, Memimage *src, Poin · 36 unmodified lines | ||
| 81 | 79 | Point p0; |
| 82 | 80 | int i; |
| 83 | 81 | |
| 84 | − if(nvert == 0) | |
| 82 | + if(nvert <= 0) | |
| 85 | 83 | return; |
| 86 | 84 | |
| 87 | 85 | seg = malloc((nvert+2)*sizeof(Seg*)); |
| @@ -11,7 +11,6 @@ enum · 10 unmodified lines | ||
| 11 | 11 | Arrow3 = 3, |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | −#ifdef NOT | |
| 15 | 14 | static |
| 16 | 15 | int |
| 17 | 16 | lmin(int a, int b) |
| @@ -20,7 +19,6 @@ lmin(int a, int b) · 2 unmodified lines | ||
| 20 | 19 | return a; |
| 21 | 20 | return b; |
| 22 | 21 | } |
| 23 | −#endif | |
| 24 | 22 | |
| 25 | 23 | static |
| 26 | 24 | int |
| @@ -370,6 +368,7 @@ _memimageline(Memimage *dst, Point p0, Point p1, int end0, int end1, int radius, · 343 unmodified lines | ||
| 370 | 368 | r.max.y += radius+1; |
| 371 | 369 | } |
| 372 | 370 | oclipr = dst->clipr; |
| 371 | + sp = addpt(r.min, d); | |
| 373 | 372 | dst->clipr = clipr; |
| 374 | 373 | memimagedraw(dst, r, src, sp, memopaque, sp, op); |
| 375 | 374 | dst->clipr = oclipr; |
| @@ -422,7 +421,7 @@ _memimageline(Memimage *dst, Point p0, Point p1, int end0, int end1, int radius, · 46 unmodified lines | ||
| 422 | 421 | break; |
| 423 | 422 | case Endarrow: |
| 424 | 423 | arrowend(q, pp, end1, sin, cos, radius); |
| 425 | − _memfillpolysc(dst, pp, 5, ~0, src, addpt(pts[0], mulpt(d, ICOSSCALE)), 1, 10, 1, op); | |
| 424 | + _memfillpolysc(dst, pp, 5, ~0, src, addpt(pp[0], mulpt(d, ICOSSCALE)), 1, 10, 1, op); | |
| 426 | 425 | pp[1] = pp[4]; |
| 427 | 426 | pp += 2; |
| 428 | 427 | } |
| @@ -4,13 +4,20 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <memdraw.h> |
| 5 | 5 | |
| 6 | 6 | int |
| 7 | −_loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 7 | +loadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) | |
| 8 | 8 | { |
| 9 | 9 | int y, l, lpart, rpart, mx, m, mr; |
| 10 | + Memdrawparam par; | |
| 10 | 11 | uchar *q; |
| 11 | 12 | |
| 12 | − if(!rectinrect(r, i->r)) | |
| 13 | + if(badrect(r) || !rectinrect(r, i->r)) | |
| 13 | 14 | return -1; |
| 15 | + | |
| 16 | + memset(&par, 0, sizeof par); | |
| 17 | + par.dst = i; | |
| 18 | + par.r = r; | |
| 19 | + hwdraw(&par); | |
| 20 | + | |
| 14 | 21 | l = bytesperline(r, i->depth); |
| 15 | 22 | if(ndata < l*Dy(r)) |
| 16 | 23 | return -1; |
| @@ -20,15 +20,19 @@ openmemsubfont(char *name) · 19 unmodified lines | ||
| 20 | 20 | i = readmemimage(fd); |
| 21 | 21 | if(i == nil) |
| 22 | 22 | goto Err; |
| 23 | − if(read(fd, hdr, 3*12) != 3*12){ | |
| 23 | + if(readn(fd, hdr, 3*12) != 3*12){ | |
| 24 | 24 | werrstr("openmemsubfont: header read error: %r"); |
| 25 | 25 | goto Err; |
| 26 | 26 | } |
| 27 | 27 | n = atoi(hdr); |
| 28 | + if(n <= 0 || n > 0x7fff){ | |
| 29 | + werrstr("openmemsubfont: bad fontchar count %d", n); | |
| 30 | + goto Err; | |
| 31 | + } | |
| 28 | 32 | p = malloc(6*(n+1)); |
| 29 | 33 | if(p == nil) |
| 30 | 34 | goto Err; |
| 31 | − if(read(fd, p, 6*(n+1)) != 6*(n+1)){ | |
| 35 | + if(readn(fd, p, 6*(n+1)) != 6*(n+1)){ | |
| 32 | 36 | werrstr("openmemsubfont: fontchar read error: %r"); |
| 33 | 37 | goto Err; |
| 34 | 38 | } |
| @@ -41,13 +45,12 @@ openmemsubfont(char *name) · 6 unmodified lines | ||
| 41 | 45 | free(fc); |
| 42 | 46 | goto Err; |
| 43 | 47 | } |
| 48 | + close(fd); | |
| 44 | 49 | free(p); |
| 45 | 50 | return sf; |
| 46 | 51 | Err: |
| 47 | 52 | close(fd); |
| 48 | − if (i != nil) | |
| 49 | − freememimage(i); | |
| 50 | − if (p != nil) | |
| 51 | − free(p); | |
| 53 | + free(p); | |
| 54 | + freememimage(i); | |
| 52 | 55 | return nil; |
| 53 | 56 | } |
| @@ -85,10 +85,6 @@ readmemimage(int fd) · 84 unmodified lines | ||
| 85 | 85 | dy = maxy - miny; |
| 86 | 86 | if(dy*l > chunk) |
| 87 | 87 | dy = chunk/l; |
| 88 | − if(dy <= 0){ | |
| 89 | − werrstr("readmemimage: image too wide for buffer"); | |
| 90 | − goto Err; | |
| 91 | − } | |
| 92 | 88 | n = dy*l; |
| 93 | 89 | m = readn(fd, tmp, n); |
| 94 | 90 | if(m != n){ |
| @@ -13,7 +13,7 @@ memimagestring(Memimage *b, Point p, Memimage *color, Point cp, Memsubfont *f, c · 12 unmodified lines | ||
| 13 | 13 | Fontchar *i; |
| 14 | 14 | |
| 15 | 15 | s = (uchar*)cs; |
| 16 | − for(; (c=*s); p.x+=width, cp.x+=width){ | |
| 16 | + for(; c=*s; p.x+=width, cp.x+=width){ | |
| 17 | 17 | width = 0; |
| 18 | 18 | if(c < Runeself) |
| 19 | 19 | s++; |
| @@ -27,8 +27,7 @@ memimagestring(Memimage *b, Point p, Memimage *color, Point cp, Memsubfont *f, c · 7 unmodified lines | ||
| 27 | 27 | } |
| 28 | 28 | if(c >= f->n) |
| 29 | 29 | continue; |
| 30 | −// i = f->info+c; | |
| 31 | − i = &(f->info[c]); | |
| 30 | + i = f->info+c; | |
| 32 | 31 | width = i->width; |
| 33 | 32 | memdraw(b, Rect(p.x+i->left, p.y+i->top, p.x+i->left+(i[1].x-i[0].x), p.y+i->bottom), |
| 34 | 33 | color, cp, f->bits, Pt(i->x, i->top), SoverD); |
| @@ -47,7 +46,7 @@ memsubfontwidth(Memsubfont *f, char *cs) · 12 unmodified lines | ||
| 47 | 46 | |
| 48 | 47 | p = Pt(0, f->height); |
| 49 | 48 | s = (uchar*)cs; |
| 50 | − for(; (c=*s); p.x+=width){ | |
| 49 | + for(; c=*s; p.x+=width){ | |
| 51 | 50 | width = 0; |
| 52 | 51 | if(c < Runeself) |
| 53 | 52 | s++; |
| @@ -30,5 +30,6 @@ freememsubfont(Memsubfont *f) · 29 unmodified lines | ||
| 30 | 30 | return; |
| 31 | 31 | free(f->info); /* note: f->info must have been malloc'ed! */ |
| 32 | 32 | freememimage(f->bits); |
| 33 | + free(f->name); | |
| 33 | 34 | free(f); |
| 34 | 35 | } |
| @@ -9,7 +9,7 @@ unloadmemimage(Memimage *i, Rectangle r, uchar *data, int ndata) · 8 unmodified lines | ||
| 9 | 9 | int y, l; |
| 10 | 10 | uchar *q; |
| 11 | 11 | |
| 12 | − if(!rectinrect(r, i->r)) | |
| 12 | + if(badrect(r) || !rectinrect(r, i->r)) | |
| 13 | 13 | return -1; |
| 14 | 14 | l = bytesperline(r, i->depth); |
| 15 | 15 | if(ndata < l*Dy(r)) |
| @@ -27,12 +27,10 @@ writememimage(int fd, Memimage *i) · 26 unmodified lines | ||
| 27 | 27 | uchar *line, *eline; /* input line, end pointer */ |
| 28 | 28 | uchar *data, *edata; /* input buffer, end pointer */ |
| 29 | 29 | ulong n; /* length of input buffer */ |
| 30 | − ulong nb; /* # of bytes returned by unloadimage */ | |
| 31 | 30 | int bpl; /* input line length */ |
| 32 | 31 | int offs, runlen; /* offset, length of consumed data */ |
| 33 | 32 | uchar dumpbuf[NDUMP]; /* dump accumulator */ |
| 34 | 33 | int ndump; /* length of dump accumulator */ |
| 35 | − int miny, dy; /* y values while unloading input */ | |
| 36 | 34 | int ncblock; /* size of compressed blocks */ |
| 37 | 35 | Rectangle r; |
| 38 | 36 | uchar *p, *q, *s, *es, *t; |
| @@ -41,28 +39,36 @@ writememimage(int fd, Memimage *i) · 2 unmodified lines | ||
| 41 | 39 | |
| 42 | 40 | r = i->r; |
| 43 | 41 | bpl = bytesperline(r, i->depth); |
| 42 | + ncblock = _compblocksize(r, i->depth); | |
| 43 | + if(ncblock > CHUNK){ | |
| 44 | + sprint(hdr, "%11s %11d %11d %11d %11d ", | |
| 45 | + chantostr(cbuf, i->chan), r.min.x, r.min.y, r.max.x, r.max.y); | |
| 46 | + if(write(fd, hdr, 5*12) != 5*12) | |
| 47 | + return -1; | |
| 48 | + for(; r.min.y < r.max.y; r.min.y++) | |
| 49 | + if(write(fd, byteaddr(i, r.min), bpl) != bpl) | |
| 50 | + return -1; | |
| 51 | + return 0; | |
| 52 | + } | |
| 53 | + | |
| 44 | 54 | n = Dy(r)*bpl; |
| 45 | 55 | data = malloc(n); |
| 46 | − ncblock = _compblocksize(r, i->depth); | |
| 56 | + if(data == 0){ | |
| 57 | + ErrOut0: | |
| 58 | + free(data); | |
| 59 | + return -1; | |
| 60 | + } | |
| 61 | + if(unloadmemimage(i, r, data, n) != n) | |
| 62 | + goto ErrOut0; | |
| 47 | 63 | outbuf = malloc(ncblock); |
| 48 | 64 | hash = malloc(NHASH*sizeof(Hlist)); |
| 49 | 65 | chain = malloc(NMEM*sizeof(Hlist)); |
| 50 | − if(data == 0 || outbuf == 0 || hash == 0 || chain == 0){ | |
| 66 | + if(outbuf == 0 || hash == 0 || chain == 0){ | |
| 51 | 67 | ErrOut: |
| 52 | − free(data); | |
| 53 | 68 | free(outbuf); |
| 54 | 69 | free(hash); |
| 55 | 70 | free(chain); |
| 56 | − return -1; | |
| 57 | − } | |
| 58 | − for(miny = r.min.y; miny != r.max.y; miny += dy){ | |
| 59 | − dy = r.max.y-miny; | |
| 60 | − if(dy*bpl > CHUNK) | |
| 61 | − dy = CHUNK/bpl; | |
| 62 | − nb = unloadmemimage(i, Rect(r.min.x, miny, r.max.x, miny+dy), | |
| 63 | − data+(miny-r.min.y)*bpl, dy*bpl); | |
| 64 | − if(nb != dy*bpl) | |
| 65 | − goto ErrOut; | |
| 71 | + goto ErrOut0; | |
| 66 | 72 | } |
| 67 | 73 | sprint(hdr, "compressed\n%11s %11d %11d %11d %11d ", |
| 68 | 74 | chantostr(cbuf, i->chan), r.min.x, r.min.y, r.max.x, r.max.y); |
| @@ -42,7 +42,7 @@ ldrawop(Memimage *dst, Rectangle screenr, Rectangle clipr, void *etc, int insave · 41 unmodified lines | ||
| 42 | 42 | if(!rectinrect(r, clipr)){ |
| 43 | 43 | oclipr = dst->clipr; |
| 44 | 44 | dst->clipr = clipr; |
| 45 | − ok = drawclip(dst, &r, d->src, &p0, d->mask, &p1, &srcr, &mr); | |
| 45 | + ok = drawclipnorepl(dst, &r, d->src, &p0, d->mask, &p1, &srcr, &mr); | |
| 46 | 46 | dst->clipr = oclipr; |
| 47 | 47 | if(!ok) |
| 48 | 48 | return; |
| @@ -74,7 +74,7 @@ if(drawdebug) iprint("mask->layer != nil\n"); · 25 unmodified lines | ||
| 74 | 74 | return; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | − if(drawclip(dst, &r, src, &p0, mask, &p1, &srcr, &mr) == 0){ | |
| 77 | + if(drawclipnorepl(dst, &r, src, &p0, mask, &p1, &srcr, &mr) == 0){ | |
| 78 | 78 | if(drawdebug) iprint("drawclip dstcr %R srccr %R maskcr %R\n", dst->clipr, src->clipr, mask->clipr); |
| 79 | 79 | return; |
| 80 | 80 | } |
| @@ -19,7 +19,7 @@ memlalloc(Memscreen *s, Rectangle screenr, Refreshfn refreshfn, void *refreshptr · 18 unmodified lines | ||
| 19 | 19 | paint->clipr = Rect(-0x3FFFFFF, -0x3FFFFFF, 0x3FFFFFF, 0x3FFFFFF); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | − n = allocmemimaged(screenr, s->image->chan, s->image->data, s->image->X); | |
| 22 | + n = allocmemimaged(screenr, s->image->chan, s->image->data); | |
| 23 | 23 | if(n == nil) |
| 24 | 24 | return nil; |
| 25 | 25 | l = malloc(sizeof(Memlayer)); |
| @@ -10,13 +10,13 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr) · 9 unmodified lines | ||
| 10 | 10 | Memlayer *l; |
| 11 | 11 | |
| 12 | 12 | l = i->layer; |
| 13 | − if(l->refreshfn!=0 && fn!=0){ /* just change functions */ | |
| 13 | + if(l->refreshfn!=nil && fn!=nil){ /* just change functions */ | |
| 14 | 14 | l->refreshfn = fn; |
| 15 | 15 | l->refreshptr = ptr; |
| 16 | 16 | return 1; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | − if(l->refreshfn == 0){ /* is using backup image; just free it */ | |
| 19 | + if(l->refreshfn == nil){ /* is using backup image; just free it */ | |
| 20 | 20 | freememimage(l->save); |
| 21 | 21 | l->save = nil; |
| 22 | 22 | l->refreshfn = fn; |
| @@ -29,7 +29,7 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr) · 6 unmodified lines | ||
| 29 | 29 | return 0; |
| 30 | 30 | /* easiest way is just to update the entire save area */ |
| 31 | 31 | l->refreshfn(i, i->r, l->refreshptr); |
| 32 | − l->refreshfn = 0; | |
| 32 | + l->refreshfn = nil; | |
| 33 | 33 | l->refreshptr = nil; |
| 34 | 34 | return 1; |
| 35 | 35 | } |
| @@ -35,7 +35,7 @@ memunload(Memimage *src, Rectangle r, uchar *data, int n) · 34 unmodified lines | ||
| 35 | 35 | * src is an obscured layer or data is unaligned |
| 36 | 36 | */ |
| 37 | 37 | if(dl->save && dx==0){ |
| 38 | − if(dl->refreshfn != 0) | |
| 38 | + if(dl->refreshfn != nil) | |
| 39 | 39 | return -1; /* can't unload window if it's not Refbackup */ |
| 40 | 40 | if(n > 0) |
| 41 | 41 | memlhide(src, r); |