Free Hero Mesh

Check-in [156b0a7c35]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 156b0a7c35d29748344bccb98980a2d0a0945560
User & Date: user on 2022-07-06 05:20:21
Other Links: manifest | tags
Context
2022-07-06
19:36
Implement coordinate input. check-in: 87a8bc6a74 user: user tags: trunk
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
Changes

Modified class.doc from [5a72b72b63] to [09d41b7e9c].

672
673
674
675
676
677
678

679
680
681
682
683
684
685
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686







+







  OSC = 8
  OSCLOOP = 10

Standard messages:
  ARRIVED
  BEGIN_TURN
  BLOCKED
  CLICK
  COLLIDE
  COLLIDEBY
  COLLIDING
  CONFLICT
  CONNECT
  CREATE
  CREATED
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
797
798
799
800
801
802
803

804
805
806
807
808
809
810







-







  BOUNCE
  BRRREEET
  BRRRT
  BUZZER
  BWEEP
  CHEEP
  CHYEW
  CLICK
  DEEP_POP
  DINK
  DOOR
  DRLRLRINK
  DYUPE
  FAROUT
  FFFFTT
834
835
836
837
838
839
840




841
842
843
844
845
846
847
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851







+
+
+
+







  UH_OH
  UNCORK
  UNHH
  VACUUM
  WAHOO
  WHACK
  YEEHAW

Note: Some messages can also be used as sounds. Some sounds might later be
changed to messages (they can still be used as sounds, although a sound
file with that name is not guaranteed to be available).


=== Variables ===

These are the variables which each object has. Some are marked [ro] below
because they are read-only. In all cases, you can put , in front to access
a different object rather than self and = in front to write that variable

Modified game.c from [d822424b13] to [d2afebc6be].

393
394
395
396
397
398
399
400

401
402

403
404
405
406
407
408
409
393
394
395
396
397
398
399

400
401

402
403
404
405
406
407
408
409







-
+

-
+







      // Old format
      replay_count=(buf[sz-2]<<8)|buf[sz-1];
      if(sz-replay_count>=4) replay_mark=(buf[replay_count]<<8)|buf[replay_count+1]; else replay_mark=0;
      if(sz-replay_count>=6) {
        i=(buf[replay_count+2]<<8)|buf[replay_count+3];
        if(i==level_version) solved=1;
      }
      replay_list=malloc(replay_size=sizeof(MoveItem)*replay_count+1);
      replay_list=malloc(replay_size=sizeof(MoveItem)*(replay_count+1));
      if(!replay_list) fatal("Allocation failed\n");
      for(i=0;i<replay_size;i++) replay_list[i]=buf[i];
      for(i=0;i<replay_count;i++) replay_list[i]=buf[i];
    } else {
      // New format
      fgetc(fp); // skip first null byte
      while((i=fgetc(fp))!=EOF) switch(i) {
        case 0x01: // Replay list
          if(replay_list) goto skip;
          decode_move_list(fp);

Modified heromesh.h from [9d19e813de] to [38b9ed2d66].

34
35
36
37
38
39
40
41


42
43
44
45
46
47
48
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49







-
+
+







#define CVALUE(x) UVALUE(x,TY_CLASS)
#define MVALUE(x) UVALUE(x,TY_MESSAGE)
#define ZVALUE(x) UVALUE(x,TY_STRING)
#define OVALUE(x) ((x)==VOIDLINK?NVALUE(0):UVALUE(x,objects[x]->generation))
#define ValueTo64(v) (((sqlite3_int64)((v).u))|(((sqlite3_int64)((v).t))<<32))
#define ValueEq(x,y) ((x).t==(y).t && (x).u==(y).u)

#define N_MESSAGES 27
#define N_MESSAGES 28
#define N_STANDARD_SOUNDS 49
extern const char*const standard_message_names[];
extern const char*const standard_sound_names[];
extern const char*const heromesh_key_names[256];

extern sqlite3*userdb;
extern xrm_db*resourcedb;
extern const char*basefilename;
238
239
240
241
242
243
244



245
246
247
248
249
250
251
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255







+
+
+







#define NO_SCORE ((Sint32)(0x80000000))

#define ANI_STOP 0x00
#define ANI_ONCE 0x01
#define ANI_LOOP 0x02
#define ANI_OSC 0x08
#define ANI_SYNC 0x80

// Special key codes; used in encoded move lists and in some cases also values for Key
#define KEY_XY 1

typedef struct {
  Uint8 flag,start,end;
  union {
    Uint8 speed; // unsynchronized
    Uint8 slot; // synchronized
  };

Modified instruc from [191572aaed] to [5a438da8d2].

204
205
206
207
208
209
210

211
212
213
214
215
216
217
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218







+








; Top level definitions
-Background
-CodePage
-Order
Control
-LevelTable
-InputXY

; Class definitions
-Input
-Quiz
-InPlace
-DefaultImage
-Help

Modified instruc.h from [d89fb3bd28] to [244f5ae7d8].

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
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
775
776







-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+




-
+

-
+



-
+

-
-
-
+
+
+



-
-
-
+
+
+


-
+


-
-
+
+


-
-
-
-
-
-
+
+
+
+
+
+

-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+

-
-
-
+
+
+







-
+




-
+

-
+


-
-
+
+

-
+



-
+

-
-
-
-
-
-
+
+
+
+
+
+



-
+




-
+


-
+

-
-
+
+


-
-
+
+

-
-
+
+


-
-
-
-
-
+
+
+
+
+




-
-
-
+
+
+

-
+

-
+

-
-
-
+
+
+
+

-
+

-
-
+
+









-
+



-
-
-
+
+
+


-
-
+
+







-
-
-
+
+
+

-
+







-
-
-
-
+
+
+
+



-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+

-
-
-
+
+
+





-
-
-
+
+
+

-
-
-
+
+
+


-
-
+
+


-
+

-
+

-
+


-
+

-
-
-
-
+
+
+
+




-
+


-
-
-
-
-
-
-
+
+
+
+
+
+
+

-
-
+
+

-
-
-
-
+
+
+
+

-
+



-
+


-
+

-
-
-
+
+
+

-
-
-
-
+
+
+
+

-
-
-
+
+
+

-
+







#define OP_FINISHED 32903
#define OP_FINISHED_E 36999
#define OP_BACKGROUND 32904
#define OP_CODEPAGE 32905
#define OP_ORDER 32906
#define OP_CONTROL 32907
#define OP_LEVELTABLE 32908
#define OP_INPUT 32909
#define OP_QUIZ 32910
#define OP_INPLACE 32911
#define OP_DEFAULTIMAGE 32912
#define OP_HELP 32913
#define OP_EDITORHELP 32914
#define OP_OTHERS 32915
#define OP_SUBS 32916
#define OP_ANIMATE 32917
#define OP_ANIMATE_E 37013
#define OP_ANIMATEDEAD 32918
#define OP_ANIMATEDEAD_E 37014
#define OP_ASSASSINATE 32919
#define OP_ASSASSINATE_C 34967
#define OP_BROADCAST 32920
#define OP_BROADCAST_D 41112
#define OP_BROADCASTAND 32921
#define OP_BROADCASTANDEX 32922
#define OP_BROADCASTCLASS 32923
#define OP_BROADCASTEX 32924
#define OP_BROADCASTEX_D 41116
#define OP_BROADCASTLIST 32925
#define OP_BROADCASTLISTEX 32926
#define OP_BROADCASTSUM 32927
#define OP_BROADCASTSUMEX 32928
#define OP_CHAIN 32929
#define OP_CHEBYSHEV 32930
#define OP_CHEBYSHEV_C 34978
#define OP_COLOC 32931
#define OP_COLOC_C 34979
#define OP_CONNECT 32932
#define OP_CONNECT_C 34980
#define OP_CREATE 32933
#define OP_CREATE_D 41125
#define OP_DATA 32934
#define OP_DELINVENTORY 32935
#define OP_DELTA 32936
#define OP_DESTROY 32937
#define OP_DESTROY_C 34985
#define OP_DESTROY_D 41129
#define OP_DESTROY_CD 43177
#define OP_FAKEMOVE 32938
#define OP_FAKEMOVE_C 34986
#define OP_FINDCONNECTION 32939
#define OP_FINDCONNECTION_C 34987
#define OP_FLUSHCLASS 32940
#define OP_FLUSHOBJ 32941
#define OP_FLUSHOBJ_C 34989
#define OP_GETINVENTORY 32942
#define OP_HEIGHTAT 32943
#define OP_HITME 32944
#define OP_IGNOREKEY 32945
#define OP_INTMOVE 32946
#define OP_INTMOVE_C 34994
#define OP_INTMOVE_D 41138
#define OP_INTMOVE_CD 43186
#define OP_JUMPTO 32947
#define OP_JUMPTO_C 34995
#define OP_JUMPTO_D 41139
#define OP_JUMPTO_CD 43187
#define OP_LOC 32948
#define OP_LOC_C 34996
#define OP_LOCATEME 32949
#define OP_LOCATEME_C 34997
#define OP_LOSELEVEL 32950
#define OP_MANHATTAN 32951
#define OP_MANHATTAN_C 34999
#define OP_MAXINVENTORY 32952
#define OP_MORTON 32953
#define OP_MORTON_C 35001
#define OP_MOVE 32954
#define OP_MOVE_C 35002
#define OP_MOVE_D 41146
#define OP_MOVE_CD 43194
#define OP_MOVEPLUS 32955
#define OP_MOVEPLUS_C 35003
#define OP_MOVEPLUS_D 41147
#define OP_MOVEPLUS_CD 43195
#define OP_MOVETO 32956
#define OP_MOVETO_C 35004
#define OP_MOVETO_D 41148
#define OP_MOVETO_CD 43196
#define OP_PLUSMOVE 32957
#define OP_PLUSMOVE_C 35005
#define OP_PLUSMOVE_D 41149
#define OP_PLUSMOVE_CD 43197
#define OP_MINUSMOVE 32958
#define OP_MINUSMOVE_C 35006
#define OP_MINUSMOVE_D 41150
#define OP_MINUSMOVE_CD 43198
#define OP_NEWX 32959
#define OP_NEWXY 32960
#define OP_NEWY 32961
#define OP_OBJABOVE 32962
#define OP_OBJABOVE_C 35010
#define OP_OBJBELOW 32963
#define OP_OBJBELOW_C 35011
#define OP_OBJBOTTOMAT 32964
#define OP_OBJCLASSAT 32965
#define OP_OBJDIR 32966
#define OP_OBJDIR_C 35014
#define OP_OBJLAYERAT 32967
#define OP_OBJMOVINGTO 32968
#define OP_OBJTOPAT 32969
#define OP_POPUP 32970
#define OP_POPUPARGS 32971
#define OP_REL 32972
#define OP_REL_C 35020
#define OP_SEEK 32973
#define OP_SEEK_C 35021
#define OP_SEND 32974
#define OP_SEND_C 35022
#define OP_SEND_D 41166
#define OP_SEND_CD 43214
#define OP_SENDEX 32975
#define OP_SENDEX_C 35023
#define OP_SENDEX_D 41167
#define OP_SENDEX_CD 43215
#define OP_SETINVENTORY 32976
#define OP_SOUND 32977
#define OP_SWEEP 32978
#define OP_SWEEPEX 32979
#define OP_SYNCHRONIZE 32980
#define OP_TARGET 32981
#define OP_TARGET_C 35029
#define OP_TRACE 32982
#define OP_TRACESTACK 32983
#define OP_TRACESTACK_C 35031
#define OP_TRIGGER 32984
#define OP_TRIGGERAT 32985
#define OP_VOLUMEAT 32986
#define OP_WALKABLE 32987
#define OP_WALKABLE_C 35035
#define OP_WINLEVEL 32988
#define OP_WINLEVEL_C 35036
#define OP_XDIR 32989
#define OP_XDIR_C 35037
#define OP_XSTEP 32990
#define OP_XSTEP_C 35038
#define OP_XYDIR 32991
#define OP_YDIR 32992
#define OP_YDIR_C 35040
#define OP_YSTEP 32993
#define OP_YSTEP_C 35041
#define OP_MARK 32994
#define OP_TMARK 32995
#define OP_IN 32996
#define OP_NIN 32997
#define OP_MBEGIN 32998
#define OP_FLIP 32999
#define OP_COUNT 33000
#define OP_CLEAR 33001
#define OP_UNIQ 33002
#define OP_ARRAY 33003
#define OP_GETARRAY 33004
#define OP_GETARRAY_C 35052
#define OP_INITARRAY 33005
#define OP_SETARRAY 33006
#define OP_SETARRAY_C 35054
#define OP_ARRAYCELL 33007
#define OP_ARRAYCELL_C 35055
#define OP_ARRAYSLICE 33008
#define OP_COPYARRAY 33009
#define OP_DOTPRODUCT 33010
#define OP_PATTERN 33011
#define OP_PATTERN_C 35059
#define OP_PATTERN_E 37107
#define OP_PATTERN_EC 39155
#define OP_PATTERNS 33012
#define OP_PATTERNS_C 35060
#define OP_PATTERNS_E 37108
#define OP_PATTERNS_EC 39156
#define OP_ROOK 33013
#define OP_BISHOP 33014
#define OP_QUEEN 33015
#define OP_CUT 33016
#define OP_BIZARRO 33017
#define OP_BIZARRO_C 35065
#define OP_BIZARRO_E 37113
#define OP_BIZARRO_EC 39161
#define OP_BIZARROSWAP 33018
#define OP_BIZARROSWAP_D 41210
#define OP_SWAPWORLD 33019
#define OP_ABSTRACT 33020
#define OP_SUPER 33021
#define OP_SUPER_C 35069
#define OP_FUNCTION 33022
#define OP_LOCAL 33023
#define OP_LABEL 33024
#define OP_STRING 33025
#define OP_INT16 33026
#define OP_INT32 33027
#define OP_DISPATCH 33028
#define OP_USERFLAG 33029
#define OP_INPUTXY 32909
#define OP_INPUT 32910
#define OP_QUIZ 32911
#define OP_INPLACE 32912
#define OP_DEFAULTIMAGE 32913
#define OP_HELP 32914
#define OP_EDITORHELP 32915
#define OP_OTHERS 32916
#define OP_SUBS 32917
#define OP_ANIMATE 32918
#define OP_ANIMATE_E 37014
#define OP_ANIMATEDEAD 32919
#define OP_ANIMATEDEAD_E 37015
#define OP_ASSASSINATE 32920
#define OP_ASSASSINATE_C 34968
#define OP_BROADCAST 32921
#define OP_BROADCAST_D 41113
#define OP_BROADCASTAND 32922
#define OP_BROADCASTANDEX 32923
#define OP_BROADCASTCLASS 32924
#define OP_BROADCASTEX 32925
#define OP_BROADCASTEX_D 41117
#define OP_BROADCASTLIST 32926
#define OP_BROADCASTLISTEX 32927
#define OP_BROADCASTSUM 32928
#define OP_BROADCASTSUMEX 32929
#define OP_CHAIN 32930
#define OP_CHEBYSHEV 32931
#define OP_CHEBYSHEV_C 34979
#define OP_COLOC 32932
#define OP_COLOC_C 34980
#define OP_CONNECT 32933
#define OP_CONNECT_C 34981
#define OP_CREATE 32934
#define OP_CREATE_D 41126
#define OP_DATA 32935
#define OP_DELINVENTORY 32936
#define OP_DELTA 32937
#define OP_DESTROY 32938
#define OP_DESTROY_C 34986
#define OP_DESTROY_D 41130
#define OP_DESTROY_CD 43178
#define OP_FAKEMOVE 32939
#define OP_FAKEMOVE_C 34987
#define OP_FINDCONNECTION 32940
#define OP_FINDCONNECTION_C 34988
#define OP_FLUSHCLASS 32941
#define OP_FLUSHOBJ 32942
#define OP_FLUSHOBJ_C 34990
#define OP_GETINVENTORY 32943
#define OP_HEIGHTAT 32944
#define OP_HITME 32945
#define OP_IGNOREKEY 32946
#define OP_INTMOVE 32947
#define OP_INTMOVE_C 34995
#define OP_INTMOVE_D 41139
#define OP_INTMOVE_CD 43187
#define OP_JUMPTO 32948
#define OP_JUMPTO_C 34996
#define OP_JUMPTO_D 41140
#define OP_JUMPTO_CD 43188
#define OP_LOC 32949
#define OP_LOC_C 34997
#define OP_LOCATEME 32950
#define OP_LOCATEME_C 34998
#define OP_LOSELEVEL 32951
#define OP_MANHATTAN 32952
#define OP_MANHATTAN_C 35000
#define OP_MAXINVENTORY 32953
#define OP_MORTON 32954
#define OP_MORTON_C 35002
#define OP_MOVE 32955
#define OP_MOVE_C 35003
#define OP_MOVE_D 41147
#define OP_MOVE_CD 43195
#define OP_MOVEPLUS 32956
#define OP_MOVEPLUS_C 35004
#define OP_MOVEPLUS_D 41148
#define OP_MOVEPLUS_CD 43196
#define OP_MOVETO 32957
#define OP_MOVETO_C 35005
#define OP_MOVETO_D 41149
#define OP_MOVETO_CD 43197
#define OP_PLUSMOVE 32958
#define OP_PLUSMOVE_C 35006
#define OP_PLUSMOVE_D 41150
#define OP_PLUSMOVE_CD 43198
#define OP_MINUSMOVE 32959
#define OP_MINUSMOVE_C 35007
#define OP_MINUSMOVE_D 41151
#define OP_MINUSMOVE_CD 43199
#define OP_NEWX 32960
#define OP_NEWXY 32961
#define OP_NEWY 32962
#define OP_OBJABOVE 32963
#define OP_OBJABOVE_C 35011
#define OP_OBJBELOW 32964
#define OP_OBJBELOW_C 35012
#define OP_OBJBOTTOMAT 32965
#define OP_OBJCLASSAT 32966
#define OP_OBJDIR 32967
#define OP_OBJDIR_C 35015
#define OP_OBJLAYERAT 32968
#define OP_OBJMOVINGTO 32969
#define OP_OBJTOPAT 32970
#define OP_POPUP 32971
#define OP_POPUPARGS 32972
#define OP_REL 32973
#define OP_REL_C 35021
#define OP_SEEK 32974
#define OP_SEEK_C 35022
#define OP_SEND 32975
#define OP_SEND_C 35023
#define OP_SEND_D 41167
#define OP_SEND_CD 43215
#define OP_SENDEX 32976
#define OP_SENDEX_C 35024
#define OP_SENDEX_D 41168
#define OP_SENDEX_CD 43216
#define OP_SETINVENTORY 32977
#define OP_SOUND 32978
#define OP_SWEEP 32979
#define OP_SWEEPEX 32980
#define OP_SYNCHRONIZE 32981
#define OP_TARGET 32982
#define OP_TARGET_C 35030
#define OP_TRACE 32983
#define OP_TRACESTACK 32984
#define OP_TRACESTACK_C 35032
#define OP_TRIGGER 32985
#define OP_TRIGGERAT 32986
#define OP_VOLUMEAT 32987
#define OP_WALKABLE 32988
#define OP_WALKABLE_C 35036
#define OP_WINLEVEL 32989
#define OP_WINLEVEL_C 35037
#define OP_XDIR 32990
#define OP_XDIR_C 35038
#define OP_XSTEP 32991
#define OP_XSTEP_C 35039
#define OP_XYDIR 32992
#define OP_YDIR 32993
#define OP_YDIR_C 35041
#define OP_YSTEP 32994
#define OP_YSTEP_C 35042
#define OP_MARK 32995
#define OP_TMARK 32996
#define OP_IN 32997
#define OP_NIN 32998
#define OP_MBEGIN 32999
#define OP_FLIP 33000
#define OP_COUNT 33001
#define OP_CLEAR 33002
#define OP_UNIQ 33003
#define OP_ARRAY 33004
#define OP_GETARRAY 33005
#define OP_GETARRAY_C 35053
#define OP_INITARRAY 33006
#define OP_SETARRAY 33007
#define OP_SETARRAY_C 35055
#define OP_ARRAYCELL 33008
#define OP_ARRAYCELL_C 35056
#define OP_ARRAYSLICE 33009
#define OP_COPYARRAY 33010
#define OP_DOTPRODUCT 33011
#define OP_PATTERN 33012
#define OP_PATTERN_C 35060
#define OP_PATTERN_E 37108
#define OP_PATTERN_EC 39156
#define OP_PATTERNS 33013
#define OP_PATTERNS_C 35061
#define OP_PATTERNS_E 37109
#define OP_PATTERNS_EC 39157
#define OP_ROOK 33014
#define OP_BISHOP 33015
#define OP_QUEEN 33016
#define OP_CUT 33017
#define OP_BIZARRO 33018
#define OP_BIZARRO_C 35066
#define OP_BIZARRO_E 37114
#define OP_BIZARRO_EC 39162
#define OP_BIZARROSWAP 33019
#define OP_BIZARROSWAP_D 41211
#define OP_SWAPWORLD 33020
#define OP_ABSTRACT 33021
#define OP_SUPER 33022
#define OP_SUPER_C 35070
#define OP_FUNCTION 33023
#define OP_LOCAL 33024
#define OP_LABEL 33025
#define OP_STRING 33026
#define OP_INT16 33027
#define OP_INT32 33028
#define OP_DISPATCH 33029
#define OP_USERFLAG 33030
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486943},
{"+",8421405},
{"+Move",10584253},
{"+Move",10584254},
{"-",8421406},
{"-Move",10584254},
{"-Move",10584255},
{"-rot",8421382},
{".",10518528},
{"/",8486944},
{"ANHH",8389394},
{"ANHH",8389393},
{"ARRIVED",8389124},
{"Abstract",8683772},
{"Animate",8552597},
{"AnimateDead",8552598},
{"Abstract",8683773},
{"Animate",8552598},
{"AnimateDead",8552599},
{"Arg1",8552577},
{"Arg2",8552578},
{"Arg3",8552579},
{"Array",8683755},
{"ArrayCell",8487151},
{"ArraySlice",8421616},
{"Array",8683756},
{"ArrayCell",8487152},
{"ArraySlice",8421617},
{"Arrivals",8618092},
{"Arrived",8618090},
{"Assassinate",8487063},
{"Assassinate",8487064},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389406},
{"BEEDEEP",8389404},
{"BEDOINGNG",8389405},
{"BEEDEEP",8389403},
{"BEGIN_TURN",8389123},
{"BLOCKED",8389144},
{"BOOOM",8389410},
{"BOUNCE",8389415},
{"BRRREEET",8389396},
{"BRRRT",8389395},
{"BUZZER",8389420},
{"BWEEP",8389397},
{"BOOOM",8389409},
{"BOUNCE",8389414},
{"BRRREEET",8389395},
{"BRRRT",8389394},
{"BUZZER",8389419},
{"BWEEP",8389396},
{"Background",8683656},
{"Bishop",8683766},
{"Bizarro",8618233},
{"BizarroSwap",10518778},
{"Broadcast",10518680},
{"BroadcastAnd",8421529},
{"BroadcastAndEx",8421530},
{"BroadcastEx",10518684},
{"BroadcastList",8421533},
{"BroadcastListEx",8421534},
{"BroadcastSum",8421535},
{"BroadcastSumEx",8421536},
{"Bishop",8683767},
{"Bizarro",8618234},
{"BizarroSwap",10518779},
{"Broadcast",10518681},
{"BroadcastAnd",8421530},
{"BroadcastAndEx",8421531},
{"BroadcastEx",10518685},
{"BroadcastList",8421534},
{"BroadcastListEx",8421535},
{"BroadcastSum",8421536},
{"BroadcastSumEx",8421537},
{"Busy",8618094},
{"CHEEP",8389393},
{"CHYEW",8389392},
{"CLICK",8389388},
{"CHEEP",8389392},
{"CHYEW",8389391},
{"CLICK",8389147},
{"COLLIDE",8389142},
{"COLLIDEBY",8389141},
{"COLLIDING",8389143},
{"CONFLICT",8389140},
{"CONNECT",8389145},
{"CREATE",8389121},
{"CREATED",8389137},
{"Chebyshev",8487074},
{"Chebyshev",8487075},
{"Class",8486976},
{"Climb",9142356},
{"CodePage",8683657},
{"CollisionLayers",8487036},
{"Coloc",8487075},
{"Coloc",8487076},
{"Compatible",8487035},
{"Connect",8487076},
{"Connect",8487077},
{"Connection",8618104},
{"Control",8421515},
{"CopyArray",8421617},
{"Create",10518693},
{"CopyArray",8421618},
{"Create",10518694},
{"Crush",8618109},
{"DEEP_POP",8389417},
{"DEEP_POP",8389416},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389390},
{"DINK",8389389},
{"DOOR",8389378},
{"DRLRLRINK",8389398},
{"DYUPE",8389413},
{"Data",8421542},
{"DefaultImage",8683664},
{"DelInventory",8421543},
{"Delta",8421544},
{"DRLRLRINK",8389397},
{"DYUPE",8389412},
{"Data",8421543},
{"DefaultImage",8683665},
{"DelInventory",8421544},
{"Delta",8421545},
{"Density",9142348},
{"Departed",8618091},
{"Departures",8618093},
{"Destroy",10584233},
{"Destroy",10584234},
{"Destroyed",8487033},
{"Dir",8618054},
{"Distance",9142346},
{"Done",8618103},
{"DotProduct",8421618},
{"DotProduct",8421619},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683666},
{"EditorHelp",8683667},
{"F",9437192},
{"FAROUT",8389421},
{"FFFFTT",8389399},
{"FAROUT",8389420},
{"FFFFTT",8389398},
{"FLOATED",8389132},
{"FROG",8389383},
{"FakeMove",8487082},
{"FindConnection",8487083},
{"FakeMove",8487083},
{"FindConnection",8487084},
{"Finished",8552583},
{"FlushClass",8421548},
{"FlushObj",8487085},
{"FlushClass",8421549},
{"FlushObj",8487086},
{"From",8421504},
{"GLASS",8389379},
{"GLISSANT",8389419},
{"GetArray",8487148},
{"GetInventory",8421550},
{"HAWK",8389425},
{"HEARTBEAT",8389407},
{"GLISSANT",8389418},
{"GetArray",8487149},
{"GetInventory",8421551},
{"HAWK",8389424},
{"HEARTBEAT",8389406},
{"HIT",8389134},
{"HITBY",8389135},
{"Hard",8618072},
{"Height",9142354},
{"HeightAt",8421551},
{"Help",8683665},
{"HitMe",8421552},
{"HeightAt",8421552},
{"Help",8683666},
{"HitMe",8421553},
{"INIT",8389120},
{"IgnoreKey",8421553},
{"IgnoreKey",8421554},
{"Image",8618055},
{"InPlace",8683663},
{"InPlace",8683664},
{"Inertia",9142344},
{"InitArray",8421613},
{"Input",8683661},
{"IntMove",10584242},
{"InitArray",8421614},
{"Input",8683662},
{"InputXY",8683661},
{"IntMove",10584243},
{"Invisible",8618095},
{"JAYAYAYNG",8389416},
{"JAYAYAYNG",8389415},
{"JUMPED",8389128},
{"JumpTo",10584243},
{"KEWEL",8389422},
{"JumpTo",10584244},
{"KEWEL",8389421},
{"KEY",8389129},
{"KLECK",8389387},
{"KLINKK",8389385},
{"Key",8421510},
{"KeyCleared",8618096},
{"L",9437194},
{"LASTIMAGE",8389126},
{"LB",9437195},
{"LF",9437193},
{"LOCK",8389408},
{"LOCK",8389407},
{"LOOP",8388610},
{"Level",8421509},
{"LevelTable",8683660},
{"Loc",8487092},
{"LocateMe",8487093},
{"LoseLevel",8421558},
{"Loc",8487093},
{"LocateMe",8487094},
{"LoseLevel",8421559},
{"MOVED",8389127},
{"MOVING",8389130},
{"Manhattan",8487095},
{"MaxInventory",8421560},
{"Manhattan",8487096},
{"MaxInventory",8421561},
{"Misc1",9142364},
{"Misc2",9142366},
{"Misc3",9142368},
{"Misc4",9142370},
{"Misc5",9142372},
{"Misc6",9142374},
{"Misc7",9142376},
{"Morton",8487097},
{"Move",10584250},
{"Move+",10584251},
{"Morton",8487098},
{"Move",10584251},
{"Move+",10584252},
{"MoveNumber",8552580},
{"MoveTo",10584252},
{"MoveTo",10584253},
{"Moved",8618101},
{"Moving",8618102},
{"Msg",8421503},
{"N",9437186},
{"NE",9437185},
{"NEXTWARP",8389146},
{"NW",9437187},
{"NewX",8421567},
{"NewXY",8421568},
{"NewY",8421569},
{"OLDPHONE",8389402},
{"NewX",8421568},
{"NewXY",8421569},
{"NewY",8421570},
{"OLDPHONE",8389401},
{"ONCE",8388609},
{"OSC",8388616},
{"OSCLOOP",8388618},
{"ObjAbove",8487106},
{"ObjBelow",8487107},
{"ObjBottomAt",8421572},
{"ObjClassAt",8421573},
{"ObjDir",8487110},
{"ObjLayerAt",8421575},
{"ObjMovingTo",8421576},
{"ObjTopAt",8421577},
{"ObjAbove",8487107},
{"ObjBelow",8487108},
{"ObjBottomAt",8421573},
{"ObjClassAt",8421574},
{"ObjDir",8487111},
{"ObjLayerAt",8421576},
{"ObjMovingTo",8421577},
{"ObjTopAt",8421578},
{"Order",8683658},
{"Others",8683667},
{"P",8880371},
{"P*",8880372},
{"Others",8683668},
{"P",8880372},
{"P*",8880373},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487034},
{"PopUp",8421578},
{"Queen",8683767},
{"Quiz",8683662},
{"PopUp",8421579},
{"Queen",8683768},
{"Quiz",8683663},
{"R",9437198},
{"RATCHET1",8389418},
{"RATCHET2",8389412},
{"RATTLE",8389403},
{"RATCHET1",8389417},
{"RATCHET2",8389411},
{"RATTLE",8389402},
{"RB",9437197},
{"RF",9437199},
{"Rel",8487116},
{"Rook",8683765},
{"Rel",8487117},
{"Rook",8683766},
{"S",9437190},
{"SE",9437191},
{"SMALL_POP",8389389},
{"SMALL_POP",8389388},
{"SPLASH",8389376},
{"STEAM",8389424},
{"STEAM",8389423},
{"STOP",8388608},
{"SUBS",8683668},
{"SUBS",8683669},
{"SUNK",8389131},
{"SW",9437189},
{"Seek",8487117},
{"Seek",8487118},
{"Self",8421502},
{"Send",10584270},
{"SendEx",10584271},
{"SetArray",8487150},
{"SetInventory",8421584},
{"Send",10584271},
{"SendEx",10584272},
{"SetArray",8487151},
{"SetInventory",8421585},
{"Shape",8618051},
{"ShapeDir",8618074},
{"Sharp",8618073},
{"Shovable",8618075},
{"Sound",8421585},
{"Sound",8421586},
{"Stealthy",8618100},
{"Strength",9142358},
{"Super",8487165},
{"SwapWorld",8421627},
{"Sweep",8421586},
{"SweepEx",8421587},
{"Synchronize",8421588},
{"TAHTASHH",8389409},
{"THMP_thmp",8389405},
{"Super",8487166},
{"SwapWorld",8421628},
{"Sweep",8421587},
{"SweepEx",8421588},
{"Synchronize",8421589},
{"TAHTASHH",8389408},
{"THMP_thmp",8389404},
{"THWIT",8389384},
{"TICK",8389391},
{"Target",8487125},
{"TICK",8389390},
{"Target",8487126},
{"Temperature",9142337},
{"Trace",8421590},
{"TraceStack",8487127},
{"Trigger",8421592},
{"TriggerAt",8421593},
{"Trace",8421591},
{"TraceStack",8487128},
{"Trigger",8421593},
{"TriggerAt",8421594},
{"UH_OH",8389382},
{"UNCORK",8389414},
{"UNCORK",8389413},
{"UNHH",8389381},
{"UserSignal",8618097},
{"UserState",8618098},
{"VACUUM",8389411},
{"VACUUM",8389410},
{"VisualOnly",8618099},
{"Volume",9142350},
{"VolumeAt",8421594},
{"VolumeAt",8421595},
{"W",9437188},
{"WAHOO",8389400},
{"WHACK",8389423},
{"Walkable",8487131},
{"WAHOO",8389399},
{"WHACK",8389422},
{"Walkable",8487132},
{"Weight",9142352},
{"WinLevel",8487132},
{"XDir",8487133},
{"XStep",8487134},
{"XYDir",8421599},
{"WinLevel",8487133},
{"XDir",8487134},
{"XStep",8487135},
{"XYDir",8421600},
{"Xloc",8486980},
{"YDir",8487136},
{"YEEHAW",8389401},
{"YStep",8487137},
{"YDir",8487137},
{"YEEHAW",8389400},
{"YStep",8487138},
{"Yloc",8486981},
{"_",8421602},
{"_",8421603},
{"a?",8421439},
{"again",8683533},
{"and",8683544},
{"band",8421415},
{"begin",8683532},
{"bit",8683563},
{"bit0",8388609},
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
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

869
870







-
-
-
-
+
+
+
+






-
+





-
+











-
+






-
+














-
+

-
+



-
+

{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421418},
{"bor",8421416},
{"bxor",8421417},
{"c?",8421433},
{"case",8683542},
{"chain",8421537},
{"clear",8421609},
{"count",8421608},
{"cut",8683768},
{"chain",8421538},
{"clear",8421610},
{"count",8421609},
{"cut",8683769},
{"cz?",8421434},
{"dup",8421377},
{"else",8683530},
{"eq",8421424},
{"eq2",8421425},
{"exec",8486940},
{"flip",8421607},
{"flip",8421608},
{"for",8683537},
{"fork",8683545},
{"ge",8486965},
{"gt",8486963},
{"if",8683529},
{"in",8421604},
{"in",8421605},
{"is",8421431},
{"land",8421420},
{"le",8486966},
{"link",8683547},
{"lnot",8421423},
{"lor",8421421},
{"lsh",8421413},
{"lt",8486964},
{"lxor",8421422},
{"m?",8421435},
{"max",8486948},
{"mbegin",8683750},
{"mbegin",8683751},
{"min",8486947},
{"mod",8486945},
{"n?",8421432},
{"ne",8421426},
{"neg",8421410},
{"next",8683538},
{"nin",8421605},
{"nin",8421606},
{"nip",8421379},
{"o?",8421437},
{"or",8683543},
{"over",8421384},
{"oz?",8421438},
{"pick",8421383},
{"repeat",8683536},
{"ret",8421397},
{"rot",8421381},
{"rsh",8486950},
{"rtn",8683546},
{"s?",8421436},
{"swap",8421378},
{"then",8683531},
{"tmark",8421603},
{"tmark",8421604},
{"tuck",8421380},
{"uniq",8421610},
{"uniq",8421611},
{"until",8683534},
{"while",8683535},
};
#define N_OP_NAMES 364
#define N_OP_NAMES 365
#endif

Modified instruc.js from [01a8b0753e] to [05c2728680].

1
2
3
4

5
6
7
8
9

10
11
12
13
14
15
16


17


18
19
20
21
22
23
24
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28




+




-
+







+
+
-
+
+







"use strict";
const fs=require("fs");
const names_file=fs.readFileSync("names.js","ascii").split("\n");
const data_file=fs.readFileSync("instruc","ascii").split("\n");
const msgkeys=Object.create(null);
const do_sound_names=x=>{
  if(!x || x[0]=="`") return;
  if(x[0]=="c") return f=()=>0;
  let y=/^ *([A-Za-z_0-9]+) *$/.exec(x);
  if(y) return data_file.push("#"+y[1]);
  if(y && !msgkeys[y[1]]) return data_file.push("#"+y[1]);
};
const do_message_names=x=>{
  if(x.startsWith("const standard_sound_names=")) {
    data_file.push("(0300)");
    return f=do_sound_names;
  }
  let y=/^ *([0-9]+) = ([^ ]*) *$/.exec(x);
  if(y) {
    msgkeys[y[2]]=true;
  if(y) data_file.push("#"+y[2]+" ("+(Number(y[1])+0x0200).toString(16)+")");
    data_file.push("#"+y[2]+" ("+(Number(y[1])+0x0200).toString(16)+")");
  }
};
let f=x=>{
  if(x.startsWith("const standard_message_names=")) f=do_message_names;
};
names_file.forEach(x=>f(x)); // not .forEach(f); the function to use varies
let curnum=0;
const names=Object.create(null);

Modified main.c from [90be19d7e2] to [efe30dc6d5].

23
24
25
26
27
28
29

30
31
32
33
34
35
36
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37







+







#include "quarks.h"
#include "cursorshapes.h"
#include "heromesh.h"

typedef struct {
  char a[(N_MESSAGES==sizeof(standard_message_names)/sizeof(*standard_message_names))?1:-9];
  char b[('\1\0'*'x'+'\0\1'*'y'=='xy')?1:-9];
  char c[(N_STANDARD_SOUNDS==sizeof(standard_sound_names)/sizeof(*standard_sound_names))?1:-9];
} ASSERTION;

static const char schema[]=
  "BEGIN;"
  "PRAGMA APPLICATION_ID(1296388936);"
  "PRAGMA RECURSIVE_TRIGGERS(1);"
  "CREATE TABLE IF NOT EXISTS `USERCACHEINDEX`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `TIME` INT);"

Modified mbtofhm.c from [b26f53b2f9] to [640a4cf4de].

1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19











+







#if 0
gcc -s -O2 -o ./mbtofhm -Wno-unused-result mbtofhm.c
exit
#endif

// This program is part of Free Hero Mesh and is public domain.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define HEROMESH_MAIN
#define HEROMESH_CONV_MAIN
#include "names.h"

#define fatal(...) do{ fprintf(stderr,__VA_ARGS__); exit(1); }while(0)

// Pictures
static unsigned char*pict;
static unsigned short*picalloc;

Modified names.h from [27b23be7e2] to [ada84b527b].

22
23
24
25
26
27
28

29
30
31
32
33
34
35
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36







+







#define MSG_CONFLICT 20
#define MSG_COLLIDEBY 21
#define MSG_COLLIDE 22
#define MSG_COLLIDING 23
#define MSG_BLOCKED 24
#define MSG_CONNECT 25
#define MSG_NEXTWARP 26
#define MSG_CLICK 27
#ifdef HEROMESH_MAIN
const char*const standard_message_names[]={
 "INIT",
 "CREATE",
 "DESTROY",
 "BEGIN_TURN",
 "ARRIVED",
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

124

125
126
127
128
129
130
131
52
53
54
55
56
57
58
59
60




















































61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83







+

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-













+

+







 "CONFLICT",
 "COLLIDEBY",
 "COLLIDE",
 "COLLIDING",
 "BLOCKED",
 "CONNECT",
 "NEXTWARP",
 "CLICK",
};
#endif
#define SND_SPLASH 0
#define SND_POUR 1
#define SND_DOOR 2
#define SND_GLASS 3
#define SND_BANG 4
#define SND_UNHH 5
#define SND_UH_OH 6
#define SND_FROG 7
#define SND_THWIT 8
#define SND_KLINKK 9
#define SND_POWER 10
#define SND_KLECK 11
#define SND_CLICK 12
#define SND_SMALL_POP 13
#define SND_DINK 14
#define SND_TICK 15
#define SND_CHYEW 16
#define SND_CHEEP 17
#define SND_ANHH 18
#define SND_BRRRT 19
#define SND_BRRREEET 20
#define SND_BWEEP 21
#define SND_DRLRLRINK 22
#define SND_FFFFTT 23
#define SND_WAHOO 24
#define SND_YEEHAW 25
#define SND_OLDPHONE 26
#define SND_RATTLE 27
#define SND_BEEDEEP 28
#define SND_THMP_thmp 29
#define SND_BEDOINGNG 30
#define SND_HEARTBEAT 31
#define SND_LOCK 32
#define SND_TAHTASHH 33
#define SND_BOOOM 34
#define SND_VACUUM 35
#define SND_RATCHET2 36
#define SND_DYUPE 37
#define SND_UNCORK 38
#define SND_BOUNCE 39
#define SND_JAYAYAYNG 40
#define SND_DEEP_POP 41
#define SND_RATCHET1 42
#define SND_GLISSANT 43
#define SND_BUZZER 44
#define SND_FAROUT 45
#define SND_KEWEL 46
#define SND_WHACK 47
#define SND_STEAM 48
#define SND_HAWK 49
#ifdef HEROMESH_MAIN
const char*const standard_sound_names[]={
 "SPLASH",
 "POUR",
 "DOOR",
 "GLASS",
 "BANG",
 "UNHH",
 "UH_OH",
 "FROG",
 "THWIT",
 "KLINKK",
 "POWER",
 "KLECK",
#ifdef HEROMESH_CONV_MAIN
 "CLICK",
#endif
 "SMALL_POP",
 "DINK",
 "TICK",
 "CHYEW",
 "CHEEP",
 "ANHH",
 "BRRRT",

Modified names.js from [2016a9f624] to [3a1df8e65c].

27
28
29
30
31
32
33

34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







+







 20 = CONFLICT
 21 = COLLIDEBY
 22 = COLLIDE
 23 = COLLIDING
 24 = BLOCKED
 25 = CONNECT
 26 = NEXTWARP
 27 = CLICK
`.split("\n").map(x=>/^ *([0-9]+) = ([^ ]*) *$/.exec(x)).filter(x=>x);
const standard_sound_names=[];
`
 SPLASH
 POUR
 DOOR
 GLASS
137
138
139
140
141
142
143

144
145




146
147
148
149
150
151
152



153
154



155
156
157
158
159
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154



155
156
157


158
159
160
161
162
163
164
165







+

-
+
+
+
+




-
-
-
+
+
+
-
-
+
+
+





 222  QUOTE
`.replace(/([0-9]+) +([A-Z][A-Z0-9_]*)/g,(x,y,z)=>{
  heromesh_key_names[y]=z;
});
[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"].forEach(x=>{
  heromesh_key_names[x.charCodeAt()]=x;
});
const msgkeys=Object.create(null); // In case some message names are also sound names
console.log("// Auto-generated! Do not modify directly!");
standard_message_names.forEach(([a,b,c])=>console.log("#define MSG_"+c+" "+b));
standard_message_names.forEach(([a,b,c])=>{
  msgkeys[c]=true;
  console.log("#define MSG_"+c+" "+b);
});
console.log("#ifdef HEROMESH_MAIN");
console.log("const char*const standard_message_names[]={");
standard_message_names.forEach(([a,b,c])=>console.log(" \""+c+"\","));
console.log("};");
console.log("#endif");
standard_sound_names.forEach((x,y)=>console.log("#define SND_"+x+" "+y));
console.log("#ifdef HEROMESH_MAIN");
console.log("const char*const standard_sound_names[]={");
standard_sound_names.forEach(x=>{
  if(msgkeys[x]) console.log("#ifdef HEROMESH_CONV_MAIN");
console.log("const char*const standard_sound_names[]={");
standard_sound_names.forEach(x=>console.log(" \""+x+"\","));
  console.log(" \""+x+"\",");
  if(msgkeys[x]) console.log("#endif");
});
console.log("};");
console.log("const char*const heromesh_key_names[256]={");
Object.keys(heromesh_key_names).forEach(x=>console.log(" ["+x+"]=\""+heromesh_key_names[x]+"\","));
console.log("};");
console.log("#endif");

Modified sound.c from [c96a0bb6e3] to [932918faf2].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
10
11
12
13
14
15
16


17
18
19
20
21
22
23







-
-







#include <string.h>
#include "sqlite3.h"
#include "smallxrm.h"
#include "quarks.h"
#include "heromesh.h"
#include "cursorshapes.h"

#define N_STANDARD_SOUNDS 50

typedef struct {
  Uint8*data;
  Uint32 len; // length in bytes
} WaveSound;

static Uint8 sound_on;
static Sint16 mmlvolume=10000;