Free Hero Mesh

Check-in [561f982c9c]
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:Change documentation about code page numbers (the effectiveness is the same as before), and treat code page 367 the same as 437 (which is a superset of 367 anyways, so it is OK).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 561f982c9c2d1918e1c6afb5f9cfa4e79dc9664c
User & Date: user on 2022-01-04 06:02:11
Other Links: manifest | tags
Context
2022-01-05
03:59
Set the correct name of the DIVISION.IDX lump when creating it. check-in: 1d52f98ea2 user: user tags: trunk
2022-01-04
06:02
Change documentation about code page numbers (the effectiveness is the same as before), and treat code page 367 the same as 437 (which is a superset of 367 anyways, so it is OK). check-in: 561f982c9c user: user tags: trunk
02:21
Implement level index editor, including divisions. (Currently, the divisions is not used outside of the level index editor; later, this should be fixed) check-in: 8117ec3cff user: user tags: trunk
Changes

Modified codepage.doc from [d8f7c530cd] to [1ddaf3a23f].

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
29
30
31
32
33







34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49
50
51
52
53
54




55
56
57
58
59
60
61
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69






-
+
+
+
+

-
-
-
+

-
+
-
-
-
-
+
+

+
-
-
-
+
+
+
-
-
-
-








+
+
+
+
+
+
+







+














+
+
+
+








=== Code page numbers ===

Code page numbers are assigned according to the following:

* Code page numbers are 16-bit numbers. Numbers 0, 65534, and 65535 are
not used; they are reserved for internal use of the software.
not used; they are reserved for internal use of the software. (TODO:
Maybe this should be changed to 23-bit code page numbers that I will
maintain a list of. The below will still apply for code page numbers
that fit in 16-bits, though.)

* IBM and Microsoft code page numbers can be used. (Mostly, only IBM
code page numbers should be used, but in some cases (described below)
Microsoft code page numbers might be applicable.)
* Mainly, IBM code page numbers are used.

* If IBM and Microsoft use the same code page number for a different
* If there is something from Microsoft or FreeDOS that does not already
character set, or if they use different code page numbers for the same
character set/encoding, then IBM takes precedence. However, if Microsoft
uses the code page number for a strict superset of IBM's definition,
then Microsoft's definition will be used.
have a IBM code page number and does not conflict with IBM assignments,
then they may also be used.

* If a Microsoft code page extends a IBM code page and is otherwise 100%
* Extensions of FreeDOS are used if they do not conflict with IBM and
are not already present as official IBM code pages.

backward compatible with it, and ahs the same number as the corresponding
IBM code page, then the extensions added by Microsoft will also apply to
that code page (only).
* The areas designated as private use areas by IBM (57344-61439 and
65280-65533) may be defined in future by myself (or others, with my
approval). Some ranges may also later be reserved as user-defined or
application-specific areas.

Note that not all of the code page numbers according to the above are
actually used in Free Hero Mesh; Free Hero Mesh only uses ASCII-based
code pages with 8-bit characters (although the implementation may be
improved in future to allow multibyte code pages, but currently it
doesn't). The full set of code page numbers may still be useful for
other applications, though.

(Even if multibyte code pages are implemented in future (as well as the
possibility of different font sizes than 8x8, and for narrow/wide
characters), Shift-JIS is not suitable for Free Hero Mesh, because Free
Hero Mesh uses a backslash for string escaping and a multibyte character
in Shift-JIS can contain the ASCII code for a backslash. However, EUC-JP
may be suitable.)


=== List of code page numbers ===

In the below list, "=" means that it is already included in the provided
codepage.har file, and "-" means it isn't included (it might or might not
be included in future).

   367 = ASCII only
   437 = default PC character set
   850 = PC-like Western Latin
   852 - PC-like Central European
   858 - PC-like Western Latin including Euro currency
   860 - PC-like Portuguese
   861 - PC-like Icelandic
   865 = PC-like Nordic
   866 = DOS Cyrillic Russian
  1041 - Katakana (Japanese)
  1125 = DOS Cyrillic Ukrainian/Belarusian
  1250 - Windows Central Europe
  1251 - Windows Cyrillic
  1252 - Windows Western
  1254 - Windows Turkish

(Note: Code page 437 is hard-coded and is compiled into the executable
file, and if you specify code page 367 then it will automatically change
it to 437 (since code page 437 is a superset of code page 367).)


=== File format ===

The codepage.har file is a Hamster archive containing one lump for each
code page, named by the code page number in decimal. Code page 437 need
not be included in this file; pcfont.h is used instead.

Modified picture.c from [ba5f92d7a9] to [74bc65b7f7].

820
821
822
823
824
825
826

827
828
829
830
831
832
833
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834







+







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(n==367) n=437;
  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);
  }