Overview
Comment: | Implement crushing (similar to pieces being crushed in ZZT if they cannot be pushed). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
08e70148057edfb8b81af4e61091673c |
User & Date: | user on 2022-07-04 05:43:46 |
Other Links: | manifest | tags |
Context
2022-07-06
| ||
05:20 | Several changes needed to allow coordinate input to be implemented in future (including the CLICK message and InputXY keyword). Also fixes a bug that was caused by changing MoveItem from Uint8 to Uint16. check-in: 156b0a7c35 user: user tags: trunk | |
2022-07-04
| ||
05:43 | Implement crushing (similar to pieces being crushed in ZZT if they cannot be pushed). check-in: 08e7014805 user: user tags: trunk | |
2022-07-02
| ||
16:14 | Implement -O switch to output private solutions on stdout. check-in: 169561bd42 user: user tags: trunk | |
Changes
Modified TODO from [c10bc30f0b] to [2d7748f974].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + | * Picture editor/loading * Allowing more altimages * Batch insert multiple dependent image lumps * Puzzle set catalog format (using with internet; a separate program) * Inventory/replay hybrid view * Scrollable playfield view * Auto scroll option (using Player flag) * Configurable auto scroll option * Manual scroll option * Bookmarks * Message trace menu to enable/disable * Bugs * Figure out why the $SeekerCloser class doesn't seem to work properly * Level 232 of SUPERHRO puzzle set (the Lava shouldn't expand? why?) * Animation stopping unexpectedly (until a key is pushed) |
︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + + | * Branching replay recording * Slow movement displaying state between triggers * Warning if file changed when uncommited data exists in the cache database * Composite puzzle set format (implemented) * Optional hypertext help * Compressed class definitions (?) * Option to auto display level titles * Option to use a separate solution file * Multiuser scoring within one computer system (optional capability) * Testing * Bizarro world * Connection movement (it is partially tested, already) * Sweep, SweepEx, HitMe * Overriding order of execution * Conversion from other games * DOS Hero Hearts |
︙ |
Modified class.c from [565233454d] to [1c13f6111e].
︙ | |||
2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 | 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 | + | case OP_STEALTHY: cl->oflags|=OF_STEALTHY; break; case OP_USERSTATE: cl->oflags|=OF_USERSTATE; break; case OP_BIZARRO: cl->oflags|=OF_BIZARRO; break; case OP_SHOVABLE: cl->shovable=0x55; break; case OP_USERFLAG: class_user_flag(cl); break; case OP_ABSTRACT: cl->cflags|=CF_GROUP; break; case OP_CONNECTION: cl->oflags|=OF_CONNECTION; break; case OP_CRUSH: cl->oflags|=OF_CRUSH; break; case 0x4000 ... 0x7FFF: set_super_class(cl,ptr); ptr=2; break; default: ParseError("Invalid directly inside of a class definition\n"); } } else if(Tokenf(TF_CLOSE)) { break; } else { ParseError("Invalid directly inside of a class definition\n"); |
︙ |
Modified class.doc from [854a736d64] to [5a72b72b63].
︙ | |||
411 412 413 414 415 416 417 418 419 420 421 422 423 424 | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | + + + | ,Compatible Sets the Compatible flag for this class, but removes the restriction of some variables limited to 16-bits. Connection Sets the Connection flag for this class. Crush Sets the Crush flag for this class. (DefaultImage <list...>) Each entry is either a number of an image in this class, or two numbers in parentheses giving a range of images, or () to indicate that there are no default images. This specifies which images can be used in objects of this class which are initially present on the level (placed in the editor). If () is used, then this class is not available in the editor. If there is no (DefaultImage) block, |
︙ | |||
497 498 499 500 501 502 503 | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | - + | dispatch block matches and it is not a key which is implicitly ignored, and Arg3 is both zero, then it will execute this block instead. Player Set the Player flag for this class. (Queen <code...>) |
︙ | |||
930 931 932 933 934 935 936 937 938 939 940 941 942 943 | 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | + + + + + + | Connection : bool [c] If this flag is set, then moving this object by the use of the Move instruction will try to move an entire connected group of objects, instead of only one. This changes some of the behaviour and will cause additional messages to be sent, too. Deferred movement is not possible if this flag is set. Crush : bool [c] If this flag is set, then objects that try to move into it will destroy it if it is unable to shove it out of the way. Unlike sharpness checking, crushing is checked after shoving instead of before. Crushing is never possible if warping occurs. Density : int16/int32 [c] Determines the order that objects are stacked within each cell. When an object is moved or created, its Density is compared with the Density of the objects already present at that location, in order to insert it into the stack of objects there, at the top, bottom, or middle, where lesser numbers mean closer to the top, and greater numbers are deeper. If there are multiple objects of the same Density, the new one goes above others |
︙ | |||
2324 2325 2326 2327 2328 2329 2330 | 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 | - - + + | the saved Departed value. The Departed variable will usually be set automatically; see the section about variables. DESTROY Received when the object is about to be destroyed. Arg3 is the reason: 0 for the Destroy or ,Destroy instruction, 1 due to this object moving into something sharp, 2 due to something sharp moving into this one, |
︙ | |||
2467 2468 2469 2470 2471 2472 2473 | 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 | - + - - + + + - + | bit0 Do not send the HITBY message to the target object. If the moving object has the Connection flag, then this bit is set in Arg3, but this does not prevent sending the HITBY message unless the return value also has bit0. bit1 |
︙ |
Modified exec.c from [cb23d27153] to [a0ee5dcd19].
︙ | |||
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 | 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | + + + | oE->inertia=o->inertia; if(move_dir(obj,objE,dir)) { if(!(oE->oflags&OF_DESTROYED)) o->inertia=oE->inertia; hit|=0x8000; if(hit&0x800000) goto restart; } } if((oE->oflags&OF_CRUSH) && !(hit&0x22) && oE->x==o->x+x_delta[dir] && oE->y==o->y+y_delta[dir]) { if(!v_bool(destroy(obj,objE,4))) hit|=0x8000; } objE=obj_below(objE); } if((hit&0x48000)==0x8000) goto restart; if((hit&0x200000) && !(hit&0x402008)) { if((hit&0x20000) || oF) goto success; else goto fail; } } else { |
︙ | |||
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | + + + | if(!(hit&0x44) && (oE->shovable&(1<<dir)) && o->inertia>=oE->weight && !(oE->oflags&OF_VISUALONLY)) { oE->inertia=o->inertia; if(move_dir(obj,objE,dir)) { if(!(oE->oflags&OF_DESTROYED)) o->inertia=oE->inertia; hit|=0x8000; if(hit&0x800000) goto restart; } } if((oE->oflags&OF_CRUSH) && !(hit&0x22) && oE->x==o->x+x_delta[dir] && oE->y==o->y+y_delta[dir]) { if(!v_bool(destroy(obj,objE,4))) hit|=0x8000; } if(hit&0x400) goto fail; objE=obj_below(objE); } if(hit&0x2008) goto fail; if((hit&0x48000)==0x8000) goto restart; if((hit&0x200000) && !(hit&0x400000)) goto success; |
︙ | |||
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 | 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | + + + | oE->inertia=o->inertia; if(move_dir(obj,objE,dir)) { if(!(oE->oflags&OF_DESTROYED)) o->inertia=oE->inertia; hit|=0x8000; if(hit&0x800000) goto restart; } } if((oE->oflags&OF_CRUSH) && !(hit&0x22) && obj==objW && oE->x==o->x+x_delta[dir] && oE->y==o->y+y_delta[dir]) { if(!v_bool(destroy(obj,objE,4))) hit|=0x8000; } } objE=obj_below(objE); } if((hit&0x48000)==0x8000) goto restart; if((hit&0x200000) && !(hit&0x402008)) { if(hit&0x20000) goto success; if(!oF) goto fail; |
︙ | |||
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 | + + + | if(!(hit&0x44) && (oE->shovable&(1<<dir)) && o->inertia>=oE->weight && !(oE->oflags&OF_VISUALONLY)) { oE->inertia=o->inertia; if(move_dir(obj,objE,dir)) { if(!(oE->oflags&OF_DESTROYED)) o->inertia=oE->inertia; hit|=0x8000; if(hit&0x800000) goto restart; } } if((oE->oflags&OF_CRUSH) && !(hit&0x22) && obj==objW && oE->x==o->x+x_delta[dir] && oE->y==o->y+y_delta[dir]) { if(!v_bool(destroy(obj,objE,4))) hit|=0x8000; } if(hit&0x400) goto fail; objE=obj_below(objE); } if(hit&0x2008) goto fail; if((hit&0x48000)==0x8000) goto restart; if((hit&0x200000) && !(hit&0x400000)) { |
︙ | |||
2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 | 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 | + + + + | case OP_CONNECTION_E: NoIgnore(); StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_CONNECTION; else o->oflags&=~OF_CONNECTION; break; case OP_CONNECTION_EC: NoIgnore(); StackReq(2,0); SetFlagOf(OF_CONNECTION); break; case OP_CONTROL: StackReq(0,1); Push(OVALUE(control_obj)); break; case OP_COPYARRAY: NoIgnore(); StackReq(2,0); t2=Pop(); t1=Pop(); v_copy_array(t1,t2); break; case OP_COUNT: StackReq(1,2); i=v_count(); Push(NVALUE(i)); break; case OP_CREATE: NoIgnore(); StackReq(5,1); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); Push(v_create(obj,t1,t2,t3,t4,t5)); break; case OP_CREATE_D: NoIgnore(); StackReq(5,0); t5=Pop(); t4=Pop(); t3=Pop(); t2=Pop(); t1=Pop(); v_create(obj,t1,t2,t3,t4,t5); break; case OP_CRUSH: StackReq(0,1); if(o->oflags&OF_CRUSH) Push(NVALUE(1)); else Push(NVALUE(0)); break; case OP_CRUSH_C: StackReq(1,1); GetFlagOf(OF_CRUSH); break; case OP_CRUSH_E: NoIgnore(); StackReq(1,0); if(v_bool(Pop())) o->oflags|=OF_CRUSH; else o->oflags&=~OF_CRUSH; break; case OP_CRUSH_EC: NoIgnore(); StackReq(2,0); SetFlagOf(OF_CRUSH); break; case OP_DATA: StackReq(2,1); t2=Pop(); t1=Pop(); v_data(t1,t2); break; case OP_DELINVENTORY: StackReq(2,0); t2=Pop(); t1=Pop(); v_delete_inventory(t1,t2); break; case OP_DELTA: StackReq(2,1); t2=Pop(); Numeric(t2); t1=Pop(); Numeric(t1); Push(NVALUE(t1.u>t2.u?t1.u-t2.u:t2.u-t1.u)); break; case OP_DENSITY: StackReq(0,1); Push(NVALUE(o->density)); break; case OP_DENSITY_C: StackReq(1,1); Push(GetVariableOrAttributeOf(density,NVALUE)); break; case OP_DENSITY_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); change_density(obj,t1.s); break; case OP_DENSITY_E16: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); change_density(obj,t1.s&0xFFFF); break; |
︙ |
Modified heromesh.h from [73a29c9f38] to [9d19e813de].
︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | + | #define OF_KEYCLEARED 0x0100 #define OF_DESTROYED 0x0200 #define OF_BIZARRO 0x0400 #define OF_MOVED2 0x0800 #define OF_MOVING 0x1000 #define OF_ORDERED 0x2000 #define OF_CONNECTION 0x4000 #define OF_CRUSH 0x8000 typedef struct { const char*name; const char*edithelp; // not present if CF_GROUP const char*gamehelp; // not present if CF_GROUP Uint16*codes; Uint16*messages; // use 0xFFFF if no such message block |
︙ |
Modified instruc from [edac0d30f7] to [191572aaed].
︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | + | ,=Moving ,=Done ,=Connection ,Destroyed ,Player ,Compatible ,CollisionLayers ,=Crush Self Msg From =Arg1 =Arg2 =Arg3 =MoveNumber |
︙ |
Modified instruc.h from [13db57267f] to [d89fb3bd28].
︙ | |||
275 276 277 278 279 280 281 | 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 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + - + - - - + + + + - - - - + + + + - + - + - + - - - - - - + + + + + + - - + + - - - + + + - + - + - - - + + + - + - + - - - - - + + + + + - - + + - - - - - + + + + + - + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - - + + - + - - - - - - + + + + + + - + - - - - - + + + + + - + - - - - + + + + - + - + - - - - + + + + - + - + - + | #define OP_DESTROYED_C 34937 #define OP_PLAYER 32890 #define OP_PLAYER_C 34938 #define OP_COMPATIBLE 32891 #define OP_COMPATIBLE_C 34939 #define OP_COLLISIONLAYERS 32892 #define OP_COLLISIONLAYERS_C 34940 #define OP_CRUSH 32893 #define OP_CRUSH_C 34941 #define OP_CRUSH_E 36989 #define OP_CRUSH_EC 39037 |
︙ | |||
799 800 801 802 803 804 805 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | - - - - + + + + - + - + - + - + - + - + - + | {"bit8",8423400}, {"bit9",8423401}, {"bnot",8421418}, {"bor",8421416}, {"bxor",8421417}, {"c?",8421433}, {"case",8683542}, |