aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/basenodes/textures/default_tree.png
blob: 189ec15930efcac4f49972c6406ac7efb3d3d713 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 02 00 00 00 90 91 68 .PNG........IHDR...............h
0020 36 00 00 02 5a 49 44 41 54 78 01 62 0c f3 00 14 04 57 59 ce db 60 00 40 a5 4f 6c c5 ce c4 f1 50 6...ZIDATx.b.....WY..`.@.Ol....P
0040 99 99 bb 82 ee ff 9c c2 6b 99 9b 7f 3c b1 13 19 24 0b 7b ef 07 c2 a4 7f dc 0a 45 bf a5 84 d5 cb ........k...<...$.{.......E.....
0060 6c 6c 77 b8 7d 4e 83 35 2c cd eb 80 c9 37 1f bf fc dd 2f ff 75 7c 77 46 13 4c 8b 7b 72 70 a3 38 llw.}N.5,....7..../.u|wF.L.{rp.8
0080 ec d1 5f eb 8c 90 fc f7 1a 37 ef a3 e5 88 88 df 53 a0 22 07 8a 4e ab 1b 51 3e 1e 39 40 a5 ee ef .._......7......S."..N..Q>.9@...
00a0 d9 ae 52 5f df ab 92 3c 84 7c 7c 68 83 df 0e 84 34 35 3b 44 9a 03 be 9e d7 3b 4c 6d 6f ad 2d d0 ..R_...<.||h....45;D.....;Lmo.-.
00c0 44 56 17 c6 3d b9 42 8a 4c 2c 38 e4 39 fe 3a bb 60 63 7f 1a 4a 2c c3 18 16 93 c4 63 5b a9 02 a6 DV..=.B.L,8.9.:.`c..J,.....c[...
00e0 c0 cb 0f 8a ea 55 bf 22 6f 1a f9 4e 43 81 30 9c 82 62 34 72 31 84 b2 ef 0e 35 c1 a7 69 68 f8 fa .....U."o..NC.0..b4r1....5..ih..
0100 cc 0a bb c1 30 ce b0 4b 0c f9 d9 e5 f8 f0 4e 53 63 5d 10 bc 52 a9 53 de e8 06 9f bd d1 7a 12 cf ....0..K......NSc]..R.S......z..
0120 53 a9 a4 38 92 9d f5 04 16 ef fe 8d 39 6c 7c f8 61 82 ec 6f ef d3 5f b3 15 8a 0c 43 34 d1 f5 ce S..8........9l|.a..o.._....C4...
0140 68 ce 33 c1 34 8a b6 65 37 3b 80 bf 7f 3a 39 7b ed c7 65 b0 e4 64 c4 be b4 98 a0 96 0b 49 a4 d2 h.3.4..e7;...:9{..e..d.......I..
0160 b4 25 62 df d5 ad 00 97 50 1a ad 8d 08 fe f3 29 d1 6a cc fc d7 e9 d2 36 ec 0c 76 a7 31 d6 64 5a .%b.....P......).j.....6..v.1.dZ
0180 4c 8d d0 e6 3c bd d8 c7 57 94 00 ea 19 36 ab 05 1b 22 72 34 db 21 fb 34 99 f2 c7 2f 27 88 a2 37 L...<...W....6..."r4.!.4.../'..7
01a0 e3 43 5d 9b cc 86 ab 9b 81 31 d5 4c d9 8a 3d 1c 69 05 2f 37 9a 71 31 85 8c 21 27 6c 2f 5e f9 52 .C]......1.L..=.i./7.q1..!'l/^.R
01c0 fa ff 62 a9 d3 9b 5a de 3f d6 15 09 0f a4 5a d6 14 47 87 66 04 9d a6 4c 38 bb 4a 2a 19 81 fc a2 ..b...Z.?.....Z..G.f...L8.J*....
01e0 ef 67 6b 2f 26 cc e7 22 39 7a 61 d6 bf 46 bc e6 a7 30 2f 9b 27 69 4f e0 a1 d6 9b d7 31 4f bb 9c .gk/&.."9za..F...0/.'iO.....1O..
0200 69 49 4f 93 4f de 8f de 49 9a e4 9d c8 26 a8 1a 23 c7 99 4f 4f 65 a9 33 86 f6 dd 4e 6d 8e 10 12 iIO.O...I....&..#..OOe.3...Nm...
0220 25 0d 3d 52 4a de 13 c2 38 1f 4b 91 b3 df 30 f2 33 be 40 da 2b 7d 39 a3 73 b0 70 f5 d7 a4 78 c7 %.=RJ...8.K...0.3.@.+}9.s.p...x.
0240 e9 5a 50 ea 98 c6 25 34 42 00 3e c8 38 86 b0 ce 93 12 96 0b f1 cc 36 a9 b9 f7 85 72 e3 4d c2 b9 .ZP...%4B.>.8.........6....r.M..
0260 66 55 a0 fb 04 2f 1f 95 20 40 1e d8 b8 25 9a 23 28 86 28 7d a8 d0 3f cf db fd 81 41 14 ff 03 f0 fU.../...@...%.#(.(}..?....A....
0280 4a 7a 15 0b a6 f1 71 00 00 00 00 49 45 4e 44 ae 42 60 82 Jz....q....IEND.B`.
d='n165' href='#n165'>165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711
/*
** $Id: lgc.c,v 2.38.1.1 2007/12/27 13:02:25 roberto Exp $
** Garbage Collector
** See Copyright Notice in lua.h
*/

#include <string.h>

#define lgc_c
#define LUA_CORE

#include "lua.h"

#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"


#define GCSTEPSIZE	1024u
#define GCSWEEPMAX	40
#define GCSWEEPCOST	10
#define GCFINALIZECOST	100


#define maskmarks	cast_byte(~(bitmask(BLACKBIT)|WHITEBITS))

#define makewhite(g,x)	\
   ((x)->gch.marked = cast_byte(((x)->gch.marked & maskmarks) | luaC_white(g)))

#define white2gray(x)	reset2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)
#define black2gray(x)	resetbit((x)->gch.marked, BLACKBIT)

#define stringmark(s)	reset2bits((s)->tsv.marked, WHITE0BIT, WHITE1BIT)


#define isfinalized(u)		testbit((u)->marked, FINALIZEDBIT)
#define markfinalized(u)	l_setbit((u)->marked, FINALIZEDBIT)


#define KEYWEAK         bitmask(KEYWEAKBIT)
#define VALUEWEAK       bitmask(VALUEWEAKBIT)



#define markvalue(g,o) { checkconsistency(o); \
  if (iscollectable(o) && iswhite(gcvalue(o))) reallymarkobject(g,gcvalue(o)); }

#define markobject(g,t) { if (iswhite(obj2gco(t))) \
		reallymarkobject(g, obj2gco(t)); }


#define setthreshold(g)  (g->GCthreshold = (g->estimate/100) * g->gcpause)


static void removeentry (Node *n) {
  lua_assert(ttisnil(gval(n)));
  if (iscollectable(gkey(n)))
    setttype(gkey(n), LUA_TDEADKEY);  /* dead key; remove it */
}


static void reallymarkobject (global_State *g, GCObject *o) {
  lua_assert(iswhite(o) && !isdead(g, o));
  white2gray(o);
  switch (o->gch.tt) {
    case LUA_TSTRING: {
      return;
    }
    case LUA_TUSERDATA: {
      Table *mt = gco2u(o)->metatable;
      gray2black(o);  /* udata are never gray */
      if (mt) markobject(g, mt);
      markobject(g, gco2u(o)->env);
      return;
    }
    case LUA_TUPVAL: {
      UpVal *uv = gco2uv(o);
      markvalue(g, uv->v);
      if (uv->v == &uv->u.value)  /* closed? */
        gray2black(o);  /* open upvalues are never black */
      return;
    }
    case LUA_TFUNCTION: {
      gco2cl(o)->c.gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TTABLE: {
      gco2h(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TTHREAD: {
      gco2th(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TPROTO: {
      gco2p(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    default: lua_assert(0);
  }
}


static void marktmu (global_State *g) {
  GCObject *u = g->tmudata;
  if (u) {
    do {
      u = u->gch.next;
      makewhite(g, u);  /* may be marked, if left from previous GC */
      reallymarkobject(g, u);
    } while (u != g->tmudata);
  }
}


/* move `dead' udata that need finalization to list `tmudata' */
size_t luaC_separateudata (lua_State *L, int all) {
  global_State *g = G(L);
  size_t deadmem = 0;
  GCObject **p = &g->mainthread->next;
  GCObject *curr;
  while ((curr = *p) != NULL) {
    if (!(iswhite(curr) || all) || isfinalized(gco2u(curr)))
      p = &curr->gch.next;  /* don't bother with them */
    else if (fasttm(L, gco2u(curr)->metatable, TM_GC) == NULL) {
      markfinalized(gco2u(curr));  /* don't need finalization */
      p = &curr->gch.next;
    }
    else {  /* must call its gc method */
      deadmem += sizeudata(gco2u(curr));
      markfinalized(gco2u(curr));
      *p = curr->gch.next;
      /* link `curr' at the end of `tmudata' list */
      if (g->tmudata == NULL)  /* list is empty? */
        g->tmudata = curr->gch.next = curr;  /* creates a circular list */
      else {
        curr->gch.next = g->tmudata->gch.next;
        g->tmudata->gch.next = curr;
        g->tmudata = curr;
      }
    }
  }
  return deadmem;