Free Hero Mesh

Check-in [9959860889]
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:Add possibility of additional code pages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 99598608898c0473fd2ce3eb5ae1d8f75a24edd4
User & Date: user on 2021-04-22 03:00:57
Other Links: manifest | tags
Context
2021-04-24
19:09
Implement BroadcastAnd and BroadcastList instructions. check-in: a833709837 user: user tags: trunk
2021-04-22
03:00
Add possibility of additional code pages. check-in: 9959860889 user: user tags: trunk
2021-04-20
02:32
Add the possibility to specify the level version number when importing (optional) check-in: 2885d776fc user: user tags: trunk
Changes

Modified .fossil-settings/binary-glob from [1669c0f851] to [e54f583c29].

1

*.gz


>
1
2
*.gz
codepage.har

Modified class.c from [bf6a8e2243] to [51b2fb5418].

1908
1909
1910
1911
1912
1913
1914







1915
1916
1917
1918
1919
1920
1921
          if(tokent!=TF_CLOSE) ParseError("Expected close parenthesis\n");
          break;
        case OP_MISC4: define_user_flags(0x1000,0x101F); break;
        case OP_MISC5: define_user_flags(0x1020,0x103F); break;
        case OP_MISC6: define_user_flags(0x1040,0x105F); break;
        case OP_MISC7: define_user_flags(0x1060,0x107F); break;
        case OP_COLLISIONLAYERS: define_user_flags(0x1C80,0x1C87); break;







        default:
          ParseError("Invalid top level definition: %s\n",tokenstr);
      }
    } else {
      ParseError("Invalid top level definition\n");
    }
  }







>
>
>
>
>
>
>







1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
          if(tokent!=TF_CLOSE) ParseError("Expected close parenthesis\n");
          break;
        case OP_MISC4: define_user_flags(0x1000,0x101F); break;
        case OP_MISC5: define_user_flags(0x1020,0x103F); break;
        case OP_MISC6: define_user_flags(0x1040,0x105F); break;
        case OP_MISC7: define_user_flags(0x1060,0x107F); break;
        case OP_COLLISIONLAYERS: define_user_flags(0x1C80,0x1C87); break;
        case OP_CODEPAGE:
          nxttok();
          if(tokent!=TF_INT || tokenv<1 || tokenv>65535) ParseError("Number from 1 to 65535 expected\n");
          set_code_page(tokenv);
          nxttok();
          if(tokent!=TF_CLOSE) ParseError("Expected close parenthesis\n");
          break;
        default:
          ParseError("Invalid top level definition: %s\n",tokenstr);
      }
    } else {
      ParseError("Invalid top level definition\n");
    }
  }

Modified class.doc from [4a0d10f48c] to [1c976b6d38].

201
202
203
204
205
206
207




208
209
210
211
212
213
214
  Set the limit for logical animations, from 1 to 255. The default is 32.

(Background <number> [<number>])
  Set the background colour, from 0 to 255. The default value is 1. You
  can optionally specify a second number, which is the background colour
  for the inventory; if not specified, uses the same colour for both.





(CollisionLayers <userflags...>)
  Define user flags as CollisionLayers bits; the first defined flag is
  bit0. Up to 8 flags can be defined in this way.

(Misc4 <userflags...>)
  Define user flags as Misc4 bits; the first defined flag is bit0. Up to
  32 flags can be defined in this way.







>
>
>
>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
  Set the limit for logical animations, from 1 to 255. The default is 32.

(Background <number> [<number>])
  Set the background colour, from 0 to 255. The default value is 1. You
  can optionally specify a second number, which is the background colour
  for the inventory; if not specified, uses the same colour for both.

(CodePage <number>)
  Define the code page, from 1 to 65535. If not specified, then the
  default code page is used.

(CollisionLayers <userflags...>)
  Define user flags as CollisionLayers bits; the first defined flag is
  bit0. Up to 8 flags can be defined in this way.

(Misc4 <userflags...>)
  Define user flags as Misc4 bits; the first defined flag is bit0. Up to
  32 flags can be defined in this way.

Added codepage.har version [cc6c7e2d15].

cannot compute difference between binary files

Modified config.doc from [cff0358f5d] to [2295add04a].

23
24
25
26
27
28
29




30
31
32
33
34
35
36

.autoSave
  If true, saves changes to the level and solution files when the program
  terminates. If false (default), they are only saved to the user cache
  database; to copy the changes to the level and solution files, you must
  use the .u command in SQL mode (-x).





.editTitle
  The window title to use in edit mode. A tilde is replaced by the name of
  the puzzle set.

.gameTitle
  The window title to use in game mode. A tilde is replaced by the name of
  the puzzle set.







>
>
>
>







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

.autoSave
  If true, saves changes to the level and solution files when the program
  terminates. If false (default), they are only saved to the user cache
  database; to copy the changes to the level and solution files, you must
  use the .u command in SQL mode (-x).

.codepage
  The path to the code page file. If not specified, then code pages other
  than 437 are not available (code page 437 is built-in).

.editTitle
  The window title to use in edit mode. A tilde is replaced by the name of
  the puzzle set.

.gameTitle
  The window title to use in game mode. A tilde is replaced by the name of
  the puzzle set.

Modified default.heromeshrc from [322c2f0dbe] to [b105198fc2].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
! Hero Mesh configuration settings
?.screenWidth: 800
?.screenHeight: 600
?.imageSize: 24
?.traceAll: true
?.showInventory: 0
?.maxTrigger: 32767
?.pasteCommand: xclip -o


! Game inputs
?.gameKey.A: 'A
?.gameKey.B: 'B
?.gameKey.C: 'C
?.gameKey.D: 'D
?.gameKey.E: 'E








>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! Hero Mesh configuration settings
?.screenWidth: 800
?.screenHeight: 600
?.imageSize: 24
?.traceAll: true
?.showInventory: 0
?.maxTrigger: 32767
?.pasteCommand: xclip -o
?.codepage: /home/user/freeheromesh/codepage.har

! Game inputs
?.gameKey.A: 'A
?.gameKey.B: 'B
?.gameKey.C: 'C
?.gameKey.D: 'D
?.gameKey.E: 'E

Modified heromesh.h from [7ea394ee1c] to [e799f3d4f3].

93
94
95
96
97
98
99

100
101
102
103
104
105
106
extern SDL_Surface*screen;
extern Uint16 picture_size;
extern int left_margin;

void init_palette(void);
void init_screen(void);
void load_pictures(void);


// Use only when screen is unlocked
void draw_picture(int x,int y,Uint16 img);
void draw_cell(int x,int y);

// Use only when screen is locked
void draw_text(int x,int y,const unsigned char*t,int bg,int fg);







>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
extern SDL_Surface*screen;
extern Uint16 picture_size;
extern int left_margin;

void init_palette(void);
void init_screen(void);
void load_pictures(void);
void set_code_page(Uint16 n);

// Use only when screen is unlocked
void draw_picture(int x,int y,Uint16 img);
void draw_cell(int x,int y);

// Use only when screen is locked
void draw_text(int x,int y,const unsigned char*t,int bg,int fg);

Modified instruc from [69544eab48] to [271efa52f9].

192
193
194
195
196
197
198

199
200
201
202
203
204
205
MoveNumber
Level
Key
=Finished

; Class definitions
-Background ; used at top level only; not in a class

-Input
-Quiz
-InPlace
-DefaultImage
-Help
-EditorHelp
-SUBS







>







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
MoveNumber
Level
Key
=Finished

; Class definitions
-Background ; used at top level only; not in a class
-CodePage ; used at top level only; not in a class
-Input
-Quiz
-InPlace
-DefaultImage
-Help
-EditorHelp
-SUBS

Modified instruc.h from [e02ef5707d] to [53b9bd40aa].

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
#define OP_ARG3_E 36987
#define OP_MOVENUMBER 32892
#define OP_LEVEL 32893
#define OP_KEY 32894
#define OP_FINISHED 32895
#define OP_FINISHED_E 36991
#define OP_BACKGROUND 32896

#define OP_INPUT 32897
#define OP_QUIZ 32898
#define OP_INPLACE 32899
#define OP_DEFAULTIMAGE 32900
#define OP_HELP 32901
#define OP_EDITORHELP 32902
#define OP_SUBS 32903
#define OP_ANIMATE 32904
#define OP_ANIMATEDEAD 32905
#define OP_ASSASSINATE 32906
#define OP_ASSASSINATE_C 34954
#define OP_BROADCAST 32907
#define OP_BROADCAST_D 41099
#define OP_BROADCASTCLASS 32908
#define OP_BROADCASTEX 32909
#define OP_BROADCASTEX_D 41101
#define OP_BROADCASTSUM 32910
#define OP_BROADCASTSUMEX 32911
#define OP_CHAIN 32912
#define OP_CHEBYSHEV 32913
#define OP_CHEBYSHEV_C 34961
#define OP_COLOC 32914
#define OP_COLOC_C 34962
#define OP_CREATE 32915
#define OP_CREATE_D 41107
#define OP_DELINVENTORY 32916
#define OP_DELTA 32917
#define OP_DESTROY 32918
#define OP_DESTROY_C 34966
#define OP_DESTROY_D 41110
#define OP_DESTROY_CD 43158
#define OP_FLUSHCLASS 32919
#define OP_FLUSHOBJ 32920
#define OP_FLUSHOBJ_C 34968
#define OP_GETINVENTORY 32921
#define OP_HEIGHTAT 32922
#define OP_IGNOREKEY 32923
#define OP_INTMOVE 32924
#define OP_INTMOVE_C 34972
#define OP_INTMOVE_D 41116
#define OP_INTMOVE_CD 43164
#define OP_JUMPTO 32925
#define OP_JUMPTO_C 34973
#define OP_JUMPTO_D 41117
#define OP_JUMPTO_CD 43165
#define OP_LOC 32926
#define OP_LOC_C 34974
#define OP_LOCATEME 32927
#define OP_LOSELEVEL 32928
#define OP_MANHATTAN 32929
#define OP_MANHATTAN_C 34977
#define OP_MAXINVENTORY 32930
#define OP_MOVE 32931
#define OP_MOVE_C 34979
#define OP_MOVE_D 41123
#define OP_MOVE_CD 43171
#define OP_MOVEPLUS 32932
#define OP_MOVEPLUS_C 34980
#define OP_MOVEPLUS_D 41124
#define OP_MOVEPLUS_CD 43172
#define OP_MOVETO 32933
#define OP_MOVETO_C 34981
#define OP_MOVETO_D 41125
#define OP_MOVETO_CD 43173
#define OP_PLUSMOVE 32934
#define OP_PLUSMOVE_C 34982
#define OP_PLUSMOVE_D 41126
#define OP_PLUSMOVE_CD 43174
#define OP_MINUSMOVE 32935
#define OP_MINUSMOVE_C 34983
#define OP_MINUSMOVE_D 41127
#define OP_MINUSMOVE_CD 43175
#define OP_NEWX 32936
#define OP_NEWXY 32937
#define OP_NEWY 32938
#define OP_OBJABOVE 32939
#define OP_OBJABOVE_C 34987
#define OP_OBJBELOW 32940
#define OP_OBJBELOW_C 34988
#define OP_OBJBOTTOMAT 32941
#define OP_OBJCLASSAT 32942
#define OP_OBJDIR 32943
#define OP_OBJDIR_C 34991
#define OP_OBJLAYERAT 32944
#define OP_OBJMOVINGTO 32945
#define OP_OBJTOPAT 32946
#define OP_POPUP 32947
#define OP_POPUPARGS 32948
#define OP_REL 32949
#define OP_REL_C 34997
#define OP_SEEK 32950
#define OP_SEEK_C 34998
#define OP_SEND 32951
#define OP_SEND_C 34999
#define OP_SEND_D 41143
#define OP_SEND_CD 43191
#define OP_SENDEX 32952
#define OP_SENDEX_C 35000
#define OP_SENDEX_D 41144
#define OP_SENDEX_CD 43192
#define OP_SETINVENTORY 32953
#define OP_SOUND 32954
#define OP_SYNCHRONIZE 32955
#define OP_TARGET 32956
#define OP_TARGET_C 35004
#define OP_TRACE 32957
#define OP_VOLUMEAT 32958
#define OP_WINLEVEL 32959
#define OP_XDIR 32960
#define OP_XDIR_C 35008
#define OP_XYDIR 32961
#define OP_YDIR 32962
#define OP_YDIR_C 35010
#define OP_MARK 32963
#define OP_TMARK 32964
#define OP_IN 32965
#define OP_NIN 32966
#define OP_MBEGIN 32967
#define OP_FLIP 32968
#define OP_ARRAY 32969
#define OP_GETARRAY 32970
#define OP_INITARRAY 32971
#define OP_SETARRAY 32972
#define OP_ARRAYCELL 32973
#define OP_ARRAYSLICE 32974
#define OP_COPYARRAY 32975
#define OP_DOTPRODUCT 32976
#define OP_PATTERN 32977
#define OP_PATTERN_C 35025
#define OP_PATTERN_E 37073
#define OP_PATTERN_EC 39121
#define OP_PATTERNS 32978
#define OP_PATTERNS_C 35026
#define OP_PATTERNS_E 37074
#define OP_PATTERNS_EC 39122
#define OP_FOUR 32979
#define OP_EIGHT 32980
#define OP_CUT 32981
#define OP_FUNCTION 32982
#define OP_LOCAL 32983
#define OP_LABEL 32984
#define OP_STRING 32985
#define OP_INT16 32986
#define OP_INT32 32987
#define OP_DISPATCH 32988
#define OP_USERFLAG 32989
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486937},
{"+",8421399},
{"+Move",10584230},
{"-",8421400},
{"-Move",10584231},
{"-rot",8421382},
{".",10518528},
{"/",8486938},
{"ANHH",8389394},
{"ARRIVED",8389124},
{"Animate",8421512},
{"AnimateDead",8421513},
{"Arg1",8552569},
{"Arg2",8552570},
{"Arg3",8552571},
{"Array",8683721},
{"ArrayCell",8421581},
{"ArraySlice",8421582},
{"Arrivals",8618086},
{"Arrived",8618084},
{"Assassinate",8487050},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389406},
{"BEEDEEP",8389404},
{"BEGIN_TURN",8389123},
{"BLOCKED",8389144},
{"BOOOM",8389410},
{"BOUNCE",8389415},
{"BRRREEET",8389396},
{"BRRRT",8389395},
{"BUZZER",8389420},
{"BWEEP",8389397},
{"Background",8683648},
{"Broadcast",10518667},
{"BroadcastEx",10518669},
{"BroadcastSum",8421518},
{"BroadcastSumEx",8421519},
{"Busy",8618088},
{"CHEEP",8389393},
{"CHYEW",8389392},
{"CLICK",8389388},
{"COLLIDE",8389142},
{"COLLIDEBY",8389141},
{"COLLIDING",8389143},
{"CONFLICT",8389140},
{"CREATE",8389121},
{"CREATED",8389137},
{"Chebyshev",8487057},
{"Class",8486970},
{"Climb",9142350},

{"CollisionLayers",8487029},
{"Coloc",8487058},
{"Compatible",8487028},
{"CopyArray",8421583},
{"Create",10518675},
{"DEEP_POP",8389417},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389390},
{"DOOR",8389378},
{"DRLRLRINK",8389398},
{"DYUPE",8389413},
{"DefaultImage",8683652},
{"DelInventory",8421524},
{"Delta",8421525},
{"Density",9142342},
{"Departed",8618085},
{"Departures",8618087},
{"Destroy",10584214},
{"Destroyed",8487026},
{"Dir",8618048},
{"Distance",9142340},
{"Done",8618097},
{"DotProduct",8421584},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683654},
{"Eight",8683732},
{"F",9437192},
{"FAROUT",8389421},
{"FFFFTT",8389399},
{"FLOATED",8389132},
{"FROG",8389383},
{"Finished",8552575},
{"FlushClass",8421527},
{"FlushObj",8487064},
{"Four",8683731},
{"From",8421496},
{"GLASS",8389379},
{"GLISSANT",8389419},
{"GetArray",8421578},
{"GetInventory",8421529},
{"HAWK",8389425},
{"HEARTBEAT",8389407},
{"HIT",8389134},
{"HITBY",8389135},
{"Hard",8618066},
{"Height",9142348},
{"HeightAt",8421530},
{"Help",8683653},
{"INIT",8389120},
{"IgnoreKey",8421531},
{"Image",8618049},
{"InPlace",8683651},
{"Inertia",9142338},
{"InitArray",8421579},
{"Input",8683649},
{"IntMove",10584220},
{"Invisible",8618089},
{"JAYAYAYNG",8389416},
{"JUMPED",8389128},
{"JumpTo",10584221},
{"KEWEL",8389422},
{"KEY",8389129},
{"KLECK",8389387},
{"KLINKK",8389385},
{"Key",8421502},
{"KeyCleared",8618090},
{"L",9437194},
{"LASTIMAGE",8389126},
{"LB",9437195},
{"LF",9437193},
{"LOCK",8389408},
{"LOOP",8388610},
{"Level",8421501},
{"Loc",8487070},
{"LocateMe",8421535},
{"LoseLevel",8421536},
{"MOVED",8389127},
{"MOVING",8389130},
{"Manhattan",8487073},
{"MaxInventory",8421538},
{"Misc1",9142358},
{"Misc2",9142360},
{"Misc3",9142362},
{"Misc4",9142364},
{"Misc5",9142366},
{"Misc6",9142368},
{"Misc7",9142370},
{"Move",10584227},
{"Move+",10584228},
{"MoveNumber",8421500},
{"MoveTo",10584229},
{"Moved",8618095},
{"Moving",8618096},
{"Msg",8421495},
{"N",9437186},
{"NE",9437185},
{"NW",9437187},
{"NewX",8421544},
{"NewXY",8421545},
{"NewY",8421546},
{"OLDPHONE",8389402},
{"ONCE",8388609},
{"OSC",8388616},
{"OSCLOOP",8388618},
{"ObjAbove",8487083},
{"ObjBelow",8487084},
{"ObjBottomAt",8421549},
{"ObjClassAt",8421550},
{"ObjDir",8487087},
{"ObjLayerAt",8421552},
{"ObjMovingTo",8421553},
{"ObjTopAt",8421554},
{"P",8880337},
{"P*",8880338},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487027},
{"PopUp",8421555},
{"Quiz",8683650},
{"R",9437198},
{"RATCHET1",8389418},
{"RATCHET2",8389412},
{"RATTLE",8389403},
{"RB",9437197},
{"RF",9437199},
{"Rel",8487093},
{"S",9437190},
{"SE",9437191},
{"SMALL_POP",8389389},
{"SPLASH",8389376},
{"STEAM",8389424},
{"STOP",8388608},
{"SUBS",8683655},
{"SUNK",8389131},
{"SW",9437189},
{"Seek",8487094},
{"Self",8421494},
{"Send",10584247},
{"SendEx",10584248},
{"SetArray",8421580},
{"SetInventory",8421561},
{"Shape",8618045},
{"ShapeDir",8618068},
{"Sharp",8618067},
{"Shovable",8618069},
{"Sound",8421562},
{"Stealthy",8618094},
{"Strength",9142352},
{"Synchronize",8421563},
{"TAHTASHH",8389409},
{"THMP_thmp",8389405},
{"THWIT",8389384},
{"TICK",8389391},
{"Target",8487100},
{"Temperature",9142331},
{"Trace",8421565},
{"UH_OH",8389382},
{"UNCORK",8389414},
{"UNHH",8389381},
{"UserSignal",8618091},
{"UserState",8618092},
{"VACUUM",8389411},
{"VisualOnly",8618093},
{"Volume",9142344},
{"VolumeAt",8421566},
{"W",9437188},
{"WAHOO",8389400},
{"WHACK",8389423},
{"Weight",9142346},
{"WinLevel",8421567},
{"XDir",8487104},
{"XYDir",8421569},
{"Xloc",8486974},
{"YDir",8487106},
{"YEEHAW",8389401},
{"Yloc",8486975},
{"_",8421571},
{"a?",8421433},
{"again",8683534},
{"band",8421409},
{"begin",8683533},
{"bit",8683557},
{"bit0",8388609},
{"bit1",8388610},







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|




|

|





|
|



|
|
|


|













|
|
|
|










|


>

|

|
|








|
|
|



|




|


|
|






|
|
|



|
|






|
|

|

|

|
|
|



|













|
|
|


|
|







|
|

|






|
|
|




|
|
|
|
|
|
|
|
|
|





|
|






|






|


|

|
|
|
|




|


|




|

|








|




|
|
|

|


|







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
#define OP_ARG3_E 36987
#define OP_MOVENUMBER 32892
#define OP_LEVEL 32893
#define OP_KEY 32894
#define OP_FINISHED 32895
#define OP_FINISHED_E 36991
#define OP_BACKGROUND 32896
#define OP_CODEPAGE 32897
#define OP_INPUT 32898
#define OP_QUIZ 32899
#define OP_INPLACE 32900
#define OP_DEFAULTIMAGE 32901
#define OP_HELP 32902
#define OP_EDITORHELP 32903
#define OP_SUBS 32904
#define OP_ANIMATE 32905
#define OP_ANIMATEDEAD 32906
#define OP_ASSASSINATE 32907
#define OP_ASSASSINATE_C 34955
#define OP_BROADCAST 32908
#define OP_BROADCAST_D 41100
#define OP_BROADCASTCLASS 32909
#define OP_BROADCASTEX 32910
#define OP_BROADCASTEX_D 41102
#define OP_BROADCASTSUM 32911
#define OP_BROADCASTSUMEX 32912
#define OP_CHAIN 32913
#define OP_CHEBYSHEV 32914
#define OP_CHEBYSHEV_C 34962
#define OP_COLOC 32915
#define OP_COLOC_C 34963
#define OP_CREATE 32916
#define OP_CREATE_D 41108
#define OP_DELINVENTORY 32917
#define OP_DELTA 32918
#define OP_DESTROY 32919
#define OP_DESTROY_C 34967
#define OP_DESTROY_D 41111
#define OP_DESTROY_CD 43159
#define OP_FLUSHCLASS 32920
#define OP_FLUSHOBJ 32921
#define OP_FLUSHOBJ_C 34969
#define OP_GETINVENTORY 32922
#define OP_HEIGHTAT 32923
#define OP_IGNOREKEY 32924
#define OP_INTMOVE 32925
#define OP_INTMOVE_C 34973
#define OP_INTMOVE_D 41117
#define OP_INTMOVE_CD 43165
#define OP_JUMPTO 32926
#define OP_JUMPTO_C 34974
#define OP_JUMPTO_D 41118
#define OP_JUMPTO_CD 43166
#define OP_LOC 32927
#define OP_LOC_C 34975
#define OP_LOCATEME 32928
#define OP_LOSELEVEL 32929
#define OP_MANHATTAN 32930
#define OP_MANHATTAN_C 34978
#define OP_MAXINVENTORY 32931
#define OP_MOVE 32932
#define OP_MOVE_C 34980
#define OP_MOVE_D 41124
#define OP_MOVE_CD 43172
#define OP_MOVEPLUS 32933
#define OP_MOVEPLUS_C 34981
#define OP_MOVEPLUS_D 41125
#define OP_MOVEPLUS_CD 43173
#define OP_MOVETO 32934
#define OP_MOVETO_C 34982
#define OP_MOVETO_D 41126
#define OP_MOVETO_CD 43174
#define OP_PLUSMOVE 32935
#define OP_PLUSMOVE_C 34983
#define OP_PLUSMOVE_D 41127
#define OP_PLUSMOVE_CD 43175
#define OP_MINUSMOVE 32936
#define OP_MINUSMOVE_C 34984
#define OP_MINUSMOVE_D 41128
#define OP_MINUSMOVE_CD 43176
#define OP_NEWX 32937
#define OP_NEWXY 32938
#define OP_NEWY 32939
#define OP_OBJABOVE 32940
#define OP_OBJABOVE_C 34988
#define OP_OBJBELOW 32941
#define OP_OBJBELOW_C 34989
#define OP_OBJBOTTOMAT 32942
#define OP_OBJCLASSAT 32943
#define OP_OBJDIR 32944
#define OP_OBJDIR_C 34992
#define OP_OBJLAYERAT 32945
#define OP_OBJMOVINGTO 32946
#define OP_OBJTOPAT 32947
#define OP_POPUP 32948
#define OP_POPUPARGS 32949
#define OP_REL 32950
#define OP_REL_C 34998
#define OP_SEEK 32951
#define OP_SEEK_C 34999
#define OP_SEND 32952
#define OP_SEND_C 35000
#define OP_SEND_D 41144
#define OP_SEND_CD 43192
#define OP_SENDEX 32953
#define OP_SENDEX_C 35001
#define OP_SENDEX_D 41145
#define OP_SENDEX_CD 43193
#define OP_SETINVENTORY 32954
#define OP_SOUND 32955
#define OP_SYNCHRONIZE 32956
#define OP_TARGET 32957
#define OP_TARGET_C 35005
#define OP_TRACE 32958
#define OP_VOLUMEAT 32959
#define OP_WINLEVEL 32960
#define OP_XDIR 32961
#define OP_XDIR_C 35009
#define OP_XYDIR 32962
#define OP_YDIR 32963
#define OP_YDIR_C 35011
#define OP_MARK 32964
#define OP_TMARK 32965
#define OP_IN 32966
#define OP_NIN 32967
#define OP_MBEGIN 32968
#define OP_FLIP 32969
#define OP_ARRAY 32970
#define OP_GETARRAY 32971
#define OP_INITARRAY 32972
#define OP_SETARRAY 32973
#define OP_ARRAYCELL 32974
#define OP_ARRAYSLICE 32975
#define OP_COPYARRAY 32976
#define OP_DOTPRODUCT 32977
#define OP_PATTERN 32978
#define OP_PATTERN_C 35026
#define OP_PATTERN_E 37074
#define OP_PATTERN_EC 39122
#define OP_PATTERNS 32979
#define OP_PATTERNS_C 35027
#define OP_PATTERNS_E 37075
#define OP_PATTERNS_EC 39123
#define OP_FOUR 32980
#define OP_EIGHT 32981
#define OP_CUT 32982
#define OP_FUNCTION 32983
#define OP_LOCAL 32984
#define OP_LABEL 32985
#define OP_STRING 32986
#define OP_INT16 32987
#define OP_INT32 32988
#define OP_DISPATCH 32989
#define OP_USERFLAG 32990
#ifdef HEROMESH_CLASS
static const Op_Names op_names[]={
{"*",8486937},
{"+",8421399},
{"+Move",10584231},
{"-",8421400},
{"-Move",10584232},
{"-rot",8421382},
{".",10518528},
{"/",8486938},
{"ANHH",8389394},
{"ARRIVED",8389124},
{"Animate",8421513},
{"AnimateDead",8421514},
{"Arg1",8552569},
{"Arg2",8552570},
{"Arg3",8552571},
{"Array",8683722},
{"ArrayCell",8421582},
{"ArraySlice",8421583},
{"Arrivals",8618086},
{"Arrived",8618084},
{"Assassinate",8487051},
{"B",9437196},
{"BANG",8389380},
{"BEDOINGNG",8389406},
{"BEEDEEP",8389404},
{"BEGIN_TURN",8389123},
{"BLOCKED",8389144},
{"BOOOM",8389410},
{"BOUNCE",8389415},
{"BRRREEET",8389396},
{"BRRRT",8389395},
{"BUZZER",8389420},
{"BWEEP",8389397},
{"Background",8683648},
{"Broadcast",10518668},
{"BroadcastEx",10518670},
{"BroadcastSum",8421519},
{"BroadcastSumEx",8421520},
{"Busy",8618088},
{"CHEEP",8389393},
{"CHYEW",8389392},
{"CLICK",8389388},
{"COLLIDE",8389142},
{"COLLIDEBY",8389141},
{"COLLIDING",8389143},
{"CONFLICT",8389140},
{"CREATE",8389121},
{"CREATED",8389137},
{"Chebyshev",8487058},
{"Class",8486970},
{"Climb",9142350},
{"CodePage",8683649},
{"CollisionLayers",8487029},
{"Coloc",8487059},
{"Compatible",8487028},
{"CopyArray",8421584},
{"Create",10518676},
{"DEEP_POP",8389417},
{"DEPARTED",8389125},
{"DESTROY",8389122},
{"DESTROYED",8389136},
{"DINK",8389390},
{"DOOR",8389378},
{"DRLRLRINK",8389398},
{"DYUPE",8389413},
{"DefaultImage",8683653},
{"DelInventory",8421525},
{"Delta",8421526},
{"Density",9142342},
{"Departed",8618085},
{"Departures",8618087},
{"Destroy",10584215},
{"Destroyed",8487026},
{"Dir",8618048},
{"Distance",9142340},
{"Done",8618097},
{"DotProduct",8421585},
{"E",9437184},
{"END_TURN",8389139},
{"EditorHelp",8683655},
{"Eight",8683733},
{"F",9437192},
{"FAROUT",8389421},
{"FFFFTT",8389399},
{"FLOATED",8389132},
{"FROG",8389383},
{"Finished",8552575},
{"FlushClass",8421528},
{"FlushObj",8487065},
{"Four",8683732},
{"From",8421496},
{"GLASS",8389379},
{"GLISSANT",8389419},
{"GetArray",8421579},
{"GetInventory",8421530},
{"HAWK",8389425},
{"HEARTBEAT",8389407},
{"HIT",8389134},
{"HITBY",8389135},
{"Hard",8618066},
{"Height",9142348},
{"HeightAt",8421531},
{"Help",8683654},
{"INIT",8389120},
{"IgnoreKey",8421532},
{"Image",8618049},
{"InPlace",8683652},
{"Inertia",9142338},
{"InitArray",8421580},
{"Input",8683650},
{"IntMove",10584221},
{"Invisible",8618089},
{"JAYAYAYNG",8389416},
{"JUMPED",8389128},
{"JumpTo",10584222},
{"KEWEL",8389422},
{"KEY",8389129},
{"KLECK",8389387},
{"KLINKK",8389385},
{"Key",8421502},
{"KeyCleared",8618090},
{"L",9437194},
{"LASTIMAGE",8389126},
{"LB",9437195},
{"LF",9437193},
{"LOCK",8389408},
{"LOOP",8388610},
{"Level",8421501},
{"Loc",8487071},
{"LocateMe",8421536},
{"LoseLevel",8421537},
{"MOVED",8389127},
{"MOVING",8389130},
{"Manhattan",8487074},
{"MaxInventory",8421539},
{"Misc1",9142358},
{"Misc2",9142360},
{"Misc3",9142362},
{"Misc4",9142364},
{"Misc5",9142366},
{"Misc6",9142368},
{"Misc7",9142370},
{"Move",10584228},
{"Move+",10584229},
{"MoveNumber",8421500},
{"MoveTo",10584230},
{"Moved",8618095},
{"Moving",8618096},
{"Msg",8421495},
{"N",9437186},
{"NE",9437185},
{"NW",9437187},
{"NewX",8421545},
{"NewXY",8421546},
{"NewY",8421547},
{"OLDPHONE",8389402},
{"ONCE",8388609},
{"OSC",8388616},
{"OSCLOOP",8388618},
{"ObjAbove",8487084},
{"ObjBelow",8487085},
{"ObjBottomAt",8421550},
{"ObjClassAt",8421551},
{"ObjDir",8487088},
{"ObjLayerAt",8421553},
{"ObjMovingTo",8421554},
{"ObjTopAt",8421555},
{"P",8880338},
{"P*",8880339},
{"PLAYERMOVING",8389133},
{"POSTINIT",8389138},
{"POUR",8389377},
{"POWER",8389386},
{"Player",8487027},
{"PopUp",8421556},
{"Quiz",8683651},
{"R",9437198},
{"RATCHET1",8389418},
{"RATCHET2",8389412},
{"RATTLE",8389403},
{"RB",9437197},
{"RF",9437199},
{"Rel",8487094},
{"S",9437190},
{"SE",9437191},
{"SMALL_POP",8389389},
{"SPLASH",8389376},
{"STEAM",8389424},
{"STOP",8388608},
{"SUBS",8683656},
{"SUNK",8389131},
{"SW",9437189},
{"Seek",8487095},
{"Self",8421494},
{"Send",10584248},
{"SendEx",10584249},
{"SetArray",8421581},
{"SetInventory",8421562},
{"Shape",8618045},
{"ShapeDir",8618068},
{"Sharp",8618067},
{"Shovable",8618069},
{"Sound",8421563},
{"Stealthy",8618094},
{"Strength",9142352},
{"Synchronize",8421564},
{"TAHTASHH",8389409},
{"THMP_thmp",8389405},
{"THWIT",8389384},
{"TICK",8389391},
{"Target",8487101},
{"Temperature",9142331},
{"Trace",8421566},
{"UH_OH",8389382},
{"UNCORK",8389414},
{"UNHH",8389381},
{"UserSignal",8618091},
{"UserState",8618092},
{"VACUUM",8389411},
{"VisualOnly",8618093},
{"Volume",9142344},
{"VolumeAt",8421567},
{"W",9437188},
{"WAHOO",8389400},
{"WHACK",8389423},
{"Weight",9142346},
{"WinLevel",8421568},
{"XDir",8487105},
{"XYDir",8421570},
{"Xloc",8486974},
{"YDir",8487107},
{"YEEHAW",8389401},
{"Yloc",8486975},
{"_",8421572},
{"a?",8421433},
{"again",8683534},
{"band",8421409},
{"begin",8683533},
{"bit",8683557},
{"bit0",8388609},
{"bit1",8388610},
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
{"bit7",8388736},
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421412},
{"bor",8421410},
{"bxor",8421411},
{"c?",8421427},
{"chain",8421520},
{"cut",8683733},
{"cz?",8421428},
{"dup",8421377},
{"el",8683532},
{"else",8683530},
{"eq",8421418},
{"eq2",8421419},
{"flip",8421576},
{"for",8683538},
{"ge",8486959},
{"gt",8486957},
{"if",8683529},
{"in",8421573},
{"is",8421425},
{"land",8421414},
{"le",8486960},
{"lnot",8421417},
{"lor",8421415},
{"lsh",8421407},
{"lt",8486958},
{"lxor",8421416},
{"m?",8421429},
{"max",8486942},
{"mbegin",8683719},
{"min",8486941},
{"mod",8486939},
{"n?",8421426},
{"ne",8421420},
{"neg",8421404},
{"next",8683539},
{"nin",8421574},
{"nip",8421379},
{"o?",8421431},
{"over",8421384},
{"oz?",8421432},
{"pick",8421383},
{"repeat",8683537},
{"ret",8421398},
{"rot",8421381},
{"rsh",8486944},
{"s?",8421430},
{"swap",8421378},
{"then",8683531},
{"tmark",8421572},
{"tuck",8421380},
{"until",8683535},
{"while",8683536},
};
#define N_OP_NAMES 322
#endif







|
|






|




|










|






|












|




|

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
{"bit7",8388736},
{"bit8",8423400},
{"bit9",8423401},
{"bnot",8421412},
{"bor",8421410},
{"bxor",8421411},
{"c?",8421427},
{"chain",8421521},
{"cut",8683734},
{"cz?",8421428},
{"dup",8421377},
{"el",8683532},
{"else",8683530},
{"eq",8421418},
{"eq2",8421419},
{"flip",8421577},
{"for",8683538},
{"ge",8486959},
{"gt",8486957},
{"if",8683529},
{"in",8421574},
{"is",8421425},
{"land",8421414},
{"le",8486960},
{"lnot",8421417},
{"lor",8421415},
{"lsh",8421407},
{"lt",8486958},
{"lxor",8421416},
{"m?",8421429},
{"max",8486942},
{"mbegin",8683720},
{"min",8486941},
{"mod",8486939},
{"n?",8421426},
{"ne",8421420},
{"neg",8421404},
{"next",8683539},
{"nin",8421575},
{"nip",8421379},
{"o?",8421431},
{"over",8421384},
{"oz?",8421432},
{"pick",8421383},
{"repeat",8683537},
{"ret",8421398},
{"rot",8421381},
{"rsh",8486944},
{"s?",8421430},
{"swap",8421378},
{"then",8683531},
{"tmark",8421573},
{"tuck",8421380},
{"until",8683535},
{"while",8683536},
};
#define N_OP_NAMES 323
#endif

Modified pcfont.h from [13abeae76c] to [b9c5627019].

1
2
3
4
5
6
7
8
static const unsigned char fontdata[2048]={
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99,
0x81, 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x6c, 0xfe,
0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x0, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38,
0x10, 0x0, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x7c, 0x38, 0x7c, 0x10, 0x10,
0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x7c, 0x0, 0x0, 0x18, 0x3c, 0x3c, 0x18, 0x0,
0x0, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0x0, 0x3c, 0x66, 0x42,
0x42, 0x66, 0x3c, 0x0, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xf,
|







1
2
3
4
5
6
7
8
static const unsigned char pcfont[2048]={
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99,
0x81, 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x6c, 0xfe,
0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x0, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38,
0x10, 0x0, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x7c, 0x38, 0x7c, 0x10, 0x10,
0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x7c, 0x0, 0x0, 0x18, 0x3c, 0x3c, 0x18, 0x0,
0x0, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0x0, 0x3c, 0x66, 0x42,
0x42, 0x66, 0x3c, 0x0, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xf,

Modified picture.c from [9d616d2335] to [e07c9a379a].

23
24
25
26
27
28
29

30
31
32
33
34
35
36

SDL_Surface*screen;
Uint16 picture_size;
int left_margin;

static SDL_Surface*picts;
static Uint8*curpic;


static const char default_palette[]=
  "C020FF "
  "000000 222222 333333 444444 555555 666666 777777 888888 999999 AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE FFFFFF "
  "281400 412300 5F3200 842100 A05000 C35F14 E1731E FF8232 FF9141 FFA050 FFAF5F FFBE73 FFD282 FFE191 FFF0A0 "
  "321E1E 412220 5F2830 823040 A03A4C BE4658 E15464 FF6670 FF7F7B FF8E7F FF9F7F FFAF7F FFBF7F FFCF7F FFDF7F "
  "280D0D 401515 602020 802A2A A03535 C04040 E04A4A FF5555 FF6764 FF6F64 FF7584 FF849D FF94B7 FF9FD1 FFAEEA "







>







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

SDL_Surface*screen;
Uint16 picture_size;
int left_margin;

static SDL_Surface*picts;
static Uint8*curpic;
static const unsigned char*fontdata;

static const char default_palette[]=
  "C020FF "
  "000000 222222 333333 444444 555555 666666 777777 888888 999999 AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE FFFFFF "
  "281400 412300 5F3200 842100 A05000 C35F14 E1731E FF8232 FF9141 FFA050 FFAF5F FFBE73 FFD282 FFE191 FFF0A0 "
  "321E1E 412220 5F2830 823040 A03A4C BE4658 E15464 FF6670 FF7F7B FF8E7F FF9F7F FFAF7F FFBF7F FFCF7F FFDF7F "
  "280D0D 401515 602020 802A2A A03535 C04040 E04A4A FF5555 FF6764 FF6F64 FF7584 FF849D FF94B7 FF9FD1 FFAEEA "
749
750
751
752
753
754
755

756
757
758
759
760
761
762
  fprintf(stderr,"Done\n");
}

void init_screen(void) {
  const char*v;
  int w,h,i;
  if(main_options['x']) return;

  optionquery[1]=Q_screenWidth;
  w=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"800",0,10);
  optionquery[1]=Q_screenHeight;
  h=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"600",0,10);
  optionquery[1]=Q_screenFlags;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"";
  if(SDL_Init(SDL_INIT_VIDEO|(strchr(v,'z')?SDL_INIT_NOPARACHUTE:0)|SDL_INIT_TIMER)) fatal("Error initializing SDL: %s\n",SDL_GetError());







>







750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
  fprintf(stderr,"Done\n");
}

void init_screen(void) {
  const char*v;
  int w,h,i;
  if(main_options['x']) return;
  if(!fontdata) fontdata=pcfont;
  optionquery[1]=Q_screenWidth;
  w=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"800",0,10);
  optionquery[1]=Q_screenHeight;
  h=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"600",0,10);
  optionquery[1]=Q_screenFlags;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"";
  if(SDL_Init(SDL_INIT_VIDEO|(strchr(v,'z')?SDL_INIT_NOPARACHUTE:0)|SDL_INIT_TIMER)) fatal("Error initializing SDL: %s\n",SDL_GetError());
782
783
784
785
786
787
788










































































789
790
791
792
793
794
795
  } else {
    SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL);
  }
  SDL_EnableUNICODE(1);
  optionquery[1]=Q_margin;
  left_margin=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"65",0,10);
}











































































// Widgets

static void draw_scrollbar(int*cur,int page,int max,int x0,int y0,int x1,int y1) {
  Uint8*pix=screen->pixels;
  Uint16 pitch=screen->pitch;
  int x,y,m0,m1;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
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
869
870
871
  } else {
    SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL);
  }
  SDL_EnableUNICODE(1);
  optionquery[1]=Q_margin;
  left_margin=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"65",0,10);
}

void set_code_page(Uint16 n) {
  int c,i,j,s;
  const char*v;
  unsigned char*d;
  Uint8 b[32];
  FILE*fp;
  if(!n) return;
  if(fontdata && fontdata!=pcfont) fatal("Multiple code page specifications\n");
  optionquery[1]=Q_codepage;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2);
  if(!v || !*v) {
    if(n==437) return;
    fatal("Cannot load code page %d; code page file is not configured\n",n);
  }
  fp=fopen(v,"r");
  if(!fp) {
    perror(0);
    fatal("Cannot open code page file\n");
  }
  fontdata=d=malloc(0x800);
  if(!d) fatal("Allocation failed\n");
  memcpy(d,pcfont,0x800);
  name:
  s=i=0;
  for(;;) {
    c=fgetc(fp);
    if(c<0) {
      if(n!=437) fatal("Cannot find code page %d\n",n);
      goto done;
    }
    if(!c) break;
    if(!s) {
      if(c<'0' || c>'9') s=1;
      else if(c=='0' && !i) s=1;
      else i=10*i+c-'0';
      if(i>65535) s=1;
    }
  }
  if(s || i!=n) goto skip;
  i=fgetc(fp)<<16;
  i|=fgetc(fp)<<24;
  i|=fgetc(fp)<<0;
  i|=fgetc(fp)<<8;
  if(i==0x800) {
    fread(d,8,256,fp);
    goto done;
  } else if(i==0x400) {
    fread(d+0x400,8,128,fp);
  } else if(i<32 || i>0x800) {
    fatal("Unrecognized format of code page %d\n",n);
  } else {
    fread(b,32,1,fp);
    for(s=0;s<256;s++) if(!(b[s>>3]&(1<<(s&7)))) {
      if(c=fgetc(fp)) {
        i=fgetc(fp);
        if(i&~255) fatal("Error reading data for character %d in code page %d\n",s,n);
        if(i!=s) memcpy(d+s*8,d+i*8,8);
      }
      for(j=0;j<8;j++) if(!(c&(1<<j))) d[j+s*8]=fgetc(fp);
    }
  }
  memset(d,0,8);
  goto done;
  skip:
  i=fgetc(fp)<<16;
  i|=fgetc(fp)<<24;
  i|=fgetc(fp)<<0;
  i|=fgetc(fp)<<8;
  fseek(fp,i,SEEK_CUR);
  goto name;
  done:
  fclose(fp);
}

// Widgets

static void draw_scrollbar(int*cur,int page,int max,int x0,int y0,int x1,int y1) {
  Uint8*pix=screen->pixels;
  Uint16 pitch=screen->pitch;
  int x,y,m0,m1;

Modified quarks from [57706df161] to [6347a65352].

216
217
218
219
220
221
222

223
traceAll
traceObject
showInventory
progress
autoSave
maxTrigger
pasteCommand









>

216
217
218
219
220
221
222
223
224
traceAll
traceObject
showInventory
progress
autoSave
maxTrigger
pasteCommand
codepage

Modified quarks.h from [2ea9aca83b] to [93005ce16b].

181
182
183
184
185
186
187

188
189
190
191
192
193
194
#define Q_traceAll 182
#define Q_traceObject 183
#define Q_showInventory 184
#define Q_progress 185
#define Q_autoSave 186
#define Q_maxTrigger 187
#define Q_pasteCommand 188

static const char*const global_quarks[]={
  "screenWidth",
  "screenHeight",
  "margin",
  "palette",
  "popupColors",
  "imageSize",







>







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#define Q_traceAll 182
#define Q_traceObject 183
#define Q_showInventory 184
#define Q_progress 185
#define Q_autoSave 186
#define Q_maxTrigger 187
#define Q_pasteCommand 188
#define Q_codepage 189
static const char*const global_quarks[]={
  "screenWidth",
  "screenHeight",
  "margin",
  "palette",
  "popupColors",
  "imageSize",
369
370
371
372
373
374
375

376
377
378
379
380
381
382
  "traceAll",
  "traceObject",
  "showInventory",
  "progress",
  "autoSave",
  "maxTrigger",
  "pasteCommand",

0};
#ifdef HEROMESH_BINDINGS
static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={
SDLK_BACKSPACE,
SDLK_TAB,
SDLK_CLEAR,
SDLK_RETURN,







>







370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
  "traceAll",
  "traceObject",
  "showInventory",
  "progress",
  "autoSave",
  "maxTrigger",
  "pasteCommand",
  "codepage",
0};
#ifdef HEROMESH_BINDINGS
static const SDLKey quark_to_key[Q_undo+1-Q_backspace]={
SDLK_BACKSPACE,
SDLK_TAB,
SDLK_CLEAR,
SDLK_RETURN,