Compare commits

...
68 Commits
Author SHA1 Message Date
Stefan MaierandClaude Opus 5.5 c8dfd3773f Merge merge/upstream-agpl: OpenCE upstream under the AGPL 3.0 or later, Ringfall with it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:29:39 +02:00
Stefan MaierandClaude Opus 5.5 856ca06a5d Merge OpenCE upstream under its new licence, the AGPL 3.0 or later
OpenCE moved from CC0 1.0 to AGPL-3.0-or-later (4b09168e7), and Ringfall:
Mjolnir VR moves with it: README's Legal section and THIRD_PARTY_NOTICES
say so (releases before this one stay CC0 1.0, LICENSES/CC0-1.0.txt).

Its disc image readers were written again from a description of the
format, extract-xiso's code and notice gone. The app's (XisoExtractor.java)
is OpenCE's new one with Ringfall's language folders (maps_es, maps_it)
added again; the Steam Frame's (steam_frame_xiso.py) is written anew the
same way, the language folders kept; the bundle and the release job no
longer carry extract-xiso's licence. Also in: bnunu/halo-1's latest
matches, the web build's WebRTC and loading fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:17:41 +02:00
MrBruh 7a1b683328 Merge pull request #415 from OpenCommunityEdition/testing
Switch OpenCE to the AGPL 3.0 or later, with the disc image readers w…
2026-10-19 20:58:05 +13:00
MrBruh 4b09168e7f Switch OpenCE to the AGPL 3.0 or later, with the disc image readers written again from a description of the format 2026-10-19 20:12:12 +13:00
MrBruh c208663539 Merge pull request #406 from OpenCommunityEdition/testing
Testing
2026-10-19 07:47:40 +13:00
Stefan MaierandClaude Opus 5.5 307d2a953c Merge fix/lan-join-bots: a lobby the bots fill is open to a person on the LAN too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:09:46 +02:00
Stefan MaierandClaude Opus 5.5 ce8eba8088 Roadmap: bots make room on the LAN too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:09:45 +02:00
Stefan MaierandClaude Opus 5.5 62dee62eb6 A lobby the bots fill is open to a person on the LAN too
The bots make room for a person who joins, and the server browser's
listing counted their slots as free, but the LAN advertisement and the
join's check still asked for a free slot: with 15 bots and the host a
lobby of 16 was advertised closed, and a Quest on the LAN was refused
("attempted to join a closed game"). Both now count a bot's slot in a
lobby as a person's, as the listing does (network_game_server_room_for_person).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:59:49 +02:00
Stefan MaierandClaude Opus 5.5 cf11cc86ce Merge merge/upstream-chat: OpenCE's text chat and streamer mode, the scores on the menu button held
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:15:13 +02:00
Stefan MaierandClaude Opus 5.5 40e4ff2cf8 Roadmap: the scores on the Quest, the text chat in VR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:15:12 +02:00
Stefan MaierandClaude Opus 5.5 e901c92b41 VR: the menu button held shows the scores (the Quest's controllers had no way to them)
A press pauses as before, now as it is let go; held 0.4 s, the scores
show as long as it is, as the Xbox's Back. In the menus it is Start at
once. The Quest's controls page says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:42:41 +02:00
Stefan MaierandClaude Opus 5.5 dc52b7a592 Merge fixes: a brace the p2p.c merge lost; in VR the chat lines where the desktop has them
The chat's lines go at the top left on Android, where the touch controls
keep the bottom left free; VR has none, so it lays them out as the desktop
does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:34:36 +02:00
Stefan MaierandClaude Opus 5.5 93b67eb7d7 Merge OpenCE upstream: text chat in network games, streamer mode, faster map sharing, the web launcher
The touch controls stay off in VR alongside the chat's on-screen
keyboard (xinput_sdl.c); the join codes and the online list beside the
server browser's listed hosts (p2p.c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:33:00 +02:00
MrBruh 81a768bc81 Export the game functions the web page calls, so its loading notice hides once the menus draw and rooms reach the game 2026-10-18 23:49:26 +13:00
MrBruh 1b61b52929 Keep a browser's WebRTC channel from stalling under loss by reporting every gap and giving up old ones, and let the test's lossless run tolerate a dropped burst 2026-10-18 23:36:08 +13:00
MrBruh 0110c16001 Merge bnunu/halo-1 main into testing, keeping OpenCE's code where both changed it and leaving out its matching tooling and logs 2026-10-18 22:31:23 +13:00
MrBruh 38ccb5f9a4 Merge pull request #401 from OpenCommunityEdition/testing
Merge Testing
2026-10-18 22:07:36 +13:00
MrBruh 54de4909ef Count the website's visits with Umami, its script loaded with CORS as the isolated page needs 2026-10-18 21:56:56 +13:00
MrBruh 1797ecd9ef Serve the web build's wasm from jsDelivr instead of GitHub Pages, checked against its SHA-256, with the site's copy as the fallback 2026-10-18 21:52:06 +13:00
MrBruh eb16cf4bdc Let a host share maps at up to 20 MB/s and a player helping it at up to 10 MB/s 2026-10-18 21:46:23 +13:00
MrBruh 52c1934dab Add sexual, hate and harassment words that Surge AI's list lacks to streamer mode 2026-10-18 21:35:30 +13:00
MrBruh bc37efd5da Redraw the web launcher in the menus' look, with a Ready to Play screen and Discord links on the page and in game 2026-10-18 21:11:01 +13:00
MrBruh f9bfca84b0 Merge pull request #400 from OpenCommunityEdition/testing
Merge Testing
2026-10-18 20:21:11 +13:00
MrBruh 453c24e6e0 Show the host's TEXT CHAT as OFF, and keep it from changing, while the game is listed in the server browser (#399) 2026-10-18 20:10:54 +13:00
MrBruh b1d71f070f Draw the text chat in team colors by default, with white as Custom Edition's an option (#399) 2026-10-18 20:01:04 +13:00
MrBruh 90ab2ff094 Move the text chat settings to Network Setup's Multiplayer HUD, put voice chat back on Audio Setup, and show Network Setup's in-game pages in the pause menu, co-op too (#399) 2026-10-18 19:57:16 +13:00
MrBruh 8488a161eb Fix the text chat's review findings: no | in lines, case-blind mutes, wrapped lines, per-view and hidden chat, stream-only host messages, no chat in browser-joined public games (#399) 2026-10-18 19:33:08 +13:00
MrBruh 4c624fcbed Merge pull request #399 from OpenCommunityEdition/ingame-chat-v2
Re-land the in-game text chat with the review's changes (#395, #397)
2026-10-18 18:26:36 +13:00
Jonas VolmanandClaude Opus 5.5 8652d565da Hide the touch controls while the chat's on-screen keyboard is up
On Android the touch controls' overlay keeps every finger while it shows
(the look, outside its controls), so a tap on the keyboard never reached
the game. While the keyboard is up the overlay now hides, as it does for a
menu or a cinematic, and lets the fingers through: a tap on a key types it,
and a tap elsewhere closes the keyboard, as B and the other touch controls
are hidden then.

A tap's place is a fraction of the screen, which the viewport fills, so the
keys' place is now kept as a fraction of the viewport, not of the HUD's
window inside it, which is smaller on Android.

Checked on the x86 Android emulator (with #396's fix for its ARM
translation, not part of this change): the touch D-pad's Up, held as a
finger holds it, opened the keyboard at the bottom of the screen and hid
the touch controls; taps on h and i typed "hi", a tap on SEND said it
("chat: Player: hi"), the keyboard closed and the controls came back; a
tap away from the keys closed it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:38:15 -07:00
Jonas VolmanandClaude Opus 5.5 bc2344fb44 Let a controller or a touchscreen type a chat line on an on-screen keyboard
A controller's D-pad Up opens an on-screen keyboard for a line to everyone
(the D-pad only repeats the left stick's movement in the game). The stick,
or D-pad Left and Right, moves between its keys, A types one, X deletes, Y
switches capitals, D-pad Up and Down turn the line to everyone, the team or
the vehicle, Start sends it and B closes the keyboard; its last row has
Aa, #+= (the symbols' page), space, DEL and SEND. It is drawn at the bottom
right, clear of the lines above the motion sensor; on Android at the bottom
in the middle, between the touch controls, as the lines are at the top
left there.

The touch controls' D-pad Up opens it too, and a tap on a key types it
(touch_input.c hands the taps outside the menus to it). While it is up the
game gets none of the first controller (xinput_sdl.c), nor the touch
controls' stick and look.

The automated tests press the controller's buttons through
test_input_press: debug.network_test_chat now has each client type
"gg ez" on the keyboard and send it to the team. A drawn Linux client typed
it and the host received "chat (team): Player 2: gg ez"; the frames show
the keyboard over the game, the key picked lit, the typed line growing.
The harness gains three cases and six negative controls for the keys'
characters, moving between them and a tap's key (64 pass); CI's Linux test
step passes (493, 6 skipped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:17:38 -07:00
Jonas VolmanandClaude Opus 5.5 7abd376b85 Mute a player's voice and text chat from the scoreboard
A player's scoreboard menu (right-click, then the player) had Mute voice,
this machine's own choice. It is now Mute voice and chat: this machine
plays none of their voice and shows none of their lines, and tells no one.
It is offered whether or not voice chat is on.

The host's menu adds Mute for everyone / Unmute for everyone. It is the
chat's /mute for 20 minutes (every machine told "Milenko muted for 20
minutes"), and it now silences the player's voice too: the host relays
none of a muted player's machine's voice (voice_host_relay), as it relays
none of their lines. /mute from the chat mutes their voice the same way.

debug.network_test_chat now also has the host mute the last player for
everyone (network_chat_host_mute, as its scoreboard does) and unmute them,
and the last player's machine mute the host's for itself. On three Linux
machines over system link, with debug.voice_test's tone as open mic:
- the host's mute: no machine showed the player's line, they alone were
  told the minutes left, and the host and the other client stopped hearing
  their voice until the unmute (one second heard at the edge);
- the client's own mute: only that machine stopped showing the host's lines
  and hearing the host's voice.
CI's Linux test step passes (484, 6 skipped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:50:59 -07:00
Jonas VolmanandClaude Opus 5.5 e6d1e09bd7 Let the host turn the text chat off and refuse links, and players hide it
The host's TEXT CHAT row (Server Setup > Teamplay Options; in co-op, Voice
and Voting; network.text_chat) is ON (the default: lines with links are
refused), WITH LINKS or OFF: one row, as Teamplay Options has room for one
more. A game listed in the server browser (p2p_hosting_listed: a public
internet game) never has the text chat; a private game, joined by its
invite, and a LAN game have it as chosen.

The host sends its settings to every client in a new message,
_distributed_message_chat_config (89, one byte of flags), as they change
and every 3 seconds. A client without them, as from a host without the
chat, has the chat off. Pressing T where it is off says "Text chat is off
in this game". A line the settings refuse is refused on the sender's
machine and again by the host, whatever the client knew, which tells the
sender why: a changed build gets no further. Older builds drop the new
kind, so the network version stays 29.

Links are found by chat_text_has_link: a scheme, "www.", four numbers and
three dots, or a name and a common top-level domain ("discord.gg/x",
"example.com"), with the dots also written "(dot)", "[dot]", "(.)" or "[.]";
"1.5", "e.g.", "U.S.A" and "wait.comrades" are not links.

TEXT CHAT on Settings > Audio > Voice and Text Chat (display.text_chat)
HIDEs the chat for purists and streamers: no lines, and T and Y open
nothing. /mute's minutes are 20 when none are given.

debug.network_test_chat now also has each machine say a line with a link
(a client's sent past its own check, network_chat_say_unchecked, for the
host to refuse), then the host turns the chat off and on again around one
more line each. On three Linux machines over system link: every machine
showed "Links aren't allowed in this game" and "Text chat is off in this
game" once, the clients' from the host, and no refused line reached anyone.
The settings screens were drawn and the TEXT CHAT row's help follows its
choice. The harness gains four cases and six negative controls (55 pass);
CI's Linux test step passes (484, 6 skipped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:39:29 -07:00
Jonas VolmanandClaude Opus 5.5 e94255072e Remove the duplication in network_chat.c
No change in behaviour:
- chat_message_new builds a line's message (header and line), which
  chat_host_send, chat_host_notice and chat_send each did by hand.
- chat_send_to_clients sends a message to every client machine.
- chat_line_text turns the typed line into wide characters too, in place
  of the drawing's own loop.
- chat_player_name_length is the one count of a name's characters, for the
  line's name and its ASCII copy.
- CHAT_DRAWN_SIZE and the comments about the chat's old filter are gone;
  testing's streamer mode keeps a word's length, so a line's buffers are
  CHAT_TEXT_SIZE.

The name match keeps its own lower-casing (chat_lower): the console's
network_game_server_name_begins_with is static in network_server_manager.c,
and the harness takes chat_name_match without the game.

Checked: the Linux debug build, the chat harness (45), and the three-machine
system-link chat test (lines, channels, /mute, /unmute) as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:55:22 -07:00
Jonas VolmanandClaude Opus 5.5 c527105b31 Use testing's streamer mode for the text chat
Testing's streamer mode (90dd65ca, text_filter.c) hides offensive words in
every string drawn, through draw_string.c, so it already covers the chat's
lines and players' names. The chat's own filter goes: chat_filter.c and
its harness tests, game.streamer_mode (which also shared
HALO_STREAMER_MODE with streamer.enabled) and the STREAMER MODE row on the
VOICE AND TEXT CHAT page. Settings > Network Setup > Streamer Mode is the
one toggle. The README's Streamer mode section now names the chat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:45:37 -07:00
Jonas VolmanandClaude Opus 5.5 da38822634 Re-land the in-game text chat (revert #397)
This reverts 4ac609f0, the revert of #395, so the chat is back as it was
merged: T, Y and Tab, team and vehicle lines, the host's /mute, the
VOICE AND TEXT CHAT settings page and the Android placement.

The one conflict is source/text/draw_string.c, where #395's streamer mode
and testing's (90dd65ca, text_filter.c) both hook the drawn text; testing's
hook is kept. #395's own filter (chat_filter.c, game.streamer_mode) is left
in place, unhooked, for the next commit to take out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:44:03 -07:00
MrBruh 90dd65cab4 Add a streamer mode that hides slurs, swearing and insults in text from other players, maps and mods 2026-10-18 15:16:12 +13:00
MrBruh efabb0d056 Merge pull request #397 from OpenCommunityEdition/revert-395-ingame-chat
Revert "Add an in-game text chat for network games"
2026-10-18 15:03:57 +13:00
MrBruh 4ac609f0df Revert "Add an in-game text chat for network games" 2026-10-18 15:03:39 +13:00
bnunu be521e2621 Merge pull request #395 from OpenCommunityEdition/ingame-chat
Add an in-game text chat for network games
2026-10-17 22:03:27 -04:00
Jonas VolmanandClaude Opus 5.5 75b2393ccf Merge testing into ingame-chat
testing's SOUND PROCESSING page and the chat's VOICE AND TEXT CHAT page
both split rows off Audio Setup in tools/port_settings.py. Both are kept,
as two category rows, sound processing first. The settings screens and
menus.json are regenerated from it, so they match testing's apart from the
chat's page, its row on Audio Setup and Controls Setup's COMMUNICATION
group.

Checked after the merge: the Linux debug build, the network format check,
the CI Linux test step (467 passed, 6 skipped), and the three-machine
system-link chat test, /mute and /unmute included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:37:12 -07:00
Jonas VolmanandClaude Opus 5.5 8592780212 Let the host mute a player's text chat with /mute
The host types "/mute <player> [minutes]" in the chat (5 minutes when it
gives none, 1440 at most), or "/unmute <player>". The player is found as
the console's kick finds one: the whole name in either case, else the one
player whose name begins with what was typed; none, or more than one, is
said to the host alone. Every machine is told "Milenko muted for 5
minutes" and "Milenko unmuted", as a notice in the chat: a down line with
the new _chat_line_notice_bit, its text alone, drawn in a pale gold
(white in the white style).

The host keeps a mute by the player's name in ASCII, so one who leaves and
joins again under it is still muted, and its minutes by its own clock. It
drops a muted player's lines as they come up and tells that machine alone
"You are muted for N more minutes". The mute ends by itself. A client's
/mute is shown "Only the host can mute players" and never sent, and the
host takes a line that came up as a line, never as a command. The wire
format and the network version (29) are unchanged.

debug.network_test_chat now has the host mute the last player for a
minute, each machine say a line, the host unmute them and each say
another. On three Linux machines over system link the muted player's line
reached no one, they alone got the minutes left, every machine showed the
mute and the unmute, and the clients' own /mute was refused. A drawn
client showed the notices in the chat. The harness gains ten cases and
eleven negative controls for the command's parsing, the name match and
the mute's time (412 pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 861b8faca7 Draw the text chat at the top left on Android, the newest line highest
On Android the touch controls' Down button and Move stick are at the bottom
left, where the chat lines went (above the motion sensor). There the lines
now start under the weapon's panel at the top left, in the same column, and
go down: the line being typed first, then the newest, the older ones below
it. At most four show at once, the typed one among them: a fifth would
reach the tops of the Up and Fire buttons. The other builds draw them as
before.

Checked on the x86 emulator (host:bloodgulch: the test's three lines, two
typed with the keyboard, a third being typed): the typed one and the three
newest show, clear of the touch controls. Linux debug build and the
harness (391) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 f9676b2962 Replace bad words in players' names wherever streamer mode draws them
Streamer mode replaced the words of its list only in the chat's lines and
names, but a player named with a slur showed it on the scoreboard, above
their head, in the kills and in the lobby. Every text the game draws or
measures now goes through the filter at draw_string.c's start, both
draw_string and draw_unicode_string, so names are replaced wherever they
show and the text's width matches what is drawn. A text's format codes (a
| and the character after it) are kept, each run between them filtered on
its own, so a code never joins the words beside it ("|t" before "its").
The same strings are drawn every frame, so a cache of 48 keeps it cheap; a
text too long for its entries is drawn as it is rather than cut short.
The chat no longer filters its own lines (the draw does), so the line you
type shows replaced too. "hoe" now shows as "rake": "garden hoe" held the
word it replaced.

debug.network_test_name names a machine's player in an automated test
game, to test this.

Checked: tools/harness/tests/test_chat_filter.py (the format codes, the
cache, every replacement passed through the filter again unchanged, with
negative controls); a host on Xvfb, streamer mode on, named "fuckhead",
with a client named "n1gger": the chat showed "fudgehead" and the
scoreboard "nugget" and "fudgehead", while debug.txt kept the names as
they were; the CI Linux test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 0ca693e681 Let a chat line go to everyone, the team or the vehicle, by Tab
The PC version's chat could talk to everyone, the team or the vehicle.
While a line is typed, Tab now turns it to each in turn ("Say:", "Say to
team:", "Say to vehicle:"), as T and Y still start a line to everyone and
to the team. A vehicle's line goes to the players riding in the vehicle
the sender rides in: the host finds each player's outermost parent object
(a unit in a seat is its vehicle's child), so any map's vehicles count,
Custom Edition maps' too, and a sender on foot sees their line alone. The
host now always sends a line back to its sender's machine. The channel is
a second bit of the line's flags, so the wire format is unchanged.

debug.network_test_chat has the host seat the last two players in one
vehicle and every machine say a line to it.

Checked: tools/harness/tests/test_chat_logic.py (who hears a vehicle's
line, the channel through the flags, with negative controls); three
machines on system link, the two clients seated in one Warthog seeing
each other's vehicle lines and the host's, on foot, seeing only its own;
a host on Xvfb turning a line to the vehicle with Tab, and typing a line of
f's without meleeing; the CI Linux test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 9fc9f4e7a4 Let the text chat be drawn all white, as Custom Edition
display.chat_style (CHAT TEXT on Audio Setup's VOICE AND TEXT CHAT page)
picks the chat's colours: "default", the player's name in their team's
colour and the text a pale blue, as the PC version drew them, or "white",
all of it white, as Custom Edition. The line typed follows it too.

Checked on Xvfb: a host's lines drawn white, and the page with its new
row; the CI Linux test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 8a899e7650 Give Audio Setup a VOICE AND TEXT CHAT page with STREAMER MODE
Streamer mode needs a row a player reaches in a game, from the pause
menu's SETTINGS. Network Setup is not offered there and has no room on
desktop, and Audio Setup has none either, so its VOICE CHAT and VOICE
VOLUME rows move to a page of their own, VOICE AND TEXT CHAT, opened from
Audio Setup as Video Setup opens GRAPHICS, with STREAMER MODE under them.

The screens are port_settings.py's settings_files and menus.json lists the
new one, both written as tools/ce_menus.py writes them (it needs the PC
version's tags, so only these were written: the other screens come out
unchanged). Checked on Xvfb: both screens drawn, STREAMER MODE changed with
the keyboard and OK writing streamer_mode = true to config.toml; the CI
Linux test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 8413225a55 Add streamer mode to the text chat
A player who streams needs the chat on screen to stay clean whatever the
others type. game.streamer_mode (off by default) shows the slurs, swearing
and sexual words in the chat's names and lines as harmless, funny ones
(fuck: fudge, cunt: chop stick, faggot: flurry), keeping their case and
fitting their endings (fucking: fudging, faggots: flurries). Only what
this machine shows changes: the lines go to every machine as typed, so the
network is unchanged, and debug.txt keeps them so
(port/linux/game/chat_filter.c).

It finds the words in the spellings that dodge a plain list: digits and
signs for letters (n1gg3r, c00n, $hit), l for i, q for g, k for c, v for u,
ph for f and * for a vowel; letters and endings typed more than once; a
word spelled out with separators (n i g g e r); and a few words inside
others (sonofabitch, thundercunt). Each word may stand alone, with endings,
at a word's start or anywhere, and harmless words that hold one are kept
as typed (Scunthorpe, snigger, Niger, assassin, cocktail, rapper, FAQ).

Checked: tools/harness/tests/test_chat_filter.py (8 cases with 11
negative controls); every word of the repository's documents and of an
English dictionary of 370,000 words (dwyl/english-words) run through the
filter, the harmless ones it changed kept, and a community-submitted list
of 2,800 entries used to find gaps (neither list is in the repository: the
community one has no licence); a host on Xvfb with streamer mode on,
lines typed on its keyboard shown replaced while the client logged them
as typed; and the CI Linux test step.

No Settings row yet: Network Setup has no room on desktop and is hidden
from the pause menu's SETTINGS, so where the toggle goes is still to be
chosen; config.toml and HALO_STREAMER_MODE set it meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 0792a3aecb Draw the chat lines with a soft shadow
The text drawing gives every string a hard shadow, a black copy a unit
down and right; the PC version's chat had a softer one, further out. The
chat lines now draw theirs as translucent black copies one to three units
down and right, which add up to a dark middle with a soft edge, and the
text's own shadow clear. Checked on a host drawn on Xvfb against the
reference screenshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
Jonas VolmanandClaude Opus 5.5 3efe79a38d Add a text chat to network games
Network games had voice chat but no way to type to the other players, as
the PC version's chat did. T (controls.chat) types a line to everyone and
Y (controls.team_chat) one to the team; Enter sends it, Escape cancels it.
The lines are drawn above the motion sensor with the HUD's font: the
player's name in their team's colour (blue without teams), then the text
in a pale blue, and fade after ten seconds (port/linux/game/network_chat.c).

A client sends its line to the host (_distributed_message_chat_up), which
takes it only from the client's own stream and one of that machine's
players, five at once and one each 1.5 seconds after, its text cut to 63
characters of printable ASCII, and sends it on to the machines that hear
it (_distributed_message_chat_down): all, or a team's line those with a
player of the team. Older builds drop both kinds as unknown, so the
network version stays 29, as for the vote kick; network_format.txt
records the two kinds.

While a line is typed the keyboard drives no player, as with the console
(xinput_sdl.c), nor voice chat's push to talk or the debug keys. Controls
Setup gets a COMMUNICATION group with PUSH TO TALK, CHAT and TEAM CHAT
(the controls screen's spinner strings changed by hand to what
port_settings.py writes: ce_menus.py needs the PC version's tags).

Checked: tools/harness/tests/test_chat_logic.py (the text's cleaning, the
host's rate, who hears a team's line, the fade, with negative controls);
the CI Linux test step; three machines on system link with
debug.network_test_chat (new), every machine showing the lines to all in
one order and a team's line only on its team's machines; and a host drawn
on Xvfb with lines typed on its keyboard through xdotool (sent on Enter,
not on Escape, the player still while typing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:02:07 -07:00
MrBruh e393fbe716 Draw the main menu's MODS item in the redraws' own letters, spaced and glowing as the other items are 2026-10-18 12:24:15 +13:00
Jonas Volman 2e376b992e Reconcile approved single-pixel S3TC decoder (+1 function, zero losses)
Apply only the Q-UP25 delta from de53e9bf, preserving both original-defect BUG comments and inferred length spelling. Fresh canonical checkpoint: +493 meaningful / +496 padded code and +76 data, zero losses; 1663 tests pass, 5 skipped, 159 subtests. Whole-board W3 unchanged at 4091; only s3tc.obj changes. Encoder and object admission remain held.
2026-10-13 17:02:57 -07:00
Jonas Volman ff2e07fac1 Replace parked stristr assembly with exact ordinary C (zero credit)
Use the natural C implementation from punpckhdq/halo 745c66b8. All 621 object fingerprints and inherited exact verdicts are unchanged; the single asm-implemented park is retired. Fresh full checkpoint: 1663 tests pass, 5 skipped, 159 subtests. Current scoring already counted the assembly: no additional function or byte credit.
2026-10-13 16:59:49 -07:00
Jonas Volman 1a98636fc0 Replace remaining BSS pragmas with verified zero initialization 2026-10-09 05:14:47 -07:00
Jonas Volman 14ec9fc4a2 Remove three no-op BSS pragma blocks without byte changes 2026-10-09 04:23:56 -07:00
Jonas Volman 73677cf26d Remove empty header stubs and unused shader-stage enums
Zero credit: remove 51 guard-only headers, 50 project-list entries, four useless includes and two unused enum definitions. Preserve source assertion locations and both repositories existing READMEs. Clean rebuild, unchanged 8252-row strict snapshot, unchanged code/data credit and admissions, 1663 tests plus 159 subtests pass. Disclose 76 compiler-local label renumberings and two warning source-line shifts; runtime sections and relocations remain identical. No private assets or scratch tooling published.
2026-10-09 02:58:59 -07:00
Jonas Volman b43c70168a Merge reviewed byte-inert cinematic cleanup into halo-1 main 2026-10-06 15:41:45 -07:00
Jonas Volman a71a4ac135 Apply approved byte-inert cinematic shadow cleanup; record upstream exclusions 2026-10-06 15:40:46 -07:00
Jonas Volman 1b25ea9a37 Merge three independently verified biped and avoidance function gains into halo-1 main 2026-10-02 17:05:13 -07:00
Jonas VolmanandClaude Opus 5.5 fccf773db3 Reconcile actor test avoidance match (+1 function, +743 meaningful bytes)
Independently verified donor c694a43d4e3343eedebac48fe6f2b6052f679778 under Q-UP21 after the separately gated helper restoration. Fresh clean full gate against 09255f0e: cumulative +3 functions, +1238 meaningful / +1264 padded bytes, zero exact losses; 7483 of 7573 Halo functions, 1603071 of 1770166 code bytes, data 3311591 and objects 396 unchanged, parks 59 valid. Tools tests: 1663 passed, 5 skipped, 159 subtests. Full /W3 and unit /W4 multisets unchanged. All twenty cast ablations and layout controls passed; helper identity, real-call schedule and 284 ordered provider-link probes passed. The disclosed residual caller changes 4144 to 4128 bytes.

Retain the narrow per-function parentheses ruling, inferred scopes and collision_result placement, S6 correction, single-variable alternative and compiler-version caveat. No general hold, object admission, research candidate, scorer/verifier or compiler flag change. Fresh canonical receipts and source-policy boundaries are recorded in docs/object_matching_logs/biped_avoidance_canonical_reconciliation_20261002.md. Unrelated README changes and research preserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 17:04:04 -07:00
Jonas VolmanandClaude Opus 5.5 201442d377 Restore actor avoidance transform helper calls with the approved guard removal (zero credit)
Independently reconciled donor 41d3b992a5e5c0fbbb5f76c476d27f9c68031e82 without candidate F. Fresh clean full gate: no additional gains or losses, all prior function sections identical, one new uncredited 48-byte SELECT_ANY point_from_line3d copy identical to January, unchanged real-call schedule, warnings, data and object credit. Current-compiler cast ablation and layout controls pass, 284 ordered provider-link probes pass, 1663 tools tests pass. Six inferred casts and three byte-inert per-site parentheses are disclosed; all other actor_moving holds stay in force.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:49:29 -07:00
Jonas VolmanandClaude Opus 5.5 164026a7f1 Restore biped_jump helper call under the admitted two-site vector view (zero credit)
Independently reconciled donor 82ea0d5e9bcee8a1a48775aab6f0c351f5ee5e2a after the biped packet. Fresh clean full gate: zero additional gains or losses, all normalized objects unchanged, parks valid, warnings unchanged and 1663 tools tests passed. Current-compiler cast ablation is byte-inert; nine layout/alignment checks pass and a deliberately false control fails. Both current selected-provider link orders pass. Cast spelling remains inferred; no new parenthesis or general view-cast exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:47:08 -07:00
Jonas VolmanandClaude Opus 5.5 606d0a2458 Reconcile approved biped sight and placement matches (+2 functions, +495 meaningful bytes)
Independently verified donor edbdbf729e9b7c0c09557f1ccb45f94ad6c8a06a against canonical 09255f0e: fresh clean full build, strict whole-board sweep with zero losses, parks 61 to 59, unchanged data/object credit and warnings, 1663 tools tests passed. Folded helper identity and all selected-provider pair links passed. Per-site parentheses, descriptive constants and coupled jumping form remain narrowly disclosed as inferred; no general hold lifted. Unrelated canonical biped_accelerate shape and README edit preserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:44:38 -07:00
Jonas Volman 862c393cd8 Merge five independently verified function gains into halo-1 main 2026-10-02 00:45:39 -07:00
Jonas Volman 09255f0e78 Reconcile main static storage: +1 exact function, zero losses
Approved coherent packet 41640b4d, independently clean-built after transport and plane-helper reconciliation. +538 meaningful / +544 padded bytes; main 95/95. Replace the invented packed aggregate with January's separate storage, add exactly eight private symbol rows and retire the frame-rate park. Names, six static scopes and exact main_game_render placement remain disclosed as inferred. Full stable sweep, parks, admission, fake scan and 1663 tools tests pass; no new warnings, data, objects or providers. Cumulative reconciliation +5 functions, +2121 meaningful / +2144 padded bytes, zero exact losses. Preserve dirty README and unrelated research. No PCH, scorer, verifier, status or held-source changes. Detailed independent receipts and limits recorded in docs/object_matching_logs/upstream_tmp_reconcile_20261002.md.
2026-10-02 00:44:12 -07:00
Jonas Volman 38fdd8cb24 Reconcile plane-helper pair: +2 exact functions, zero losses
Approved coherent packet 78294dd3 (Q-UP1), independently gated on canonical. Remove only outer helper parentheses, preserving /Od argument order, together with the attested float argument repair in item_accelerate. Items object remains identical. +1126 meaningful / +1136 padded bytes; data/object/provider sets unchanged. Fresh full build, stable sweep, admission, fake scan (26), parks and tests (1663 passed, 5 skipped, 159 subtests) pass; no new warnings. Retire only two exact parks. Remeasure four residuals on canonical, preserving previous measurements/rejection history: frustum 88.8082->90.11173; pill 97.21691->98.086395; polygon clip 80.76382->82.37186; lens flares 99.29274->99.198944 (disclosed decrease). Do not import unrelated lane fidelity changes or held parentheses/DD2/DD3/casts.
2026-10-02 00:34:46 -07:00
Jonas Volman 25f719236d Reconcile transport pair: +2 exact functions, zero losses
Independently reconciled lane e191c0f1 under Q-UP1. Header and definition return long together; January startup-store and cleanup topology retained. Retire only the two verified parks. Fresh clean build and stable sweep: +457 meaningful / +464 padded bytes, 0 losses, unchanged data and object status. Affected /W4 warning counts unchanged; inherited WSA narrowing moves to initialization. Admission/parks/fake scan pass; tools 1663 passed, 5 skipped, 159 subtests. No new providers or section/data changes beyond the two intended functions. README and unrelated research preserved.
2026-10-02 00:30:24 -07:00
Jonas Volman 356a8d412c Merge verified triangle and nav-point matches into halo-1 main
Preserve main README unchanged. Source/config/verification tree equals canonical 5e55d8f8; two exact Halo gains, zero regressions, +1998 meaningful bytes. No object or data-credit changes.
2026-10-01 19:41:01 -07:00
Jonas Volman 5e55d8f83a Reconcile exact triangle predicate and nav-point renderer (+1998 Halo bytes)
Cleaned punpck donor reconstructions; strict bytes and all relocations match January. Fresh cold whole-board gate: 2 gains, 0 losses; 1663 tests pass. Retire the two parks. Disclose six HUD /W3 C4244 narrowing warnings and six identical shared-inline helper copies; provider links pass both orders. No object or data credit changes; inherited README and research excluded.
2026-10-01 19:40:22 -07:00
167 changed files with 12479 additions and 2887 deletions

No files matched your search

+40 -1
View File
@@ -371,7 +371,6 @@ jobs:
with:
sparse-checkout: |
port/android
port/third_party/extract-xiso
tools
- uses: actions/download-artifact@v4
@@ -469,6 +468,7 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: write
pages: write
id-token: write
concurrency:
@@ -483,6 +483,45 @@ jobs:
name: halo-web-release
path: site
# The game's wasm, most of a build, from jsDelivr rather than GitHub
# Pages, which serves 100 GB a month: the wasm alone in a commit of the
# web-wasm branch (pushed over the last, so the repository keeps one),
# which jsDelivr serves by its hash (with CORS; GitHub's release
# downloads have none, so a page cannot fetch them), and version.json
# names that copy and its SHA-256. The site's service worker takes the
# wasm from there, checked, and from the site only when it cannot
# (port/web/site/sw.js). A failure here leaves the site serving it.
- name: The wasm on jsDelivr
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
sha256="$(sha256sum site/halo.wasm | cut -d' ' -f1)"
mkdir wasm
cp site/halo.wasm wasm/
cd wasm
git init -q -b web-wasm
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
add halo.wasm
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
commit -q -m "The web build's wasm (build $GITHUB_RUN_NUMBER, $GITHUB_SHA)"
git push -q --force "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:refs/heads/web-wasm
url="https://cdn.jsdelivr.net/gh/${GITHUB_REPOSITORY}@$(git rev-parse HEAD)/halo.wasm"
# (jsDelivr fetches it now, and it must be the same file: it serves
# files of at most 20 MB from GitHub)
curl -fsSL --retry 6 --retry-delay 10 --retry-all-errors -o served.wasm "$url"
echo "$sha256 served.wasm" | sha256sum -c -
cd ..
python3 - "$url" "$sha256" <<'EOF'
import json, sys
with open("site/version.json") as file:
stamp = json.load(file)
stamp["wasm"] = {"url": sys.argv[1], "sha256": sys.argv[2]}
with open("site/version.json", "w") as file:
json.dump(stamp, file, indent=1)
EOF
echo "the wasm from $url"
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
+14 -5
View File
@@ -16,7 +16,7 @@ end.
| --- | --- |
| `source/` | The game: 466 C files of the decompilation, compiled as they are with few changes (each marked, below) |
| `port/linux/src/` | The platform layer the three ports share: Direct3D 8 on OpenGL (`d3d8_gl.c`), DirectSound and XInput on SDL3, files, threads, memory, sockets, settings (`port_config.c`), the mods folder (`port_mods.c`), internet play (`p2p*.c`) |
| `port/linux/game/` | The port's game-side code, compiled as the game's sources are: the distributed netcode (`network_*.c`), co-op, map sharing (`map_share*.c`), the menus (`menu_tags.c`, `menu_functions.c`), Custom Edition maps (`custom_edition_*.c`, `cache_file_formats.c`), the tag validator (`tag_validate.c`, `tag_schema_*.c`), mods (`mods.c`, `mod_*.c`), touch, FOV and more |
| `port/linux/game/` | The port's game-side code, compiled as the game's sources are: the distributed netcode (`network_*.c`), co-op, map sharing (`map_share*.c`), the menus (`menu_tags.c`, `menu_functions.c`), Custom Edition maps (`custom_edition_*.c`, `cache_file_formats.c`), the tag validator (`tag_validate.c`, `tag_schema_*.c`), mods (`mods.c`, `mod_*.c`), streamer mode's word filter (`text_filter*.c`), touch, FOV and more |
| `port/linux/include/` | The port's headers: the limits (`halo_port_limits.h`, with `HALO_PORT_NETWORK_VERSION`), capacities (`halo_port_capacity.h`), the prefix header, `halo_linux_source_fixups.h` (port functions the game's sources call) |
| `port/include/xdk/` | Stand-ins for the Xbox SDK's headers (declarations only) |
| `port/windows/` | The Windows build's own files (`win32_*.c`, headers) |
@@ -190,10 +190,18 @@ otherwise.
### Third-party code and licences
The repository is CC0. Vendored code goes in `port/third_party/<name>`,
copied unchanged, with a README naming the upstream, the version or commit,
the checksum and what uses it. GPL code (OpenSauce, Reclaimer) may be read
as documentation of file formats, never copied.
The repository is `AGPL-3.0-or-later` (`LICENSE`); the commits before the
change, and the releases built from them, stay CC0 (`LICENSES/CC0-1.0.txt`).
The README's "Licence" section says what each part is under. Vendored code
goes in `port/third_party/<name>`, copied unchanged, with a README naming
the upstream, the version or commit, the licence, the checksum and what uses
it. Its licence must let it be combined with the AGPL 3.0: MIT, BSD (without
an advertising clause), ISC, zlib, Apache 2.0, MPL 2.0, LGPL or GPL 3.0 or
later, public domain. GPL-2.0-only code and the 4-clause BSD licence cannot
be. Code taken from another project, GPL 3.0 code included, keeps its
notices and its licence, and says where it came from.
The decompilation's upstream, punpckhdq/halo, is AGPL 3.0 from 17 October
2026; bnunu/halo-1 is CC0.
### Commits and pull requests
@@ -218,6 +226,7 @@ as documentation of file formats, never copied.
| [port/include/xdk/README.md](port/include/xdk/README.md) | How the SDK declarations were written and are checked |
| [docs/custom_edition_caches.md](docs/custom_edition_caches.md) | Loading and converting Custom Edition maps, and the evidence for each layout |
| [docs/mods.md](docs/mods.md) | Mods: folders of Halo PC tag files whose sounds, bitmaps, text and models play over a map's on one machine |
| [port/assets/text_filter/README.md](port/assets/text_filter/README.md) | Streamer mode's words: Surge AI's list, the review, the allowed words |
| [port/assets/menus/README.md](port/assets/menus/README.md) | The menu files' format and how to write them again |
| [port/assets/menus/NON_HANDDRAWN.md](port/assets/menus/NON_HANDDRAWN.md) | Menu pictures that are not redraws |
| [port/assets/menus/UNWIRED.md](port/assets/menus/UNWIRED.md) | Menu functions that do nothing yet |
+661
View File
@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
View File
File renamed without changes.
+26 -5
View File
@@ -170,8 +170,9 @@ Ringfall: Mjolnir VR stands on the work of others:
- **[HaloCE-VR](https://github.com/astromaddie/HaloCE-VR)** by astromaddie
(CC0): the Steam Frame work, whose findings (such as quieting Mesa's
trace markers) are used here.
- **[extract-xiso](https://github.com/XboxDev/extract-xiso)**: the disc
image readers follow its format handling.
- **[xboxdevwiki](https://xboxdevwiki.net/XDVDFS)**: its description of
the Xbox's disc file system, which the disc image readers are written
from.
- The libraries and fonts in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
Thank you all.
@@ -198,6 +199,26 @@ distributed. You need your own, legally purchased copy of the game. If
you enjoy this mod, please support the creators of the original by buying
their games.
This project's own code is released under [CC0 1.0](LICENSE.md), as the
decompilation it builds on. Third-party code and fonts keep their own
licenses: see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
### Licence
Ringfall: Mjolnir VR is free software: you can give it to others and change
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License or (at your option)
any later version (`AGPL-3.0-or-later`), as OpenCE, which it builds on, is.
It comes with no warranty. The full text is in [LICENSE](LICENSE).
- **From build 312 on.** The AGPL applies from the commit that took in
OpenCE's change of licence (19 October 2026), and to each release built
from it or a later one. Earlier releases, and the source at every earlier
commit, were released under [CC0 1.0](LICENSES/CC0-1.0.txt) and stay
that way.
- **Hosts and servers.** If you change the game and let other persons play
with your version over a network (for example, as the host of an
internet game), the AGPL asks you to offer them the source of your
version. The game as released has its source here, and each release's
source is its tag (`build-<n>`).
- **Third-party code and fonts** keep their own licences: see
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
- **Halo is not covered.** The licence covers the work of this project's
and OpenCE's authors. It gives no rights in Halo, its maps or anything
else that Microsoft owns.
+10 -8
View File
@@ -1,14 +1,16 @@
# Third-party notices
Ringfall: Mjolnir VR's own code is released under [CC0 1.0](LICENSE.md).
It includes or builds on the following, under their own licenses; each
license's full text is in the file named.
Ringfall: Mjolnir VR is released under the GNU Affero General Public
License, version 3 or later ([LICENSE](LICENSE)); releases before build 312
were released under [CC0 1.0](LICENSES/CC0-1.0.txt). It includes or builds
on the following, under their own licenses; each license's full text is in
the file named.
## Code
| Component | Used for | License | Text |
| --- | --- | --- | --- |
| [OpenCE](https://github.com/OpenCommunityEdition/OpenCE) and the decompilation ([bnunu/halo-1](https://github.com/bnunu/halo-1), [punpckhdq/halo](https://github.com/punpckhdq/halo)) | the game's code, the port | CC0 1.0 | [LICENSE.md](LICENSE.md) |
| [OpenCE](https://github.com/OpenCommunityEdition/OpenCE) and the decompilation ([bnunu/halo-1](https://github.com/bnunu/halo-1), [punpckhdq/halo](https://github.com/punpckhdq/halo)) | the game's code, the port | AGPL 3.0 or later (OpenCE from 19 October 2026, punpckhdq/halo from 17 October 2026; CC0 1.0 before); bnunu/halo-1: CC0 1.0 | [LICENSE](LICENSE), [LICENSES/CC0-1.0.txt](LICENSES/CC0-1.0.txt) |
| [HaloCE-Quest-VR](https://github.com/moistman42069/HaloCE-Quest-VR) | the arm IK, forearm twist and finger poses (`port/linux/game/vr_arms.c`) | CC0 1.0 | (its repository) |
| [HaloCE-VR](https://github.com/astromaddie/HaloCE-VR) | Steam Frame findings | CC0 1.0 | (its repository) |
| [SDL 3](https://libsdl.org) | windows, input, sound | zlib | (in SDL's source, `LICENSE.txt`) |
@@ -22,11 +24,11 @@ license's full text is in the file named.
| [tomlc17](https://github.com/cktan/tomlc17) | reading `config.toml` | MIT | [port/third_party/tomlc17/LICENSE](port/third_party/tomlc17/LICENSE) |
| [stb](https://github.com/nothings/stb) | drawing the game's text sharply (stb_truetype) | MIT or public domain | [port/third_party/stb/LICENSE](port/third_party/stb/LICENSE) |
| [SMAA](https://www.iryoku.com/smaa/) | anti-aliasing (flat screens; off in VR) | MIT | [port/third_party/smaa/LICENSE](port/third_party/smaa/LICENSE) |
| [extract-xiso](https://github.com/XboxDev/extract-xiso) | reading disc images (followed by `XisoExtractor.java`, `steam_frame_xiso.py`, `xiso.c`) | BSD-style (in@fishtank.com) | [port/third_party/extract-xiso/LICENSE.TXT](port/third_party/extract-xiso/LICENSE.TXT) |
The disc image readers include this acknowledgement, as extract-xiso's
license asks: *This product includes software developed by in
&lt;in@fishtank.com&gt;.*
The disc image readers (`XisoExtractor.java`, `steam_frame_xiso.py`,
`xiso.c`) are written from a description of the Xbox's disc file system
([xboxdevwiki's XDVDFS page](https://xboxdevwiki.net/XDVDFS)), not from
extract-xiso, which earlier releases followed.
## Fonts
+31
View File
@@ -207,3 +207,34 @@ Enter `adb pull` to copy the recording parts to a computer.
A profiling build plays with normal builds. It does not use
`--pgo=train`.
## Licence
OpenCE is free software: you can give it to others and change it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation, version 3 of the License or (at your option) any later
version (`AGPL-3.0-or-later`). It comes with no warranty. The full text is in
[LICENSE](LICENSE).
- **From the change.** The AGPL applies from the commit that made the change,
and to each release built from that commit or a later one. Earlier
releases, and the source at every earlier commit, were released under
[CC0 1.0](LICENSES/CC0-1.0.txt) and stay that way.
- **What OpenCE builds on.** The decompilation of
[punpckhdq/halo](https://github.com/punpckhdq/halo) is under the AGPL 3.0
from 17 October 2026, and under CC0 1.0 before that date.
[bnunu/halo-1](https://github.com/bnunu/halo-1) is under CC0 1.0.
- **Contributions** are under `AGPL-3.0-or-later`. A change taken from a
project under GPL 3.0 keeps that licence and its notices; the GPL 3.0 and
the AGPL 3.0 let the two be combined (section 13 of each).
- **Hosts and servers.** If you change the game and let other persons play
with your version over a network (for example, as the host of an internet
game, or on a web site), the AGPL asks you to offer them the source of
your version (section 13). The game as released has its source here, and
each release's source is its tag (`build-<n>`).
- **Third-party code, fonts and art** keep their own licences, which are
next to them (`port/third_party`, `port/assets/fonts`,
`port/assets/icons`, `port/assets/text_filter`). The release downloads and
the web site's `licenses.txt` carry their notices.
- **Halo is not covered.** The licence covers the work of OpenCE's authors.
It gives no rights in Halo, its maps or anything else that Microsoft owns.
+3 -3
View File
@@ -493,9 +493,9 @@ file the same as the host's; with `network.map_download` off, or a host with
but their model parts have its 0x68-byte layout and their shader types its
numbering, which makes them a check on what the conversion produces.
OpenSauce and Reclaimer are GPL-3.0 and this repository is CC0: no code from
either was copied. They were read as documentation of the file formats, and
every layout used was then checked against the sample maps.
No code from OpenSauce or Reclaimer (both GPL-3.0) was copied: they were
read as documentation of the file formats, and every layout used was then
checked against the sample maps.
### Documented facts (source, checked against the sample maps)
+1 -1
View File
@@ -161,7 +161,7 @@ controller for player 1. With the default buttons of the profile:
| Crouch, Zoom | left and right stick clicks |
| Light, Gren. type | white, black |
| Pause, Back | start, back |
| Up, Down, Left, Right | D-pad |
| Up, Down, Left, Right | D-pad (in a network game, Up opens the text chat's keyboard) |
The names on the buttons follow the profile's "Button layout" (Settings >
Gamepads): with "Swap triggers", the right trigger's button says "Grenade".
+2 -1
View File
@@ -21,10 +21,11 @@ named where code is taken over.
| Aiming | The weapon in the hand, its shots from the muzzle, laser and crosshair options; each weapon held so that its model's hand lands on the real one, as the free hand's (it learns where each weapon's animations hold the hand; the pistol's had been 15 cm before the real hand, the assault rifle's 8 cm aside), the scope's disc moved with it; `vr.weapon_hand_*` to adjust (2026-10-17) |
| Body | Physical crouch (`vr.crouch_limit`) beside the crouch button, leaning (`vr.lean_limit`), melee by swinging, grenades thrown with the left hand, two-handed weapons |
| Vehicles | The Warthog's wheel turned with the hands, right trigger throttle, left brake; first-person seats; turrets with handles |
| Scores | The menu button held shows the scores on the Quest (a press pauses, as it is let go); the Steam Frame's View button as before; the text chat's lines where the desktop has them (2026-10-18) |
| Comfort | Snap or smooth turning, a comfort vignette in vehicles, VR options in the main and pause menus (Y), a page of every controller button |
| Menus | The PC version's menus in VR (`vr.menus`), clicked with a laser; text typed on the on-screen keyboard |
| Multiplayer | Up to date with OpenCE (network version 29, 2026-10-14): cross-play, its server browser, co-op campaign, password lobbies; join codes and the VR online list |
| Bots | Bots in multiplayer: on foot (paths, items, objectives), in vehicles and at turrets; they make room for a joining person |
| Bots | Bots in multiplayer: on foot (paths, items, objectives), in vehicles and at turrets; they make room for a joining person, on the LAN too (a lobby they fill is advertised open, 2026-10-18) |
| Voice chat | Push to talk on any button (`vr.button_talk`, BUTTONS page; the free hand's grip by default, sending nothing while it reaches for the foregrip or the wheel), open mic, off (2026-10-13) |
| Builds | The Android build's assembly conversion (`tools/android_asm_convert.py`) keeps string data as it is: strings and tables starting with "_" or holding \" lost a "_" (Opus's pulse cache among them: the Steam Frame's crashes in online games while talking), 2026-10-13 |
| Languages | The European disc in Spanish and Italian (a maps folder for each, `maps_es` and `maps_it`, none called `maps`) imported on the Quest and the Steam Frame: the headset's language's, its language the game's and the menus' (`maps/language.txt`, unless `game.language` is set), 2026-10-17; not yet tried with that disc |
@@ -4,101 +4,88 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.List;
import java.util.Locale;
/**
* Copies the maps folder out of an Xbox disc image (an "xiso", or a whole
* disc's ".iso"), as the desktop games do (port/linux/src/xiso.c, which this
* follows).
* Copies the maps folder out of the player's Xbox disc image of Halo, for
* LauncherActivity, as the desktop games do (port/linux/src/xiso.c; the web
* page's is port/web/site/xiso-worker.js). The image is a document the
* player picked, read through its FileChannel at absolute positions.
*
* The image's file system is XDVDFS, read as extract-xiso does
* (https://github.com/XboxDev/extract-xiso, extract-xiso.c, whose format
* handling this follows; its license is below and in
* port/third_party/extract-xiso/LICENSE.TXT): 2048-byte sectors; a volume
* descriptor at 0x10000 that starts and ends with "MICROSOFT*XBOX*MEDIA" and
* gives the root directory's sector and size; and directories whose entries
* form a binary tree (each entry: left and right subtree offsets in 4-byte
* units, the start sector, the size, attributes, the name's length and the
* name, 4-byte aligned). Images made from a whole disc put the game partition
* further in, at one of the offsets below.
* Written from a description of the Xbox's disc file system, XDVDFS
* (xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS, and the format
* facts OpenCE's readers rely on). What this class relies on:
*
* The files are written to maps.partial first and moved into maps once they
* all are, so an interrupted extraction never leaves maps/ui.map behind.
* - Sectors are 2048 bytes and integers little-endian. Sector numbers count
* from the start of the game partition: an image of the partition alone
* has it at 0, an image of a whole disc further in (0x0FD90000, 0x02080000
* or 0x18300000 for XGD2, XGD3 and XGD1 discs). They are tried in that
* order.
* - The volume descriptor is the partition's sector 32 (at 0x10000). It
* holds "MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the
* root directory table's start sector (u32 at 0x14) and size in bytes (u32
* at 0x18).
* - A directory table is a binary tree of entries whose root is the entry at
* offset 0. An entry is a left and a right subtree link (u16 each, in
* 4-byte units from the table's start, 0 for none), the start sector and
* the size of the file or of the subdirectory's table (u32 each), the
* attributes (u8, 0x10 for a directory), the name's length (u8) and the
* name. Unused bytes of a table are 0xFF, so a left link of 0xFFFF is
* padding, not an entry.
* - A file is one contiguous run of bytes from the start of its sector.
*
* A European disc in two languages (Spanish and Italian) has no maps folder
* but one for each, maps_es and maps_it: the device's language's is taken,
* else English's, else the first, and its language written to
* maps/language.txt, which the game asks the Xbox for (game.language unset,
* port/linux/src/xbox_xapi.c): the menus in it too.
* The image is the player's file and nothing read from it is trusted. Only
* the root's table and the maps folder's are read, each whole and at most
* 4 MB; the walk of a table visits each offset once, goes at most 64 links
* deep and looks at most 4096 entries; and a file is written only under a
* plain name that no file before it had (ignoring case).
*
* Some parts of this code are copyright in@fishtank.com. This product
* includes software developed by in &lt;in@fishtank.com&gt;.
*
* Copyright (c) 2003 in &lt;in@fishtank.com&gt;
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by in &lt;in@fishtank.com&gt;.
*
* 4. Neither the name of "in" nor the email address "in@fishtank.com"
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* The app starts the game once maps/ui.map exists, and makes the maps folder
* itself, so the copy is written to maps.partial (emptied first of what an
* earlier attempt left) and its files moved into maps once all are
* complete, ui.map last.
*/
final class XisoExtractor {
private static final int SECTOR_SIZE = 2048;
private static final long VOLUME_DESCRIPTOR_OFFSET = 0x10000;
private static final int ENTRY_HEADER_SIZE = 14;
private static final int DESCRIPTOR_OFFSET = 0x10000;
private static final byte[] MAGIC = "MICROSOFT*XBOX*MEDIA".getBytes(StandardCharsets.ISO_8859_1);
private static final int SECOND_MAGIC_OFFSET = 0x7EC;
private static final int ENTRY_FIXED_SIZE = 14;
private static final int ATTRIBUTE_DIRECTORY = 0x10;
/* directory tables are a few sectors; anything much larger is not one */
private static final long MAXIMUM_DIRECTORY_SIZE = 4 << 20;
private static final int MAXIMUM_FILES = 256;
private static final int COPY_BUFFER_SIZE = 1 << 20;
private static final byte[] VOLUME_MAGIC = "MICROSOFT*XBOX*MEDIA".getBytes(StandardCharsets.US_ASCII);
/* where the game partition starts: a plain image, and whole-disc images
(extract-xiso's GLOBAL, XGD3 and XGD1 offsets) */
private static final long[] PARTITION_OFFSETS = { 0, 0x0FD90000L, 0x02080000L, 0x18300000L };
private static final int PADDING_LINK = 0xFFFF;
/** where the game partition may start, in the order they are tried */
private static final long[] PARTITION_STARTS = {
0x00000000L, // an image of the game partition alone
0x0FD90000L, // a whole XGD2 disc
0x02080000L, // a whole XGD3 disc
0x18300000L, // a whole XGD1 disc (the original Xbox's)
};
/** directory tables are a few sectors; anything much larger is not one */
private static final int MAXIMUM_TABLE_SIZE = 4 * 1024 * 1024;
private static final int MAXIMUM_DEPTH = 64;
private static final int MAXIMUM_VISITS = 4096;
private static final int MAXIMUM_ENTRIES = 256;
private static final int COPY_CHUNK = 1024 * 1024;
private static final String PARTIAL_DIRECTORY = "maps.partial";
/** Told as the copy goes: the file being copied, and the bytes copied of all the files'. */
interface Progress {
void report(String file, long done, long total);
}
/** a reason the player can act on */
/** A reason the player can act on: its message is shown as it is. */
static final class ExtractException extends IOException {
ExtractException(String message) {
super(message);
}
}
/** a file or folder found in a directory table */
private static final class Entry {
final String name;
final long sector;
@@ -111,140 +98,60 @@ final class XisoExtractor {
}
}
private final FileChannel image;
private long partition;
private XisoExtractor(FileChannel image) {
this.image = image;
private XisoExtractor() {
}
/** copies the image's maps folder to destination/maps */
/** Copies the image's maps folder to destination/maps. */
static void extractMaps(FileChannel image, File destination, Progress progress) throws IOException {
new XisoExtractor(image).extract(destination, progress);
}
long imageSize = image.size();
long partition = -1;
long rootSector = 0, rootSize = 0;
ByteBuffer descriptor = ByteBuffer.allocate(SECTOR_SIZE);
private void readAt(long offset, ByteBuffer buffer) throws IOException {
while (buffer.hasRemaining()) {
int count = image.read(buffer, offset);
if (count <= 0)
throw new ExtractException("Could not read the disc image (is it complete?).");
offset += count;
}
buffer.flip();
}
private static boolean magicAt(ByteBuffer buffer, int offset) {
for (int index = 0; index < VOLUME_MAGIC.length; index++) {
if (buffer.get(offset + index) != VOLUME_MAGIC[index])
return false;
}
return true;
}
/** whether a name is one to write in the maps folder: no path, no "." or
* "..", and only printable ASCII that every file system takes as a plain
* name (a disc's maps folder holds .map files and loading.tga) */
static boolean isPlainName(String name) {
if (name.isEmpty() || name.equals(".") || name.equals(".."))
return false;
for (int index = 0; index < name.length(); index++) {
char c = name.charAt(index);
if (c < 0x20 || c > 0x7E || "/\\:*?\"<>|".indexOf(c) >= 0)
return false;
}
return true;
}
/** the partition's volume descriptor: the root directory's sector and size */
private long[] findVolume() throws IOException {
for (long offset : PARTITION_OFFSETS) {
ByteBuffer descriptor = ByteBuffer.allocate(SECTOR_SIZE).order(ByteOrder.LITTLE_ENDIAN);
try {
readAt(offset + VOLUME_DESCRIPTOR_OFFSET, descriptor);
} catch (IOException e) {
for (long start : PARTITION_STARTS) {
if (start + DESCRIPTOR_OFFSET + SECTOR_SIZE > imageSize)
continue;
}
if (!magicAt(descriptor, 0) || !magicAt(descriptor, 0x7EC))
descriptor.clear();
if (!readFully(image, descriptor, start + DESCRIPTOR_OFFSET))
continue;
partition = offset;
return new long[] {
descriptor.getInt(20) & 0xFFFFFFFFL, descriptor.getInt(24) & 0xFFFFFFFFL,
};
byte[] bytes = descriptor.array();
if (!hasMagic(bytes, 0) || !hasMagic(bytes, SECOND_MAGIC_OFFSET))
continue;
partition = start;
rootSector = u32(bytes, 0x14);
rootSize = u32(bytes, 0x18);
break;
}
throw new ExtractException("This is not an Xbox disc image.");
}
if (partition < 0)
throw new ExtractException("This is not an Xbox disc image.");
/** a directory's table, read whole */
private ByteBuffer readDirectory(long sector, long size, String what) throws IOException {
if (size <= 0 || size > MAXIMUM_DIRECTORY_SIZE)
throw new ExtractException(what);
ByteBuffer table = ByteBuffer.allocate((int) size).order(ByteOrder.LITTLE_ENDIAN);
readAt(partition + sector * SECTOR_SIZE, table);
return table;
}
/**
* collects the entries of the subtree at offset (4-byte units), files or
* directories as asked
*/
private static void walk(ByteBuffer table, long offset, int depth, boolean directories, List<Entry> out,
int[] visited) {
offset *= 4;
/* a malformed table must not loop or run off its end */
if (depth > 64 || ++visited[0] > 4096 || offset + ENTRY_HEADER_SIZE > table.limit())
return;
int at = (int) offset;
int left = table.getShort(at) & 0xFFFF;
int right = table.getShort(at + 2) & 0xFFFF;
/* 0xFFFF: padding, an empty directory */
if (left == 0xFFFF)
return;
int nameLength = table.get(at + 13) & 0xFF;
if (left != 0)
walk(table, left, depth + 1, directories, out, visited);
boolean isDirectory = (table.get(at + 12) & ATTRIBUTE_DIRECTORY) != 0;
if (at + ENTRY_HEADER_SIZE + nameLength <= table.limit() && nameLength > 0 && isDirectory == directories
&& out.size() < MAXIMUM_FILES) {
byte[] bytes = new byte[nameLength];
for (int index = 0; index < nameLength; index++)
bytes[index] = table.get(at + ENTRY_HEADER_SIZE + index);
String name = new String(bytes, StandardCharsets.ISO_8859_1);
/* (as extract-xiso refuses them: no name may leave the folder, and
none but a plain file name is written) */
if (isPlainName(name))
out.add(new Entry(name, table.getInt(at + 4) & 0xFFFFFFFFL, table.getInt(at + 8) & 0xFFFFFFFFL));
}
if (right != 0)
walk(table, right, depth + 1, directories, out, visited);
}
private void extract(File destination, Progress progress) throws IOException {
long[] root = findVolume();
/* the root's maps folder */
ByteBuffer table = readDirectory(root[0], root[1], "The disc image's file system is damaged.");
List<Entry> directories = new ArrayList<>();
walk(table, 0, 0, true, directories, new int[1]);
// the root's maps folder
byte[] root = readTable(image, partition, rootSector, rootSize, "The disc image's file system is damaged.");
Entry maps = null;
for (Entry entry : directories) {
if (entry.name.equalsIgnoreCase("maps"))
for (Entry entry : walkTable(root, true)) {
if (entry.name.equalsIgnoreCase("maps")) {
maps = entry;
break;
}
}
// (Ringfall: a European disc in two languages, Spanish and Italian,
// has no maps folder but one for each, maps_es and maps_it: the
// device's language's is taken, else English's, else the first, and
// its language written to maps/language.txt, which the game asks the
// Xbox for while game.language is unset: port/linux/src/xbox_xapi.c)
String language = null;
if (maps == null) {
String wanted = Locale.getDefault().getLanguage();
Entry english = null, first = null;
for (Entry entry : directories) {
for (Entry entry : walkTable(root, true)) {
String code = mapsLanguage(entry.name);
if (code == null)
continue;
if (code.equals(wanted))
if (code.equals(wanted) && maps == null)
maps = entry;
if (code.equals("en"))
if (code.equals("en") && english == null)
english = entry;
if (first == null)
first = entry;
@@ -257,73 +164,68 @@ final class XisoExtractor {
if (maps == null)
throw new ExtractException("The disc image has no maps folder: it is not a Halo disc.");
/* its files */
table = readDirectory(maps.sector, maps.size, "The disc image's maps folder is damaged.");
List<Entry> files = new ArrayList<>();
walk(table, 0, 0, false, files, new int[1]);
long total = 0;
boolean hasUi = false;
// its files
byte[] table = readTable(image, partition, maps.sector, maps.size, "The disc image's maps folder is damaged.");
List<Entry> files = walkTable(table, false);
Entry userInterface = null;
for (Entry file : files) {
total += file.size;
hasUi |= file.name.equalsIgnoreCase("ui.map");
if (file.name.equalsIgnoreCase("ui.map"))
userInterface = file;
}
if (!hasUi)
if (userInterface == null)
throw new ExtractException("The disc image's maps folder has no ui.map: it is not a Halo disc.");
File partial = new File(destination, "maps.partial");
File finished = new File(destination, "maps");
if (!partial.isDirectory() && !partial.mkdirs())
throw new ExtractException("Could not create " + partial + ".");
ByteBuffer buffer = ByteBuffer.allocateDirect(COPY_BUFFER_SIZE);
long done = 0;
// (an image that ends before a file does is refused before anything
// is written; an empty file's sector need not be anywhere)
long total = 0;
for (Entry file : files) {
File path = new File(partial, file.name);
long offset = partition + file.sector * SECTOR_SIZE;
long remaining = file.size;
if (file.size > 0 && partition + file.sector * SECTOR_SIZE + file.size > imageSize)
throw new ExtractException(readFailure(file));
total += file.size;
}
try (FileOutputStream out = new FileOutputStream(path)) {
FileChannel output = out.getChannel();
while (remaining > 0) {
buffer.clear();
buffer.limit((int) Math.min(remaining, COPY_BUFFER_SIZE));
readAt(offset, buffer);
int count = buffer.remaining();
while (buffer.hasRemaining())
output.write(buffer);
offset += count;
remaining -= count;
done += count;
progress.report(file.name, done, total);
}
} catch (ExtractException e) {
throw new ExtractException("Could not read " + file.name + " from the disc image (is it complete?).");
} catch (IOException e) {
throw new ExtractException("Could not write " + path + " (is the storage full?).");
// the copy, to maps.partial
File partial = new File(destination, PARTIAL_DIRECTORY);
if (partial.isDirectory()) {
File[] leftovers = partial.listFiles();
if (leftovers != null) {
for (File leftover : leftovers)
leftover.delete();
}
} else {
partial.delete();
partial.mkdirs();
}
if (!partial.isDirectory())
throw new ExtractException("Could not create " + partial.getPath() + ".");
ByteBuffer buffer = ByteBuffer.allocate(COPY_CHUNK);
long done = 0;
for (Entry file : files)
done = copyFile(image, partition, file, new File(partial, file.name), buffer, done, total, progress);
/* (the maps folder may be there, empty: the app makes it for adb) */
if (!finished.isDirectory() && !finished.mkdirs())
throw new ExtractException("Could not create " + finished + ".");
for (Entry file : files) {
File from = new File(partial, file.name);
File to = new File(finished, file.name);
to.delete();
if (!from.renameTo(to))
throw new ExtractException("Could not move " + file.name + " into " + finished + ".");
}
partial.delete();
File languageFile = new File(finished, "language.txt");
// then into maps, ui.map (the app's sign that the data is there) last
File mapsFolder = new File(destination, "maps");
if (!mapsFolder.isDirectory() && !mapsFolder.mkdirs() && !mapsFolder.isDirectory())
throw new ExtractException("Could not create " + mapsFolder.getPath() + ".");
// (the language of a language's maps folder: before ui.map is there)
File languageFile = new File(mapsFolder, "language.txt");
languageFile.delete();
if (language != null) {
try (FileOutputStream out = new FileOutputStream(languageFile)) {
out.write((language + "\n").getBytes(StandardCharsets.US_ASCII));
} catch (IOException e) {
throw new ExtractException("Could not write " + languageFile + " (is the storage full?).");
throw new ExtractException("Could not write " + languageFile.getPath() + " (is the storage full?).");
}
}
List<Entry> order = new ArrayList<>(files);
order.remove(userInterface);
order.add(userInterface);
for (Entry file : order) {
File target = new File(mapsFolder, file.name);
target.delete();
if (!new File(partial, file.name).renameTo(target))
throw new ExtractException("Could not move " + file.name + " into " + mapsFolder.getPath() + ".");
}
partial.delete();
}
/** a language's maps folder's language ("maps_it": "it"), else null */
@@ -333,4 +235,190 @@ final class XisoExtractor {
String code = name.substring(5).toLowerCase(Locale.ROOT);
return Character.isLetter(code.charAt(0)) && Character.isLetter(code.charAt(1)) ? code : null;
}
/** No path, no . or .., and only printable ASCII that every file system takes as a plain name. */
static boolean isPlainName(String name) {
if (name == null || name.isEmpty() || name.equals(".") || name.equals(".."))
return false;
for (int index = 0; index < name.length(); index++) {
char character = name.charAt(index);
if (character < 0x20 || character > 0x7E || "/\\:*?\"<>|".indexOf(character) >= 0)
return false;
}
return true;
}
/* ---------- the image */
private static long u16(byte[] bytes, int offset) {
return (bytes[offset] & 0xFF) | (bytes[offset + 1] & 0xFF) << 8;
}
private static long u32(byte[] bytes, int offset) {
return u16(bytes, offset) | u16(bytes, offset + 2) << 16;
}
private static boolean hasMagic(byte[] bytes, int offset) {
for (int index = 0; index < MAGIC.length; index++) {
if (bytes[offset + index] != MAGIC[index])
return false;
}
return true;
}
/** Fills buffer from the image at position; false if the image ends first. */
private static boolean readFully(FileChannel image, ByteBuffer buffer, long position) throws IOException {
while (buffer.hasRemaining()) {
int count = image.read(buffer, position);
if (count <= 0)
return false;
position += count;
}
return true;
}
private static byte[] readTable(FileChannel image, long partition, long sector, long size, String damaged)
throws IOException {
if (size == 0 || size > MAXIMUM_TABLE_SIZE)
throw new ExtractException(damaged);
ByteBuffer table = ByteBuffer.allocate((int) size);
if (!readFully(image, table, partition + sector * SECTOR_SIZE))
throw new ExtractException("Could not read the disc image (is it complete?).");
return table.array();
}
/* ---------- directory tables */
private static final class Walk {
final byte[] table;
final boolean directories;
final BitSet visited = new BitSet();
final List<Entry> entries = new ArrayList<>();
int visits;
boolean stopped;
Walk(byte[] table, boolean directories) {
this.table = table;
this.directories = directories;
}
}
/** The folders (or the files) of a table with plain names, in the tree's order. */
private static List<Entry> walkTable(byte[] table, boolean directories) {
Walk walk = new Walk(table, directories);
walkEntry(walk, 0, 0);
return walk.entries;
}
/**
* The subtree whose root entry is at offset: its left subtree, the
* entry, its right subtree. A link to padding, past the table or back to
* an entry already visited ends that branch.
*/
private static void walkEntry(Walk walk, int offset, int depth) {
byte[] table = walk.table;
if (walk.stopped || depth > MAXIMUM_DEPTH)
return;
if (offset >= table.length || table.length - offset < ENTRY_FIXED_SIZE)
return;
int left = (int) u16(table, offset);
int right = (int) u16(table, offset + 2);
if (left == PADDING_LINK || walk.visited.get(offset / 4))
return;
walk.visited.set(offset / 4);
if (walk.visits >= MAXIMUM_VISITS) {
walk.stopped = true;
return;
}
walk.visits++;
if (left != 0)
walkEntry(walk, left * 4, depth + 1);
int nameLength = table[offset + 13] & 0xFF;
if (nameLength != 0 && nameLength <= table.length - offset - ENTRY_FIXED_SIZE)
collect(walk, offset, nameLength);
if (right != 0)
walkEntry(walk, right * 4, depth + 1);
}
private static void collect(Walk walk, int offset, int nameLength) {
byte[] table = walk.table;
boolean directory = (table[offset + 12] & ATTRIBUTE_DIRECTORY) != 0;
if (directory != walk.directories || walk.entries.size() >= MAXIMUM_ENTRIES)
return;
String name = new String(table, offset + ENTRY_FIXED_SIZE, nameLength, StandardCharsets.ISO_8859_1);
if (!isPlainName(name))
return;
// (the destination's file system may ignore case)
for (Entry entry : walk.entries) {
if (entry.name.equalsIgnoreCase(name))
return;
}
walk.entries.add(new Entry(name, u32(table, offset + 4), u32(table, offset + 8)));
}
/* ---------- the copy */
private static String readFailure(Entry file) {
return "Could not read " + file.name + " from the disc image (is it complete?).";
}
/** Copies one file of the image to output; returns the bytes copied of all the files so far. */
private static long copyFile(FileChannel image, long partition, Entry file, File output, ByteBuffer buffer,
long done, long total, Progress progress) throws IOException {
String writeFailure = "Could not write " + output.getPath() + " (is the storage full?).";
long position = partition + file.sector * SECTOR_SIZE;
long remaining = file.size;
FileOutputStream stream = null;
try {
stream = new FileOutputStream(output);
FileChannel channel = stream.getChannel();
while (remaining > 0) {
int count = (int) Math.min(remaining, COPY_CHUNK);
boolean read;
buffer.clear();
buffer.limit(count);
try {
read = readFully(image, buffer, position);
} catch (IOException exception) {
read = false;
}
if (!read)
throw new ExtractException(readFailure(file));
buffer.flip();
while (buffer.hasRemaining()) {
if (channel.write(buffer) <= 0)
throw new ExtractException(writeFailure);
}
position += count;
remaining -= count;
done += count;
if (progress != null)
progress.report(file.name, done, total);
}
FileOutputStream closing = stream;
stream = null;
closing.close();
} catch (ExtractException exception) {
throw exception;
} catch (IOException exception) {
throw new ExtractException(writeFailure);
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException ignored) {
// (the copy failed already)
}
}
}
return done;
}
}
+161 -148
View File
@@ -1,66 +1,50 @@
#!/usr/bin/env python3
"""
Copies the maps folder out of an Xbox disc image (an "xiso", or a whole
disc's ".iso") on the Steam Frame's SteamOS side, for its installer
(steam_frame_install.sh). It reads the image as the app's own import does
Copies the maps folder out of the player's Xbox disc image of Halo (an
"xiso", or a whole disc's ".iso") on the Steam Frame's SteamOS side, for
its installer (steam_frame_install.sh), as the app's own import does
(app/src/main/java/com/halo/decomp/XisoExtractor.java, which this follows;
the desktop games' is port/linux/src/xiso.c).
steam_frame_xiso.py <image> <destination>
writes <destination>/maps (through maps.partial, so an interrupted copy
never leaves maps/ui.map behind) and prints its progress for zenity
--progress: a percentage on a line of its own, and "# <text>" lines. On
failure it prints "error: <reason the player can act on>" to stderr and
exits 1.
writes <destination>/maps (through maps.partial, ui.map moved in last, so
an interrupted copy never leaves maps/ui.map behind) and prints its
progress for zenity --progress: a percentage on a line of its own, and
"# <text>" lines. On failure it prints "error: <reason the player can act
on>" to stderr and exits 1.
The image's file system is XDVDFS, read as extract-xiso does
(https://github.com/XboxDev/extract-xiso, extract-xiso.c, whose format
handling this follows; its license is below and in
port/third_party/extract-xiso/LICENSE.TXT): 2048-byte sectors; a volume
descriptor at 0x10000 that starts and ends with "MICROSOFT*XBOX*MEDIA" and
gives the root directory's sector and size; and directories whose entries
form a binary tree (each entry: left and right subtree offsets in 4-byte
units, the start sector, the size, attributes, the name's length and the
name). Images made from a whole disc put the game partition further in, at
one of the offsets below.
Written from a description of the Xbox's disc file system, XDVDFS
(xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS), as
XisoExtractor.java is:
Some parts of this code are copyright in@fishtank.com. This product
includes software developed by in <in@fishtank.com>.
- Sectors are 2048 bytes and integers little-endian. Sector numbers count
from the start of the game partition: an image of the partition alone has
it at 0, an image of a whole disc further in (PARTITION_STARTS, tried in
that order).
- The volume descriptor is the partition's sector 32 (at 0x10000). It holds
"MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the root
directory table's start sector (u32 at 0x14) and size in bytes (u32 at
0x18).
- A directory table is a binary tree of entries whose root is the entry at
offset 0. An entry is a left and a right subtree link (u16 each, in 4-byte
units from the table's start, 0 for none), the start sector and the size
of the file or of the subdirectory's table (u32 each), the attributes (u8,
0x10 for a directory), the name's length (u8) and the name. Unused bytes
are 0xFF, so a left link of 0xFFFF is padding, not an entry.
- A file is one contiguous run of bytes from the start of its sector.
Copyright (c) 2003 in <in@fishtank.com>
All rights reserved.
The image is the player's file and nothing read from it is trusted: only
the root's table and the maps folder's are read, each whole and at most
4 MB; a table's walk visits each offset once, goes at most 64 links deep
and looks at most 4096 entries; and a file is written only under a plain
name that no file before it had (ignoring case).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by in <in@fishtank.com>.
4. Neither the name of "in" nor the email address "in@fishtank.com"
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
A European disc in two languages (Spanish and Italian) has no maps folder
but one for each, maps_es and maps_it: the one for the language asked for
(RINGFALL_LANGUAGE, else the system's) is taken, else English's, else the
first, and its language written to maps/language.txt, which the game takes
as the Xbox's language while game.language is unset.
"""
import os
@@ -68,74 +52,100 @@ import struct
import sys
SECTOR_SIZE = 2048
VOLUME_DESCRIPTOR_OFFSET = 0x10000
ENTRY_HEADER_SIZE = 14
DESCRIPTOR_OFFSET = 0x10000
MAGIC = b"MICROSOFT*XBOX*MEDIA"
SECOND_MAGIC_OFFSET = 0x7EC
ENTRY_FIXED_SIZE = 14
ATTRIBUTE_DIRECTORY = 0x10
PADDING_LINK = 0xFFFF
# where the game partition may start: an image of the partition alone, a
# whole XGD2, XGD3 and XGD1 (the original Xbox's) disc
PARTITION_STARTS = (0x00000000, 0x0FD90000, 0x02080000, 0x18300000)
# directory tables are a few sectors; anything much larger is not one
MAXIMUM_DIRECTORY_SIZE = 4 << 20
MAXIMUM_FILES = 256
COPY_BUFFER_SIZE = 1 << 20
VOLUME_MAGIC = b"MICROSOFT*XBOX*MEDIA"
# where the game partition starts: a plain image, and whole-disc images
# (extract-xiso's GLOBAL, XGD3 and XGD1 offsets)
PARTITION_OFFSETS = (0, 0x0FD90000, 0x02080000, 0x18300000)
MAXIMUM_TABLE_SIZE = 4 << 20
MAXIMUM_DEPTH = 64
MAXIMUM_VISITS = 4096
MAXIMUM_ENTRIES = 256
COPY_CHUNK = 1 << 20
PARTIAL_DIRECTORY = "maps.partial"
class ExtractError(Exception):
"""a reason the player can act on"""
def read_at(image, offset, size):
image.seek(offset)
def read_exactly(image, position, size):
"""size bytes of the image from position; None if it ends first"""
image.seek(position)
data = image.read(size)
if len(data) != size:
raise ExtractError("Could not read the disc image (is it complete?).")
return data
return data if len(data) == size else None
def find_volume(image):
"""the game partition's offset, and the root directory's sector and size"""
for offset in PARTITION_OFFSETS:
try:
descriptor = read_at(image, offset + VOLUME_DESCRIPTOR_OFFSET, SECTOR_SIZE)
except ExtractError:
def find_partition(image, image_size):
"""the game partition's start, and the root table's sector and size"""
for start in PARTITION_STARTS:
if start + DESCRIPTOR_OFFSET + SECTOR_SIZE > image_size:
continue
if descriptor[:20] != VOLUME_MAGIC or descriptor[0x7EC:0x7EC + 20] != VOLUME_MAGIC:
descriptor = read_exactly(image, start + DESCRIPTOR_OFFSET, SECTOR_SIZE)
if (descriptor is None or descriptor[:len(MAGIC)] != MAGIC or
descriptor[SECOND_MAGIC_OFFSET:SECOND_MAGIC_OFFSET + len(MAGIC)] != MAGIC):
continue
sector, size = struct.unpack_from("<II", descriptor, 20)
return offset, sector, size
sector, size = struct.unpack_from("<II", descriptor, 0x14)
return start, sector, size
raise ExtractError("This is not an Xbox disc image.")
def read_directory(image, partition, sector, size, what):
if size <= 0 or size > MAXIMUM_DIRECTORY_SIZE:
raise ExtractError(what)
return read_at(image, partition + sector * SECTOR_SIZE, size)
def read_table(image, partition, sector, size, damaged):
if size == 0 or size > MAXIMUM_TABLE_SIZE:
raise ExtractError(damaged)
table = read_exactly(image, partition + sector * SECTOR_SIZE, size)
if table is None:
raise ExtractError("Could not read the disc image (is it complete?).")
return table
def walk(table, offset, depth, directories, out, visited):
"""collects the entries (name, sector, size) of the subtree at offset
(4-byte units), files or directories as asked"""
at = offset * 4
# a malformed table must not loop or run off its end
visited[0] += 1
if depth > 64 or visited[0] > 4096 or at + ENTRY_HEADER_SIZE > len(table):
return
left, right, sector, size, attributes, name_length = struct.unpack_from("<HHIIBB", table, at)
# 0xFFFF: padding, an empty directory
if left == 0xFFFF:
return
if left:
walk(table, left, depth + 1, directories, out, visited)
is_directory = bool(attributes & ATTRIBUTE_DIRECTORY)
if (at + ENTRY_HEADER_SIZE + name_length <= len(table) and name_length > 0
and is_directory == directories and len(out) < MAXIMUM_FILES):
name = table[at + ENTRY_HEADER_SIZE:at + ENTRY_HEADER_SIZE + name_length].decode("latin-1")
# (as extract-xiso refuses them: no name may leave the folder)
if name not in (".", "..") and "/" not in name and "\\" not in name:
out.append((name, sector, size))
if right:
walk(table, right, depth + 1, directories, out, visited)
def is_plain_name(name):
"""no path, no . or .., and only printable ASCII that every file system
takes as a plain name"""
if not name or name in (".", ".."):
return False
return all(0x20 <= ord(character) <= 0x7E and character not in '/\\:*?"<>|' for character in name)
def walk_table(table, directories):
"""the folders (or the files) of a table with plain names, as (name,
sector, size), in the tree's order: each entry's left subtree, the entry,
its right subtree; a link to padding, past the table or back to an entry
already visited ends that branch"""
entries, visited = [], set()
visits = [0]
def walk(offset, depth):
if depth > MAXIMUM_DEPTH or visits[0] >= MAXIMUM_VISITS:
return
if offset >= len(table) or len(table) - offset < ENTRY_FIXED_SIZE:
return
left, right = struct.unpack_from("<HH", table, offset)
if left == PADDING_LINK or offset // 4 in visited:
return
visited.add(offset // 4)
visits[0] += 1
if left:
walk(left * 4, depth + 1)
name_length = table[offset + 13]
if name_length and name_length <= len(table) - offset - ENTRY_FIXED_SIZE:
is_directory = bool(table[offset + 12] & ATTRIBUTE_DIRECTORY)
name = table[offset + ENTRY_FIXED_SIZE:offset + ENTRY_FIXED_SIZE + name_length].decode("latin-1")
# (the destination's file system may ignore case)
if (is_directory == directories and len(entries) < MAXIMUM_ENTRIES and is_plain_name(name) and
all(entry[0].lower() != name.lower() for entry in entries)):
sector, size = struct.unpack_from("<II", table, offset + 4)
entries.append((name, sector, size))
if right:
walk(right * 4, depth + 1)
walk(0, 0)
return entries
def maps_language(name):
@@ -145,65 +155,67 @@ def maps_language(name):
return None
def choose_maps(folders):
"""the maps folder, and its language (None for a plain "maps")"""
for folder in folders:
if folder[0].lower() == "maps":
return folder, None
languages = [(maps_language(folder[0]), folder) for folder in folders if maps_language(folder[0])]
wanted = (os.environ.get("RINGFALL_LANGUAGE") or os.environ.get("LC_ALL") or
os.environ.get("LC_MESSAGES") or os.environ.get("LANG") or "")[:2].lower()
for preferred in (wanted, "en"):
for language, folder in languages:
if language == preferred:
return folder, language
if languages:
return languages[0][1], languages[0][0]
raise ExtractError("The disc image has no maps folder: it is not a Halo disc.")
def extract(image_path, destination):
with open(image_path, "rb") as image:
partition, root_sector, root_size = find_volume(image)
image_size = os.fstat(image.fileno()).st_size
partition, root_sector, root_size = find_partition(image, image_size)
# the root's maps folder
table = read_directory(image, partition, root_sector, root_size,
"The disc image's file system is damaged.")
directories = []
walk(table, 0, 0, True, directories, [0])
maps = [entry for entry in directories if entry[0].lower() == "maps"]
# (a European disc in two languages, Spanish and Italian, has a maps
# folder for each, maps_es and maps_it: the one for the language
# asked for (RINGFALL_LANGUAGE, else the system's), else English's,
# else the first; its language goes into maps/language.txt, which the
# game takes as game.language's when that is unset)
language = None
if not maps:
languages = [(maps_language(entry[0]), entry) for entry in directories if maps_language(entry[0])]
wanted = (os.environ.get("RINGFALL_LANGUAGE") or os.environ.get("LC_ALL") or
os.environ.get("LC_MESSAGES") or os.environ.get("LANG") or "")[:2].lower()
for preferred in (wanted, "en"):
chosen = [pair for pair in languages if pair[0] == preferred]
if chosen:
break
chosen = chosen or languages[:1]
if chosen:
language, entry = chosen[0]
maps = [entry]
if not maps:
raise ExtractError("The disc image has no maps folder: it is not a Halo disc.")
root = read_table(image, partition, root_sector, root_size, "The disc image's file system is damaged.")
(_, maps_sector, maps_size), language = choose_maps(walk_table(root, True))
# its files
table = read_directory(image, partition, maps[-1][1], maps[-1][2],
"The disc image's maps folder is damaged.")
files = []
walk(table, 0, 0, False, files, [0])
if not any(name.lower() == "ui.map" for name, _, _ in files):
table = read_table(image, partition, maps_sector, maps_size, "The disc image's maps folder is damaged.")
files = walk_table(table, False)
user_interface = next((file for file in files if file[0].lower() == "ui.map"), None)
if user_interface is None:
raise ExtractError("The disc image's maps folder has no ui.map: it is not a Halo disc.")
# (an image that ends before a file does is refused before anything
# is written; an empty file's sector need not be anywhere)
for name, sector, size in files:
if size and partition + sector * SECTOR_SIZE + size > image_size:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
total = sum(size for _, _, size in files) or 1
partial = os.path.join(destination, "maps.partial")
finished = os.path.join(destination, "maps")
# the copy, to maps.partial (emptied of what an earlier attempt left)
partial = os.path.join(destination, PARTIAL_DIRECTORY)
try:
os.makedirs(partial, exist_ok=True)
for leftover in os.listdir(partial):
os.remove(os.path.join(partial, leftover))
except OSError:
raise ExtractError("Could not create %s." % partial)
done = 0
shown = -1
done, shown = 0, -1
for name, sector, size in files:
path = os.path.join(partial, name)
offset = partition + sector * SECTOR_SIZE
remaining = size
position, remaining = partition + sector * SECTOR_SIZE, size
print("# Copying maps/%s" % name, flush=True)
try:
with open(path, "wb") as out:
while remaining > 0:
count = min(remaining, COPY_BUFFER_SIZE)
out.write(read_at(image, offset, count))
offset += count
count = min(remaining, COPY_CHUNK)
data = read_exactly(image, position, count)
if data is None:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
out.write(data)
position += count
remaining -= count
done += count
# (zenity closes at 100: that is left to the caller)
@@ -211,23 +223,24 @@ def extract(image_path, destination):
if percent != shown:
print(percent, flush=True)
shown = percent
except ExtractError:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
except OSError:
raise ExtractError("Could not write %s (is the storage full?)." % path)
# (the maps folder may be there, empty)
# then into maps (which may be there, empty), the language before and
# ui.map (the sign that the data is there) last
finished = os.path.join(destination, "maps")
try:
os.makedirs(finished, exist_ok=True)
for name, _, _ in files:
os.replace(os.path.join(partial, name), os.path.join(finished, name))
os.rmdir(partial)
language_file = os.path.join(finished, "language.txt")
if os.path.exists(language_file):
os.remove(language_file)
if language:
with open(language_file, "w") as out:
out.write(language + "\n")
order = [file for file in files if file is not user_interface] + [user_interface]
for name, _, _ in order:
os.replace(os.path.join(partial, name), os.path.join(finished, name))
os.rmdir(partial)
except OSError as error:
raise ExtractError("Could not move the maps into %s (%s)." % (finished, error.strerror))
@@ -219,7 +219,7 @@
<string text="Anyone can see and join your game: it is listed\nin everyone's Server Browser."/>
<string text="Only players with your invite link can join."/>
<string text="Friendly fire, the enemies and player collisions,\nfor this game."/>
<string text="Voice chat and votes to kick a player, for this\ngame."/>
<string text="Voice chat, text chat and votes to kick a player,\nfor this game."/>
<string text="Players from the Server Browser must type it to\njoin (an invite link needs none). Enter sets it."/>
<string text="Sending players who join without the game's\nCustom Edition map the map, and how fast."/>
</strings>
@@ -369,6 +369,7 @@
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/op_voice_kbps" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/op_voice_proximity" x="54" y="163"/>
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/op_votekick" x="54" y="193"/>
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/op_text_chat" x="54" y="223"/>
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/voice_options_button_bar" y="414"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/voice_options/voice_options_button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
@@ -458,12 +459,27 @@
<string text="ON"/>
<string text="OFF"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/voice_options/op_text_chat" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/text_chat_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/text_chat_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/voice_options/text_chat_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/voice_options/voice_options_labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/voice_options/text_chat_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/voice_options/var_text_chat" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/voice_options/var_text_chat">
<string text="ON"/>
<string text="WITH LINKS"/>
<string text="OFF"/>
</strings>
<strings name="main_menu/multiplayer_type_select/server_settings/voice_options/voice_options_labels">
<string text="VOICE CHAT:"/>
<string text="LOBBY VOICE CHAT:"/>
<string text="VOICE QUALITY:"/>
<string text="VOICE NEAR DISTANCE:"/>
<string text="VOTE KICK:"/>
<string text="TEXT CHAT:"/>
</strings>
<strings name="main_menu/multiplayer_type_select/server_settings/voice_options/cap_voice_options">
<string text="No voice chat during the game."/>
@@ -488,6 +504,9 @@
<string text="Players 150 metres apart or less are near\nfor voice chat."/>
<string text="Players can vote to kick a player, from the\nscoreboard."/>
<string text="Players cannot vote to kick anyone."/>
<string text="Players can type to each other; lines with links\nare refused. Off in a public internet game."/>
<string text="Players can type to each other, links too. Off\nin a public internet game."/>
<string text="No text chat in the game."/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/map_share_options/map_share_options_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
<child widget="main_menu/multiplayer_type_select/server_settings/map_share_options/header_map_share_options"/>
@@ -543,6 +562,8 @@
<string text="2 MB/S"/>
<string text="4 MB/S"/>
<string text="8 MB/S"/>
<string text="16 MB/S"/>
<string text="20 MB/S"/>
</strings>
<strings name="main_menu/multiplayer_type_select/server_settings/map_share_options/map_share_options_labels">
<string text="SHARE MAPS:"/>
@@ -557,5 +578,7 @@
<string text="The most you send of maps, so that the game\nkeeps the rest of your upload."/>
<string text="The most you send of maps, so that the game\nkeeps the rest of your upload."/>
<string text="The most you send of maps, so that the game\nkeeps the rest of your upload."/>
<string text="The most you send of maps, so that the game\nkeeps the rest of your upload."/>
<string text="The most you send of maps, so that the game\nkeeps the rest of your upload."/>
</strings>
</menus>
@@ -78,4 +78,18 @@
<string text="ON"/>
<string text="OFF"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/op_text_chat" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/text_chat_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/text_chat_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/text_chat_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/teamplay_options_labels" string_index="8" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/text_chat_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/var_text_chat" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/var_text_chat">
<string text="ON"/>
<string text="WITH LINKS"/>
<string text="OFF"/>
</strings>
</menus>
@@ -53,6 +53,7 @@
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/op_voice_kbps" x="54" y="223"/>
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/op_voice_proximity" x="54" y="253"/>
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/op_votekick" x="54" y="283"/>
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/op_text_chat" x="54" y="313"/>
<child widget="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/teamplay_button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/teamplay_options_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
@@ -35,7 +35,7 @@
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/controls_setup/group_label" type="text" controller="1" width="200" height="22" text="SHOW:" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/controls_setup/group_spinner" type="spinner" left="3" top="2" width="297" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="MOVEMENT|WEAPONS|ACTIONS" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 300 19 306">
<widget name="main_menu/settings_select/player_setup/player_profile_edit/controls_setup/group_spinner" type="spinner" left="3" top="2" width="297" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="MOVEMENT|WEAPONS|ACTIONS|COMMUNICATION" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 300 19 306">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/controls_setup/op_command_1" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" run="controls begin binding"/>
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's settings screen, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/in_game_network_settings_screen" width="640" height="480" flags="pass_unhandled_to_focused_child pause_game" bitmap="bitmaps/gradient">
<on event="b" back="true"/>
<on event="back" back="true"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/header_profile_network_settings"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/options_menu"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/header_profile_network_settings" controller="1" left="35" top="11" width="605" height="59" bitmap="main_menu/settings_select/player_setup/player_profile_edit/network_setup/header_profile_network_settings">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/help" type="text" controller="1" left="68" top="350" width="482" height="60" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/help_strings" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/options_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/help">
<data input="port settings help"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_map_sharing" x="54" y="73" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_multiplayer_hud" x="54" y="103" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_multiplayer_hud" x="54" y="73" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_streamer_mode" x="54" y="133" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_streamer_mode" x="54" y="103" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_defaults" y="1"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_ok" x="380" y="1"/>
<child widget="common_button_cancel" x="510" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_map_sharing" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF" platform="desktop android">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_sharing_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_sharing_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/map_sharing_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/map_sharing_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/labels" string_index="0" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_multiplayer_hud" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/multiplayer_hud_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/multiplayer_hud_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/multiplayer_hud_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/multiplayer_hud_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/labels" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/op_streamer_mode" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/streamer_mode_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/streamer_mode_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/streamer_mode_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/streamer_mode_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
<on event="start" run="port settings defaults"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/button_ok" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="1" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings save" back="true"/>
<on event="start" run="port settings save" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/labels">
<string text="MAP SHARING:"/>
<string text="MULTIPLAYER HUD:"/>
<string text="STREAMER MODE:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/help_strings">
<string text=""/>
<string text="Downloading Custom Edition maps you do not have,\nand helping send them to other players."/>
<string text="Players' names above their heads, the\nscoreboard, and the text chat."/>
<string text="Hide offensive words in names and text from\nother players, maps and mods, as stars."/>
</strings>
</menus>
@@ -47,7 +47,7 @@
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_seed_upload_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_seed_upload_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="64 KB/S|128 KB/S|256 KB/S|512 KB/S|1 MB/S|2 MB/S" setting="network.map_seed_upload" values="64|128|256|512|1024|2048" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_seed_upload_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="64 KB/S|128 KB/S|256 KB/S|512 KB/S|1 MB/S|2 MB/S|4 MB/S|8 MB/S|10 MB/S" setting="network.map_seed_upload" values="64|128|256|512|1024|2048|4096|8192|10240" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's settings screen, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/multiplayer_hud_settings_screen" width="640" height="480" flags="pass_unhandled_to_focused_child pause_game" bitmap="bitmaps/gradient">
<on event="b" back="true"/>
<on event="back" back="true"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/header_profile_network_settings"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/options_menu"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/header_profile_network_settings" controller="1" left="35" top="11" width="605" height="59" bitmap="main_menu/settings_select/player_setup/player_profile_edit/network_setup/header_profile_network_settings">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/help" type="text" controller="1" left="68" top="350" width="482" height="60" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/help_strings" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/options_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/help">
<data input="port settings help"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_player_names" x="54" y="73"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_player_name_scale" x="54" y="103"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_scoreboard_team_layout" x="54" y="133"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_scoreboard_background" x="54" y="163"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_text_chat" x="54" y="193"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_chat_style" x="54" y="223"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_defaults" y="1"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_ok" x="380" y="1"/>
<child widget="common_button_cancel" x="510" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_player_names" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_names_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_names_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_names_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="0" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_names_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ALL|ALLIES|ENEMIES|NONE" setting="display.player_names" values="all|allies|enemies|none" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_player_name_scale" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_name_scale_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_name_scale_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_name_scale_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/player_name_scale_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="0.5x|0.75x|1x|1.25x|1.5x|2x" setting="display.player_name_scale" values="0.5|0.75|1|1.25|1.5|2" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_scoreboard_team_layout" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_team_layout_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_team_layout_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_team_layout_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_team_layout_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="TEAMS|BY SCORE" setting="display.scoreboard_team_layout" values="teams|score" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_scoreboard_background" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_background_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_background_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_background_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/scoreboard_background_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ON|OFF" setting="display.scoreboard_background" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_text_chat" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/text_chat_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/text_chat_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/text_chat_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/text_chat_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="SHOW|HIDE" setting="display.text_chat" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/op_chat_style" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/chat_style_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/chat_style_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/chat_style_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/chat_style_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="COLORS|WHITE" setting="display.chat_style" values="colors|white" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
<on event="start" run="port settings defaults"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/button_ok" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="1" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings save" back="true"/>
<on event="start" run="port settings save" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/labels">
<string text="PLAYER NAMES:"/>
<string text="PLAYER NAME SIZE:"/>
<string text="SCOREBOARD LAYOUT:"/>
<string text="SCOREBOARD PANEL:"/>
<string text="TEXT CHAT:"/>
<string text="CHAT TEXT:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/help_strings">
<string text=""/>
<string text="In multiplayer, whose names are drawn above their\nheads."/>
<string text="How large the players' names are drawn."/>
<string text="A team game's scoreboard: a column for each team,\nor every player in order of score."/>
<string text="Draw a panel behind the scoreboard, for clearer\ntext."/>
<string text="SHOW the text chat, or HIDE it: no lines, and\nits keys and D-pad Up open nothing."/>
<string text="The text chat's colors: COLORS, names in their\nteam's color; WHITE, as Custom Edition."/>
</strings>
</menus>
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's settings screen, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/streamer_mode_settings_screen" width="640" height="480" flags="pass_unhandled_to_focused_child pause_game" bitmap="bitmaps/gradient">
<on event="b" back="true"/>
<on event="back" back="true"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/header_profile_network_settings"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/options_menu"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/header_profile_network_settings" controller="1" left="35" top="11" width="605" height="59" bitmap="main_menu/settings_select/player_setup/player_profile_edit/network_setup/header_profile_network_settings">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/help" type="text" controller="1" left="68" top="350" width="482" height="60" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/help_strings" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/options_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/help">
<data input="port settings help"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_enabled" x="54" y="73"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_slurs" x="54" y="103"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_swearing" x="54" y="133"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_insults" x="54" y="163"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_defaults" y="1"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_ok" x="380" y="1"/>
<child widget="common_button_cancel" x="510" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_enabled" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/enabled_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/enabled_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/enabled_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/labels" string_index="0" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/enabled_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ON|OFF" setting="streamer.enabled" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_slurs" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/slurs_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/slurs_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/slurs_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/labels" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/slurs_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="OFF|SEVERE|STRONG AND WORSE|MILD AND WORSE" setting="streamer.slurs" values="off|severe|strong|mild" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_swearing" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/swearing_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/swearing_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/swearing_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/swearing_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="OFF|SEVERE|STRONG AND WORSE|MILD AND WORSE" setting="streamer.swearing" values="off|severe|strong|mild" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/op_insults" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/insults_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/insults_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/insults_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/insults_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="OFF|SEVERE|STRONG AND WORSE|MILD AND WORSE" setting="streamer.insults" values="off|severe|strong|mild" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
<on event="start" run="port settings defaults"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/button_ok" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="1" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings save" back="true"/>
<on event="start" run="port settings save" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/labels">
<string text="STREAMER MODE:"/>
<string text="CENSOR SLURS:"/>
<string text="CENSOR SWEARING:"/>
<string text="CENSOR INSULTS:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/help_strings">
<string text=""/>
<string text="Hide offensive words in names and text from\nother players, maps and mods, as stars."/>
<string text="Slurs about race, sexuality, gender and\ndisability."/>
<string text="Swearing and sexual words (STRONG AND WORSE\nleaves the mildest showing)."/>
<string text="Name-calling and insults that are not slurs."/>
</strings>
</menus>
@@ -17,15 +17,11 @@
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_allow_upnp" x="54" y="103" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_join_from_clipboard" x="54" y="133" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_auto" x="54" y="163" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_names" x="54" y="193" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_names" x="54" y="103" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_name_scale" x="54" y="223" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_name_scale" x="54" y="133" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_team_layout" x="54" y="253" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_team_layout" x="54" y="163" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_background" x="54" y="283" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_background" x="54" y="193" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_map_sharing" x="54" y="313" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_map_sharing" x="54" y="193" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_multiplayer_hud" x="54" y="223" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_multiplayer_hud" x="54" y="103" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_streamer_mode" x="54" y="253" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_streamer_mode" x="54" y="133" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
@@ -69,49 +65,29 @@
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/auto_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ON|OFF" setting="update.auto" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_names" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_names_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_names_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_names_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_names_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ALL|ALLIES|ENEMIES|NONE" setting="display.player_names" values="all|allies|enemies|none" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_player_name_scale" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_name_scale_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_name_scale_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_name_scale_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/player_name_scale_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="0.5x|0.75x|1x|1.25x|1.5x|2x" setting="display.player_name_scale" values="0.5|0.75|1|1.25|1.5|2" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_team_layout" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_team_layout_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_team_layout_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_team_layout_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="6" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_team_layout_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="TEAMS|BY SCORE" setting="display.scoreboard_team_layout" values="teams|score" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_scoreboard_background" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_background_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_background_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_background_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="7" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/scoreboard_background_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ON|OFF" setting="display.scoreboard_background" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_map_sharing" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF" platform="desktop android">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_sharing_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing/map_sharing_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="8" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/map_sharing_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_multiplayer_hud" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/multiplayer_hud_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud/multiplayer_hud_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/multiplayer_hud_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_streamer_mode" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/streamer_mode_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode/streamer_mode_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="6" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
@@ -128,11 +104,9 @@
<string text="UPNP PORT FORWARDING:"/>
<string text="JOIN FROM CLIPBOARD:"/>
<string text="CHECK FOR UPDATES:"/>
<string text="PLAYER NAMES:"/>
<string text="PLAYER NAME SIZE:"/>
<string text="SCOREBOARD LAYOUT:"/>
<string text="SCOREBOARD PANEL:"/>
<string text="MAP SHARING:"/>
<string text="MULTIPLAYER HUD:"/>
<string text="STREAMER MODE:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/help_strings">
<string text=""/>
@@ -140,10 +114,8 @@
<string text="Let internet play ask the router to forward its\nport, for networks that stop connections."/>
<string text="Join the game of an invite link copied before\nswitching to the game."/>
<string text="Look for a new version when the game starts."/>
<string text="In multiplayer, whose names are drawn above their\nheads."/>
<string text="How large the players' names are drawn."/>
<string text="A team game's scoreboard: a column for each team,\nor every player in order of score."/>
<string text="Draw a panel behind the scoreboard, for clearer\ntext."/>
<string text="Downloading Custom Edition maps you do not have,\nand helping send them to other players."/>
<string text="Players' names above their heads, the\nscoreboard, and the text chat."/>
<string text="Hide offensive words in names and text from\nother players, maps and mods, as stars."/>
</strings>
</menus>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

+4
View File
@@ -1045,6 +1045,9 @@
<string text="Players 150 metres apart or less are near\nfor voice chat."/>
<string text="Players can vote to kick a player, from the\nscoreboard."/>
<string text="Players cannot vote to kick anyone."/>
<string text="Players can type to each other; lines with links\nare refused. Off in a public internet game."/>
<string text="Players can type to each other, links too. Off\nin a public internet game."/>
<string text="No text chat in the game."/>
</strings>
<strings name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/teamplay_options_labels">
<string text="FRIENDLY FIRE:"/>
@@ -1055,6 +1058,7 @@
<string text="VOICE QUALITY:"/>
<string text="VOICE NEAR DISTANCE:"/>
<string text="VOTE KICK:"/>
<string text="TEXT CHAT:"/>
</strings>
<strings name="main_menu/settings_select/multiplayer_setup/teamplay_options_edit/var_friendly_fire">
<string text="OFF"/>
+3
View File
@@ -47,7 +47,10 @@
"ce/main_menu.settings_select.player_setup.player_profile_edit.gamepad_setup.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.mouse_settings.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.name_edit.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.network_setup.in_game.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.network_setup.map_sharing.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.network_setup.multiplayer_hud.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.network_setup.streamer_mode.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.network_setup.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.video_settings.fov_viewmodels.xml",
"ce/main_menu.settings_select.player_setup.player_profile_edit.video_settings.graphics.xml",
@@ -1,15 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="64" viewBox="0 0 256 64">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="64" viewBox="0 0 256 64">
<defs>
<path id="gD" d="M736 -413Q736 -529 659 -621Q573 -719 396 -719H68V0H400Q486 0 540 -17Q590 -36 657 -90Q689 -118 708 -163Q716 -177 717 -183Q718 -186 720 -194Q722 -199 723 -205Q726 -222 729 -235Q731 -253 731 -263Q733 -271 735 -288Q736 -297 736 -321V-333V-347V-364V-386ZM570 -358V-329V-326Q568 -303 566 -287Q562 -259 559 -245Q558 -240 556 -229Q554 -222 554 -221L537 -182Q510 -140 469 -131L452 -128L434 -126L394 -125H219V-594H394L438 -592L478 -584Q517 -573 540 -531Q558 -497 565 -444Q567 -431 569 -407Q570 -394 570 -369Z"/>
<path id="gM" d="M877 0V-719H656L473 -168L291 -719H69V0H224L208 -564L396 0H557L740 -559L728 0Z"/>
<path id="gO" d="M742 -307Q742 -373 736 -427Q730 -477 719 -519Q683 -638 591 -688Q510 -733 354 -733Q198 -733 110 -638Q22 -544 22 -361Q22 -174 110 -80Q199 15 381 15Q475 15 542 -9Q610 -33 653 -79Q742 -174 742 -307ZM577 -358Q577 -248 536 -183Q485 -108 425 -108Q363 -108 333 -114L283 -128Q252 -140 231 -167Q213 -195 205 -226Q186 -293 186 -384Q186 -471 228 -534Q279 -609 381 -609Q488 -609 537 -533Q577 -472 577 -358Z"/>
<path id="gS" d="M712 -179Q712 -256 702 -297Q692 -340 668 -361L646 -379L629 -392Q607 -405 583 -410L562 -414L538 -417L481 -418Q241 -418 213 -437Q186 -458 186 -502Q186 -546 218 -569Q250 -590 304 -590H677V-719H280Q160 -719 98 -672Q28 -617 28 -487Q28 -357 141 -313Q193 -293 306 -293L355 -294H389Q510 -294 536 -268Q541 -263 544 -255Q549 -248 550 -237Q553 -225 553 -192Q553 -161 516 -142Q491 -129 436 -129H58V0Q581 0 642 -46Q712 -98 712 -179Z"/>
<path id="gD" d="M0,0L11.75,0C16.21,0 19.83,3.62 19.83,8.08L19.83,13.42C19.83,17.88 16.21,21.5 11.75,21.5L0,21.5ZM4.76,17.67L10.59,17.67C13.07,17.67 15.08,15.66 15.08,13.18L15.08,8.32C15.08,5.84 13.07,3.83 10.59,3.83L4.76,3.83Z"/>
<path id="gM" d="M0,0L6.86,0L12.21,16.25L17.56,0L24.43,0L24.43,21.5L19.96,21.5L19.96,5.76L14.69,21.5L9.73,21.5L4.46,5.76L4.46,21.5L0,21.5Z"/>
<path id="gO" d="M0,8.58C0,3.62 4.02,-0.4 8.98,-0.4L12.39,-0.4C17.35,-0.4 21.37,3.62 21.37,8.58L21.37,12.92C21.37,17.88 17.35,21.9 12.39,21.9L8.98,21.9C4.02,21.9 0,17.88 0,12.92ZM5.06,12.7C5.06,15.7 7.5,18.13 10.49,18.13L10.88,18.13C13.88,18.13 16.31,15.7 16.31,12.7L16.31,8.8C16.31,5.8 13.88,3.37 10.88,3.37L10.49,3.37C7.5,3.37 5.06,5.8 5.06,8.8Z"/>
<path id="gS" d="M20.26,0L20.26,3.84L7.18,3.84C5.73,3.84 4.55,5.02 4.55,6.47L4.55,6.07C4.55,7.52 5.73,8.7 7.18,8.7L15.05,8.7C17.93,8.7 20.26,11.03 20.26,13.91L20.26,16.29C20.26,19.17 17.93,21.5 15.05,21.5L0,21.5L0,17.66L13.08,17.66C14.53,17.66 15.71,16.48 15.71,15.03L15.71,15.11C15.71,13.65 14.53,12.47 13.08,12.47L5.21,12.47C2.33,12.47 0,10.14 0,7.27L0,5.21C0,2.33 2.33,0 5.21,0Z"/>
</defs>
<!-- "MODS" (normal state: dim blue) -->
<g id="text" fill="#2895ff" stroke="#2895ff" opacity="0.467" stroke-width="33.30" stroke-linejoin="round">
<use href="#gM" transform="translate(86.71,26.00) scale(0.02702)"/>
<use href="#gO" transform="translate(112.11,26.00) scale(0.02702)"/>
<use href="#gD" transform="translate(132.81,26.00) scale(0.02702)"/>
<use href="#gS" transform="translate(153.40,26.00) scale(0.02702)"/>
<g id="text" fill="#2895ff" fill-opacity="0.467">
<use href="#gM" transform="translate(87.45,6.57) scale(0.9037)"/>
<use href="#gO" transform="translate(112.40,6.57) scale(0.9037)"/>
<use href="#gD" transform="translate(134.24,6.57) scale(0.9037)"/>
<use href="#gS" transform="translate(154.24,6.57) scale(0.9037)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,24 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="64" viewBox="0 0 256 64">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="64" viewBox="0 0 256 64">
<defs>
<path id="gD" d="M736 -413Q736 -529 659 -621Q573 -719 396 -719H68V0H400Q486 0 540 -17Q590 -36 657 -90Q689 -118 708 -163Q716 -177 717 -183Q718 -186 720 -194Q722 -199 723 -205Q726 -222 729 -235Q731 -253 731 -263Q733 -271 735 -288Q736 -297 736 -321V-333V-347V-364V-386ZM570 -358V-329V-326Q568 -303 566 -287Q562 -259 559 -245Q558 -240 556 -229Q554 -222 554 -221L537 -182Q510 -140 469 -131L452 -128L434 -126L394 -125H219V-594H394L438 -592L478 -584Q517 -573 540 -531Q558 -497 565 -444Q567 -431 569 -407Q570 -394 570 -369Z"/>
<path id="gM" d="M877 0V-719H656L473 -168L291 -719H69V0H224L208 -564L396 0H557L740 -559L728 0Z"/>
<path id="gO" d="M742 -307Q742 -373 736 -427Q730 -477 719 -519Q683 -638 591 -688Q510 -733 354 -733Q198 -733 110 -638Q22 -544 22 -361Q22 -174 110 -80Q199 15 381 15Q475 15 542 -9Q610 -33 653 -79Q742 -174 742 -307ZM577 -358Q577 -248 536 -183Q485 -108 425 -108Q363 -108 333 -114L283 -128Q252 -140 231 -167Q213 -195 205 -226Q186 -293 186 -384Q186 -471 228 -534Q279 -609 381 -609Q488 -609 537 -533Q577 -472 577 -358Z"/>
<path id="gS" d="M712 -179Q712 -256 702 -297Q692 -340 668 -361L646 -379L629 -392Q607 -405 583 -410L562 -414L538 -417L481 -418Q241 -418 213 -437Q186 -458 186 -502Q186 -546 218 -569Q250 -590 304 -590H677V-719H280Q160 -719 98 -672Q28 -617 28 -487Q28 -357 141 -313Q193 -293 306 -293L355 -294H389Q510 -294 536 -268Q541 -263 544 -255Q549 -248 550 -237Q553 -225 553 -192Q553 -161 516 -142Q491 -129 436 -129H58V0Q581 0 642 -46Q712 -98 712 -179Z"/>
<path id="gD" d="M0,0L11.75,0C16.21,0 19.83,3.62 19.83,8.08L19.83,13.42C19.83,17.88 16.21,21.5 11.75,21.5L0,21.5ZM4.76,17.67L10.59,17.67C13.07,17.67 15.08,15.66 15.08,13.18L15.08,8.32C15.08,5.84 13.07,3.83 10.59,3.83L4.76,3.83Z"/>
<path id="gM" d="M0,0L6.86,0L12.21,16.25L17.56,0L24.43,0L24.43,21.5L19.96,21.5L19.96,5.76L14.69,21.5L9.73,21.5L4.46,5.76L4.46,21.5L0,21.5Z"/>
<path id="gO" d="M0,8.58C0,3.62 4.02,-0.4 8.98,-0.4L12.39,-0.4C17.35,-0.4 21.37,3.62 21.37,8.58L21.37,12.92C21.37,17.88 17.35,21.9 12.39,21.9L8.98,21.9C4.02,21.9 0,17.88 0,12.92ZM5.06,12.7C5.06,15.7 7.5,18.13 10.49,18.13L10.88,18.13C13.88,18.13 16.31,15.7 16.31,12.7L16.31,8.8C16.31,5.8 13.88,3.37 10.88,3.37L10.49,3.37C7.5,3.37 5.06,5.8 5.06,8.8Z"/>
<path id="gS" d="M20.26,0L20.26,3.84L7.18,3.84C5.73,3.84 4.55,5.02 4.55,6.47L4.55,6.07C4.55,7.52 5.73,8.7 7.18,8.7L15.05,8.7C17.93,8.7 20.26,11.03 20.26,13.91L20.26,16.29C20.26,19.17 17.93,21.5 15.05,21.5L0,21.5L0,17.66L13.08,17.66C14.53,17.66 15.71,16.48 15.71,15.03L15.71,15.11C15.71,13.65 14.53,12.47 13.08,12.47L5.21,12.47C2.33,12.47 0,10.14 0,7.27L0,5.21C0,2.33 2.33,0 5.21,0Z"/>
<filter id="glow" filterUnits="userSpaceOnUse" x="0" y="0" width="256" height="64">
<feGaussianBlur stdDeviation="2.19"/>
</filter>
</defs>
<!-- "MODS" (highlighted: white with blue glow) -->
<g fill="#2895ff" stroke="#2895ff" stroke-width="233.13" stroke-linejoin="round" opacity="0.650" filter="url(#glow)">
<use href="#gM" transform="translate(86.71,26.00) scale(0.02702)"/>
<use href="#gO" transform="translate(112.11,26.00) scale(0.02702)"/>
<use href="#gD" transform="translate(132.81,26.00) scale(0.02702)"/>
<use href="#gS" transform="translate(153.40,26.00) scale(0.02702)"/>
<g fill="#2895ff" stroke="#2895ff" stroke-width="6.3" stroke-linejoin="round" opacity="0.650" filter="url(#glow)">
<use href="#gM" transform="translate(87.45,6.57) scale(0.9037)"/>
<use href="#gO" transform="translate(112.40,6.57) scale(0.9037)"/>
<use href="#gD" transform="translate(134.24,6.57) scale(0.9037)"/>
<use href="#gS" transform="translate(154.24,6.57) scale(0.9037)"/>
</g>
<g id="text" fill="#fff" stroke="#fff" stroke-width="33.30" stroke-linejoin="round">
<use href="#gM" transform="translate(86.71,26.00) scale(0.02702)"/>
<use href="#gO" transform="translate(112.11,26.00) scale(0.02702)"/>
<use href="#gD" transform="translate(132.81,26.00) scale(0.02702)"/>
<use href="#gS" transform="translate(153.40,26.00) scale(0.02702)"/>
<g id="text" fill="#fff">
<use href="#gM" transform="translate(87.45,6.57) scale(0.9037)"/>
<use href="#gO" transform="translate(112.40,6.57) scale(0.9037)"/>
<use href="#gD" transform="translate(134.24,6.57) scale(0.9037)"/>
<use href="#gS" transform="translate(154.24,6.57) scale(0.9037)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

+72
View File
@@ -0,0 +1,72 @@
# Streamer mode's words
The words streamer mode hides (Settings > Network Setup > Streamer Mode; the
`streamer.*` settings in `port/linux/README.md`). The game builds them in
from `port/linux/game/text_filter_terms.inc`, which
`tools/text_filter_terms.py` writes from Surge AI's list and these files:
| File | Contents |
| --- | --- |
| `review.txt` | The review of every base word of Surge AI's list: kept (its group, severity and where it may be found) or dropped, and the spellings dropped. The words are ROT13'd. |
| `allow.txt` | Words never hidden, however a hidden word sits inside them (Scunthorpe), in plain text |
| `english.txt` | The words of the English word list (`port/third_party/english-words`) that the list hides, ROT13'd, which `tools/test_text_filter_terms.py` checks |
`python3 tools/text_filter_terms.py --list` shows the table decoded, and
`--check "some text"` shows what the game would hide in a text.
## Surge AI's list
The words, their categories and their severities come from Surge AI's
profanity list, "The Obscenity List": 1,598 English profanities and their
spellings, each with up to three base words, up to three categories and a
severity that five raters gave it (Mild, Strong or Severe).
Upstream: https://github.com/surge-ai/profanity (gone since; the Internet
Archive's copy of its page of 1 March 2025 shows an MIT `LICENSE`, whose text
it did not keep), copied at https://huggingface.co/datasets/mmathys/profanity
(MIT), revision `c2a17bf3ec64d9b6418ead1cb5f7ef26dbdffccb`: `profanity_en.csv`,
SHA-256 ca4ff7d713a8e6f6ec2616f489cd09f6fb96b8b3af404a207783be58a91f3ede.
The CSV is not in the repository: give `tools/text_filter_terms.py --surge`
its path to write the table again (and `HALO_SURGE_CSV` its path for the
test that checks it).
The groups are made from its categories (`tools/text_filter_terms.py`'s
`GROUPS`), each base word in one, then reviewed (`review.txt`):
| Group | Surge AI's categories |
| --- | --- |
| SLURS | racial / ethnic slurs, sexual orientation / gender, mental disability, physical disability, political |
| SWEARING | sexual anatomy / sexual acts, bodily fluids / excrement, religious offense |
| INSULTS | other / general insult, animal references, physical attributes |
The review adds words of the project's own that their list has not (`term`
lines at its end): sexual words (porn, hentai and the like), words for
sexualised minors, hate phrases and harassment ("kill yourself"), each with a
severity the default levels hide (slurs from mild, swearing from strong).
The table is made from their list, so it carries their notice:
```
MIT License
Copyright (c) Surge AI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
+53
View File
@@ -0,0 +1,53 @@
# Streamer mode's allowed words (tools/text_filter_terms.py): words never
# hidden, nor any part of them, however a hidden word sits inside them
# (Scunthorpe). One a line, lowercase.
agapornis
assess
assesses
bereshith
brushite
chashitsu
cushite
cushitic
elkoshite
epornitic
epornitically
girgashite
kaneshite
koreishite
mackintoshite
marshite
matsushita
metabrushite
mishit
mishits
mishitting
niggard
nonporness
peshito
phage
phages
placuntitis
placuntoma
poorness
poornesses
rappist
scunthorpe
shiitake
shiite
shiites
shiitic
shitake
shittah
shittahs
shitterton
shittim
shittims
shittimwood
snigger
spoorn
unniggard
unporness
washita
wiggeries
wiggery
+297
View File
@@ -0,0 +1,297 @@
abacbeabtencuvp
abapr
abaprf
ahqrf
arteb
artebf
artebrf
artebvq
artebvqf
avt
avtten
avttre
avttref
avttregbr
avttrejrrq
avttrel
avttreqbz
avttrerq
avttresvfu
avttresvfurf
avttretbbfr
avttreurnq
avttrevfu
avttrevfz
avttreyvat
betnfz
betnfzf
cbea
cbeab
cbeabf
cbeabpeng
cbeabpenpl
cbeabtencu
cbeabtencubznavn
cbeabtencul
cbeabtencure
cbeabtencuvfg
cbeabtencuvp
cbeabtencuvpnyyl
cbeabtencuvrf
cbeabybtvpny
cbeaf
cbearenfgvp
cevpx
cevpxf
chffl
chffvrf
crpxre
crpxref
crqbcuvyr
cuvybcbeavfg
cvff
cvffrf
encr
encrf
encvfg
encvfgf
ergneq
ergneqf
ergneqrq
erqfxva
erqfxvaf
fcvp
fcvpf
fcvt
fcvx
fcvxf
fnzob
fnzobf
fphz
fphzf
fphzzl
fulybpx
fulybpxf
fung
fuvg
fuvgf
fuvggl
fuvggra
fuvggrq
fuvggvarff
fuvggvat
fuvggvre
fuvggvrfg
fuvggyr
fuvgn
fuvgrcbxr
fuvgure
fuvgurnq
fuvgurry
fvffl
fyhg
fyhgf
fyhggl
fynt
fyntf
gbffre
gbffref
gheq
gheqf
gjng
gjngf
gvg
gvgf
hacbeabtencuvp
jbc
jbcf
jnax
jnaxre
jrgonpx
jrgonpxf
juber
juberf
jvttre
mbbcuvybhf
mbbcuvyl
mbbcuvyr
mbbcuvyrf
mbbcuvyvfg
mbbcuvyvfz
mbbcuvyvgr
mbbcuvyvgvp
mbbcuvyvn
mbbcuvyvnp
mbbcuvyvp
mbbcuvyvrf
nany
navyvathf
nefr
nefrf
nefrubyr
nff
nffrf
nffubyr
nffubyrf
nob
nobf
obare
obaref
obbof
obyybk
obyybkrf
obyybkrq
obyybkvat
obyybpx
obyybpxf
ohgg
ohggf
ohttre
ohttref
ohyyfuvg
ohyyfuvgf
ohyyfuvggrq
ohyyfuvggvat
onfgneq
onfgneqf
onfgnneq
orfgvnyvgl
ornare
ornaref
ovgpu
ovgpul
ovgpurel
ovgpurevrf
ovgpurf
ovgpurq
ovgpuvat
oybjwbo
oybjwbof
oynpxl
pbba
pbbaf
pbbyvr
pbbyvrf
pbpx
pbpxf
pbpxurnq
phaavyvathf
phag
phagf
phpx
phz
pnjx
pnjxl
pnjxre
pnpn
pnpnf
pnpx
pnpxf
puvax
puvaxf
puvaxl
puvpxrafuvg
pyvg
qbhpur
qbhpurf
qbyg
qbygf
qlxr
qlxrf
qnexl
qnexvr
qnexvrf
qntb
qntbf
qnza
qnzaf
qvpx
qvpxf
qvqqyr
qvqqyrf
qvyqb
qvyqbf
shpx
shpxf
shpxjvg
shpxre
shpxrq
shpxvat
shttrq
sneg
snegf
snpx
snpxf
snt
sntbg
sntbgf
sntbgg
sntf
snttbg
snttbgel
snttbgf
snttbgl
snttbgrq
snttbgvat
snttl
snttvat
srpx
srpxf
sryyngbe
sryyngbel
sryyngvb
sryyngvbf
synzre
synzref
tbbx
tbbxf
tbjy
tbqqnz
tbqqnza
tbqqnzaf
tbqqnzarq
tbqqnzavg
tbqqnzf
tbqqnzzvg
tlc
tlcf
tlcfl
ubeal
ubefrfuvg
ubr
ubrf
uror
uryy
uryyf
vaprfg
vaprfgf
vaprfghbhf
vaprfghbhfarff
vaprfghbhfyl
vawha
wnc
wnpxnff
wnpxnffrf
wnvyonvg
wrex
wrexf
wvtnobb
wvtnobbf
xabo
xabof
xaboore
xaboorq
xlxr
xvxr
xvxrf
xyna
xynaf
ybyv
zbat
zbatbybvq
zbatbybvqf
zbgureshpxre
zhss
zhssf
znfgheongr
znfgheongrf
+326
View File
@@ -0,0 +1,326 @@
# Streamer mode's review of Surge AI's profanity list (tools/text_filter_terms.py):
# every base word of its profanity_en.csv kept (its group, severity and rule;
# - for Surge AI's severity and the rule worked out) or dropped. The words are
# ROT13'd; tools/text_filter_terms.py --list shows them.
#
# Dropped: everyday words the list has because they can be offensive in some
# uses (the filter has no context), and words for identities or anatomy that
# are neither slurs nor swearing. Moved: gendered insults filed under
# "sexual orientation / gender" go to SWEARING, homophobic phrases filed under
# the sexual categories go to SLURS, and the mild insults filed under "mental
# disability" or "sexual orientation / gender" go to INSULTS. Severities
# raised or lowered where one spelling's rating set the word's (damn and butt
# are mild, as Ofcom rates them; the Australian slur rated mild is strong).
drop 69
keep - - - norrq
keep - strong whole nob
drop noenunz
keep - - whole nany
drop nahf
drop ncr
keep - - - nefr
keep - - whole nff
keep - - - onol onggre
keep - - - onyyfnpx
drop onat
keep - - - onfgneq
keep - - - orna dhrra
keep - - whole ornare
keep - - - orng bss
keep - - - oryyraq
drop oraqre
keep swearing - - ovgpu
keep - - whole oynpxl
keep - - - oybj n ybnq
keep - - - oybjwbo
keep - - - oyhzcxva
keep - - - obvbynf
keep - - - obyybpxf
drop obaqntr
keep - - whole obare
drop obax
keep - - whole obbof
drop obbgl
drop oernfg
keep - - whole ohttre
drop ohz
drop ohat
keep - mild whole ohgg
drop ohggrezvyx
keep - - - pnzry wbpxrl
keep - - - pnzrygbr
keep slurs - - pnecrg zhapure
keep - - - puvan ivehf
keep - - - puvatpubat
keep - - whole puvax
keep - - - pubnq
keep - - - pubpun
keep - - - pubxr gur puvpxra
drop pubyb
keep - - - pyvg
keep - - whole pbpx
drop pbwbarf
keep - - whole pbbyvr
keep - - whole pbba
drop pbbg
drop pbbgvrf
keep - - - pbggba cvpxre
keep - - - pernzcvr
drop pebgpu
drop pebj
keep - - whole phz
keep - - - phaavyvathf
keep - - anywhere phag
keep - - whole qntb
keep - mild - qnza
keep - - whole qnexl
keep - - whole qvpx
keep - - whole qvqqyr
keep - - - qvyqb
drop qvcfgvpx
keep - - - qvegl fnapurm
keep - - - qbttl fglyr
keep insults - whole qbyg
drop qbat
keep - - - qbgurnq
drop qbhoyr cra
keep - - whole qbhpur
keep - - - qhzc n ybnq
keep - - whole qlxr
drop rwnphyngvba
keep - - - rerpgbcynfz
keep - - whole snt
keep - - anywhere snttbg
keep - - whole sneg
keep - - - sryyngvb
drop svatre
keep - - whole synzre
drop sberfxva
keep - - anywhere shpx
keep slurs - - shqtr cnpxre
keep - - - shaontf
drop tneontr ont
keep - - - tnfu-fgnoore
drop tnl
keep - - - tva wbpxrl
keep - - - tveyl ovgf
keep insults - - tveylobl
keep - - whole tbbx
keep - - whole tbjy
drop ternfre
keep - - start tebvq
drop tebcr
keep - - whole tlcfl
drop unt
keep - - - uneel cnyzf
keep - - whole uror
keep - - whole uryy
keep swearing - whole ubr
drop ubzbfrkhny
drop ubbgref
drop uhfgyre
keep - - whole vawha
keep - - - wnpx bss
keep - - - wnpxbss
keep - - - wnvyonvg
keep - - whole wnc
keep - - whole wrex
keep - - - wrex bss
drop wrj
keep - - - wvttnobb
drop wvz pebj
keep - - - wvmm
keep - - - xvqgbhpure
keep - - whole xvxr
keep - - - xvggl chapure
keep slurs - whole xxx
keep - - whole xyna
keep - strong whole xabo
keep - - - xh xyhkre
keep - - - ynqlobl
drop yrfovna
drop ybbfr
keep - - - zna pubjqre
keep - - - zna frrq
keep - - - znfgheongr
drop zrng
keep - - - zrng phegnvaf
keep - - - zvys
drop zbyrfg
keep - - whole zbat
keep - - whole zbatbybvq
drop zbatery
drop zbaxrl
keep - - - zbgureshpxre
keep - - whole zhss
keep - - - zhfuebbz gvc
keep - - whole arteb
keep - - anywhere avttn
keep - - anywhere avttre
keep - - - avttref
keep - - - avtttre
drop avccyr
keep - - whole abapr
drop ahg ohggre
keep - - - ahgfnpx
drop alzcu
keep - - - betnfz
keep - - - bira qbqtre
keep - - whole cnxv
keep - - - cnyz wbpxrl
keep - - - cnapnxr snpr
keep - - whole crpxre
keep insults - - crqbcuvyr
drop cravf
keep - - - crgre chssre
drop cvt
keep slurs - - cvyybj ovgre
keep - - - cvff
keep - - - cbyr yvpxre
keep - - - cbyr fzbxre
keep - - - cbyr fhpxre
keep - - - cbyrfzbxre
keep - - - cbepu zbaxrl
keep - - whole cevpx
keep - - - chyy gur chq
keep - - - chanav
drop chagn
keep - - whole chffl
drop dhrre
keep - - - enturnq
drop enzebq
keep - - - ernpunebhaq
drop erpghz
keep - - - erqfxva
keep - - whole ergneq
keep - - whole ergneqrq
keep - - - evz wbo
drop fnqbznfbpuvfz
keep - - - fnynq gbffre
keep - - whole fnzob
keep - - - fnhfntr wbpxrl
keep - - - fpuybat
keep insults - whole fphz
drop fphg
drop frk
keep - - - furznyr
drop fuvrfgre
keep - - anywhere fuvg
keep - - - fuybat
keep - - whole fulybpx
keep insults - whole fvffl
keep swearing - - fxnax
keep swearing - whole fynt
keep - - - fynag rlr
drop fyvg
keep swearing - - fyhg
drop fangpu
drop fcnax
drop fcrez
drop fcuvapgre
keep - - whole fcvp
drop fcbbx
drop fchax
keep - - - fghzc purjre
drop fhpx
drop fjvar
keep - - - gnpburnq
keep - - - gnqtre
keep - - - gnxvat gur cvff
keep - - - gnyyljnpxre
keep - - - gne-onol
drop gneg
drop grfgvpyrf
keep - - - guebng lbtheg
keep - - - guebngre
keep - - - gvpxyr gur cvpxyr
keep - - whole gvg
keep - - whole gvgf
keep - - whole gbffre
keep - - - gbffvat fnynq
keep - - - gbjryurnq
drop genzc
keep - - whole genaal
drop genafirfgvgr
drop genfu
keep - - - gebhfre fanxr
keep - - - gebhfrefanxr
keep - - whole gheq
keep - - - gjng
drop gjvax
keep - - - hcfxveg
drop intvan
drop ihyin
drop jnat
keep - - - jnax
drop jrravr
drop jrvare
keep - - - jrgonpx
keep - - - junpx bss
keep swearing - - juber
keep - - - jvyyl-junpxre
keep - - - jvaqbj yvpxre
keep - - whole jbc
drop jbhaq
keep - - - mvccreurnq
# spellings of kept words that are everyday words, or another's initials
drop onfgvanqb
drop crgre
drop ahttrgf
drop ahttrg
drop xavpxref
drop avpxre
drop avpxref
drop fnpx
drop ongre
drop ongrf
drop abof
drop abo
drop fbof
drop fbo
drop ubne
drop chfflpng
drop chffrf
drop chff
drop qvk
drop srq
drop sre
drop srt
drop sbexrq
drop furrg
drop oop
drop ojp
drop ow
drop fcvpx
# The project's own words, which Surge AI's list has not: sexual words and
# those for sexualised minors, hate phrases, and harassment (a term's
# severity puts it under the default levels: slurs mild, swearing strong)
term swearing strong anywhere cbea
term swearing strong anywhere uragnv
term swearing strong whole ahqrf
term swearing mild whole ubeal
term swearing strong start vaprfg
term swearing severe - orfgvnyvgl
term swearing severe start mbbcuvy
term swearing strong - lvss
term swearing strong whole shgn
term swearing strong - shgnanev
term swearing strong - nurtnb
term swearing strong - pnztvey
term swearing severe whole ybyv
term swearing severe - ybyvpba
term swearing severe whole fubgn
term swearing severe - fubgnpba
term swearing strong whole encr
term swearing strong whole encvfg
term slurs severe - shesnt
term slurs severe - urvyuvgyre
term slurs severe - fvrturvy
term insults strong whole xlf
term insults severe - xvyylbhefrys
term insults severe - xvyyhefrys
term insults strong whole gubg
term insults mild whole phpx
+68 -1
View File
@@ -280,6 +280,62 @@ as it changes), for the scoreboard, whose right click frees the mouse to
pick a player; the host's own scoreboard adds Kick and Ban. Builds without
votes drop both kinds as unknown, so the network version is unchanged.
The text chat (`network_chat.c`): a client sends its player's line to the
host (`_distributed_message_chat_up`, reliably), which takes it only from
the client's own stream and from one of that machine's players, at most 5
lines at once and one each 1.5 seconds after (more are dropped; a machine
gone from the game has its count let go, so one new to its slot starts
afresh), its text cut to 63 characters of printable ASCII but `|` (which
the game's text drawing takes for the start of a code; it becomes `?`, on
the host and again on each client). The host alone sends the line on
(`_distributed_message_chat_down`, reliably, with the sender's absolute
index and its channel, the line's flags): to every client, a team's line
only to the machines with a player of the sender's team (to every one in a
game without teams), and a vehicle's line only to those with a player
riding in the sender's vehicle (the outermost object each unit is a child
of, so any map's vehicles), as the host has them; the sender's machine gets
its own line whatever it is. The host shows it itself if one of its own
players hears it or said it. A client shows only
the host's lines, its own too, so every machine shows them in one order,
and takes them (and the chat settings below) only over the host's
connection's stream: a datagram from the host's address could be anyone's.
Each local player's view shows the lines that player hears.
The host's own `/mute <player> [minutes]` and `/unmute <player>` are
commands, not lines: it keeps a mute by the player's name (in ASCII,
matched in either case, as the host keeps names apart) and its minutes by
its own clock, drops the lines of a muted player's machine
when they come up, and sends that machine alone a notice of the minutes
left; it tells every machine of each mute and unmute. A notice is a down
line with `_chat_line_notice_bit` set, its text alone (no sender). A
client's `/mute` is never sent, and the host takes the text of a line that
came up as a line, never a command. The host's scoreboard Mute for everyone
is the same mute (20 minutes), and the host relays none of a muted player's
machine's voice either (`network_voice.c`'s `voice_host_relay`, by the
names of the network game's players, which the lobby has too). A
machine's own scoreboard mute stays its own: it plays none of that
machine's voice and shows none of its players' lines, and tells no one.
The host's chat settings (`network.text_chat`: on, links allowed, or off;
always off while its game is listed in the server browser,
`p2p_hosting_listed`) go to every client in
`_distributed_message_chat_config` (one byte of flags), reliably, as they
change and every 3 seconds. A client without them (from a host without the
chat, or before they come) has the chat off, and so does a client in a
public game it joined from the server browser, whatever its host sends (a
changed host could turn the chat on): while the tunnel reaches the host of
the listing it joined (`p2p_join_listing`, `p2p_joined_listed_host`; any
other invite joined since forgets it), it takes no chat line or notice and
sends none. A client refuses a line the
settings refuse before sending it, and the host refuses it again whatever
the client knew, telling its machine why: a changed build gets no further.
Links are found in the line's text (`chat_text_has_link`): a scheme, `www.`,
an address of four numbers, or a name and a common top-level domain, its
dots also written `(dot)`, `[dot]`, `{dot}`, `(.)`, `[.]` or ` dot `, with
spaces about them or not, or a dot with spaces both sides; a domain that is
a word as well (`me`, `to`, `is`) counts only with a path, a port or another
domain after it (`chat_link_domain`).
Builds without the chat drop the three kinds as unknown, so the network
version is unchanged.
Voice chat (`network_voice.c`, the sound in `port/linux/src/voice_audio.c`)
travels as distributed messages too, but in the lobby as well as in a game:
`network_voice_handles_message` takes them before the netcode's checks that
@@ -738,7 +794,18 @@ two machines' views of one game can be compared. `debug.network_test_kill`,
`debug.network_test_shoot`, `debug.network_test_vehicle` and
`debug.network_test_pickup` script kills, hits, a vehicle ride and a weapon
swap the bots' wandering does not reach (`debug.network_test_pickup_weapon`
picks the weapon: the first whose tag name has it in it, as "sniper"), and `debug.network_test_score`
picks the weapon: the first whose tag name has it in it, as "sniper"),
`debug.network_test_chat` has each machine's player say a chat line to
everyone, one to the team and one to the vehicle (the host seats the last
two players in one first), then the host mutes the last player for a
minute, each says a line, the host unmutes them and each says another,
each says a line with a link (a client's sent past its own check, for the
host to refuse), the host turns the text chat off (and on again) as each
says one more, the host mutes the last player for everyone (as its
scoreboard does) around a line each, and the last player's machine mutes
the host's for itself (as a client's scoreboard does) before another,
which every machine's `debug.txt` records as
it shows them (the notices as `chat notice:`), and `debug.network_test_score`
shortens the game, to test the next (`host:<map>:<variant>,<variant>...`
plays the variants in turn, the next once a game is over, as the host's
button on the scores does). `debug.network_test_public` lists the host's
+162 -7
View File
@@ -212,6 +212,12 @@ gamepads' only.
| pause menu | escape |
| screenshot | F10 |
| talk in voice chat (hold) | V |
| type a chat line to everyone | T |
| type a chat line to your team | Y |
| while typing a chat line: to everyone, the team or the vehicle, in turn | Tab |
With a controller, or the touch controls' D-pad, D-pad Up opens the text
chat's on-screen keyboard (refer to "Text chat").
Always: \` opens the developer console, F12 releases or captures the mouse,
F11 changes between fullscreen and window. Screenshot (default F10,
@@ -282,6 +288,9 @@ PLAYER then START, and JOIN GAME brings them all into the game.
In a multiplayer game, the pause menu (escape) has SETTINGS, which opens
the profile's settings while the game goes on, and for the host END GAME.
There Network Setup has only its pages that work in a game (Map Sharing,
Multiplayer HUD with the text chat, and Streamer Mode), not INTERNET PLAY,
which would drop the game, nor the rows for the main menu.
END GAME ends the game as its time limit does: the players stay, and after
the carnage report the host picks the next map and gametype (PICK GAME).
LEAVE GAME of the host still ends the game for everyone. The buttons go into
@@ -295,7 +304,8 @@ In a single-player campaign, the pause menu has SETTINGS too, before REVERT
TO SAVED, in the same box: a list with room for it centres its rows, and
one without keeps its size, its rows closer. It opens the same settings,
while the game stays paused, with only Controls, Gamepads, Mouse, Audio and
Video Setup; Gamepads' OK saves the profile at once.
Video Setup; Gamepads' OK saves the profile at once. In co-op the settings
have Network Setup too, with its in-game pages as in a multiplayer game.
The menus are XML files in `port/assets/menus` (`tools/ce_menus.py` writes
them from the PC version's tags), which the game contains. To change them,
@@ -348,6 +358,8 @@ the setting for one start of the game. It has priority over the file.
| `display.menus` | `"pc"` | `HALO_MENUS` | `"pc"`: the PC version's menus, from the files in `port/assets/menus` and a `menus` folder next to `config.toml`. Refer to "Menus". `"xbox"`: the Xbox's menus. |
| `display.player_names` | `"all"` | `HALO_PLAYER_NAMES` | In multiplayer, whose names are drawn above their heads: `"all"`, `"allies"`, `"enemies"` or `"none"`. An ally's name is drawn above the triangle the game shows over teammates. An enemy's name shows only within the motion sensor's reach, while the enemy is in sight and not camouflaged, so it never shows where an enemy hides. The gametype's motion tracker setting also applies: no names if it shows no players, only allies' if it shows only friends. |
| `display.player_name_scale` | `1.0` | `HALO_PLAYER_NAME_SCALE` | How large the players' names are drawn: `1.0` is three quarters of the size of the HUD's text, from `0.25` to `4`. With high-res text, larger names are rasterized at their size, so they stay sharp. |
| `display.text_chat` | `true` | `HALO_TEXT_CHAT` | Show the text chat of network games (Settings > Network Setup > Multiplayer HUD > TEXT CHAT). `false` hides its lines, and its keys and a controller's D-pad Up open nothing. Refer to "Text chat". |
| `display.chat_style` | `"colors"` | `HALO_CHAT_STYLE` | The text chat's colours (Settings > Network Setup > Multiplayer HUD > CHAT TEXT): `"colors"`, the player's name in their team's colour and the text a pale blue; `"white"`, all of it white, as Custom Edition. |
| `display.scoreboard_team_layout` | `"teams"` | `HALO_SCOREBOARD_TEAM_LAYOUT` | How the multiplayer scoreboard (hold BACK, or tab) lists a team game's players. `"teams"`: a column for each team, red on the left and blue on the right. `"score"`: all the players in order of score. With more players than fit, the mouse wheel and Page Up / Page Down scroll the scoreboard. |
| `display.scoreboard_background` | `true` | `HALO_SCOREBOARD_BACKGROUND` | `true`: the multiplayer scoreboard (hold BACK, or tab) has a panel behind its text, for clearer text. |
| `display.scoreboard_background_color` | `"16, 16, 16, 150"` | `HALO_SCOREBOARD_BACKGROUND_COLOR` | The colour of the scoreboard's panel: `"red, green, blue, alpha"`, each from `0` to `255`. Alpha `0` is see-through, `255` is solid. |
@@ -367,7 +379,7 @@ the setting for one start of the game. It has priority over the file.
| `input.mouse_vertical_sensitivity` | `0.0` | `HALO_MOUSE_VERTICAL_SENSITIVITY` | The multiplier for the vertical mouse aim. `0`: the same as `input.mouse_sensitivity`. |
| `input.invert_mouse` | `false` | `HALO_MOUSE_INVERT=1` sets `true` | `true`: the vertical mouse aim is inverted. |
| `input.mouse_aim_assist` | `false` | `HALO_MOUSE_AIM_ASSIST` | `true`: the magnetism of the controller also operates for the mouse. `false`: when the mouse moved after the right stick, the view is not slowed or dragged by a target. The autoaim of the bullets operates in both cases. |
| `controls.<action>` | (the table in "Controls") | `HALO_KEY_<ACTION>` | The keys and mouse buttons of an action, up to two, separated by a comma: `move_forward`, `move_backward`, `strafe_left`, `strafe_right`, `jump`, `crouch`, `fire`, `throw_grenade`, `melee`, `reload`, `zoom`, `switch_weapon`, `switch_grenade`, `action`, `flashlight`, `scoreboard`, `pause`, `screenshot`, `push_to_talk`. Keys by their names (`"W"`, `"Space"`, `"Left Ctrl"`, `"F1"`), and `"Mouse Left"`, `"Mouse Right"`, `"Mouse Middle"`, `"Mouse 4"`, `"Mouse 5"`, `"Wheel"` (either way), `"Wheel Up"`, `"Wheel Down"`. |
| `controls.<action>` | (the table in "Controls") | `HALO_KEY_<ACTION>` | The keys and mouse buttons of an action, up to two, separated by a comma: `move_forward`, `move_backward`, `strafe_left`, `strafe_right`, `jump`, `crouch`, `fire`, `throw_grenade`, `melee`, `reload`, `zoom`, `switch_weapon`, `switch_grenade`, `action`, `flashlight`, `scoreboard`, `pause`, `screenshot`, `push_to_talk`, `chat`, `team_chat`. Keys by their names (`"W"`, `"Space"`, `"Left Ctrl"`, `"F1"`), and `"Mouse Left"`, `"Mouse Right"`, `"Mouse Middle"`, `"Mouse 4"`, `"Mouse 5"`, `"Wheel"` (either way), `"Wheel Up"`, `"Wheel Down"`. |
| `game.console_log` | `"important"` | `HALO_CONSOLE_LOG` | What the console shows on the screen. `"important"`: bans, players that the host drops for cheating, the reasons that the game refuses a command, and the asserts that stop the game. `"all"`: all the lines. `"none"`: only the asserts that stop the game. The output of a command always shows. `debug.txt` gets all the lines. |
| `game.language` | `""` | `HALO_LANGUAGE` | The language of the menus: `ja`, `de`, `fr`, `es` or `it`. Empty: English. |
| `game.enhanced_animations` | `true` | `HALO_ENHANCED_ANIMATIONS` | `true`: the player bipeds' grenade throws keep their legs moving, blended by speed and direction (crouched throws stay crouched, throws in the air use the jump's legs), Warthog and Scorpion riders stay seated to throw and let go of the grips to throw and reload, and a player turns with the aim while throwing, as while meleeing. `false`: the original animations, which freeze the legs during a throw and stand a rider up. Only in config.toml, not in the menus. |
@@ -390,19 +402,24 @@ the setting for one start of the game. It has priority over the file.
| `network.voice_mode` | `"team_global_enemy_proximity"` | `HALO_NET_VOICE_MODE` | When you host: who hears whom during a game. `"off"`; `"team_proximity"` (teammates who are near); `"team_enemy_proximity"` (all players who are near); `"team_global"` (all teammates); `"team_global_enemy_proximity"` (all teammates, and enemies who are near). Refer to "Voice chat". |
| `network.voice_kbps` | `24` | `HALO_NET_VOICE_KBPS` | When you host: the voice quality in the lobby and in a game, in kilobits per second, `8` to `64`. |
| `network.voice_proximity` | `15.0` | `HALO_NET_VOICE_PROXIMITY` | When you host: the distance in world units (1 unit is approximately 3 metres) at which players are near, for voice chat. `5` to `100`. |
| `network.text_chat` | `"on"` | `HALO_NET_TEXT_CHAT` | When you host: the text chat. `"on"`, lines with links refused; `"links"`, links allowed; `"off"`, no chat (in either case). Always off in a game listed in the server browser. TEXT CHAT in Server Setup > Teamplay Options (in co-op, Voice and Voting) writes its choice here. Refer to "Text chat". |
| `network.votekick` | `true` | `HALO_NET_VOTEKICK` | When you host: `true`, the players can vote to kick a player. Refer to "Security". `false`: no votes. VOTE KICK in Server Setup > Teamplay Options (in co-op, Voice and Voting) writes its choice here. |
| `network.votekick_minutes` | `5` | `HALO_NET_VOTEKICK_MINUTES` | When you host: the minutes that a player must play on the server before the player can start a vote to kick (`0` to `60`). To vote, a player must play for 2 minutes, or for this time if it is less. |
| `network.votekick_ban_minutes` | `30` | `HALO_NET_VOTEKICK_BAN_MINUTES` | When you host: the minutes that a player who is kicked by a vote cannot join again (`1` to `1440`). |
| `network.map_share` | `true` | `HALO_NET_MAP_SHARE` | When you host: send a player who joins without the game's Custom Edition map the map, and the resource maps that it needs and that the player does not have. SHARE MAPS in Server Setup > Map Sharing writes its choice here. Refer to "Map sharing". |
| `network.map_share_upload` | `1024` | `HALO_NET_MAP_SHARE_UPLOAD` | When you host: the most kilobytes per second that the game sends of maps (`16` to `65536`). UPLOAD LIMIT in Server Setup > Map Sharing writes its choice here. |
| `network.map_share_upload` | `1024` | `HALO_NET_MAP_SHARE_UPLOAD` | When you host: the most kilobytes per second that the game sends of maps (`16` to `20480`, 20 MB/s). UPLOAD LIMIT in Server Setup > Map Sharing writes its choice here. |
| `network.map_seed` | `true` | `HALO_NET_MAP_SEED` | When you play in the game of another machine: help send its map to players who join without it. HELP SEND MAPS in Settings > Network Setup > Map Sharing. |
| `network.map_seed_upload` | `256` | `HALO_NET_MAP_SEED_UPLOAD` | When you play in the game of another machine: the most kilobytes per second that the game sends of maps to other players (`16` to `65536`). UPLOAD LIMIT in Settings > Network Setup > Map Sharing. |
| `network.map_seed_upload` | `256` | `HALO_NET_MAP_SEED_UPLOAD` | When you play in the game of another machine: the most kilobytes per second that the game sends of maps to other players (`16` to `10240`, 10 MB/s). UPLOAD LIMIT in Settings > Network Setup > Map Sharing. |
| `network.map_download` | `true` | `HALO_NET_MAP_DOWNLOAD` | When you join a game on a Custom Edition map that you do not have: download it from the players of the game. `false`: leave the game and show which map is missing. DOWNLOAD MAPS in Settings > Network Setup > Map Sharing. |
| `network.coop_public` | `false` | `HALO_NET_COOP_PUBLIC` | `true`: an online co-op game (Create Game > Internet, a SINGLEPLAYER map) starts as PUBLIC. `false`: it starts as PRIVATE. LISTING in co-op's Server Setup writes its choice here. Refer to "Server browser". |
| `network.brokers_file` | `"brokers.txt"` | `HALO_NET_BROKERS_FILE` | The file of the public MQTT brokers that let the machines of an invite find each other, and that carry the listings of the server browser: next to `config.toml`, unless a full path. One `host:port` on each line, up to 4; `#` starts a comment. |
| `network.stun_servers` | Google and Cloudflare | `HALO_NET_STUN` | The public STUN servers (`host:port`, with commas between them) that give the internet address of a machine. |
| `discord.application_id` | the application of the project | `HALO_DISCORD_APPLICATION` | The Discord application for invites. Empty: no Discord. |
| `update.auto` | `true` | `HALO_UPDATE_AUTO` | `true`: at start-up, the game looks for a new version. Refer to "Updates". `false`: the game does not look. |
| `streamer.enabled` | `false` | `HALO_STREAMER_MODE` | `true`: streamer mode hides offensive words, as stars, in the names and text of other players, maps and mods, at the levels below. Refer to "Streamer mode". STREAMER MODE in Settings > Network Setup > Streamer Mode. |
| `streamer.slurs` | `"mild"` | `HALO_STREAMER_SLURS` | With `streamer.enabled`, the slurs (race, ethnicity, sexuality, gender, disability) hidden: `"off"`, `"severe"`, `"strong"` (strong and severe) or `"mild"` (all). CENSOR SLURS in Settings > Network Setup > Streamer Mode. |
| `streamer.swearing` | `"strong"` | `HALO_STREAMER_SWEARING` | With `streamer.enabled`, the swearing and sexual words hidden: `"off"`, `"severe"`, `"strong"` or `"mild"`. CENSOR SWEARING in Settings > Network Setup > Streamer Mode. |
| `streamer.insults` | `"off"` | `HALO_STREAMER_INSULTS` | With `streamer.enabled`, the insults that are not slurs hidden: `"off"`, `"severe"`, `"strong"` or `"mild"`. CENSOR INSULTS in Settings > Network Setup > Streamer Mode. |
| `crash_reports.upload` | `"ask"` | `HALO_CRASH_REPORTS` | Windows only. `"yes"`: the game sends a report of each crash to the developers. `"no"`: the game sends no reports. `"ask"`: the game asks at the next crash and writes the answer here. Refer to "Crash reports" in [port/windows/README.md](../windows/README.md#crash-reports). |
| `debug.update_answer` | `""` | `HALO_UPDATE_ANSWER` | The answer to the update question, for automatic tests: `yes`, `no` or `never`. Empty: the game asks. |
| `debug.exit_after` | `0.0` | `HALO_EXIT_AFTER` | The game stops after this number of seconds. `0`: never. |
@@ -411,7 +428,7 @@ the setting for one start of the game. It has priority over the file.
| `debug.gpu_stats`, `debug.gpu_trace_frame`, `debug.gpu_trace_constants`, `debug.gpu_dump_shaders`, `debug.texture_dump_directory`, `debug.texture_log`, `debug.gl_debug`, `debug.texture_no_cache` | off | `HALO_GPU_STATS`, `HALO_GPU_TRACE`, `HALO_GPU_TRACE_CONSTANTS`, `HALO_GPU_DUMP_SHADERS`, `HALO_TEXTURE_DUMP`, `HALO_TEXTURE_LOG`, `HALO_GL_DEBUG`, `HALO_TEXTURE_NO_CACHE` | Tools to find problems in the graphics: counts for each frame, all the GL state of one frame, the GLSL code, the textures. |
| `debug.menu_open` | `""` | `HALO_MENU_OPEN` | Start on this screen of the menus (`main_menu/settings_select/...`, as `port/assets/menus` names it), a player profile being edited, to look at it. |
| `debug.gpu_skip_vertex_shaders`, `debug.gpu_debug_expression`, `debug.gpu_debug_flat`, `debug.gpu_debug_texture0` | off | `HALO_GPU_SKIP_VS`, `HALO_GPU_DEBUG_EXPR`, `HALO_GPU_DEBUG_FLAT`, `HALO_GPU_DEBUG_T0` | Tools to find problems in the graphics: skip the draws of a vertex shader, or replace the output of all pixel shaders with a GLSL expression (for example `t0.rgb`). |
| `debug.network_test`, `debug.network_test_start`, `debug.network_test_kill`, `debug.network_test_score`, `debug.network_test_shoot`, `debug.network_test_vehicle`, `debug.network_test_pickup`, `debug.network_test_pickup_weapon`, `debug.network_test_public`, `debug.test_input` | off | `HALO_NETWORK_TEST`, `HALO_NETWORK_TEST_START`, `HALO_NETWORK_TEST_KILL`, `HALO_NETWORK_TEST_SCORE`, `HALO_NETWORK_TEST_SHOOT`, `HALO_NETWORK_TEST_VEHICLE`, `HALO_NETWORK_TEST_PICKUP`, `HALO_NETWORK_TEST_PICKUP_WEAPON`, `HALO_NETWORK_TEST_PUBLIC`, `HALO_TEST_INPUT` | Automatic tests of system link (`game/network_test.c`). Refer to `NETCODE.md`. |
| `debug.network_test`, `debug.network_test_start`, `debug.network_test_kill`, `debug.network_test_score`, `debug.network_test_shoot`, `debug.network_test_vehicle`, `debug.network_test_pickup`, `debug.network_test_pickup_weapon`, `debug.network_test_chat`, `debug.network_test_name`, `debug.network_test_public`, `debug.test_input` | off | `HALO_NETWORK_TEST`, `HALO_NETWORK_TEST_START`, `HALO_NETWORK_TEST_KILL`, `HALO_NETWORK_TEST_SCORE`, `HALO_NETWORK_TEST_SHOOT`, `HALO_NETWORK_TEST_VEHICLE`, `HALO_NETWORK_TEST_PICKUP`, `HALO_NETWORK_TEST_PICKUP_WEAPON`, `HALO_NETWORK_TEST_CHAT`, `HALO_NETWORK_TEST_NAME`, `HALO_NETWORK_TEST_PUBLIC`, `HALO_TEST_INPUT` | Automatic tests of system link (`game/network_test.c`). Refer to `NETCODE.md`. |
| `debug.touch_targets` | `false` | `HALO_TOUCH_TARGETS` | Outlines the tap targets of the menus (item green, value blue, list slot yellow, legend button red, the band beside the slots of a list orange, keys of the on-screen keyboard white), marks where the last finger went down and the last tap landed for 3 seconds, and logs each tap with the target that it hit (for a value, also where it splits into previous and next): to judge the accuracy of touch. |
| `debug.network_latency`, `debug.network_loss`, `debug.network_corrupt`, `debug.network_corrupt_stream`, `debug.network_corrupt_after` | `0` | `HALO_NETWORK_LATENCY`, `HALO_NETWORK_LOSS`, `HALO_NETWORK_CORRUPT`, `HALO_NETWORK_CORRUPT_STREAM`, `HALO_NETWORK_CORRUPT_AFTER` | The game holds all the data that it receives for this number of milliseconds, ignores this percentage of the datagrams, and damages this percentage of the datagrams it receives, and this percentage of its reads of streams, at random (bytes changed, cut short, stretched or replaced), from this many seconds after the start. Use the first two to test the netcode as on the internet, and the others to test that nothing another machine sends can crash the game (a damaged stream is closed, so a little goes a long way; a host's messages to its own client are damaged too, so start damaging once the game has started). |
| `debug.voice_test` | `false` | `HALO_VOICE_TEST` | Automatic tests of voice chat: a tone replaces the microphone, and each voice that the game hears is written to the log once each second. |
@@ -656,6 +673,98 @@ as between native builds, two networks that do not let a direct connection
through (some company and school networks block WebRTC) cannot play
together.
### Text chat
Network games have a text chat, as the PC version had. Press T
(`controls.chat`) to type a line to all the players, or Y
(`controls.team_chat`) to type one to your team (in a game without teams,
to all the players). While you type, Tab changes who the line is to, in
turn: all the players, your team, or your vehicle (the players riding in
the vehicle you ride in, whatever the map's vehicles are, Custom Edition
maps' too; on foot, only you see it). Enter sends the line, Escape cancels
it. While you type, your player does not move.
With a controller, D-pad Up opens an on-screen keyboard at the bottom right
(on Android, at the bottom in the middle) for a line to all the players:
the left stick (or D-pad Left and Right) moves between the keys, A types
the key, X deletes, Y switches capitals, D-pad Up and Down change who the
line is to (all the players, your team, your vehicle), Start sends the
line, and B closes the keyboard (the button that closed it does nothing in
the game until you let it go). Its last row has Aa (capitals), #+= (the
symbols), space, DEL and SEND. On a touchscreen (Android, and a browser on
a phone or tablet), the touch controls' D-pad Up opens it, a tap on a key
types it, and a tap anywhere else closes it: the touch controls hide while
it is up. While the keyboard is up the controller and the touch controls
move nothing in the game. The face buttons are the same places on
other controllers (on a PlayStation controller: Cross types, Square
deletes, Triangle switches capitals, Circle closes).
The lines show above the motion sensor, in a column a little over half the
screen wide: a long line wraps onto the next rows, and the line you type
shows its end when it is wider. The player's name is in the colour of
their team (blue in a game without teams), the text in a pale blue, and the
host's notices in a pale gold; WHITE in CHAT TEXT in Settings > Network
Setup > Multiplayer HUD (`display.chat_style`) draws them all white, as
Custom Edition does. A line to the
team says "(team)" after the name, one to the vehicle "(vehicle)". The
lines go after ten seconds; while you type, the last six rows show. Where
the touch controls are (Android, and a browser whose touch controls you
use), the lines go at the top left, the newest highest. In split screen,
each player's view shows the lines that player hears, and the first player
types. No line shows, and none can be typed, in a menu, in a cinematic or
while the HUD is hidden; opening a menu ends the line being typed. A new
game starts with no lines. A line has 63 characters at most, letters,
numbers and punctuation but `|` only (ASCII; `|` becomes `?`). `debug.txt`
gets every line.
Streamer mode (refer to "Streamer mode") hides offensive words in the
chat's lines and players' names as it does in all the text the game draws:
only on your screen, never in what is sent, and never in the line you are
typing.
The host sends each line on: a player of an older build does not see the
lines and cannot send them. The host takes 5 lines at once from a machine,
then one each 1.5 seconds; a machine that joins starts afresh.
TEXT CHAT in Settings > Network Setup > Multiplayer HUD (`display.text_chat`)
can HIDE the chat entirely, for purists and streamers: no lines show, and
its keys open nothing.
The host chooses the text chat for its games with TEXT CHAT in Server
Setup > Teamplay Options (in co-op, Voice and Voting; `network.text_chat`):
ON (the default: a line with a link, such as `discord.gg/...`,
`example.com`, `www.`, an address, or `example [dot] com`, is refused),
WITH LINKS, or OFF. A domain that is a word as well (`.me`, `.to`, `.is`)
counts only with a path after it (`youtu.be/...`), so that `go.to` and
`he.is` are not refused. A game listed in
the server browser (a public internet game) never has the text chat,
whatever it says (TEXT CHAT shows OFF there, and cannot be changed, while
LISTING is PUBLIC); a private game, joined by its invite, and a LAN game have
it as chosen. A player who joins a game from the server browser has no text
chat in it even if its host turns it on: their game takes no line from that
host and sends none. Pressing T where the chat is off says so, and a refused line
tells its sender why.
On the scoreboard (right-click, then click the player), Mute voice and chat
mutes a player for you alone: you no longer see their lines or hear their
voice, and nobody else is told. The host's scoreboard also has Mute for
everyone: no machine sees the player's lines or hears their voice for 20
minutes, or until the host picks Unmute for everyone, and all the players
see "Milenko muted for 20 minutes". The mute holds in the lobby too. A
machine's voice is one: muting one of two players in split screen mutes
the other's voice too.
The host can also mute a player from the chat: type `/mute <player>
<minutes>`, as `/mute Milenko 5` (20 minutes when you give none, 1440 at
most), which mutes their voice too. The player is found as the console's `kick` finds one: the whole
name in either case, else the one player whose name begins with what you
typed. All the players see "Milenko muted for 5 minutes". The muted
player's lines go to no one, and they see how many minutes are left. The
mute ends when its minutes are up, or with `/unmute <player>`. A player
who leaves and joins again under the same name, in either case, is still
muted. Only the
host mutes: a player's `/mute` is not sent.
### Voice chat
Network games have voice chat, on the local network and on the internet.
@@ -688,8 +797,10 @@ A speaker shows next to the name of a player who talks: in the lobby, on
the scoreboard, in a list at the left of the screen during a game, and
beside the name above their head (when names are shown there:
`display.player_names`). To mute a player, open the scoreboard,
right-click, click the player, and click Mute voice. You no longer hear
them, and nobody else is told.
right-click, click the player, and click Mute voice and chat. You no longer
hear them or see their text chat lines, and nobody else is told. The host's
Mute for everyone silences a player's voice for every machine (refer to
"Text chat").
The host sends each voice on to the players who can hear it. The host
accepts a voice only from the machine of the player (with a key that it
@@ -991,6 +1102,48 @@ checks every file before it plays it, and leaves out (with a line in
replaces. A mod changes nothing that the machines of a
network game agree on. Refer to [docs/mods.md](../../docs/mods.md).
## Streamer mode
Streamer mode (Settings > Network Setup > Streamer Mode, `streamer.enabled`)
hides offensive words as stars wherever the game draws text that other
people or files wrote: the text chat's lines, players' names over their
heads, in the chat, in the kill feed, on
the scoreboards and in the lobbies, the server browser's games, the host's
notices in the console, map and mod names, and the text of a map's or mod's
own string lists, as well as the message boxes about mods and maps. It
changes only what this machine shows: the names others see, and what the
machines send each other, stay as they are.
The words come from Surge AI's rated list of English profanities, reviewed
for the game (`port/assets/text_filter`), in three groups, each with a level
that hides that severity and worse:
| Group | Setting | Default | What it has |
| --- | --- | --- | --- |
| SLURS | `streamer.slurs` | `"mild"` (all) | Slurs about race, ethnicity, nationality, religion, sexuality, gender and disability |
| SWEARING | `streamer.swearing` | `"strong"` | Swearing and sexual words; the mildest (damn, hell) show at `"strong"` |
| INSULTS | `streamer.insults` | `"off"` | Name-calling that is not a slur |
A word is found however it is dressed: in capitals or with accents, in
look-alike letters (Cyrillic, Greek, full-width, small capitals), in leet
(`0` for o, `@` for a, `ph` for f), with its letters stretched ("fuuuck"),
with punctuation between them (`f.u.c.k`), spaced out (`f u c k`, `fu ck`),
and with characters the game does not draw (zero-width spaces, the menus'
`|` codes) between them. Each word may be found inside a name, at a word's
start, or only as a whole word, as fits it, and some words are never
hidden though a hidden one is inside them (Scunthorpe). `python3
tools/text_filter_terms.py --check "some text"` shows what would be hidden.
What it cannot catch: letters added into a word or its letters scrambled, new
spellings, a word split between two names or two lines, voice chat (mute a
player from the scoreboard, or set `audio.voice_volume` to 0), and pictures.
What you type is shown as you type it.
Your own words: `text_filter.txt` in the data root, with lines of `add
<word>` (hidden whenever streamer mode is on) and `allow <word>` (never
hidden), read when the game starts and when the settings change. The web
build's page draws its own list of mods, which is not filtered.
## Map checks
The game reads a map's tags straight into memory and uses them as its own
@@ -1168,6 +1321,7 @@ Other changes:
| `rasterizer/rasterizer.c` | The 128 KB of vertices of the debug display of a model's vertices are static, not on the stack: the compiler inlines the function in `render_model`, and the Windows build probed the stack a page at a time for every model drawn. |
| `render/render.c` | The 3D view of each window is antialiased before the HUD is drawn (`display.anti_aliasing`). |
| `interface/hud.c` | In multiplayer, players' names are drawn above their heads (`display.player_names`, `display.player_name_scale`). |
| `text/draw_string.c`, `interface/terminal.c`, `interface/virtual_keyboard.c` | Streamer mode's words are hidden in every string drawn or measured (`game/text_filter.c`), but in the console's line and the virtual keyboard's text being typed. |
| `rasterizer/rasterizer_text.c`, `text/draw_string.c` | Text is drawn from an atlas of the fonts' glyphs, rasterized at the resolution the game draws at (`src/text_hires.c`), when the font has every character of the string. Text can be drawn scaled about a point (`rasterizer_text_set_scale`), as the players' names are. Each glyph's advance is centred on the font tag character's, so the layout is the same, and a glyph is cut at a text box only where the font tag's character visibly was. |
| `interface/first_person_weapons.c` | The first-person hands are drawn with the unit's shield modifier shader, as its body is (`display.viewmodel_shield`). |
| `render/render_objects.c`, `objects/objects.c` | In first person, your own body is drawn from the waist down with the pose `first_person_legs.c` makes (`display.first_person_legs`); the waist it found and the mesh `object_mesh.c` read are forgotten on a new map. |
@@ -1182,6 +1336,7 @@ Other changes:
| `cutscene/cinematics.c` | A scenario's titles (some Custom Edition maps show their name for the whole game) are not drawn over a menu, as the letterbox is not: the screen's overlays are drawn after the players' menus. |
| `tag_files/tag_groups.h` | `TAG_BLOCK_GET_ELEMENT` returns an element in the block without a call, and calls `tag_block_get_element_with_size` for anything else. |
| `input/input_xbox.c`, `physics/collision_usage.c` | The clock is read only for a button held, and for collision tests only when their times are shown: a read of the clock is slow in a browser. |
| `main/main.c`, `interface/hud.c`, `interface/hud_unit.c`, `interface/hud_draw.c`, `game/game_engine.c` | The text chat of network games (`game/network_chat.c`): its keys are read each frame, and the debug keys are not while a line is typed; each view's HUD draws its lines, above the motion sensor, whose place the HUD notes (the left of the last picture drawn); the scoreboard's menu has Mute voice and chat, and the host's Mute for everyone. |
The x86 inline assembly of the game is replaced by C. Thus the compiler
can optimize that code for each processor:
+5 -5
View File
@@ -14,11 +14,11 @@ Sources for the layouts, cited per structure below:
- BlamLib, in the same archive: the font and unicode string list layouts.
- Reclaimer (GPL-3.0, Gravemind2401; the Reclaimer-master archive): how
bitmap tags and pixel data are found in bitmaps.map.
No code from either project is used: they are documentation here, and this
repository is CC0. Facts that neither source states were established by
reading the sample Custom Edition maps; the comments below say so where they
are used ("observed", "every map examined"), and
docs/custom_edition_caches.md lists each with its evidence.
No code from either project is used: they are documentation here. Facts
that neither source states were established by reading the sample Custom
Edition maps; the comments below say so where they are used ("observed",
"every map examined"), and docs/custom_edition_caches.md lists each with its
evidence.
*/
/* ---------- headers */
+8 -5
View File
@@ -160,9 +160,11 @@ enum
MAXIMUM_MAP_BYTES = 0x30000000,
MAXIMUM_RESOURCE_MAP_BYTES = 0x20000000,
/* the kilobytes a second a machine sends, at least and at most */
/* the kilobytes a second a machine sends, at least and at most: the
host 20 MB/s, a player helping it 10 MB/s */
MINIMUM_UPLOAD_KILOBYTES = 16,
MAXIMUM_UPLOAD_KILOBYTES = 65536,
MAXIMUM_HOST_UPLOAD_KILOBYTES = 20480,
MAXIMUM_SEED_UPLOAD_KILOBYTES = 10240,
/* network_server_manager.c's host state in game, transport_endpoint_winsock.c's
stream endpoint and hud_messaging.c's centred text (their enums are their
@@ -659,10 +661,11 @@ static unsigned long map_share_host_address(
static long upload_limit(
void)
{
long kilobytes = map_share_host() ? config_integer("network.map_share_upload") :
config_integer("network.map_seed_upload");
boolean host = map_share_host();
long kilobytes = host ? config_integer("network.map_share_upload") : config_integer("network.map_seed_upload");
return PIN(kilobytes, MINIMUM_UPLOAD_KILOBYTES, MAXIMUM_UPLOAD_KILOBYTES) * 1024;
return PIN(kilobytes, MINIMUM_UPLOAD_KILOBYTES, host ? MAXIMUM_HOST_UPLOAD_KILOBYTES : MAXIMUM_SEED_UPLOAD_KILOBYTES) *
1024;
}
/* whether this machine sends the game's files to the others: in a game on
+43 -8
View File
@@ -85,6 +85,7 @@ their handlers open opens.
#include "text/draw_string.h"
/* (internet play's server browser: the platform layer's) */
#include "../src/p2p.h"
#include "text_filter.h"
#include <stdlib.h>
#include <string.h>
@@ -1977,7 +1978,9 @@ static struct
{ "controls.scoreboard", L"SHOW SCORES", 2 },
{ "controls.pause", L"PAUSE MENU", 2 },
{ "controls.screenshot", L"SCREENSHOT", 2 },
{ "controls.push_to_talk", L"PUSH TO TALK", 2 },
{ "controls.push_to_talk", L"PUSH TO TALK", 3 },
{ "controls.chat", L"CHAT", 3 },
{ "controls.team_chat", L"TEAM CHAT", 3 },
};
static struct
@@ -2752,6 +2755,7 @@ boolean game_engine_running(void);
void game_engine_end_game(void);
/* the platform layer's */
int p2p_join_invite(char const *text);
int p2p_join_listing(struct p2p_listing const *listing);
int p2p_invite_link(char *link, int size);
void p2p_set_hosting_allowed(int allowed);
int p2p_peer_address(unsigned char const *identifier, unsigned long *address);
@@ -2984,6 +2988,12 @@ static void text_field_show(struct widget_instance *value, char const *text, boo
shown[index++] = L'_';
shown[index] = 0;
text_set(value, shown);
/* (what is being typed shown as it is: streamer mode hides nothing of it,
text_filter.c) */
if (editing && value)
text_filter_exempt(value->parameters.text_box.text);
else if (!text_field_editing(NULL))
text_filter_exempt(NULL);
}
/* ---- the menu */
@@ -4208,7 +4218,9 @@ static void lobby_browser_update(struct widget_instance *list)
lobby_browser_update) */
static boolean lobby_browser_join(struct p2p_listing const *game, short controller)
{
if (!p2p_join_invite(game->invite))
/* (a public game: the text chat is off in it, whatever its host says:
network_chat.c) */
if (!p2p_join_listing(game))
return FALSE;
csmemcpy(lobby_browser.identifier, game->identifier, sizeof(lobby_browser.identifier));
csmemcpy(lobby_browser.name, game->name, sizeof(lobby_browser.name));
@@ -5298,6 +5310,8 @@ static struct gametype_option const gametype_options[] =
{ "5", "10", "15", "20", "30", "50" } },
/* (and the players' votes to kick: port/linux/game/network_votekick.c) */
{ "votekick_spinner", _option_setting, 0, 0, 2, { 0 }, "network.votekick", { "true", "false" } },
/* (and the text chat: port/linux/game/network_chat.c) */
{ "text_chat_spinner", _option_setting, 0, 0, 3, { 0 }, "network.text_chat", { "on", "links", "off" } },
/* co-op's options (Server Setup's CO-OP OPTIONS: tools/port_settings.py's
COOP_SETUP_SCREENS; coop_enemies.c) */
{ "coop_friendly_fire_spinner", _option_setting, 0, 0, 4, { 0 }, "network.coop_friendly_fire",
@@ -5313,13 +5327,25 @@ static struct gametype_option const gametype_options[] =
/* map sharing's (Server Setup's MAP SHARING: tools/port_settings.py's
MAP_SHARE_SETUP; map_share.c) */
{ "map_share_spinner", _option_setting, 0, 0, 2, { 0 }, "network.map_share", { "true", "false" } },
{ "map_share_upload_spinner", _option_setting, 0, 0, 6, { 0 }, "network.map_share_upload",
{ "256", "512", "1024", "2048", "4096", "8192" } },
{ "map_share_upload_spinner", _option_setting, 0, 0, 8, { 0 }, "network.map_share_upload",
{ "256", "512", "1024", "2048", "4096", "8192", "16384", "20480" } },
/* vehicle options (the side's set and counts: vehicles_update) */
{ "vehicles_respawn_spinner", _option_short, OPTIONS_FIELD(vehicle_respawn_time), 0, 7,
{ 0, 30, 60, 90, 120, 180, 300 } },
};
/* TEXT CHAT's (network.text_chat) OFF, which it shows while the game is
listed in the server browser, and its host cannot change: a listed game has
no text chat whatever the setting (network_chat.c), which is kept for a
private game or a LAN one */
#define TEXT_CHAT_SPINNER "text_chat_spinner"
#define TEXT_CHAT_OFF 2
static boolean text_chat_locked(struct gametype_option const *option)
{
return !strcmp(option->spinner, TEXT_CHAT_SPINNER) && p2p_hosting_listed();
}
/* an option of the host's own setting: the value shown for it (the one
set, else the nearest) */
static short gametype_option_setting_index(struct gametype_option const *option)
@@ -5454,8 +5480,11 @@ static void gametype_options_each(struct widget_instance *list, boolean save)
if (!gametype_edit.setup)
continue;
if (!save)
spinner->parameters.list.selected_index = gametype_option_setting_index(option);
else if (index != gametype_option_setting_index(option) &&
{
spinner->parameters.list.selected_index = text_chat_locked(option) ? TEXT_CHAT_OFF :
gametype_option_setting_index(option);
}
else if (!text_chat_locked(option) && index != gametype_option_setting_index(option) &&
!setting_write(option->setting, option->setting_values[index]))
{
platform_log("menus: could not set %s", option->setting);
@@ -5495,8 +5524,11 @@ static void setting_options_each(struct widget_instance *list, boolean save)
continue;
index = (short)PIN(spinner->parameters.list.selected_index, 0, option->count - 1);
if (!save)
spinner->parameters.list.selected_index = gametype_option_setting_index(option);
else if (index != gametype_option_setting_index(option) &&
{
spinner->parameters.list.selected_index = text_chat_locked(option) ? TEXT_CHAT_OFF :
gametype_option_setting_index(option);
}
else if (!text_chat_locked(option) && index != gametype_option_setting_index(option) &&
!setting_write(option->setting, option->setting_values[index]))
{
platform_log("menus: could not set %s", option->setting);
@@ -5837,6 +5869,9 @@ static void gametype_option_help(struct widget_instance *list)
visible_set(named(list, "op_primary_weapon", 0), custom);
visible_set(named(list, "op_secondary_weapon", 0), custom);
}
/* (TEXT CHAT held at OFF while the game is listed: text_chat_locked) */
if (named(list, TEXT_CHAT_SPINNER, 0) && p2p_hosting_listed())
named(list, TEXT_CHAT_SPINNER, 0)->parameters.list.selected_index = TEXT_CHAT_OFF;
/* (CO-OP OPTIONS: the row of the amount of the extra enemies chosen,
PER PLAYER's or MULTIPLIER's, in the one place) */
if (named(list, "coop_extra_enemies_spinner", 0))
+35 -2
View File
@@ -1767,13 +1767,17 @@ profile itself. */
#define PAUSE_SETTINGS_LIST "main_menu/settings_select/player_setup/player_profile_edit/profile_edit_select_list"
#define PAUSE_SETTINGS_GAMEPADS_OK "main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/button_ok"
#define PAUSE_NETWORK_ITEM "main_menu/settings_select/player_setup/player_profile_edit/network_settings_profile_item"
#define PAUSE_NETWORK_SCREEN \
"main_menu/settings_select/player_setup/player_profile_edit/network_setup/in_game/in_game_network_settings_screen"
/* Change Name's keyboard and Change Color's pictures are ui.map's, Network
Setup's settings are not for a game under way, and About is nothing to it */
Setup is for others' games (shown in co-op: its pages, pause_network_patch),
and About is nothing to it */
static char const *const pause_settings_hidden_items[] =
{
"main_menu/settings_select/player_setup/player_profile_edit/name_profile_item",
"main_menu/settings_select/player_setup/player_profile_edit/network_settings_profile_item",
PAUSE_NETWORK_ITEM,
"main_menu/settings_select/player_setup/player_profile_edit/color_profile_item",
"main_menu/settings_select/player_setup/player_profile_edit/about_item",
};
@@ -1906,12 +1910,40 @@ static boolean pause_settings_item_hidden(long tag_index)
{
long widget = widget_named(pause_settings_hidden_items[index]);
/* (Network Setup stays in a co-op game, which is a network one or
has players beside this one: build.campaign is a game alone) */
if (!build.campaign && !strcmp(pause_settings_hidden_items[index], PAUSE_NETWORK_ITEM))
continue;
if (widget != NONE && build.widget_tags[widget] == tag_index)
return TRUE;
}
return FALSE;
}
/* in a game (a multiplayer map's pause menu, a campaign's in co-op),
Network Setup opens its pages alone (PAUSE_NETWORK_SCREEN: map sharing, the
multiplayer HUD and the text chat, streamer mode: tools/port_settings.py),
not the rows that would drop the game (internet play) or are for the main
menu (the router, the clipboard, the updates) */
static void pause_network_patch(void)
{
long item_widget = widget_named(PAUSE_NETWORK_ITEM);
long screen_widget = widget_named(PAUSE_NETWORK_SCREEN);
struct ui_widget_definition *item;
struct ui_widget_event_handler_reference *handlers;
long handler;
if (item_widget == NONE || screen_widget == NONE)
return;
item = tag_get(UI_WIDGET_DEFINITION_TAG, build.widget_tags[item_widget]);
handlers = item->event_handlers.address;
for (handler = 0; handler < item->event_handlers.count; handler++)
{
if (TEST_FLAG(handlers[handler].flags, _event_handler_open_widget_bit))
reference_set(&handlers[handler].widget_tag, UI_WIDGET_DEFINITION_TAG, build.widget_tags[screen_widget]);
}
}
/* the hidden items stay in the list, empty and taking no events (which it
passes over), as an item's description is the one at its place in the list;
the others move up into the first places */
@@ -2181,6 +2213,7 @@ void menu_tags_loaded(
pause_patch(instances);
if (campaign)
pause_campaign_patch(instances);
pause_network_patch();
if (build.failed)
goto failed;
/* (those it made) */
File diff suppressed because it is too large. Load diff
+58
View File
@@ -0,0 +1,58 @@
/*
NETWORK_CHAT.H
The text chat of network games (network_chat.c): what the main loop, the
HUD (hud.c, hud_unit.c), the keyboard (xinput_sdl.c) and the netcode ask of
it.
*/
#ifndef __NETWORK_CHAT_H
#define __NETWORK_CHAT_H
#pragma once
/* ---------- constants */
/* who a line is to */
enum
{
_chat_channel_everyone,
_chat_channel_team,
/* those riding in the sender's vehicle */
_chat_channel_vehicle,
NUMBER_OF_CHAT_CHANNELS
};
/* ---------- prototypes/NETWORK_CHAT.C */
/* every frame (main.c): the keys that start typing a line, and those typed */
void network_chat_update(void);
/* the first local player says a line to a channel, as if typed and sent;
the automated tests' (network_test.c) */
void network_chat_say(short channel, char const *text);
/* ... sent past this machine's own checks of the host's settings, as a
changed build could send it, for the host to refuse (network_test.c) */
void network_chat_say_unchecked(short channel, char const *text);
/* whether a line is being typed: the keyboard types into it, and drives no
player (xinput_sdl.c), as with the console */
boolean network_chat_typing(void);
/* (hud_unit.c) where the local player's motion sensor was drawn: its left
and the top of its circle, in the window's units */
void network_chat_note_motion_sensor(short local_player_index, short left, short top);
/* (hud.c, in the HUD of each local player's view) the lines that view's
player hears, above the motion sensor (with the touch controls, under the
weapon's panel at the top left), and in the first local player's the one
being typed */
void network_chat_draw(short local_player_index);
/* (the host) the minutes a player (absolute index) is muted for everyone;
0 for none */
short network_chat_host_mute_minutes(short player_index);
/* (the host: the scoreboard) a player (absolute index) muted for everyone,
their lines and their voice, for /mute's minutes when it gives none (every
machine told), or unmuted */
void network_chat_host_mute(short player_index, boolean mute);
/* (the host: network_voice.c) whether a player's name (the network game's,
in the lobby too; at most 12 characters, ended or not) is muted for everyone:
their machine's voice goes no further */
boolean network_chat_host_name_muted(wchar_t const *name);
#endif // __NETWORK_CHAT_H
+18
View File
@@ -4050,6 +4050,9 @@ void network_distributed_handle_message(
case _distributed_message_pickups: entry_size = sizeof(struct distributed_pickup); break;
case _distributed_message_votekick: entry_size = network_votekick_request_entry_size(); break;
case _distributed_message_votekick_status: entry_size = network_votekick_status_entry_size(); break;
case _distributed_message_chat_up:
case _distributed_message_chat_down: entry_size = network_chat_line_entry_size(); break;
case _distributed_message_chat_config: entry_size = network_chat_config_entry_size(); break;
case _distributed_message_player_inputs: entry_size = sizeof(struct distributed_player_input); break;
case _distributed_message_relayed_actions: entry_size = DISTRIBUTED_RELAYED_ACTION_MINIMUM_SIZE; break;
case _distributed_message_game_state:
@@ -4076,6 +4079,9 @@ void network_distributed_handle_message(
case _distributed_message_coop_skip_vote:
case _distributed_message_votekick:
case _distributed_message_votekick_status:
case _distributed_message_chat_up:
case _distributed_message_chat_down:
case _distributed_message_chat_config:
if (header.count < 1)
return;
break;
@@ -4107,6 +4113,7 @@ void network_distributed_handle_message(
case _distributed_message_player_inputs:
case _distributed_message_coop_skip_vote:
case _distributed_message_votekick:
case _distributed_message_chat_up:
if (machine_index == NONE || game_connection() != _game_connection_network_server)
return;
break;
@@ -4167,6 +4174,17 @@ void network_distributed_handle_message(
case _distributed_message_votekick_status:
network_votekick_handle_status(entries);
break;
case _distributed_message_chat_up:
network_chat_handle_up(machine_index, entries, distributed_handling_stream_message);
break;
/* (the host's, over its connection's stream alone: a datagram from its
address could be anyone's) */
case _distributed_message_chat_down:
network_chat_handle_down(entries, !network_connection_last_read_was_unreliable());
break;
case _distributed_message_chat_config:
network_chat_handle_config(entries, !network_connection_last_read_was_unreliable());
break;
case _distributed_message_coop_device_groups:
network_coop_handle_device_groups(entries, header.count);
break;
+21
View File
@@ -125,6 +125,14 @@ enum
_distributed_message_map_share_offer = 84,
_distributed_message_map_share_sources = 85,
_distributed_message_map_share_progress = 86,
/* the text chat (network_chat.c): a player's line to the host,
reliably, which takes it only from the player's own machine's stream; and
the line the host sends on to each machine that hears it, reliably */
_distributed_message_chat_up = 87,
_distributed_message_chat_down = 88,
/* the host's text chat settings (network_chat.c): whether its players
may chat and send links, to every client, reliably */
_distributed_message_chat_config = 89,
/* The VR port's own messages, numbered far past the game's (240 on),
so that messages upstream adds never take their numbers: a build
@@ -301,6 +309,19 @@ word network_votekick_request_entry_size(void);
void network_votekick_handle_status(void const *entries);
word network_votekick_status_entry_size(void);
/* ---------- prototypes/NETWORK_CHAT.C */
/* (the host) a client's line; from_stream: it came over the machine's own
stream (anything else is refused) */
void network_chat_handle_up(long machine_index, void const *entries, boolean from_stream);
/* (a client) a line the host sent on; from_stream: it came over the host's
connection's stream (anything else is refused) */
void network_chat_handle_down(void const *entries, boolean from_stream);
word network_chat_line_entry_size(void);
/* (a client) the host's chat settings; from_stream: as above */
void network_chat_handle_config(void const *entries, boolean from_stream);
word network_chat_config_entry_size(void);
/* ---------- prototypes/NETWORK_ACTORS.C */
void network_actors_new_game(void);
+357 -1
View File
@@ -41,6 +41,7 @@ Called from the main loop every frame (main.c).
#include "cseries.h"
#include "main/main.h"
#include "interface/player_ui.h"
#include "saved games/player_profile.h"
#include "interface/ui_widget.h"
#include "networking/network_game_globals.h"
#include "networking/network_client_manager.h"
@@ -61,6 +62,9 @@ Called from the main loop every frame (main.c).
#include "camera/observer.h"
#include "../src/p2p.h" /* port: port/linux/src/p2p.c, p2p_lobby.c */
#include "network_chat.h"
#include "network_voice.h"
#include "halo_keyboard.h"
#include <math.h>
#include <stdarg.h>
@@ -72,6 +76,7 @@ const char *config_string(char const *name);
int config_boolean(char const *name);
double config_real(char const *name);
long config_integer(char const *name);
int config_write(char const *name, char const *value);
void platform_log(char const *format, ...);
/* damage.c's */
void damage_kill_object_for_player(long object_index, long player_index);
@@ -81,6 +86,7 @@ void network_distributed_item_statistics(long *creates, long *deletes, long *fai
void network_damage_statistics(long *sent_reports, long *dealt_reports, long *rejected_reports, long *replayed_events);
/* xinput_sdl.c's */
void test_input_hold_action(int hold);
void test_input_press(unsigned long buttons);
enum
{
@@ -116,6 +122,9 @@ static struct
real vehicle_time;
real pickup_time;
char pickup_weapon[64];
/* debug.network_test_chat's, and the lines said this game */
real chat_time;
short chat_lines_said;
long score_to_win;
long logged_time;
boolean public_game;
@@ -183,6 +192,7 @@ static void network_test_read_settings(
network_test.shoot_interval = (real)config_real("debug.network_test_shoot");
network_test.vehicle_time = (real)config_real("debug.network_test_vehicle");
network_test.pickup_time = (real)config_real("debug.network_test_pickup");
network_test.chat_time = (real)config_real("debug.network_test_chat");
snprintf(network_test.pickup_weapon, sizeof(network_test.pickup_weapon), "%s",
config_string("debug.network_test_pickup_weapon"));
network_test.score_to_win = (long)config_integer("debug.network_test_score");
@@ -591,6 +601,193 @@ static void network_test_vehicle(
}
}
/* debug.network_test_name: the name the machine's first player takes (its
profile's, which it joins with), in ASCII */
static void network_test_set_name(
void)
{
char const *name = config_string("debug.network_test_name");
struct player_profile profile;
short index;
if (!name || !name[0])
return;
player_ui_get_active_player_profile(0, &profile);
for (index = 0; name[index] && index < MAXIMUM_PLAYER_PROFILE_NAME_LENGTH - 1; index++)
profile.player_name[index] = (wchar_t)(unsigned char)name[index];
profile.player_name[index] = 0;
player_ui_set_active_player_profile(0, player_ui_get_active_player_profile_index(0), &profile);
platform_log("network test: this machine's player is named %s", name);
}
/* debug.network_test_chat: the host seats the last two players in one
vehicle, the nearest to the first of them with seats for both (any, a map's
own), for the vehicle chat (two joining machines' players, of one team: they
start near each other) */
static void network_test_seat_together(
void)
{
struct data_iterator iterator;
struct player_datum *player;
struct object_iterator vehicles;
long units[2];
long best_index = NONE;
real best_distance = 0.0f;
short count = 0;
short index;
data_iterator_new(&iterator, player_data);
while ((player = (struct player_datum *)data_iterator_next(&iterator)) != NULL)
{
if (player->unit_index == NONE)
continue;
units[0] = count ? units[1] : NONE;
units[1] = player->unit_index;
count++;
}
if (count < 2)
return;
object_iterator_new(&vehicles, _object_mask_vehicle, 0);
while (object_iterator_next(&vehicles))
{
real distance;
if (unit_definition_get(object_get(vehicles.index)->definition_index)->unit.seats.count < 2)
continue;
distance = distance_squared3d(&object_get(units[0])->object.position, &object_get(vehicles.index)->object.position);
if (best_index == NONE || distance < best_distance)
{
best_index = vehicles.index;
best_distance = distance;
}
}
if (best_index == NONE)
{
platform_log("network test: no vehicle with two seats");
return;
}
for (index = 0; index < (short)NUMBEROF(units); index++)
{
short seat_index;
for (seat_index = 0;
seat_index < unit_definition_get(object_get(best_index)->definition_index)->unit.seats.count; seat_index++)
{
if (!unit_seat_filled(best_index, seat_index) && unit_enter_seat(units[index], best_index, seat_index))
break;
}
}
platform_log("network test: the last two players ride vehicle %lx: %s, %s", best_index,
object_get(units[0])->object.parent_object_index == best_index ? "in" : "out",
object_get(units[1])->object.parent_object_index == best_index ? "in" : "out");
}
/* debug.network_test_chat: a line typed on the text chat's on-screen
keyboard with the controller's buttons, ticks since it began: each held
for two frames and let go for two, whatever the frame rate (a press of two
ticks falls between two frames of a machine drawing slowly) (the keyboard
opens on the first key, 'q': "gg ez", then D-pad Down to the team, then
Start) */
static void network_test_keyboard_line(
long ticks)
{
enum { STEP_FRAMES = 4 };
static long frames;
static long last_ticks = -1;
static unsigned long const steps[] =
{
1UL << HALO_CHAT_PAD_UP,
1UL << HALO_CHAT_PAD_STICK_DOWN,
1UL << HALO_CHAT_PAD_STICK_RIGHT, 1UL << HALO_CHAT_PAD_STICK_RIGHT, 1UL << HALO_CHAT_PAD_STICK_RIGHT,
1UL << HALO_CHAT_PAD_STICK_RIGHT,
1UL << HALO_CHAT_PAD_A, 1UL << HALO_CHAT_PAD_A,
1UL << HALO_CHAT_PAD_STICK_DOWN, 1UL << HALO_CHAT_PAD_STICK_DOWN,
1UL << HALO_CHAT_PAD_A,
1UL << HALO_CHAT_PAD_STICK_UP, 1UL << HALO_CHAT_PAD_STICK_UP, 1UL << HALO_CHAT_PAD_STICK_UP,
1UL << HALO_CHAT_PAD_STICK_LEFT, 1UL << HALO_CHAT_PAD_STICK_LEFT,
1UL << HALO_CHAT_PAD_A,
1UL << HALO_CHAT_PAD_STICK_DOWN, 1UL << HALO_CHAT_PAD_STICK_DOWN,
1UL << HALO_CHAT_PAD_STICK_LEFT, 1UL << HALO_CHAT_PAD_STICK_LEFT,
1UL << HALO_CHAT_PAD_A,
1UL << HALO_CHAT_PAD_DOWN,
1UL << HALO_CHAT_PAD_START,
};
long step;
/* (frames since it began: again for the next game's line) */
if (ticks < last_ticks)
frames = 0;
last_ticks = ticks;
step = frames / STEP_FRAMES;
frames++;
if (step >= (long)NUMBEROF(steps))
{
/* (after the line, let go: a held key would move nothing more) */
if (step == (long)NUMBEROF(steps))
test_input_press(0);
return;
}
test_input_press((frames - 1) % STEP_FRAMES < STEP_FRAMES / 2 ? steps[step] : 0);
}
/* debug.network_test_chat: the last player (absolute index; NONE), whom the
host mutes; whether it is this machine's; and the first player's machine
(the network's index: the host's), which the last player's mutes */
static short network_test_last_player_index(
void)
{
struct data_iterator iterator;
short last = NONE;
data_iterator_new(&iterator, player_data);
while (data_iterator_next(&iterator) != NULL)
last = (short)DATUM_INDEX_TO_ABSOLUTE_INDEX(iterator.datum_index);
return last;
}
static boolean network_test_last_player_local(
void)
{
struct data_iterator iterator;
struct player_datum *player;
struct player_datum *last = NULL;
data_iterator_new(&iterator, player_data);
while ((player = (struct player_datum *)data_iterator_next(&iterator)) != NULL)
last = player;
return last && last->local_player_index != NONE;
}
static long network_test_first_player_machine(
void)
{
struct data_iterator iterator;
struct player_datum *player;
data_iterator_new(&iterator, player_data);
player = (struct player_datum *)data_iterator_next(&iterator);
return player ? player->network_player_data.machine_index : NONE;
}
/* debug.network_test_chat: the last player's name, in ASCII (the host
mutes it) */
static void network_test_last_player_name(
char *name,
short size)
{
struct data_iterator iterator;
struct player_datum *player;
struct player_datum *last = NULL;
short index;
data_iterator_new(&iterator, player_data);
while ((player = (struct player_datum *)data_iterator_next(&iterator)) != NULL)
last = player;
for (index = 0; last && index < size - 1 && index < (short)NUMBEROF(last->name) && last->name[index]; index++)
name[index] = player_name_character_ascii(last->name[index]);
name[index] = 0;
}
/* both machines stand the last player at the driver's entrance of the
nearest vehicle no one rides (a joining machine's player then holds the
action button, as a player getting in does) */
@@ -749,6 +946,16 @@ void network_test_update(
if (network_test.mode == _network_test_off)
return;
/* debug.network_test_chat: each client's player types "gg ez" on the
text chat's on-screen keyboard 32 seconds on, as a controller does, and
sends it to the team (each frame, not each second, as the rest) */
if (network_test.chat_time > 0.0f && network_test.mode != _network_test_host && game_in_progress() &&
!main_menu_loaded &&
game_time_get() >= (long)(network_test.chat_time * TICKS_PER_SECOND) + 32 * TICKS_PER_SECOND)
{
network_test_keyboard_line(game_time_get() - (long)(network_test.chat_time * TICKS_PER_SECOND) -
32 * TICKS_PER_SECOND);
}
/* the game running: report (from the start of each game: the next
game's time starts over) */
if (game_in_progress() && game_time_get() < network_test.logged_time)
@@ -797,6 +1004,151 @@ void network_test_update(
test_input_hold_action(hold);
}
}
/* debug.network_test_chat: each machine's player says a line to
everyone that many seconds in, one to the team two seconds on, and
one to the vehicle two more on, the host having seated the last two
players in one vehicle (the others in none) three seconds before;
then the host mutes the last player for a minute (a client's /mute
of the host refused), each says a line to everyone (the last
player's going no further than the host), the host unmutes it, and
each says another; then each says a line with a link (refused, as
network.text_chat "on" refuses links), the host turns the text chat
off (network.text_chat "off"), and each says a line (refused); then
the host mutes the last player for everyone, as its scoreboard does,
and each says a line, and the last player's machine mutes the host's
for itself, as a client's scoreboard does, and each says another */
if (network_test.chat_time > 0.0f)
{
long chat_time = (long)(network_test.chat_time * TICKS_PER_SECOND);
char const *machine = network_test.mode == _network_test_host ? "the host" : "a client";
char text[64];
if (game_time_get() < chat_time - 3 * TICKS_PER_SECOND)
network_test.chat_lines_said = 0;
if (network_test.mode == _network_test_host && network_test.chat_lines_said == 0 &&
game_time_get() >= chat_time - 3 * TICKS_PER_SECOND)
{
network_test_seat_together();
network_test.chat_lines_said = -1;
}
if (network_test.chat_lines_said <= 0 && game_time_get() >= chat_time)
{
/* (long enough to wrap in the chat's column) */
snprintf(text, sizeof(text), "hello everyone from %s, long enough to wrap the column", machine);
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said = 1;
}
if (network_test.chat_lines_said == 1 && game_time_get() >= chat_time + 2 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "hello team from %s", machine);
network_chat_say(_chat_channel_team, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 2 && game_time_get() >= chat_time + 4 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "hello vehicle from %s", machine);
network_chat_say(_chat_channel_vehicle, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 3 && game_time_get() >= chat_time + 6 * TICKS_PER_SECOND)
{
char name[16];
network_test_last_player_name(name, sizeof(name));
if (network_test.mode == _network_test_host)
snprintf(text, sizeof(text), "/mute %s 1", name);
else
snprintf(text, sizeof(text), "/mute host");
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 4 && game_time_get() >= chat_time + 8 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "while muted from %s", machine);
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 5 && game_time_get() >= chat_time + 10 * TICKS_PER_SECOND)
{
char name[16];
network_test_last_player_name(name, sizeof(name));
if (network_test.mode == _network_test_host)
{
snprintf(text, sizeof(text), "/unmute %s", name);
network_chat_say(_chat_channel_everyone, text);
}
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 6 && game_time_get() >= chat_time + 12 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "after unmute from %s", machine);
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 7 && game_time_get() >= chat_time + 14 * TICKS_PER_SECOND)
{
/* (a client's sent past its own check, for the host to refuse) */
snprintf(text, sizeof(text), "join us at discord(dot)gg/halo from %s", machine);
if (network_test.mode == _network_test_host)
network_chat_say(_chat_channel_everyone, text);
else
network_chat_say_unchecked(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 8 && game_time_get() >= chat_time + 16 * TICKS_PER_SECOND)
{
if (network_test.mode == _network_test_host && !config_write("network.text_chat", "off"))
platform_log("network test: could not turn the text chat off");
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 9 && game_time_get() >= chat_time + 18 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "with the chat off from %s", machine);
if (network_test.mode == _network_test_host)
network_chat_say(_chat_channel_everyone, text);
else
network_chat_say_unchecked(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
/* (and on again: config.toml is the executable's folder's, which
every test of it shares) */
if (network_test.chat_lines_said == 10 && game_time_get() >= chat_time + 20 * TICKS_PER_SECOND)
{
if (network_test.mode == _network_test_host && !config_write("network.text_chat", "on"))
platform_log("network test: could not turn the text chat on");
network_test.chat_lines_said++;
}
/* (the scoreboard's mutes: the host's of the last player for
everyone, their lines and voice, then the last player's machine's
own mute of the host's machine, here alone) */
if (network_test.chat_lines_said == 11 && game_time_get() >= chat_time + 22 * TICKS_PER_SECOND)
{
if (network_test.mode == _network_test_host)
network_chat_host_mute(network_test_last_player_index(), TRUE);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 12 && game_time_get() >= chat_time + 24 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "after the scoreboard mute from %s", machine);
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 13 && game_time_get() >= chat_time + 28 * TICKS_PER_SECOND)
{
if (network_test.mode == _network_test_host)
network_chat_host_mute(network_test_last_player_index(), FALSE);
else if (network_test_last_player_local())
network_voice_mute_machine(network_test_first_player_machine(), TRUE);
network_test.chat_lines_said++;
}
if (network_test.chat_lines_said == 14 && game_time_get() >= chat_time + 30 * TICKS_PER_SECOND)
{
snprintf(text, sizeof(text), "after the local mute from %s", machine);
network_chat_say(_chat_channel_everyone, text);
network_test.chat_lines_said++;
}
}
if (network_test.mode == _network_test_host && network_test.vehicle_time > 0.0f)
{
long enter_time = (long)(network_test.vehicle_time * TICKS_PER_SECOND);
@@ -972,7 +1324,7 @@ void network_test_update(
listed[index].invite[0] ? "" : ", locked");
}
}
if (count > 0 && p2p_join_invite(games[0].invite))
if (count > 0 && p2p_join_listing(&games[0]))
{
p2p_lobby_browse(FALSE);
platform_log("network test: joining %s's game (%s) from the server browser", games[0].name, games[0].map);
@@ -1032,7 +1384,10 @@ void network_test_update(
network_test.map_set = TRUE;
}
if (!network_test.player_added && network_test.setup_seconds >= 2.0f && global_network_game_client_get())
{
network_test_set_name();
network_test.player_added = network_game_client_add_player(global_network_game_client_get(), 0);
}
if (network_test.setup_seconds >= network_test.start_delay)
{
network_test.started = TRUE;
@@ -1047,6 +1402,7 @@ void network_test_update(
network_test.set_up = TRUE;
dispose_global_network_game_client();
dispose_global_network_game_server();
network_test_set_name();
if (create_global_network_game_client())
{
game_connection_set(_game_connection_network_client);
+30 -2
View File
@@ -30,7 +30,10 @@ decodes, and a machine's own voice never comes back to it.
Each machine decides only for itself: whether it talks (audio.voice_chat:
push to talk, open mic, or not), how loud the others are
(audio.voice_volume), and whom it mutes (the scoreboard's menu,
game_engine.c), which it does not tell anyone.
game_engine.c: their voice and their text chat lines), which it does not
tell anyone. The host's mute for everyone (the scoreboard's, or the chat's
/mute: network_chat.c) is the host's alone: it relays none of a muted
player's voice.
*/
#include "cseries.h"
@@ -52,6 +55,7 @@ game_engine.c), which it does not tell anyone.
#include "objects/objects.h"
#include "network_distributed.h"
#include "network_voice.h"
#include "network_chat.h"
#include "../src/voice_audio.h"
#include <math.h>
@@ -375,6 +379,27 @@ static void voice_machine_name(
}
}
/* (the host) whether a machine has a player the host muted for everyone
(network_chat.c), by the network game's names, which the lobby has too */
static boolean voice_machine_muted_for_everyone(
long machine_index)
{
struct network_game *game = voice_network_game();
short index;
for (index = 0; game && index < HALO_PORT_MAXIMUM_NETWORK_PLAYERS; index++)
{
struct network_player *player = &game->players[index];
if (network_player_is_valid(player) && player->machine_index == machine_index &&
network_chat_host_name_muted(player->name))
{
return TRUE;
}
}
return FALSE;
}
/* a player's living unit's position */
static boolean voice_player_position(
struct player_datum const *player,
@@ -608,6 +633,9 @@ static void voice_host_relay(
{
return;
}
/* (a player the host muted for everyone is heard by no one) */
if (voice_machine_muted_for_everyone(speaker_machine))
return;
/* (no more than so many at once: those talking keep talking) */
if (!(voice_machines[speaker_machine].talked && now - voice_machines[speaker_machine].talked_at < VOICE_TALKING_MS) &&
voice_host_talkers(speaker_machine, now) >= VOICE_MAXIMUM_TALKERS)
@@ -924,7 +952,7 @@ void network_voice_update(
}
/* the microphone: open mic, open while voice is on; push to talk, from
the first press (none asked for until then) */
held = push_to_talk && halo_push_to_talk_held() && !console_is_active();
held = push_to_talk && halo_push_to_talk_held() && !console_is_active() && !network_chat_typing();
if (!voice_may_talk() || (!open_mic && !push_to_talk))
voice_microphone_wanted = FALSE;
else if (open_mic || held)
+392
View File
@@ -0,0 +1,392 @@
/*
TEXT_FILTER.C
Streamer mode (Settings > Network Setup > Streamer Mode): the words of
text_filter_match.c's list hidden as stars wherever text is drawn, at the
levels set (streamer.enabled, and streamer.slurs, streamer.swearing and
streamer.insults: "off", "severe", "strong" or "mild", each that severity
and worse).
draw_string.c's draw_string and draw_unicode_string take the string's
filtered copy before they draw or measure it (draw_string_compute_bounds
and the rest measure through them), so every string the game shows is
filtered: names over heads, the kill feed, the scoreboards, the lobbies, the
server browser, map and mod names, the console's lines, and a map's or mod's
own text. A copy is the same length or shorter (a censored character is one
'*'), so a fixed buffer is never overrun. Copies are kept, so that a string
drawn each frame is looked at once.
What the player types is drawn as it is: the menus' text field being edited
(text_filter_exempt), the console's input line and the virtual keyboard's
(text_filter_suspend). The player's own words: d:\text_filter.txt, lines of
"add <word>" (hidden whenever streamer mode is on) and "allow <word>" (never
hidden), read as the settings change.
Only what this machine draws changes: nothing sent between machines.
*/
#include "text_filter.h"
#include <stdio.h>
#include <string.h>
/* port/linux/src/port_config.c */
int config_boolean(const char *name);
const char *config_string(const char *name);
unsigned long config_changes(void);
#define USER_FILE "d:\\text_filter.txt"
#define CACHE_ENTRIES 128
#define CACHE_LENGTH 256
#define LONG_BUFFERS 4
struct text_filter_cache_entry
{
unsigned long hash;
short length;
unsigned char narrow;
unsigned char clean;
unsigned short original[CACHE_LENGTH];
union
{
unsigned short wide[CACHE_LENGTH];
char narrow[CACHE_LENGTH];
} filtered;
};
static struct
{
unsigned long changes;
int enabled;
unsigned char levels[NUMBER_OF_TEXT_FILTER_GROUPS];
long suspended;
void const *exempt;
struct text_filter_cache_entry cache[CACHE_ENTRIES];
union
{
unsigned short wide[TEXT_FILTER_MAXIMUM_LENGTH + 1];
char narrow[TEXT_FILTER_MAXIMUM_LENGTH + 1];
} long_buffers[LONG_BUFFERS];
long next_long_buffer;
unsigned short units[TEXT_FILTER_MAXIMUM_LENGTH];
unsigned char censored[TEXT_FILTER_MAXIMUM_LENGTH];
} text_filter_globals = { (unsigned long)-1 };
static unsigned char text_filter_level(
char const *name)
{
char const *value = config_string(name);
if (!value || !strcmp(value, "off"))
return _text_filter_off;
if (!strcmp(value, "severe"))
return _text_filter_severe;
if (!strcmp(value, "strong"))
return _text_filter_strong;
return _text_filter_mild;
}
/* the list again with the player's own words (USER_FILE) */
static void text_filter_user_words(
void)
{
FILE *file = fopen(USER_FILE, "r");
char line[128];
text_filter_words_reset();
if (!file)
return;
while (fgets(line, sizeof(line), file))
{
char *word = line;
line[strcspn(line, "\r\n")] = 0;
while (*word == ' ' || *word == '\t')
word++;
if (!strncmp(word, "add ", 4))
text_filter_word_add(word + 4, _text_filter_own, _text_filter_severe, _text_filter_anywhere);
else if (!strncmp(word, "allow ", 6))
text_filter_allow_add(word + 6);
}
fclose(file);
return;
}
/* whether anything is hidden: the settings, read again when they change */
static int text_filter_enabled(
void)
{
if (text_filter_globals.changes != config_changes())
{
long index;
text_filter_globals.changes = config_changes();
text_filter_globals.enabled = config_boolean("streamer.enabled") != 0;
text_filter_globals.levels[_text_filter_slurs] = text_filter_level("streamer.slurs");
text_filter_globals.levels[_text_filter_swearing] = text_filter_level("streamer.swearing");
text_filter_globals.levels[_text_filter_insults] = text_filter_level("streamer.insults");
text_filter_globals.levels[_text_filter_own] = _text_filter_mild;
for (index = 0; index < CACHE_ENTRIES; index++)
text_filter_globals.cache[index].length = -1;
if (text_filter_globals.enabled)
text_filter_user_words();
}
return text_filter_globals.enabled && !text_filter_globals.suspended;
}
/* whether the string is a copy of ours (a string measured is drawn again
through draw_string or draw_unicode_string) */
static int text_filter_ours(
void const *string)
{
char const *pointer = (char const *)string;
char const *start = (char const *)&text_filter_globals;
return pointer >= start && pointer < start + sizeof(text_filter_globals);
}
static unsigned long text_filter_hash(
unsigned short const *units,
long length)
{
unsigned long hash = 2166136261UL;
long index;
for (index = 0; index < length; index++)
hash = (hash ^ units[index]) * 16777619UL;
return hash;
}
/* the units with what is hidden as '*' (a wide string's "|n" and a narrow
string's style codes kept, and a wide "|"'s hidden character dropped with
it), into wide or narrow; whether anything was */
static int text_filter_apply(
unsigned short const *units,
long length,
int narrow,
unsigned short *wide,
char *narrow_text)
{
unsigned char *censored = text_filter_globals.censored;
long index;
long written = 0;
if (!text_filter_censor(units, length, narrow, text_filter_globals.levels, censored))
return 0;
for (index = 0; index < length; index++)
{
unsigned short unit = units[index];
if (censored[index])
{
if (unit == '|' && index + 1 < length)
{
unsigned short next = units[index + 1];
if (next == 'n' || (narrow && next && next < 0x80 && strchr("ibukprlctn", (char)next)))
{
/* a line break or a style code: kept */
if (narrow)
{
narrow_text[written++] = '|';
narrow_text[written++] = (char)next;
}
else
{
wide[written++] = '|';
wide[written++] = next;
}
index++;
continue;
}
if (!narrow)
{
/* a "|" that hides the character after it: both one '*' */
index++;
}
unit = '*';
}
else if (unit != '\r' && unit != '\n' && unit != '\t')
{
unit = '*';
}
}
if (narrow)
narrow_text[written++] = (char)unit;
else
wide[written++] = unit;
}
if (narrow)
narrow_text[written] = 0;
else
wide[written] = 0;
return 1;
}
/* the string's filtered copy, or the string itself (nothing hidden, or a
string longer than TEXT_FILTER_MAXIMUM_LENGTH, which is drawn as it is) */
static void const *text_filter(
void const *string,
int narrow)
{
unsigned short *units = text_filter_globals.units;
struct text_filter_cache_entry *entry;
unsigned long hash;
long length = 0;
if (!string || string == text_filter_globals.exempt || text_filter_ours(string) || !text_filter_enabled())
return string;
if (narrow)
{
unsigned char const *text = (unsigned char const *)string;
while (text[length] && length <= TEXT_FILTER_MAXIMUM_LENGTH)
{
if (length < TEXT_FILTER_MAXIMUM_LENGTH)
units[length] = text[length];
length++;
}
}
else
{
unsigned short const *text = (unsigned short const *)string;
while (text[length] && length <= TEXT_FILTER_MAXIMUM_LENGTH)
{
if (length < TEXT_FILTER_MAXIMUM_LENGTH)
units[length] = text[length];
length++;
}
}
if (!length || length > TEXT_FILTER_MAXIMUM_LENGTH)
return string;
if (length >= CACHE_LENGTH)
{
/* a long string: filtered each time it is drawn, into one of a few
buffers in turn */
long buffer = text_filter_globals.next_long_buffer;
text_filter_globals.next_long_buffer = (buffer + 1) % LONG_BUFFERS;
if (!text_filter_apply(units, length, narrow, text_filter_globals.long_buffers[buffer].wide,
text_filter_globals.long_buffers[buffer].narrow))
{
return string;
}
return narrow ?
(void const *)text_filter_globals.long_buffers[buffer].narrow :
(void const *)text_filter_globals.long_buffers[buffer].wide;
}
hash = text_filter_hash(units, length) ^ (unsigned long)narrow;
entry = &text_filter_globals.cache[hash % CACHE_ENTRIES];
if (entry->length != length || entry->hash != hash || entry->narrow != narrow ||
memcmp(entry->original, units, length * sizeof(*units)))
{
entry->hash = hash;
entry->length = (short)length;
entry->narrow = (unsigned char)narrow;
memcpy(entry->original, units, length * sizeof(*units));
entry->clean = !text_filter_apply(units, length, narrow, entry->filtered.wide, entry->filtered.narrow);
}
if (entry->clean)
return string;
return narrow ? (void const *)entry->filtered.narrow : (void const *)entry->filtered.wide;
}
/* draw_unicode_string's string (draw_string.c) */
wchar_t const *text_filter_unicode(
wchar_t const *string)
{
return (wchar_t const *)text_filter(string, 0);
}
/* draw_string's string (draw_string.c) */
char const *text_filter_string(
char const *string)
{
return (char const *)text_filter(string, 1);
}
/* what is drawn until text_filter_resume drawn as it is (what the player
types) */
void text_filter_suspend(
void)
{
text_filter_globals.suspended++;
return;
}
void text_filter_resume(
void)
{
if (text_filter_globals.suspended > 0)
text_filter_globals.suspended--;
return;
}
/* the text (a widget's buffer) drawn as it is while it is being edited;
NULL: none */
void text_filter_exempt(
void const *text)
{
text_filter_globals.exempt = text;
return;
}
/* text shown outside the game's drawing (the platform's message boxes),
UTF-8, filtered in place (a hidden character, of however many bytes, one
'*') */
void text_filter_utf8(
char *text)
{
unsigned short *units = text_filter_globals.units;
unsigned char *censored = text_filter_globals.censored;
long starts[TEXT_FILTER_MAXIMUM_LENGTH];
unsigned char const *byte = (unsigned char const *)text;
long length = 0;
long index;
long written = 0;
long read = 0;
long total;
if (!text || !text_filter_enabled())
return;
while (*byte && length < TEXT_FILTER_MAXIMUM_LENGTH)
{
unsigned long code = *byte;
long size = 1;
if (code >= 0xE0 && byte[1] && byte[2])
{
code = ((code & 0x0F) << 12) | ((byte[1] & 0x3F) << 6) | (byte[2] & 0x3F);
size = 3;
}
else if (code >= 0xC0 && byte[1])
{
code = ((code & 0x1F) << 6) | (byte[1] & 0x3F);
size = 2;
}
starts[length] = (long)(byte - (unsigned char const *)text);
units[length++] = (unsigned short)code;
byte += size;
}
if (*byte || !text_filter_censor(units, length, 0, text_filter_globals.levels, censored))
return;
total = (long)(byte - (unsigned char const *)text);
for (index = 0; index < length; index++)
{
long next = index + 1 < length ? starts[index + 1] : total;
read = starts[index];
if (censored[index])
{
text[written++] = '*';
}
else
{
while (read < next)
text[written++] = text[read++];
}
}
text[written] = 0;
return;
}
+65
View File
@@ -0,0 +1,65 @@
/*
TEXT_FILTER.H
Streamer mode (Settings > Network Setup > Streamer Mode, streamer.*): the
words hidden as stars in what is drawn. text_filter_match.c finds them, with
no game types, so that the harness builds it alone
(tools/harness/tests/test_text_filter.py); text_filter.c applies them to
what the game draws.
*/
#ifndef __TEXT_FILTER_H__
#define __TEXT_FILTER_H__
#include <stddef.h>
/* the groups a player sets a level for, and the player's own words
(text_filter.txt), hidden whenever streamer mode is on */
enum text_filter_group
{
_text_filter_slurs,
_text_filter_swearing,
_text_filter_insults,
_text_filter_own,
NUMBER_OF_TEXT_FILTER_GROUPS
};
/* a term's severity (Surge AI's: mild, strong, severe), and a group's
level: the least severity hidden, or none */
enum text_filter_severity
{
_text_filter_off,
_text_filter_mild,
_text_filter_strong,
_text_filter_severe
};
/* where a term may be found: inside any word, at a word's start, or as the
whole word (or it and "s" or "es") */
enum text_filter_rule
{
_text_filter_anywhere,
_text_filter_start,
_text_filter_whole,
NUMBER_OF_TEXT_FILTER_RULES
};
/* the most code units of a string looked at (a longer one is drawn as it is) */
#define TEXT_FILTER_MAXIMUM_LENGTH 1024
/* text_filter_match.c */
void text_filter_words_reset(void);
int text_filter_word_add(char const *term, int group, int severity, int rule);
int text_filter_allow_add(char const *word);
long text_filter_censor(unsigned short const *text, long length, int narrow, unsigned char const *levels,
unsigned char *censored);
/* text_filter.c */
wchar_t const *text_filter_unicode(wchar_t const *string);
char const *text_filter_string(char const *string);
void text_filter_suspend(void);
void text_filter_resume(void);
void text_filter_exempt(void const *text);
void text_filter_utf8(char *text);
#endif
File diff suppressed because it is too large. Load diff
+758
View File
@@ -0,0 +1,758 @@
/*
TEXT_FILTER_MATCH.C
Streamer mode's matcher: which code units of a string spell a hidden word,
however it is dressed (README.md, "Streamer mode"). A string is read as the
game draws it (draw_string.c's parsers: a wide string's "|n" breaks a line
and any other "|" hides the character after it; a narrow string's style
codes are not drawn), and each character it shows becomes an element:
- a letter, of a-z: the case folded, accents and look-alikes (Cyrillic,
Greek, full-width, small capitals: text_filter_fold.inc) made plain;
- a digit or symbol read as letters (leet: 0 o, 1 i or l, 3 e, @ a, $ s...),
or as any letter (* # % ?, the last of which is what the server browser's
listings show for a character they cannot), which may also be
punctuation;
- a space or punctuation, which a word may be spelled across;
- anything else, which no word crosses.
Two elements together may read as one letter (ph f, vv w, \/ v, |< k).
Then each term (text_filter_terms.inc, made by tools/text_filter_terms.py
from Surge AI's list; and the player's own) is looked for from each element:
a run of one letter reads as one ("fuuuck"); punctuation may come between
letters ("f.u.c.k"); spaces too where the pieces are a letter or two
("f u c k", "fu ck") or the match is whole words ("f uck"). A term's rule
says where it may be (inside a word, at a word's start, or as the whole
word), and the allowed words (Scunthorpe) are never hidden. Nothing here
knows the game: the harness builds it alone (tools/harness).
*/
#include "text_filter.h"
#include <string.h>
#define MAXIMUM_TERMS 2048
#define MAXIMUM_TERM_CHARACTERS 32768
#define MAXIMUM_TERM_LENGTH 40
#define MAXIMUM_ALLOWED 1024
#define MAXIMUM_ALLOWED_CHARACTERS 16384
#define MAXIMUM_GAP 4
#define ALL_LETTERS 0x03FFFFFFUL
#define LETTER(c) (1UL << ((c) - 'a'))
/* text_filter_terms.inc's terms: their letters with each byte xor'd by
TEXT_FILTER_TERM_KEY, so that the program holds no readable list */
struct text_filter_term_definition
{
unsigned char group;
unsigned char severity;
unsigned char rule;
char const *letters;
};
/* text_filter_fold.inc's characters read as letters */
struct text_filter_fold
{
unsigned short code;
unsigned long letters;
};
#include "text_filter_terms.inc"
#include "text_filter_fold.inc"
enum
{
_element_letter,
_element_digit,
_element_symbol,
_element_wildcard,
_element_space,
_element_punctuation,
_element_break
};
struct element
{
unsigned long letters;
unsigned long pair;
short first;
short last;
unsigned short code;
unsigned char kind;
};
struct term
{
short offset;
unsigned char length;
unsigned char group;
unsigned char severity;
unsigned char rule;
};
static struct
{
int ready;
long term_count;
long character_count;
struct term terms[MAXIMUM_TERMS];
char characters[MAXIMUM_TERM_CHARACTERS];
/* the terms by their first letter: first[letter] .. first[letter + 1] of
order */
short order[MAXIMUM_TERMS];
short first[27];
int sorted;
long allowed_count;
long allowed_character_count;
short allowed[MAXIMUM_ALLOWED];
char allowed_characters[MAXIMUM_ALLOWED_CHARACTERS];
} text_filter_words;
/* a term's or allowed word's letters, kept a-z only (others dropped);
their count */
static long text_filter_letters(
char *letters,
long size,
char const *text)
{
long length = 0;
for (; *text; text++)
{
char character = *text;
if (character >= 'A' && character <= 'Z')
character = (char)(character - 'A' + 'a');
if (character >= 'a' && character <= 'z' && length < size - 1)
letters[length++] = character;
}
letters[length] = 0;
return length;
}
static int text_filter_word_store(
char const *letters,
long length,
int group,
int severity,
int rule)
{
struct term *term;
if (length < 2 || length > MAXIMUM_TERM_LENGTH ||
text_filter_words.term_count >= MAXIMUM_TERMS ||
text_filter_words.character_count + length + 1 > MAXIMUM_TERM_CHARACTERS ||
group < 0 || group >= NUMBER_OF_TEXT_FILTER_GROUPS ||
severity < _text_filter_mild || severity > _text_filter_severe ||
rule < 0 || rule >= NUMBER_OF_TEXT_FILTER_RULES)
{
return 0;
}
term = &text_filter_words.terms[text_filter_words.term_count++];
term->offset = (short)text_filter_words.character_count;
term->length = (unsigned char)length;
term->group = (unsigned char)group;
term->severity = (unsigned char)severity;
term->rule = (unsigned char)rule;
memcpy(text_filter_words.characters + text_filter_words.character_count, letters, length + 1);
text_filter_words.character_count += length + 1;
text_filter_words.sorted = 0;
return 1;
}
/* the built-in terms and allowed words again, without the player's */
void text_filter_words_reset(
void)
{
long index;
text_filter_words.term_count = 0;
text_filter_words.character_count = 0;
text_filter_words.allowed_count = 0;
text_filter_words.allowed_character_count = 0;
for (index = 0; index < (long)(sizeof(text_filter_term_definitions) / sizeof(*text_filter_term_definitions)); index++)
{
struct text_filter_term_definition const *definition = &text_filter_term_definitions[index];
char letters[MAXIMUM_TERM_LENGTH + 1];
long length = 0;
char const *encoded;
for (encoded = definition->letters; *encoded && length < MAXIMUM_TERM_LENGTH; encoded++)
letters[length++] = (char)(*encoded ^ TEXT_FILTER_TERM_KEY);
letters[length] = 0;
text_filter_word_store(letters, length, definition->group, definition->severity, definition->rule);
}
for (index = 0; index < (long)(sizeof(text_filter_allowed_words) / sizeof(*text_filter_allowed_words)); index++)
text_filter_allow_add(text_filter_allowed_words[index]);
text_filter_words.ready = 1;
return;
}
/* a term of the player's, hidden at its group's level (a-z: others are
dropped); whether it was kept */
int text_filter_word_add(
char const *term,
int group,
int severity,
int rule)
{
char letters[MAXIMUM_TERM_LENGTH + 2];
long length;
if (!text_filter_words.ready)
text_filter_words_reset();
length = text_filter_letters(letters, sizeof(letters), term);
return text_filter_word_store(letters, length, group, severity, rule);
}
/* a word never hidden, nor any part of it (a-z); whether it was kept */
int text_filter_allow_add(
char const *word)
{
char letters[MAXIMUM_TERM_LENGTH + 2];
long length = text_filter_letters(letters, sizeof(letters), word);
if (length < 2 || length > MAXIMUM_TERM_LENGTH ||
text_filter_words.allowed_count >= MAXIMUM_ALLOWED ||
text_filter_words.allowed_character_count + length + 1 > MAXIMUM_ALLOWED_CHARACTERS)
{
return 0;
}
text_filter_words.allowed[text_filter_words.allowed_count++] = (short)text_filter_words.allowed_character_count;
memcpy(text_filter_words.allowed_characters + text_filter_words.allowed_character_count, letters, length + 1);
text_filter_words.allowed_character_count += length + 1;
return 1;
}
/* the terms by their first letter */
static void text_filter_words_sort(
void)
{
long letter;
long count = 0;
for (letter = 0; letter < 26; letter++)
{
long index;
text_filter_words.first[letter] = (short)count;
for (index = 0; index < text_filter_words.term_count; index++)
{
if (text_filter_words.characters[text_filter_words.terms[index].offset] == 'a' + letter)
text_filter_words.order[count++] = (short)index;
}
}
text_filter_words.first[26] = (short)count;
text_filter_words.sorted = 1;
return;
}
/* ---------- elements */
/* a character above ASCII read as letters (text_filter_fold.inc), or 0 */
static unsigned long text_filter_fold_letters(
unsigned short code)
{
long low = 0;
long high = (long)(sizeof(text_filter_folds) / sizeof(*text_filter_folds)) - 1;
while (low <= high)
{
long middle = (low + high) / 2;
if (text_filter_folds[middle].code == code)
return text_filter_folds[middle].letters;
if (text_filter_folds[middle].code < code)
low = middle + 1;
else
high = middle - 1;
}
return 0;
}
/* what a character is (an _element_ kind; NONE (-1) for one not drawn), and
the letters it may read as */
static int text_filter_classify(
unsigned short code,
unsigned long *letters)
{
*letters = 0;
if (code >= 0xFF01 && code <= 0xFF5E)
code = (unsigned short)(code - 0xFEE0);
if (code >= 'A' && code <= 'Z')
code = (unsigned short)(code - 'A' + 'a');
if (code >= 'a' && code <= 'z')
{
*letters = LETTER(code);
return _element_letter;
}
switch (code)
{
case '0': *letters = LETTER('o'); return _element_digit;
case '1': *letters = LETTER('i') | LETTER('l'); return _element_digit;
case '2': *letters = LETTER('z'); return _element_digit;
case '3': *letters = LETTER('e'); return _element_digit;
case '4': *letters = LETTER('a'); return _element_digit;
case '5': *letters = LETTER('s'); return _element_digit;
case '6': *letters = LETTER('g') | LETTER('b'); return _element_digit;
case '7': *letters = LETTER('t'); return _element_digit;
case '8': *letters = LETTER('b'); return _element_digit;
case '9': *letters = LETTER('g') | LETTER('q'); return _element_digit;
case '@': *letters = LETTER('a'); return _element_symbol;
case '$': *letters = LETTER('s'); return _element_symbol;
case '!': *letters = LETTER('i'); return _element_symbol;
case '+': *letters = LETTER('t'); return _element_symbol;
case '(': *letters = LETTER('c'); return _element_symbol;
case '<': *letters = LETTER('c'); return _element_symbol;
case '|': *letters = LETTER('i') | LETTER('l'); return _element_symbol;
case 0x00A1: *letters = LETTER('i'); return _element_symbol;
case 0x00A2: *letters = LETTER('c'); return _element_symbol;
case 0x00A3: *letters = LETTER('l') | LETTER('e'); return _element_symbol;
case 0x00A5: *letters = LETTER('y'); return _element_symbol;
case 0x00A7: *letters = LETTER('s'); return _element_symbol;
case 0x00A9: *letters = LETTER('c'); return _element_symbol;
case 0x00AE: *letters = LETTER('r'); return _element_symbol;
case 0x00D7: *letters = LETTER('x'); return _element_symbol;
case 0x20AC: *letters = LETTER('e'); return _element_symbol;
case '*': case '#': case '%': case '?':
*letters = ALL_LETTERS;
return _element_wildcard;
case ' ': case '\t': case '\r': case '\n': case 0x00A0: case 0x1680: case 0x202F: case 0x205F: case 0x3000:
return _element_space;
}
if (code >= 0x2000 && code <= 0x200A)
return _element_space;
/* invisible: the soft hyphen, joiners, marks over letters, direction
and variation selectors */
if (code == 0x00AD || code == 0x034F || code == 0x180E || code == 0xFEFF ||
(code >= 0x0300 && code <= 0x036F) || (code >= 0x1AB0 && code <= 0x1AFF) ||
(code >= 0x1DC0 && code <= 0x1DFF) || (code >= 0x20D0 && code <= 0x20FF) ||
(code >= 0x200B && code <= 0x200F) || (code >= 0x202A && code <= 0x202E) ||
(code >= 0x2060 && code <= 0x2069) || (code >= 0xFE00 && code <= 0xFE0F) ||
(code >= 0xFE20 && code <= 0xFE2F))
{
return -1;
}
if (code >= 0x80)
{
*letters = text_filter_fold_letters(code);
if (*letters)
return _element_letter;
}
if ((code > ' ' && code < 0x7F) || (code >= 0x00A1 && code <= 0x00BF) ||
(code >= 0x2010 && code <= 0x2027) || (code >= 0x2030 && code <= 0x205E))
{
return _element_punctuation;
}
return _element_break;
}
static int text_filter_style_code(
unsigned short code)
{
return code && code < 0x80 && strchr("ibukprlctn", (char)code) != NULL;
}
/* the string's elements as it is drawn; their count */
static long text_filter_elements(
unsigned short const *text,
long length,
int narrow,
struct element *elements,
long maximum)
{
long count = 0;
long index = 0;
long element_index;
while (index < length && count < maximum)
{
unsigned short code = text[index];
struct element *element = &elements[count];
long last = index;
int kind;
if (code == '|' && index + 1 < length)
{
unsigned short next = text[index + 1];
if (narrow ? text_filter_style_code(next) : 1)
{
last = index + 1;
if (next == 'n' || (narrow && next == 't'))
{
element->letters = 0;
element->kind = _element_space;
element->code = ' ';
element->first = (short)index;
element->last = (short)last;
count++;
index = last + 1;
continue;
}
if (narrow)
{
/* a style code: not drawn */
index = last + 1;
continue;
}
/* a wide string's "|": drawn, the character after it not */
}
}
kind = text_filter_classify(code, &element->letters);
if (kind < 0)
{
index++;
continue;
}
element->kind = (unsigned char)kind;
element->code = code >= 'A' && code <= 'Z' ? (unsigned short)(code - 'A' + 'a') : code;
element->first = (short)index;
element->last = (short)last;
count++;
index = last + 1;
}
/* pairs read as one letter */
for (element_index = 0; element_index < count; element_index++)
{
unsigned short first = elements[element_index].code;
unsigned short second = element_index + 1 < count ? elements[element_index + 1].code : 0;
unsigned long pair = 0;
if (first == 'p' && second == 'h') pair = LETTER('f');
else if (first == 'v' && second == 'v') pair = LETTER('w');
else if (first == '\\' && second == '/') pair = LETTER('v');
else if (first == '/' && second == '\\') pair = LETTER('a');
else if (first == '|' && second == '<') pair = LETTER('k');
else if (first == '>' && second == '<') pair = LETTER('x');
else if (first == '(' && second == ')') pair = LETTER('o');
else if (first == '[' && second == ']') pair = LETTER('o');
else if (first == '|' && second == ')') pair = LETTER('d');
elements[element_index].pair = pair;
}
return count;
}
/* ---------- matching */
struct attempt
{
struct element const *elements;
long count;
char const *letters;
long length;
int rule;
long start;
long end;
};
/* what a match has crossed so far */
struct path
{
long wildcards;
long real_letters;
long piece;
long longest_piece;
int spaced;
int crossed;
};
static int text_filter_try_letter(struct attempt *attempt, long term_index, long element_index, struct path path);
static int text_filter_word_character(
struct element const *element)
{
return element->kind == _element_letter;
}
/* whether an allowed word covers the match, inside the word it is in */
static int text_filter_allowed(
struct attempt const *attempt)
{
long word_start = attempt->start;
long word_end = attempt->end;
long index;
while (word_start > 0 &&
(attempt->elements[word_start - 1].kind == _element_letter || attempt->elements[word_start - 1].kind == _element_digit))
{
word_start--;
}
while (word_end < attempt->count &&
(attempt->elements[word_end].kind == _element_letter || attempt->elements[word_end].kind == _element_digit))
{
word_end++;
}
for (index = 0; index < text_filter_words.allowed_count; index++)
{
char const *allowed = text_filter_words.allowed_characters + text_filter_words.allowed[index];
long length = (long)strlen(allowed);
long at;
for (at = word_start; at + length <= word_end; at++)
{
long offset;
if (at > attempt->start || at + length < attempt->end)
continue;
for (offset = 0; offset < length; offset++)
{
if (!(attempt->elements[at + offset].letters & LETTER(allowed[offset])))
break;
}
if (offset == length)
return 1;
}
}
return 0;
}
/* the term read to the element before end: whether the match stands */
static int text_filter_finish(
struct attempt *attempt,
long end,
struct path path)
{
struct element const *elements = attempt->elements;
int start_boundary = attempt->start == 0 || !text_filter_word_character(&elements[attempt->start - 1]);
int end_boundary = end >= attempt->count || !text_filter_word_character(&elements[end]);
if (path.piece > path.longest_piece)
path.longest_piece = path.piece;
/* any letter (* ? #) once in a short word, twice in a longer one, and
never in a word of three letters */
if (path.wildcards && (attempt->length < 4 || path.wildcards > (attempt->length <= 5 ? 1 : 2)))
return 0;
/* a third of the letters letters, not digits or symbols (not "8008") */
if (!path.real_letters || path.real_letters * 3 < attempt->length)
return 0;
/* across spaces: pieces of a letter or two, or whole words */
if (path.spaced && path.longest_piece > 2 && !(start_boundary && end_boundary))
return 0;
switch (attempt->rule)
{
case _text_filter_start:
if (!start_boundary)
return 0;
break;
case _text_filter_whole:
if (!start_boundary)
return 0;
if (!end_boundary)
{
/* or with "s", or "es" after s, x, z, ch or sh */
long after = end;
char last = attempt->letters[attempt->length - 1];
char before_last = attempt->length > 1 ? attempt->letters[attempt->length - 2] : 0;
if ((last == 's' || last == 'x' || last == 'z' || (last == 'h' && (before_last == 'c' || before_last == 's'))) &&
after < attempt->count && (elements[after].letters & LETTER('e')) && elements[after].kind == _element_letter &&
after + 1 < attempt->count && (elements[after + 1].letters & LETTER('s')))
{
after++;
}
if (after < attempt->count && (elements[after].letters & LETTER('s')) &&
(elements[after].kind == _element_letter || elements[after].kind == _element_digit) &&
(after + 1 >= attempt->count || !text_filter_word_character(&elements[after + 1])))
{
end = after + 1;
}
else
{
return 0;
}
}
break;
}
if (!path.crossed)
{
attempt->end = end;
if (text_filter_allowed(attempt))
return 0;
}
attempt->end = end;
return 1;
}
/* the term's letter at term_index from element_index on, after what came
before (spaces and punctuation between letters skipped, at most
MAXIMUM_GAP) */
static int text_filter_next(
struct attempt *attempt,
long term_index,
long element_index,
long gap,
int spaced,
struct path path)
{
struct element const *element;
if (term_index == attempt->length)
return text_filter_finish(attempt, element_index, path);
if (element_index >= attempt->count)
return 0;
element = &attempt->elements[element_index];
if (gap > 0)
{
path.crossed = 1;
if (spaced)
{
path.spaced = 1;
if (path.piece > path.longest_piece)
path.longest_piece = path.piece;
path.piece = 0;
}
}
if ((element->letters || element->pair) && text_filter_try_letter(attempt, term_index, element_index, path))
return 1;
if (term_index > 0 && gap < MAXIMUM_GAP &&
(element->kind == _element_space || element->kind == _element_punctuation ||
element->kind == _element_symbol || element->kind == _element_wildcard))
{
return text_filter_next(attempt, term_index, element_index + 1, gap + 1,
spaced || element->kind == _element_space, path);
}
return 0;
}
/* after the term's letter at term_index, read to element end: the same
letter again ("fuuuck") is part of it, unless the term has it twice; for a
short whole word, only three or more of it ("woops" is not a short word's
"o" twice) */
static int text_filter_after(
struct attempt *attempt,
long term_index,
long end,
struct path path)
{
char letter = attempt->letters[term_index];
if (term_index + 1 >= attempt->length || attempt->letters[term_index + 1] != letter)
{
long repeated = end;
while (repeated < attempt->count &&
(attempt->elements[repeated].kind == _element_letter || attempt->elements[repeated].kind == _element_digit) &&
(attempt->elements[repeated].letters & LETTER(letter)))
{
repeated++;
}
if (repeated != end &&
(attempt->rule != _text_filter_whole || attempt->length > 4 || repeated - end >= 2))
{
struct path longer = path;
longer.piece += repeated - end;
if (text_filter_next(attempt, term_index + 1, repeated, 0, 0, longer))
return 1;
}
}
return text_filter_next(attempt, term_index + 1, end, 0, 0, path);
}
static int text_filter_try_letter(
struct attempt *attempt,
long term_index,
long element_index,
struct path path)
{
struct element const *element = &attempt->elements[element_index];
unsigned long letter = LETTER(attempt->letters[term_index]);
if (element->letters & letter)
{
struct path one = path;
one.piece++;
if (element->kind == _element_wildcard)
one.wildcards++;
else if (element->kind == _element_letter)
one.real_letters++;
if ((element->kind != _element_wildcard || term_index > 0) &&
text_filter_after(attempt, term_index, element_index + 1, one))
{
return 1;
}
}
if (element->pair & letter)
{
struct path two = path;
two.piece++;
if (element->kind == _element_letter)
two.real_letters++;
if (text_filter_after(attempt, term_index, element_index + 2, two))
return 1;
}
return 0;
}
/* which code units of the text (of a wide string, or narrow: char's widened)
spell a term of a group whose level its severity reaches (levels: one for
each group, _text_filter_off or the least severity hidden), marked in
censored (as long as the text); how many */
long text_filter_censor(
unsigned short const *text,
long length,
int narrow,
unsigned char const *levels,
unsigned char *censored)
{
static struct element elements[TEXT_FILTER_MAXIMUM_LENGTH];
long count;
long start;
long marked = 0;
memset(censored, 0, length);
if (!text_filter_words.ready)
text_filter_words_reset();
if (!text_filter_words.sorted)
text_filter_words_sort();
count = text_filter_elements(text, length, narrow, elements, TEXT_FILTER_MAXIMUM_LENGTH);
for (start = 0; start < count; start++)
{
unsigned long letters = elements[start].kind == _element_wildcard ? 0 : (elements[start].letters | elements[start].pair);
long letter;
for (letter = 0; letters && letter < 26; letter++)
{
long order;
if (!(letters & (1UL << letter)))
continue;
for (order = text_filter_words.first[letter]; order < text_filter_words.first[letter + 1]; order++)
{
struct term const *term = &text_filter_words.terms[text_filter_words.order[order]];
struct attempt attempt;
struct path path;
if (levels[term->group] == _text_filter_off || term->severity < levels[term->group])
continue;
attempt.elements = elements;
attempt.count = count;
attempt.letters = text_filter_words.characters + term->offset;
attempt.length = term->length;
attempt.rule = term->rule;
attempt.start = start;
attempt.end = start;
memset(&path, 0, sizeof(path));
if (text_filter_try_letter(&attempt, 0, start, path))
{
long unit;
for (unit = elements[start].first; unit <= elements[attempt.end - 1].last; unit++)
{
if (!censored[unit])
{
censored[unit] = 1;
marked++;
}
}
}
}
}
}
return marked;
}
+688
View File
@@ -0,0 +1,688 @@
/* port/linux/game/text_filter_terms.inc: streamer mode's words, written by
tools/text_filter_terms.py from Surge AI's profanity_en.csv
(sha256 ca4ff7d713a8e6f6ec2616f489cd09f6fb96b8b3af404a207783be58a91f3ede) and port/assets/text_filter/review.txt and allow.txt.
Each term's letters are xor'd with TEXT_FILTER_TERM_KEY. Do not edit. */
#define TEXT_FILTER_TERM_KEY 0x5A
static struct text_filter_term_definition const text_filter_term_definitions[] =
{
{ _text_filter_insults, 1, _text_filter_anywhere, "\x3D\x33\x28\x36\x33\x3F\x38\x35\x23" },
{ _text_filter_insults, 1, _text_filter_anywhere, "\x3D\x33\x28\x36\x23\x38\x35\x23" },
{ _text_filter_insults, 1, _text_filter_anywhere, "\x29\x39\x2F\x37\x37\x23" },
{ _text_filter_insults, 1, _text_filter_whole, "\x39\x2F\x39\x31" },
{ _text_filter_insults, 1, _text_filter_whole, "\x3E\x35\x36\x2E" },
{ _text_filter_insults, 1, _text_filter_whole, "\x30\x3F\x28\x31" },
{ _text_filter_insults, 1, _text_filter_whole, "\x34\x35\x34\x39\x3F" },
{ _text_filter_insults, 1, _text_filter_whole, "\x29\x39\x2F\x37" },
{ _text_filter_insults, 1, _text_filter_whole, "\x29\x33\x29\x29\x23" },
{ _text_filter_insults, 1, _text_filter_whole, "\x2E\x35\x29\x29\x3F\x28" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x38\x3B\x29\x29\x2E\x2F\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x38\x3B\x29\x2E\x3B\x28\x3E\x33\x29\x32" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x38\x3B\x29\x2E\x3B\x28\x3E\x29" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x38\x3B\x29\x2E\x3F\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x38\x3B\x29\x2E\x2F\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x3E\x2F\x37\x38\x38\x3B\x29\x2E\x3B\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2A\x3F\x3E\x35\x38\x3F\x3B\x28" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2A\x3F\x3E\x35\x2A\x32\x33\x36\x3F" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2A\x3F\x3E\x35\x2A\x32\x36" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2A\x3F\x3E\x35\x20" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x28\x3B\x2E\x38\x3B\x29\x2E\x3B\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x28\x3B\x2E\x38\x3B\x20\x2E\x3B\x3E" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2E\x2F\x28\x3E\x39\x2F\x2E\x2E\x3F\x28" },
{ _text_filter_insults, 2, _text_filter_anywhere, "\x2E\x2F\x28\x3E\x32\x3F\x3B\x3E" },
{ _text_filter_insults, 2, _text_filter_whole, "\x38\x3B\x29\x2E\x3B\x28\x3E" },
{ _text_filter_insults, 2, _text_filter_whole, "\x38\x3B\x29\x2E\x33\x3E" },
{ _text_filter_insults, 2, _text_filter_whole, "\x3D\x35\x2D\x36" },
{ _text_filter_insults, 2, _text_filter_whole, "\x31\x23\x29" },
{ _text_filter_insults, 2, _text_filter_whole, "\x2A\x3F\x3E\x35" },
{ _text_filter_insults, 2, _text_filter_whole, "\x2A\x3F\x3E\x35\x29" },
{ _text_filter_insults, 2, _text_filter_whole, "\x2E\x32\x35\x2E" },
{ _text_filter_insults, 2, _text_filter_whole, "\x2E\x2F\x28\x3E" },
{ _text_filter_insults, 3, _text_filter_anywhere, "\x31\x33\x36\x36\x2F\x28\x29\x3F\x36\x3C" },
{ _text_filter_insults, 3, _text_filter_anywhere, "\x31\x33\x36\x36\x23\x35\x2F\x28\x29\x3F\x36\x3C" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x38\x3F\x3B\x34\x2B\x2F\x3F\x3F\x34" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x3C\x2F\x3E\x3D\x3F\x2A\x3B\x39\x31\x3F\x28" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x35\x2C\x3F\x34\x3E\x35\x3E\x3D\x3F\x28" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x3B\x39\x31\x3F\x28\x3C\x2F\x3E\x3D\x3F\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x3B\x39\x31\x33\x34\x3D\x3C\x2F\x3E\x3D\x3F" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x3B\x39\x31\x37\x23\x3C\x2F\x3E\x3D\x3F" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x3B\x34\x39\x3B\x31\x3F\x3C\x3B\x39\x3F" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x3F\x2E\x3F\x28\x2A\x2F\x3C\x3C\x3F\x28" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2A\x33\x36\x36\x35\x2D\x38\x33\x2E\x3F\x28" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x28\x3F\x3E\x29\x31\x33\x34" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2E\x3B\x39\x35\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2D\x33\x34\x3E\x35\x2D\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x2D\x35\x2A\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x20\x33\x2A\x33\x34\x2E\x32\x3F\x2D\x33\x28\x3F" },
{ _text_filter_slurs, 2, _text_filter_anywhere, "\x20\x33\x2A\x2A\x3F\x28\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 2, _text_filter_start, "\x3B\x38\x35\x3F" },
{ _text_filter_slurs, 2, _text_filter_start, "\x3D\x28\x35\x33\x3E" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x3B\x38\x3F\x3F\x3E" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x3B\x38\x35" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x38\x36\x3B\x39\x31\x23" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x39\x35\x35\x36\x33\x3F" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x3E\x3B\x3D\x35" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x3D\x23\x2A" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x3D\x23\x2A\x29\x23" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x32\x3F\x38\x3F" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x32\x3F\x3F\x38" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x33\x34\x30\x2F\x34" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x31\x31\x31" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x31\x36\x3B\x34" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x37\x35\x34\x3D" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x37\x35\x34\x3D\x35\x36\x35\x33\x3E" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x29\x3B\x37\x38\x35" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x29\x32\x23\x36\x35\x39\x31" },
{ _text_filter_slurs, 2, _text_filter_whole, "\x2D\x35\x2A" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x38\x3F\x3B\x34\x3F\x28\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x3B\x37\x3F\x36\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x3B\x28\x2A\x3F\x2E\x37\x2F\x34\x39\x32\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x3B\x28\x2A\x3F\x2E\x37\x2F\x34\x39\x32\x33\x34\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x32\x33\x34\x3B\x2C\x33\x28\x2F\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x32\x33\x34\x3F\x29\x3F\x2C\x33\x28\x2F\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x32\x33\x34\x3D\x39\x32\x35\x34\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x32\x33\x34\x31\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x39\x35\x2E\x2E\x35\x34\x2A\x33\x39\x31\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3E\x3B\x28\x31\x33\x3F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3E\x35\x2E\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3E\x2F\x34\x3F\x39\x35\x35\x34" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x38\x3B\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x3F\x2E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x3D\x35\x2E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x2B\x2F\x3F\x3F\x34" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x3B\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x3C\x2F\x28\x3C\x3B\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x32\x3F\x33\x36\x32\x33\x2E\x36\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3B\x38\x35\x35" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3D\x3B\x38\x35\x35" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3D\x3B\x38\x2F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3D\x3B\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3D\x3F\x28\x38\x35\x35" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x30\x33\x3D\x3D\x23\x38\x35\x35" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x31\x33\x31\x3F\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x31\x34\x3F\x3F\x3D\x28\x35\x2D\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x31\x2F\x31\x36\x2F\x22\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x31\x23\x31\x3F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x36\x3B\x3E\x38\x35\x23\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x36\x3B\x3E\x38\x35\x23\x20" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x36\x3B\x3E\x33\x38\x35\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x36\x3B\x3E\x23\x38\x35\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x37\x3F\x39\x32\x3B\x3C\x3B\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x37\x3F\x3D\x3B\x3C\x3B\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x3F\x3D\x28\x35\x3F\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x39\x31\x3B\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x3B\x32" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x3D\x3B" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x3D\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x3D\x33\x28" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x3D\x2F\x32" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x36\x3F\x2E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x34\x33\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x34\x35\x3D" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x3D\x2F\x32" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x33\x31\x31\x3B\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x34\x2F\x39\x31\x3B\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2A\x32\x3B\x3D\x3D\x35\x2E\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2A\x32\x3B\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2A\x35\x28\x39\x32\x37\x35\x34\x31\x3F\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x28\x3B\x3D\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x28\x3F\x2E\x3B\x28\x3E\x35" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x32\x3F\x37\x3B\x36\x3F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x32\x37\x3B\x36\x3F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x33\x3F\x3D\x32\x3F\x33\x36" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x36\x3B\x34\x2E\x3F\x23\x3F" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x36\x3B\x34\x2E\x3C\x28\x3F\x3B\x31" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x36\x3B\x34\x2E\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x29\x2A\x33\x22" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2E\x3B\x28\x38\x3B\x38\x23" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2E\x35\x2D\x3F\x36\x32\x3F\x3B\x3E" },
{ _text_filter_slurs, 3, _text_filter_anywhere, "\x2D\x3F\x2E\x38\x3B\x39\x31" },
{ _text_filter_slurs, 3, _text_filter_start, "\x3C\x3B\x3D\x3D\x23" },
{ _text_filter_slurs, 3, _text_filter_start, "\x3C\x36\x3B\x37\x3F\x28\x29" },
{ _text_filter_slurs, 3, _text_filter_start, "\x32\x33\x3D\x3D\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_start, "\x32\x33\x3D\x3D\x3F\x28\x29" },
{ _text_filter_slurs, 3, _text_filter_start, "\x34\x33\x39\x39\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_start, "\x34\x33\x3D\x3F\x28\x29" },
{ _text_filter_slurs, 3, _text_filter_start, "\x34\x33\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_start, "\x34\x33\x31\x31\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_start, "\x2A\x32\x3B\x3D\x3D\x35\x2E" },
{ _text_filter_slurs, 3, _text_filter_start, "\x2A\x32\x3B\x3D\x35\x2E" },
{ _text_filter_slurs, 3, _text_filter_start, "\x29\x2A\x33\x39\x29" },
{ _text_filter_slurs, 3, _text_filter_start, "\x2D\x33\x3D\x3D\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x38\x3F\x3B\x34\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x39\x32\x33\x34\x31" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x39\x35\x35\x34" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x39\x35\x35\x34\x33\x3F" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x39\x35\x35\x34\x33\x3F\x29" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x39\x35\x35\x34\x29" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3E\x3B\x28\x31\x23" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3E\x23\x31\x3F" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3C\x3B\x3D" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3C\x3B\x3D\x3D\x33\x34\x3D" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3C\x3B\x3D\x3D\x35" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3C\x3B\x3D\x35\x2E" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3C\x36\x3B\x37\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x3D\x35\x35\x31" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x32\x33\x3D\x3D\x3B" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x30\x3B\x2A" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x30\x33\x3D\x3D\x29" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x31\x33\x31\x3F" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x3F\x3D\x3D\x3B" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x3F\x3D\x3D\x3B\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x3F\x3D\x28\x35" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x3F\x3D\x28\x35\x33\x3E" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x39\x31\x3B" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x39\x31\x31\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x3D" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x3D\x3B" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x3D\x3D\x3D\x3F\x28" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x3D\x3D\x28\x3F\x29\x29" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x34\x33\x3D\x28\x3B" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x2A\x3B\x31\x33" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x28\x3F\x2E\x3B\x28\x3E" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x28\x3F\x2E\x3B\x28\x3E\x3F\x3E" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x29\x2A\x33\x39" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x29\x2A\x33\x3D" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x29\x2A\x33\x31" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x2E\x3B\x28\x3E" },
{ _text_filter_slurs, 3, _text_filter_whole, "\x2E\x28\x3B\x34\x34\x23" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x3B\x38\x23\x38\x3B\x2E\x2E\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x3B\x36\x36\x29\x3B\x39\x31" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x3F\x3B\x2E\x35\x3C\x3C" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x3F\x36\x36\x3F\x34\x3E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x3F\x2D\x38\x29" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x2F\x3D\x3D\x3F\x28\x35\x3C\x3C" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x2F\x2E\x2E\x32\x35\x36\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x2F\x2E\x2E\x37\x2F\x34\x39\x32\x3F\x28\x29" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x38\x2F\x2E\x2E\x2A\x33\x28\x3B\x2E\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x39\x3B\x37\x3F\x36\x2E\x35\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x39\x32\x35\x31\x3F\x2E\x32\x3F\x39\x32\x33\x39\x31\x3F\x34" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3E\x35\x2F\x39\x32\x3F\x38\x3B\x3D" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3E\x35\x2F\x39\x32\x3F\x39\x3B\x34\x35\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3C\x2F\x34\x38\x3B\x3D\x29" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3D\x33\x28\x36\x23\x38\x33\x2E\x29" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3D\x35\x3E\x3B\x37\x34\x33\x2E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3D\x35\x3E\x3E\x3B\x37\x37\x33\x2E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3D\x35\x3E\x3E\x3B\x37\x34\x33\x2E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x3D\x35\x2E\x35\x32\x3F\x36\x36" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x30\x3B\x39\x31\x35\x3C\x3C" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x37\x3B\x34\x39\x32\x35\x2D\x3E\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x37\x3B\x34\x29\x3F\x3F\x3E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x37\x2F\x29\x32\x28\x35\x35\x37\x2E\x33\x2A" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2A\x3B\x36\x37\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2A\x33\x29\x29\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2A\x33\x29\x29\x35\x3C\x3C" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2A\x2F\x36\x36\x2E\x32\x3F\x2A\x2F\x3E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x28\x3F\x3B\x39\x32\x3B\x28\x35\x2F\x34\x3E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x29\x39\x32\x36\x35\x34\x3D" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x29\x32\x36\x35\x34\x3D" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x29\x2E\x2F\x37\x2A\x39\x32\x3F\x2D\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2E\x3B\x3E\x3D\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2E\x3B\x31\x33\x34\x3D\x2E\x32\x3F\x2A\x33\x29\x29" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2E\x3B\x36\x36\x23\x2D\x3B\x39\x31\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2E\x33\x39\x31\x36\x3F\x2E\x32\x3F\x2A\x33\x39\x31\x36\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2E\x28\x35\x2F\x29\x3F\x28\x29\x34\x3B\x31\x3F" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2F\x2A\x29\x31\x33\x28\x2E" },
{ _text_filter_swearing, 1, _text_filter_anywhere, "\x2D\x32\x3B\x39\x31\x35\x3C\x3C" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x38\x35\x34\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x38\x35\x35\x38\x29" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x38\x2F\x3D\x3D\x3F\x28" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x38\x2F\x2E\x2E" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3E\x3B\x37\x34" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3E\x33\x36\x3E\x35" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3E\x35\x35\x29\x32" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3E\x35\x2F\x39\x32\x3F" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3D\x35\x3E\x3E\x3B\x37" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3D\x35\x3E\x3E\x3B\x37\x34" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x3D\x35\x3E\x3E\x3B\x37\x34\x3F\x3E" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x32\x3F\x36\x36" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x32\x35\x28\x34\x23" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x35\x28\x3D\x3B\x29\x37" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x2A\x33\x29\x29" },
{ _text_filter_swearing, 1, _text_filter_whole, "\x2E\x33\x2E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x32\x3F\x3D\x3B\x35" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x3B\x36\x32\x35\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x3B\x36\x32\x35\x28\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x3B\x36\x33\x34\x3D\x2F\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x3B\x36\x2A\x33\x28\x3B\x2E\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x3B\x36\x2A\x36\x2F\x3D" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x34\x33\x36\x33\x34\x3D\x2F\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x28\x29\x3F\x38\x3B\x34\x3E\x33\x2E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x28\x29\x3F\x3D\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x28\x29\x3F\x32\x35\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x28\x29\x3F\x29\x32\x3B\x3D\x3D\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3B\x28\x29\x3F\x2D\x33\x2A\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x3B\x36\x36\x38\x3B\x3D" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x3F\x3F\x35\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x3F\x23\x35\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x3F\x23\x35\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x3B\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x35\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x3F\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x3F\x20" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x32\x35\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x33\x34\x3D" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x36\x33\x31\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x34\x3F\x29\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x2E\x33\x2E\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x2E\x39\x32\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x33\x20\x20\x3B\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x36\x35\x2D\x3B\x36\x35\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x36\x35\x2D\x30\x35\x38" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x36\x2F\x37\x2A\x31\x33\x34" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x35\x36\x36\x35\x39\x31" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x35\x36\x36\x35\x22" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x38\x2E\x35\x2E\x32\x3F\x33\x34\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x3B\x37\x3D\x33\x28\x36" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x32\x35\x3B\x3E\x34\x3F\x39\x2E\x3B\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x36\x33\x2E\x36\x33\x39\x31\x3F\x28\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x35\x38\x38\x31\x34\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x28\x3B\x20\x23\x29\x35\x38" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x28\x3F\x3B\x37\x2A\x33\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x39\x2F\x34\x34\x33\x36\x33\x34\x3D\x2F\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x33\x28\x2E\x23\x29\x3B\x34\x39\x32\x3F\x20" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x35\x3D\x3D\x35\x29\x2E\x23\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x35\x3D\x3D\x23\x29\x2E\x23\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x35\x3D\x33\x3F\x29\x2E\x23\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x35\x3D\x29\x2E\x23\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3E\x2F\x37\x2A\x3B\x36\x35\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3F\x28\x3F\x39\x2E\x35\x2A\x36\x3B\x29\x37" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3C\x3F\x39\x31\x3B\x28\x29\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3C\x3F\x36\x36\x3B\x2E\x33\x35\x3B\x3C\x33\x39\x33\x35\x34\x3B\x3E\x35" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3C\x3F\x36\x36\x3B\x2E\x35\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3C\x2F\x2E\x3B\x34\x3B\x28\x33" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3D\x3B\x29\x32\x29\x2E\x3B\x38\x38\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x3D\x33\x34\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x32\x3B\x28\x28\x23\x2A\x3B\x36\x37\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x32\x3F\x34\x2E\x3B\x33" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x32\x35\x3F\x38\x3B\x3D" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3B\x39\x31\x3B\x28\x29\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3B\x39\x31\x35\x3C\x3C\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3B\x39\x31\x35\x3C\x3C\x20" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3B\x3D\x35\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3B\x33\x36\x38\x3B\x33\x2E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3F\x28\x31\x33\x34\x3D\x35\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3F\x28\x31\x35\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x3F\x28\x31\x29\x35\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x30\x35\x3C\x3C\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x33\x3E\x3E\x23\x2E\x35\x2F\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x33\x3E\x2E\x35\x2F\x39\x32\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x33\x2E\x2E\x23\x2A\x2F\x34\x39\x32\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x36\x33\x2E\x35\x28\x33\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x34\x35\x38\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x34\x35\x38\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x34\x35\x38\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x31\x34\x35\x38\x3D\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x37\x3F\x3B\x2E\x39\x2F\x28\x2E\x3B\x33\x34\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x38\x23\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x30\x35\x39\x31\x33\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x30\x35\x39\x31\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x35\x38\x30\x35\x31\x3F\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x34\x2F\x2E\x29\x3B\x39\x31" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x3F\x39\x31\x3F\x28\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x35\x36\x3F\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x35\x36\x3F\x29\x37\x35\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x35\x36\x3F\x29\x2F\x39\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x35\x28\x34" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x28\x33\x39\x31\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x28\x33\x39\x31\x3D\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x28\x33\x39\x31\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2A\x2F\x34\x3B\x34\x33" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x28\x33\x37\x30\x35\x38" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x3B\x36\x3B\x3E\x2E\x35\x29\x29\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x31\x3B\x34\x31" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x36\x2F\x2E\x32\x35\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x36\x2F\x2E\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x36\x2F\x2E\x2E\x23" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x35\x34\x34\x3B\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x35\x34\x35\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x35\x34\x35\x3C\x3B\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x35\x2A\x2A\x23\x38\x35\x36\x36\x2F\x39\x31\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x2E\x2F\x2A\x33\x3E\x32\x35\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x2F\x37\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x29\x2F\x37\x35\x3C\x3B\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x32\x28\x35\x3B\x2E\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x32\x28\x35\x3B\x2E\x23\x35\x3D\x2F\x28\x2E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x35\x29\x29\x33\x34\x3D\x29\x3B\x36\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x2D\x3B\x2E\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x2D\x3B\x2E\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x2D\x3B\x2E\x2E\x33\x29\x32" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x2D\x3B\x2E\x2D\x3B\x3C\x3C\x36\x3F" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2E\x2D\x3B\x2E\x20\x33\x36\x36\x3B" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2D\x3B\x34\x31\x3F\x28\x29" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2D\x3B\x34\x31\x35\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2D\x32\x35\x3B\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2D\x33\x36\x36\x23\x2D\x32\x3B\x39\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_anywhere, "\x2D\x34\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_start, "\x38\x33\x39\x32\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_start, "\x38\x33\x29\x32\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_start, "\x39\x32\x35\x3B\x3E" },
{ _text_filter_swearing, 2, _text_filter_start, "\x39\x32\x35\x39\x32\x3B" },
{ _text_filter_swearing, 2, _text_filter_start, "\x33\x34\x39\x3F\x29\x2E" },
{ _text_filter_swearing, 2, _text_filter_start, "\x29\x35\x3B\x38" },
{ _text_filter_swearing, 2, _text_filter_start, "\x2D\x3B\x34\x31\x3F\x3E" },
{ _text_filter_swearing, 2, _text_filter_start, "\x2D\x3B\x34\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_start, "\x2D\x3B\x34\x31\x33\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_start, "\x2D\x3B\x34\x31\x33\x34\x3D" },
{ _text_filter_swearing, 2, _text_filter_start, "\x2D\x3B\x34\x31\x29" },
{ _text_filter_swearing, 2, _text_filter_start, "\x23\x33\x3C\x3C" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x3B\x34\x3B\x36" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x3B\x28\x29\x3F" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x38\x33\x2E\x39\x32" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x38\x33\x2E\x39\x32\x33\x34" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x39\x36\x33\x2E" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x3C\x3F\x36\x36\x3B\x2E\x33\x35" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x3C\x2F\x2E\x3B" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x32\x35\x3F" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x32\x35\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x31\x34\x35\x38" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x37\x3B\x29\x2E\x2F\x28\x38\x3B\x2E\x3F" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x37\x33\x36\x3C" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x34\x2F\x3E\x3F\x29" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2A\x3F\x39\x31\x3F\x28" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2A\x28\x33\x39\x31" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2A\x28\x33\x39\x31\x29" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x28\x3B\x2A\x3F" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x28\x3B\x2A\x33\x29\x2E" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x29\x36\x3B\x3D" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x29\x36\x2F\x2E" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2E\x2D\x3B\x2E" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2E\x2D\x3B\x2E\x2E" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2D\x3B\x34\x31" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2D\x32\x35\x28\x3F" },
{ _text_filter_swearing, 2, _text_filter_whole, "\x2D\x32\x35\x28\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x32\x35\x36\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x38\x3B\x34\x3E\x33\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x3F\x3B\x2E\x33\x34\x3D\x34\x35\x38\x30\x35\x31\x3F\x23\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x32\x3B\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x32\x35\x36\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x31\x33\x29\x29\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x36\x33\x39\x31\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x37\x2F\x34\x39\x32" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x2D\x32\x35\x36\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x29\x29\x2D\x33\x2A\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3B\x20\x20\x32\x35\x36\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x38\x3F\x29\x2E\x33\x3B\x36\x33\x2E\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x38\x35\x33\x35\x36\x3B\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x3B\x2D\x31\x37\x2F\x34\x39\x32\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x3B\x2D\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x38\x35\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x3E\x28\x35\x2A\x36\x3F\x2E\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x3F\x3B\x2E\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x3D\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x32\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x31\x34\x35\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x37\x35\x34\x3D\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x37\x2F\x34\x39\x32" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x28\x33\x3E\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x31\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x37\x35\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x34\x35\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x2F\x39\x39" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x2F\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x29\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x31\x2E\x3F\x3B\x29\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x39\x29\x2F\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x31\x37\x2F\x34\x39\x32\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x35\x31\x29\x2F\x39\x31\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x28\x3B\x20\x23\x37\x35\x3C\x35\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x31\x29\x2F\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x31\x29\x2F\x31\x31\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x37\x3E\x2F\x37\x2A\x29\x2E\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x37\x3D\x35\x35\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x37\x29\x36\x2F\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x2F\x34\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x39\x23\x38\x3F\x28\x3C\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x3B\x3C\x2F\x2B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x38\x28\x3F\x3B\x2E\x32" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x3C\x3B\x39\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x3D\x35\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x30\x35\x39\x31\x33\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x36\x3F\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x37\x33\x36\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x37\x2F\x34\x39\x32\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x34\x33\x38\x38\x36\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x29\x31\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x29\x36\x3B\x2A\x2A\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x29\x37\x35\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x29\x2F\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x2C\x3B\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x39\x31\x20" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x31\x32\x3F\x3B\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x2A\x29\x32\x3B\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x33\x2A\x29\x32\x33\x3E\x33\x35\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x36\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x35\x2F\x38\x36\x3F\x3E\x33\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x2F\x37\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x2F\x37\x38\x3B\x28\x28\x3B\x29\x29\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3E\x2F\x37\x38\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x3B\x39\x31\x2F\x32\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x3B\x2E\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x39\x2F\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x23\x3F\x3B\x32" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x31\x23\x35\x2F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x39\x2C\x31\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x3F\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x38\x34\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x38\x2F\x34\x34\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x31\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x35\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x35\x35\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x35\x35\x31\x2F\x32" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x35\x2E\x32\x3F\x28\x37\x2F\x39\x31\x3F\x28\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x39\x3F\x28\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x39\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x39\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x39\x22" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x3D\x3D\x3F\x28\x20" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x3D\x3D\x33\x34\x3D\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x3D\x36\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x39\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x32\x3F\x3B\x3E\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x2F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x31\x2D\x33\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2F\x2E\x32\x3B\x37\x2F\x39\x31\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x2C\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x3C\x22\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x32\x35\x28\x29\x3F\x29\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x3B\x39\x31\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x38\x3B\x3D\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x3F\x3B\x2E\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x29\x3B\x39\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x30\x33\x20\x20\x29\x2E\x3B\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x31\x33\x3E\x3E\x33\x3E\x3E\x36\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x31\x33\x29\x29\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x31\x33\x29\x29\x37\x23\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x36\x35\x36\x33\x39\x35\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x3B\x28\x31\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x3C\x35\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x3C\x2F\x39\x39\x31\x3F\x28\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x3C\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3B\x3C\x2F\x39\x39" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x3F\x3C\x3C\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x3C\x3B\x39\x31\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x3C\x3F\x39\x31\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x3C\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3F\x28\x3C\x2F\x39\x39\x3B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x35\x2E\x32\x3C\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x2F\x3E\x3E\x3F\x28\x3C\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x2F\x3C\x3E\x33\x2C\x3F" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x2F\x3C\x3E\x33\x2C\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x2F\x3C\x3C\x3E\x33\x2C\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x37\x2F\x3C\x3C\x33\x34\x3E\x33\x2C\x33\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x35\x39\x2E\x35\x2A\x2F\x29\x29\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x32\x2F\x39" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x32\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x32\x2F\x2B" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x32\x2C\x39\x31\x33\x34\x3D\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x34\x31\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x29\x29\x36\x3F\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x29\x29\x36\x33\x39\x31\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x29\x29\x23\x36\x33\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x29\x29\x23\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x29\x29\x23\x2D\x32\x33\x2A\x2A\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x20\x20\x33\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2A\x2F\x20\x20\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x3B\x2F\x29\x3B\x3D\x3F\x30\x35\x39\x31\x3F\x23" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x32\x3F\x33\x29\x2E\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x32\x33\x2A\x3E\x33\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x32\x33\x2E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x32\x35\x2E\x3B\x39\x35\x34" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x2E\x2F\x2A\x33\x3E\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x2F\x39\x31\x37\x23\x39\x35\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x29\x2F\x39\x31\x37\x23\x3E" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2E\x3B\x28\x3E\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_anywhere, "\x2D\x33\x29\x3F\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x39\x3B\x2D\x31" },
{ _text_filter_swearing, 3, _text_filter_start, "\x39\x2F\x37\x38\x3B\x36\x36" },
{ _text_filter_swearing, 3, _text_filter_start, "\x39\x2F\x37\x20" },
{ _text_filter_swearing, 3, _text_filter_start, "\x39\x2F\x2F\x34\x2E" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3E\x3B\x28\x31\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x3B\x2E\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x2F\x3D\x3D\x3F\x3E" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x2F\x3D\x3D\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x2F\x31" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x2F\x2B" },
{ _text_filter_swearing, 3, _text_filter_start, "\x3C\x2F\x22" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x3C\x3F\x28" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x3C\x3F\x28\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x3C\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x3C\x31" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x3C\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x35\x3C\x35" },
{ _text_filter_swearing, 3, _text_filter_start, "\x37\x35\x3C\x35\x29" },
{ _text_filter_swearing, 3, _text_filter_start, "\x29\x2E\x3C\x2F" },
{ _text_filter_swearing, 3, _text_filter_start, "\x20\x35\x35\x2A\x32\x33\x36" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3B\x29\x29\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3B\x20\x20" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x38\x2F\x36\x36\x29\x32\x33" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x3B\x3B\x3B\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x3B\x39\x3B" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x3B\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x35\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x35\x39\x31\x36\x3F\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x35\x39\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x2F\x37" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x2F\x37\x37\x33\x34\x3D" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x39\x2F\x37\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3E\x33\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3E\x33\x39\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3E\x33\x3E\x3E\x36\x3F" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3E\x33\x31\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x3B\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x3B\x28\x2E" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x3F\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x33\x39\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x35\x35\x31" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x2F\x39" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x2F\x39\x39" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x3C\x2F\x39\x39\x3B" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x30\x3B\x39\x31\x3B\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x30\x3B\x39\x31\x3B\x29\x29\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x30\x33\x20\x20" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x30\x33\x20\x20\x23" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x36\x35\x36\x33" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x37\x2F\x3C\x3C" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x2A\x2F\x29\x29\x33\x3F" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x2A\x2F\x29\x29\x33\x3F\x29" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x2A\x2F\x29\x29\x23" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x2A\x2F\x2F\x29\x29\x23" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x29\x32\x3B\x2E" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x29\x32\x3F\x3F\x3F\x3F\x2E" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x29\x32\x3F\x2E" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x29\x32\x33\x3B\x2E" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x29\x32\x35\x2E\x3B" },
{ _text_filter_swearing, 3, _text_filter_whole, "\x2E\x33\x2E\x29" },
};
static char const *const text_filter_allowed_words[] =
{
"agapornis",
"assess",
"assesses",
"bereshith",
"brushite",
"chashitsu",
"cushite",
"cushitic",
"elkoshite",
"epornitic",
"epornitically",
"girgashite",
"kaneshite",
"koreishite",
"mackintoshite",
"marshite",
"matsushita",
"metabrushite",
"mishit",
"mishits",
"mishitting",
"niggard",
"nonporness",
"peshito",
"phage",
"phages",
"placuntitis",
"placuntoma",
"poorness",
"poornesses",
"rappist",
"scunthorpe",
"shiitake",
"shiite",
"shiites",
"shiitic",
"shitake",
"shittah",
"shittahs",
"shitterton",
"shittim",
"shittims",
"shittimwood",
"snigger",
"spoorn",
"unniggard",
"unporness",
"washita",
"wiggeries",
"wiggery",
};
+38 -1
View File
@@ -38,15 +38,52 @@ enum halo_keyboard_action
/* (voice chat's, which the game itself does not read:
halo_push_to_talk_held) */
HALO_KEYBOARD_PUSH_TO_TALK,
/* (the text chat's, which the game itself does not read: a line to
everyone, or to the team: port/linux/game/network_chat.c) */
HALO_KEYBOARD_CHAT,
HALO_KEYBOARD_TEAM_CHAT,
NUMBER_OF_HALO_KEYBOARD_ACTIONS
};
/* the actions the keyboard and mouse hold for the player on the controller
(a bit for each halo_keyboard_action): theirs is the first's; none while a
menu or the console is up */
menu or the console is up, or a chat line is typed */
unsigned long halo_keyboard_actions(short controller_index);
/* whether voice chat's push to talk is held (controls.push_to_talk), in the
game and in the menus alike */
int halo_push_to_talk_held(void);
/* the first controller's buttons (with the touch controls'), as the text
chat's on-screen keyboard reads them: a bit for each (port/linux/game/
network_chat.c). The game gets none of the controller while that keyboard is
up (network_chat_keyboard_open), nor the touch controls' stick and look */
enum halo_chat_pad_button
{
HALO_CHAT_PAD_UP,
HALO_CHAT_PAD_DOWN,
HALO_CHAT_PAD_LEFT,
HALO_CHAT_PAD_RIGHT,
HALO_CHAT_PAD_A,
HALO_CHAT_PAD_B,
HALO_CHAT_PAD_X,
HALO_CHAT_PAD_Y,
HALO_CHAT_PAD_START,
/* the left stick, pushed most of the way */
HALO_CHAT_PAD_STICK_UP,
HALO_CHAT_PAD_STICK_DOWN,
HALO_CHAT_PAD_STICK_LEFT,
HALO_CHAT_PAD_STICK_RIGHT,
NUMBER_OF_HALO_CHAT_PAD_BUTTONS
};
unsigned long halo_chat_pad_buttons(void);
/* the taps on the touchscreen outside the menus since the last call while
that keyboard is up, and where the latest was (0 to 1 across and down the
window) */
int halo_chat_taps(float *x, float *y);
/* whether the touch controls hold the screen's bottom left, where the chat
then goes at the top left: on Android, and in a browser once its touch
controls have been used */
int halo_chat_touch_layout(void);
#endif
+6
View File
@@ -1,4 +1,5 @@
version 29
bound CHAT_TEXT_SIZE 64
bound DISCORD_ID_SIZE 24
bound DISCORD_NAME_SIZE 40
bound DISTRIBUTED_INPUT_HISTORY 4
@@ -41,6 +42,9 @@ enum _distributed_actor_super_camouflaged_bit 5
enum _distributed_message_actor_damage 73
enum _distributed_message_actor_states 64
enum _distributed_message_batch 16
enum _distributed_message_chat_config 89
enum _distributed_message_chat_down 88
enum _distributed_message_chat_up 87
enum _distributed_message_client_identity 18
enum _distributed_message_client_ready 9
enum _distributed_message_coop_device_groups 68
@@ -218,6 +222,8 @@ struct distributed_actor_damage 96a57e13e2b8
struct distributed_actor_damage_message f985e899a708
struct distributed_actor_state 8bd5e771659d
struct distributed_actor_state_message 51a56e04a536
struct distributed_chat_config dfa4e32efe1e
struct distributed_chat_line cdab1468ffe0
struct distributed_client_identity 4d9e62025616
struct distributed_coop_device_group 4aa3499be2cc
struct distributed_coop_device_groups_message b96ad0030ccc
+38
View File
@@ -2472,6 +2472,11 @@ static int parse_invite(const char *text, unsigned char *host_hash, unsigned cha
return 1;
}
/* the host of the public game this machine joined from the server browser
(p2p_join_listing), till another invite is joined: its identifier */
static unsigned char listed_host[P2P_IDENTIFIER_SIZE];
static int listed_host_known;
/* under p2p_lock: parse_invite's result */
static int join_invite(const char *text)
{
@@ -2484,6 +2489,8 @@ static int join_invite(const char *text)
"cannot join");
if (parsed <= 0)
return parsed;
/* (any invite's game is no listed one, unless p2p_join_listing says) */
listed_host_known = 0;
p2p_identifier_from_hash(hash, host);
if (!memcmp(host, identifier, P2P_IDENTIFIER_SIZE))
return 1;
@@ -2641,6 +2648,37 @@ void p2p_join_code_clear_status(void)
pthread_mutex_unlock(&p2p_lock);
}
int p2p_join_listing(const struct p2p_listing *listing)
{
unsigned char hash[P2P_KEY_HASH_SIZE], token[P2P_TOKEN_SIZE];
if (!p2p_join_invite(listing->invite))
return 0;
/* (its host as the invite names it, as the tunnel knows its peers) */
pthread_mutex_lock(&p2p_lock);
if (parse_invite(listing->invite, hash, token) > 0)
{
p2p_identifier_from_hash(hash, listed_host);
listed_host_known = 1;
}
pthread_mutex_unlock(&p2p_lock);
return 1;
}
int p2p_joined_listed_host(void)
{
struct peer *peer;
int reached;
if (!p2p.running)
return 0;
pthread_mutex_lock(&p2p_lock);
peer = listed_host_known ? find_peer(listed_host) : NULL;
reached = peer && peer->connected;
pthread_mutex_unlock(&p2p_lock);
return reached;
}
void p2p_invite_received(const char *text)
{
/* (an older version's is logged as such; a join code is looked up,
+11
View File
@@ -149,6 +149,9 @@ in everyone's server browser: Create Game's PUBLIC; a private game is
reached only by its invite. Going private makes a new invite, if the old one
was listed */
void p2p_set_hosting_public(int public);
/* whether the game this machine hosts is listed in everyone's server
browser (PUBLIC, and network.public_lobby): the text chat is off in one */
int p2p_hosting_listed(void);
/* the password of the game hosted for the internet (Server Setup's
PASSWORD; NULL or empty: none): its listing lets only those who know it
join from the server browser (its invite link still joins it). Setting or
@@ -201,6 +204,14 @@ struct p2p_listing
unsigned char signing_key[P2P_LISTING_SIGNING_KEY_SIZE];
unsigned char sealed_token[P2P_LISTING_SEALED_TOKEN_SIZE];
};
/* joins a public game the server browser found (p2p_join_invite with its
invite), remembering its host: nonzero if it held an invite */
int p2p_join_listing(const struct p2p_listing *listing);
/* whether this machine is in the public game it joined from the server
browser: the tunnel still reaches its host, and no other invite was joined
since. Such a game has no text chat, whatever its host says
(port/linux/game/network_chat.c) */
int p2p_joined_listed_host(void);
/* a copy of the public games found, in the order shown (the most players
first; then those not failed, the open ones, by name); returns their count */
int p2p_lobby_games(struct p2p_listing *games, int maximum_count);
+10
View File
@@ -726,6 +726,16 @@ void p2p_set_hosting_public(int public)
pthread_mutex_unlock(&p2p_lock);
}
int p2p_hosting_listed(void)
{
int listed;
pthread_mutex_lock(&p2p_lock);
listed = lobby.public && config_boolean("network.public_lobby");
pthread_mutex_unlock(&p2p_lock);
return listed;
}
void p2p_set_hosting_password(const char *password)
{
unsigned char key[P2P_PASSWORD_KEY_SIZE];
+58 -7
View File
@@ -24,7 +24,15 @@ play's, sealed as to any peer; WebRTC is only their way through.
the tunnel's datagrams, whose streams KCP makes reliable, as on UDP).
Messages larger than a packet are split and joined again. What this end
sends and the peer has not acknowledged in ABANDON_TIME is given up
(FORWARD-TSN, RFC 3758); what it receives is acknowledged at once.
(FORWARD-TSN, RFC 3758); what it receives is acknowledged at once, every
run past a gap (a SACK of only some has the peer count the others in
flight, and fill its window), and again each SACK_INTERVAL while a gap
stays. What is missing before a TSN that came GAP_TIME ago is given up as
the peer's FORWARD-TSN would give it up (the channel's messages are
never sent again, and the peer sent it before that TSN): Firefox's SCTP,
after one loss, gives up others only once its cumulative acknowledgement
has passed the first, which the gaps after it stop, and the channel would
stall for seconds, then fall out of TSN_WINDOW.
Everything runs on the p2p thread, under p2p_lock.
*/
@@ -54,7 +62,9 @@ enum
TSN_WINDOW = 1024,
/* fragments of messages kept for joining */
MAXIMUM_FRAGMENTS = 16,
MAXIMUM_GAP_BLOCKS = 16,
/* the runs past the cumulative TSN a SACK reports: all of them, at a
tenth of the datagrams lost (a SACK of 12 + 4 * this bytes) */
MAXIMUM_GAP_BLOCKS = 128,
SCTP_PORT = 5000,
/* the window this end says it has: messages are passed on at once */
RECEIVE_WINDOW = 1 << 20,
@@ -65,6 +75,10 @@ enum
PUNCH_TIME = 30000,
ABANDON_TIME = 300,
FORWARD_INTERVAL = 200,
SACK_INTERVAL = 200,
/* a gap given up by this end (longer than ABANDON_TIME: what is only
late still comes, and the peer may give it up first) */
GAP_TIME = 1000,
/* a path not checked in this long is not one the browser uses */
PATH_TIME = 30000,
};
@@ -178,7 +192,11 @@ struct connection
unsigned int cumulative;
unsigned int highest;
unsigned char received[TSN_WINDOW];
/* (system time) when each TSN past the cumulative one came */
unsigned long arrived[TSN_WINDOW];
int sack_due;
/* when the last SACK went */
unsigned long sack_time;
struct fragment fragments[MAXIMUM_FRAGMENTS];
/* sending: the next TSN, the peer's cumulative acknowledgement, when
each TSN past it was sent (by TSN modulo TSN_WINDOW), and the last
@@ -528,6 +546,7 @@ static void sctp_send_sack(struct connection *connection)
put_short(value + 10, 0);
sctp_send_chunk(connection, _chunk_sack, 0, value, 12 + blocks * 4);
connection->sack_due = 0;
connection->sack_time = p2p_now();
}
/* a message on the channel (stream 0, unordered), split as needed */
@@ -663,6 +682,7 @@ static void data_received(struct connection *connection, int flags, const unsign
return;
}
connection->received[tsn % TSN_WINDOW] = 1;
connection->arrived[tsn % TSN_WINDOW] = p2p_now();
if (tsn_after(tsn, connection->highest))
connection->highest = tsn;
while (connection->received[(connection->cumulative + 1) % TSN_WINDOW] &&
@@ -712,14 +732,13 @@ static void data_received(struct connection *connection, int flags, const unsign
}
}
static void forward_tsn_received(struct connection *connection, const unsigned char *value, int length)
/* what the peer gave up (FORWARD-TSN), or this end did: the cumulative TSN
moved to forward and past what came after it, and the fragments of messages
given up let go */
static void skip_to(struct connection *connection, unsigned int forward)
{
unsigned int forward;
int index;
if (length < 4)
return;
forward = get_long(value);
connection->sack_due = 1;
if (!tsn_after(forward, connection->cumulative))
return;
@@ -750,6 +769,35 @@ static void forward_tsn_received(struct connection *connection, const unsigned c
}
}
static void forward_tsn_received(struct connection *connection, const unsigned char *value, int length)
{
if (length >= 4)
skip_to(connection, get_long(value));
}
/* the gaps past the cumulative TSN: what is missing before a TSN that came
GAP_TIME ago given up, and the rest told again each SACK_INTERVAL */
static void gap_check(struct connection *connection)
{
unsigned int tsn;
if (!tsn_after(connection->highest, connection->cumulative))
return;
for (tsn = connection->highest; tsn_after(tsn, connection->cumulative); tsn--)
{
if (connection->received[tsn % TSN_WINDOW] && elapsed(connection->arrived[tsn % TSN_WINDOW], GAP_TIME))
{
skip_to(connection, tsn);
break;
}
}
if (connection->sack_due || (tsn_after(connection->highest, connection->cumulative) &&
elapsed(connection->sack_time, SACK_INTERVAL)))
{
sctp_send_sack(connection);
}
}
static void sack_received(struct connection *connection, const unsigned char *value, int length)
{
unsigned int cumulative;
@@ -1138,7 +1186,10 @@ int p2p_webrtc_update(void)
/* (the handshake's retransmissions) */
connection_receive(connection);
if (connection->state == _sctp_established)
{
sctp_forward(connection);
gap_check(connection);
}
else if (!elapsed(connection->created_time, PUNCH_TIME) && elapsed(connection->punch_time, PUNCH_INTERVAL))
punch(connection);
}
+40 -2
View File
@@ -536,6 +536,11 @@ static const struct config_setting config_settings[] =
"Save a PNG screenshot beside maps/ (press once per capture)." },
{ "controls.push_to_talk", _config_string, "\"V\"", "HALO_KEY_PUSH_TO_TALK", _environment_value, _platform_all,
"Voice chat: talk while it is held (audio.voice_chat \"push_to_talk\")." },
{ "controls.chat", _config_string, "\"T\"", "HALO_KEY_CHAT", _environment_value, _platform_all,
"Network games' text chat: type a line to everyone (Enter sends it,\n"
"Escape lets it go)." },
{ "controls.team_chat", _config_string, "\"Y\"", "HALO_KEY_TEAM_CHAT", _environment_value, _platform_all,
"Network games' text chat: type a line to your team." },
{ "game.console_log", _config_string, "\"important\"", "HALO_CONSOLE_LOG", _environment_value, _platform_all,
"What the game's console shows on screen of what it logs: \"important\"\n"
@@ -547,6 +552,13 @@ static const struct config_setting config_settings[] =
{ "game.language", _config_string, "\"\"", "HALO_LANGUAGE", _environment_value, _platform_all,
"The language the game asks the Xbox for: \"ja\", \"de\", \"fr\", \"es\" or \"it\";\n"
"empty for English. The game data decides what is translated." },
{ "display.text_chat", _config_boolean, "true", "HALO_TEXT_CHAT", _environment_value, _platform_all,
"Show the text chat of network games: false hides its lines and keeps\n"
"its keys (and a controller's D-pad Up) from opening it, as for purists\n"
"and streamers." },
{ "display.chat_style", _config_string, "\"colors\"", "HALO_CHAT_STYLE", _environment_value, _platform_all,
"The text chat's colours: \"colors\" (names in their team's colour, the\n"
"text a pale blue) or \"white\" (all white, as Custom Edition)." },
{ "game.enhanced_animations", _config_boolean, "true", "HALO_ENHANCED_ANIMATIONS", _environment_value, _platform_all,
"The player bipeds' grenade throws keep their legs moving (crouched,\n"
"in the air and in a vehicle's seat too), riders' hands leave the grips\n"
@@ -643,6 +655,10 @@ static const struct config_setting config_settings[] =
_platform_all,
"Hosting: how near (world units: 1 is about 3 metres) a player must be\n"
"to be heard by proximity voice chat (5 to 100)." },
{ "network.text_chat", _config_string, "\"on\"", "HALO_NET_TEXT_CHAT", _environment_value, _platform_all,
"Hosting: the text chat: \"on\" (links in lines are refused), \"links\"\n"
"(links allowed) or \"off\", in either case. Always off in a game listed\n"
"in the server browser (a public internet game)." },
{ "network.votekick", _config_boolean, "true", "HALO_NET_VOTEKICK", _environment_value, _platform_all,
"Hosting: let the players vote to kick a player (the scoreboard's\n"
"right-click, or the console's votekick). More than half of the players\n"
@@ -663,7 +679,8 @@ static const struct config_setting config_settings[] =
{ "network.map_share_upload", _config_integer, "1024", "HALO_NET_MAP_SHARE_UPLOAD", _environment_value,
_platform_all,
"Hosting: the most kilobytes a second the host sends of maps (16 to\n"
"65536), so that the game's own traffic keeps the rest of the upload." },
"20480: 20 MB/s), so that the game's own traffic keeps the rest of the\n"
"upload." },
{ "network.map_seed", _config_boolean, "true", "HALO_NET_MAP_SEED", _environment_value, _platform_all,
"Playing in another's game: help send its map to players who join\n"
"without it, as a torrent's peers do (the pieces this machine has, at\n"
@@ -671,7 +688,7 @@ static const struct config_setting config_settings[] =
{ "network.map_seed_upload", _config_integer, "256", "HALO_NET_MAP_SEED_UPLOAD", _environment_value,
_platform_all,
"Playing in another's game: the most kilobytes a second this machine\n"
"sends of maps to other players (16 to 65536)." },
"sends of maps to other players (16 to 10240: 10 MB/s)." },
{ "network.map_download", _config_boolean, "true", "HALO_NET_MAP_DOWNLOAD", _environment_value, _platform_all,
"Joining a game on a Custom Edition map this machine does not have:\n"
"download it (and the resource maps it needs) from the game's players\n"
@@ -734,6 +751,18 @@ static const struct config_setting config_settings[] =
{ "update.auto", _config_boolean, "true", "HALO_UPDATE_AUTO", _environment_value, _platform_all,
"Look for a new version when the game starts, and offer to update to it;\n"
"false never looks (the game's \"Do not ask again\" writes false here)." },
{ "streamer.enabled", _config_boolean, "false", "HALO_STREAMER_MODE", _environment_value, _platform_all,
"Hide offensive words in names and text from other players, maps and mods\n"
"as stars, at the levels below (Settings > Network Setup > Streamer Mode)." },
{ "streamer.slurs", _config_string, "\"mild\"", "HALO_STREAMER_SLURS", _environment_value, _platform_all,
"With streamer.enabled, the slurs (race, sexuality, gender, disability)\n"
"hidden: \"off\", \"severe\", \"strong\" (and severe) or \"mild\" (all)." },
{ "streamer.swearing", _config_string, "\"strong\"", "HALO_STREAMER_SWEARING", _environment_value, _platform_all,
"With streamer.enabled, the swearing and sexual words hidden: \"off\",\n"
"\"severe\", \"strong\" (and severe) or \"mild\" (all)." },
{ "streamer.insults", _config_string, "\"off\"", "HALO_STREAMER_INSULTS", _environment_value, _platform_all,
"With streamer.enabled, the insults that are not slurs hidden: \"off\",\n"
"\"severe\", \"strong\" (and severe) or \"mild\" (all)." },
{ "crash_reports.upload", _config_string, "\"ask\"", "HALO_CRASH_REPORTS", _environment_value, _platform_windows,
"Send a report of each crash (a minidump and halo.log) to the developers'\n"
"Sentry project (port/windows/src/win32_crash.c): \"yes\" sends them, \"no\"\n"
@@ -761,6 +790,15 @@ static const struct config_setting config_settings[] =
{ "debug.network_test_pickup", _config_real, "0.0", "HALO_NETWORK_TEST_PICKUP", _environment_value, _platform_all,
"This many seconds into an automated test game the host stands its last\n"
"player on a weapon, which a joining player then picks up; 0 never." },
{ "debug.network_test_chat", _config_real, "0.0", "HALO_NETWORK_TEST_CHAT", _environment_value, _platform_all,
"This many seconds into an automated test game each machine's player\n"
"says a chat line to everyone, then to the team and to the vehicle (the\n"
"host seats the last two players in one first), then the host mutes and\n"
"unmutes a player, refuses a link and turns the chat off, and the\n"
"clients type on the on-screen keyboard (port/linux/NETCODE.md); 0 never." },
{ "debug.network_test_name", _config_string, "\"\"", "HALO_NETWORK_TEST_NAME", _environment_value, _platform_all,
"The name this machine's player takes in an automated test game (ASCII);\n"
"empty keeps its profile's." },
{ "debug.network_test_pickup_weapon", _config_string, "\"\"", "HALO_NETWORK_TEST_PICKUP_WEAPON", _environment_value,
_platform_all,
"The weapon network_test_pickup stands the player on: the first whose tag\n"
+31 -8
View File
@@ -18,6 +18,7 @@ and the debug keyboard that the game's console reads.
#include "port_mods.h"
#include "xiso.h"
#include "touch_input.h"
#include "../game/text_filter.h"
#include <SDL3/SDL.h>
#include <stdio.h>
@@ -1282,6 +1283,9 @@ void platform_show_message(const char *title, const char *message)
pthread_mutex_lock(&platform_message_lock);
snprintf(platform_message_title, sizeof(platform_message_title), "%s", title);
snprintf(platform_message_text, sizeof(platform_message_text), "%s", message);
/* (streamer mode's words hidden here too: a map's or a mod's name) */
text_filter_utf8(platform_message_title);
text_filter_utf8(platform_message_text);
platform_message_pending = TRUE;
pthread_mutex_unlock(&platform_message_lock);
}
@@ -1294,10 +1298,36 @@ void web_js_ask(const char *title, const char *text, const char *labels);
int platform_ask(const char *title, const char *text, const char *const *labels, int count, int default_index)
{
/* (streamer mode's words hidden here too: mods' names) */
static char shown_title[128];
static char shown_text[4096];
static char shown_labels[3][128];
const char *shown[3];
int index;
#ifdef HALO_WEB
char joined[512] = "";
int index;
#else
SDL_MessageBoxButtonData buttons[3];
SDL_MessageBoxData question;
int answer = -1;
#endif
if (count > 3)
count = 3;
snprintf(shown_title, sizeof(shown_title), "%s", title);
snprintf(shown_text, sizeof(shown_text), "%s", text);
text_filter_utf8(shown_title);
text_filter_utf8(shown_text);
for (index = 0; index < count; index++)
{
snprintf(shown_labels[index], sizeof(shown_labels[index]), "%s", labels[index]);
text_filter_utf8(shown_labels[index]);
shown[index] = shown_labels[index];
}
title = shown_title;
text = shown_text;
labels = shown;
#ifdef HALO_WEB
/* (the page's dialog: the game's thread waits for the player there, as
SDL's box would, which a page's worker cannot show) */
for (index = 0; index < count; index++)
@@ -1313,13 +1343,6 @@ int platform_ask(const char *title, const char *text, const char *const *labels,
(void)default_index;
return __atomic_load_n(&web_shared[_web_answer], __ATOMIC_SEQ_CST);
#else
SDL_MessageBoxButtonData buttons[3];
SDL_MessageBoxData question;
int answer = -1;
int index;
if (count > 3)
count = 3;
for (index = 0; index < count; index++)
{
buttons[index].flags = index == default_index ?
+34 -3
View File
@@ -169,6 +169,25 @@ void touch_input_menu_read(struct platform_ui_pointer *pointer)
pointer->touch = TRUE;
}
/* port/linux/game/network_chat.c: its on-screen keyboard is up, which
takes the taps outside the menus */
extern unsigned char network_chat_keyboard_open(void);
/* the taps for that keyboard since it last took them, and the latest's
place (0 to 1 of the window) */
static int chat_taps;
static float chat_tap_x, chat_tap_y;
int touch_input_chat_taps(float *x, float *y)
{
int taps = chat_taps;
*x = chat_tap_x;
*y = chat_tap_y;
chat_taps = 0;
return taps;
}
void touch_input_gamepad(XINPUT_GAMEPAD *pad)
{
/* outside the menus the touchscreen only skips a cinematic that can be
@@ -179,7 +198,17 @@ void touch_input_gamepad(XINPUT_GAMEPAD *pad)
menu_setup();
touch_menu_read(&menu, &output);
if (output.clicks && touch_game_cinematic_skippable())
/* (or, while the text chat's on-screen keyboard is up, its keys) */
if (output.clicks && network_chat_keyboard_open())
{
int width = 0, height = 0;
platform_video_drawable_size(&width, &height);
chat_taps += output.clicks;
chat_tap_x = width > 0 ? output.click_x / (float)width : 0.0f;
chat_tap_y = height > 0 ? output.click_y / (float)height : 0.0f;
}
else if (output.clicks && touch_game_cinematic_skippable())
{
skip_polls = TOUCH_PRESS_POLLS;
platform_log("touch: A pressed to skip a cinematic");
@@ -257,9 +286,11 @@ void touch_input_controls(XINPUT_GAMEPAD *pad, int menus)
int index;
/* (the controls show only in a game: not while it starts, at the main
menu, in a menu or during a cinematic) */
menu, in a menu or during a cinematic; nor while the text chat's
on-screen keyboard is up, whose keys the fingers then tap) */
host_touch_scene(_touch_scene_known | touch_controls_setting() |
(menus || !touch_game_playing() || touch_game_cinematic_playing() ? _touch_scene_menus : 0));
(menus || !touch_game_playing() || touch_game_cinematic_playing() || network_chat_keyboard_open() ?
_touch_scene_menus : 0));
/* (the profile's mapping, for the buttons' names; only when it changes) */
touch_game_button_controls(bindings);
if (!bindings_known || memcmp(bindings, bindings_sent, sizeof(bindings)))
+4
View File
@@ -34,6 +34,10 @@ void touch_input_menu_read(struct platform_ui_pointer *pointer);
/* outside the menus, presses A for a few polls after a tap when a
cinematic can be skipped (the on-screen controls: touch_input_controls) */
void touch_input_gamepad(XINPUT_GAMEPAD *pad);
/* the taps outside the menus since the last call while the text chat's
on-screen keyboard is up (port/linux/game/network_chat.c), and where the
latest was, 0 to 1 across and down the window */
int touch_input_chat_taps(float *x, float *y);
#if defined(HALO_ANDROID) || defined(HALO_WEB)
/* the on-screen touch controls (port/android/app/.../TouchControls.java; in
+4 -2
View File
@@ -522,13 +522,15 @@ static void updater_update(void)
}
}
/* the files a previous update left behind */
/* the files a previous update left behind, and the notice of extract-xiso,
which releases carried until the disc image readers were written again */
static void updater_clean_up(void)
{
static const char *const names[] =
{
"halo.old", "halo.exe.old", "SDL3.dll.old", "libSDL3.so.0.old", "SDL3-LICENSE.txt.old",
"extract-xiso-LICENSE.txt.old", "mbedtls-LICENSE.txt.old",
"extract-xiso-LICENSE.txt.old", "mbedtls-LICENSE.txt.old", "LICENSE.txt.old",
"extract-xiso-LICENSE.txt",
};
char path[1200];
size_t index;
+194 -6
View File
@@ -57,6 +57,12 @@ drive the controller.
/* main/console.c */
extern unsigned char console_is_active(void);
/* port/linux/game/network_chat.c: a chat line is typed, which takes the
keyboard as the console does */
extern unsigned char network_chat_typing(void);
/* ... and its on-screen keyboard is up, which takes the first controller
and the touch controls' stick and look */
extern unsigned char network_chat_keyboard_open(void);
/* port/linux/game/menu_functions.c: two or more players on this machine
(co-op, or split screen in a network game) */
extern unsigned char pc_menu_split_players(void);
@@ -169,6 +175,96 @@ static void touch_used(void)
}
#endif
/* ---------- the text chat's on-screen keyboard (halo_keyboard.h) */
/* the first controller's buttons, as each read of it found them */
static unsigned long chat_pad;
static void chat_pad_record(const XINPUT_GAMEPAD *pad)
{
/* (an analog button pressed half way; the stick most of the way) */
enum { PRESSED = 0x80, PUSHED = 22000 };
unsigned long buttons = 0;
if (pad->wButtons & XINPUT_GAMEPAD_DPAD_UP) buttons |= 1UL << HALO_CHAT_PAD_UP;
if (pad->wButtons & XINPUT_GAMEPAD_DPAD_DOWN) buttons |= 1UL << HALO_CHAT_PAD_DOWN;
if (pad->wButtons & XINPUT_GAMEPAD_DPAD_LEFT) buttons |= 1UL << HALO_CHAT_PAD_LEFT;
if (pad->wButtons & XINPUT_GAMEPAD_DPAD_RIGHT) buttons |= 1UL << HALO_CHAT_PAD_RIGHT;
if (pad->wButtons & XINPUT_GAMEPAD_START) buttons |= 1UL << HALO_CHAT_PAD_START;
if (pad->bAnalogButtons[XINPUT_GAMEPAD_A] >= PRESSED) buttons |= 1UL << HALO_CHAT_PAD_A;
if (pad->bAnalogButtons[XINPUT_GAMEPAD_B] >= PRESSED) buttons |= 1UL << HALO_CHAT_PAD_B;
if (pad->bAnalogButtons[XINPUT_GAMEPAD_X] >= PRESSED) buttons |= 1UL << HALO_CHAT_PAD_X;
if (pad->bAnalogButtons[XINPUT_GAMEPAD_Y] >= PRESSED) buttons |= 1UL << HALO_CHAT_PAD_Y;
if (pad->sThumbLY > PUSHED) buttons |= 1UL << HALO_CHAT_PAD_STICK_UP;
if (pad->sThumbLY < -PUSHED) buttons |= 1UL << HALO_CHAT_PAD_STICK_DOWN;
if (pad->sThumbLX < -PUSHED) buttons |= 1UL << HALO_CHAT_PAD_STICK_LEFT;
if (pad->sThumbLX > PUSHED) buttons |= 1UL << HALO_CHAT_PAD_STICK_RIGHT;
chat_pad = buttons;
}
unsigned long halo_chat_pad_buttons(void)
{
return chat_pad;
}
int halo_chat_taps(float *x, float *y)
{
return touch_input_chat_taps(x, y);
}
int halo_chat_touch_layout(void)
{
#if defined(HALO_ANDROID)
/* (port: not in VR, which has no touch controls in the way) */
return !halo_vr_active();
#elif defined(HALO_WEB)
int used;
pthread_mutex_lock(&mouse_lock);
used = touch_aimed_ms != 0;
pthread_mutex_unlock(&mouse_lock);
return used;
#else
return FALSE;
#endif
}
/* the first controller's buttons held as the on-screen keyboard closed (the
B that closed it, the Start or the A that sent the line), which the game
gets none of till each is let go: it would see a new press of it, a pause
menu opened, a melee, a jump (the triggers are analog buttons too) */
static WORD chat_held_buttons;
static unsigned char chat_held_analog;
static void chat_pad_hold_over(XINPUT_GAMEPAD *pad)
{
int index;
if (network_chat_keyboard_open())
{
chat_held_buttons = pad->wButtons;
chat_held_analog = 0;
for (index = 0; index < 8; index++)
{
if (pad->bAnalogButtons[index])
chat_held_analog |= (unsigned char)(1 << index);
}
memset(pad, 0, sizeof(*pad));
return;
}
chat_held_buttons &= pad->wButtons;
pad->wButtons &= (WORD)~chat_held_buttons;
for (index = 0; index < 8; index++)
{
if (!(chat_held_analog & (1 << index)))
continue;
if (pad->bAnalogButtons[index])
pad->bAnalogButtons[index] = 0;
else
chat_held_analog &= (unsigned char)~(1 << index);
}
}
/* the touch controls' stick as the player's movement (input_abstraction.c's
keyboard_controls_update), forward and strafe -1..1, whatever the
profile's sticks do; nonzero while it is pushed. Nothing but on Android and
@@ -181,8 +277,12 @@ int halo_linux_touch_move(short controller_index, float *forward, float *strafe)
return FALSE;
#if defined(HALO_ANDROID) || defined(HALO_WEB)
/* (port: not in VR, where the touch controls are off) */
if (halo_vr_active() || !touch_input_move(forward, strafe))
if (halo_vr_active() || !touch_input_move(forward, strafe) || network_chat_keyboard_open())
{
*forward = 0.0f;
*strafe = 0.0f;
return FALSE;
}
touch_used();
return TRUE;
#else
@@ -208,6 +308,15 @@ int halo_linux_touch_look(short gamepad_index, float *yaw, float *pitch, float *
if (halo_vr_active())
return FALSE;
touch_input_look(0.0022f, yaw, pitch, gyro_yaw, gyro_pitch);
/* (none while the chat's on-screen keyboard is up: what was swiped is
dropped, not saved for after) */
if (network_chat_keyboard_open())
{
*yaw = 0.0f;
*pitch = 0.0f;
*gyro_yaw = 0.0f;
*gyro_pitch = 0.0f;
}
if (*yaw == 0.0f && *pitch == 0.0f && *gyro_yaw == 0.0f && *gyro_pitch == 0.0f)
return FALSE;
touch_used();
@@ -399,7 +508,8 @@ static void keys_held_over_switch(struct platform_input_state *input)
{
static unsigned char held[SDL_SCANCODE_COUNT];
static int context = -1;
int next_context = (input->menus != FALSE) | (text_typing ? 2 : 0) | (console_is_active() ? 4 : 0);
int next_context = (input->menus != FALSE) | (text_typing ? 2 : 0) | (console_is_active() ? 4 : 0) |
(network_chat_typing() ? 8 : 0);
int scancode;
if (context != next_context)
@@ -426,7 +536,7 @@ static const char *const binding_settings[NUMBER_OF_HALO_KEYBOARD_ACTIONS] =
"controls.jump", "controls.crouch", "controls.fire", "controls.throw_grenade", "controls.melee",
"controls.reload", "controls.zoom", "controls.switch_weapon", "controls.switch_grenade", "controls.action",
"controls.flashlight", "controls.scoreboard", "controls.pause", "controls.screenshot",
"controls.push_to_talk",
"controls.push_to_talk", "controls.chat", "controls.team_chat",
};
static const struct
@@ -657,12 +767,49 @@ void test_input_hold_action(int hold)
test_input_holding_action = hold;
}
/* the automated tests (port/linux/game/network_test.c): the controller's
buttons (halo_chat_pad_button bits) held for the reads to come, as a player
types on the text chat's on-screen keyboard; the scripted player does
nothing else while that keyboard is up */
static unsigned long test_input_pressed;
void test_input_press(unsigned long buttons)
{
test_input_pressed = buttons;
}
static void test_input_gamepad(XINPUT_GAMEPAD *pad)
{
static const WORD digital[] =
{
XINPUT_GAMEPAD_DPAD_UP, XINPUT_GAMEPAD_DPAD_DOWN, XINPUT_GAMEPAD_DPAD_LEFT, XINPUT_GAMEPAD_DPAD_RIGHT,
};
static const int analog[] = { XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y };
static int checked;
static int seed = -1;
static int looking;
double t;
int index;
for (index = 0; index < 4; index++)
{
if (test_input_pressed & (1UL << (HALO_CHAT_PAD_UP + index)))
pad->wButtons |= digital[index];
if (test_input_pressed & (1UL << (HALO_CHAT_PAD_A + index)))
pad->bAnalogButtons[analog[index]] = 255;
}
if (test_input_pressed & (1UL << HALO_CHAT_PAD_START))
pad->wButtons |= XINPUT_GAMEPAD_START;
if (test_input_pressed & (1UL << HALO_CHAT_PAD_STICK_UP))
pad->sThumbLY = 32000;
if (test_input_pressed & (1UL << HALO_CHAT_PAD_STICK_DOWN))
pad->sThumbLY = -32000;
if (test_input_pressed & (1UL << HALO_CHAT_PAD_STICK_LEFT))
pad->sThumbLX = -32000;
if (test_input_pressed & (1UL << HALO_CHAT_PAD_STICK_RIGHT))
pad->sThumbLX = 32000;
if (network_chat_keyboard_open())
return;
if (!checked)
{
@@ -1043,7 +1190,43 @@ static void vr_gamepad_state(XINPUT_GAMEPAD *pad)
if (abs(value) > abs(pad->sThumbLX)) pad->sThumbLX = value;
value = vr_stick(left->thumbstick[1]);
if (abs(value) > abs(pad->sThumbLY)) pad->sThumbLY = value;
if (left->buttons & HALO_XR_BUTTON_MENU) pad->wButtons |= XINPUT_GAMEPAD_START;
{
/* the menu button: a press pauses, as Start; held, the scores show
while it is, as Back (the Quest's controllers have no button of
their own for it). In the menus it is Start at once */
static Uint64 menu_pressed_at, menu_pulse_until;
static int menu_held_handled;
Uint64 now = SDL_GetTicks();
int down = (left->buttons & HALO_XR_BUTTON_MENU) != 0;
if (menus)
{
if (down)
pad->wButtons |= XINPUT_GAMEPAD_START;
menu_pressed_at = 0;
}
else if (down)
{
if (!menu_pressed_at)
{
menu_pressed_at = now;
menu_held_handled = 0;
}
else if (now - menu_pressed_at >= 400)
{
pad->wButtons |= XINPUT_GAMEPAD_BACK;
menu_held_handled = 1;
}
}
else if (menu_pressed_at)
{
if (!menu_held_handled)
menu_pulse_until = now + 100;
menu_pressed_at = 0;
}
if (now < menu_pulse_until)
pad->wButtons |= XINPUT_GAMEPAD_START;
}
/* (the Steam Frame's controllers: the left one's View button and D-pad) */
if (left->buttons & HALO_XR_BUTTON_VIEW) pad->wButtons |= XINPUT_GAMEPAD_BACK;
if (left->buttons & HALO_XR_BUTTON_DPAD_UP) pad->wButtons |= XINPUT_GAMEPAD_DPAD_UP;
@@ -1148,7 +1331,8 @@ DWORD WINAPI XInputGetState(HANDLE device, PXINPUT_STATE state)
wheel_update();
keyboard_actions_held = 0;
keys_held_over_switch(&input);
console_active = console_is_active();
/* (a chat line typed takes the keyboard as the console does) */
console_active = console_is_active() || network_chat_typing();
held = console_active ? 0 : keyboard_bound_actions(&input);
keyboard_screenshot(held);
if (!console_active)
@@ -1175,6 +1359,10 @@ DWORD WINAPI XInputGetState(HANDLE device, PXINPUT_STATE state)
touch_input_controls(&state->Gamepad, input.menus);
#endif
}
/* (the text chat's on-screen keyboard reads them, and takes them
while it is up) */
chat_pad_record(&state->Gamepad);
chat_pad_hold_over(&state->Gamepad);
if (abs(state->Gamepad.sThumbRX) > STICK_AIMING_DEFLECTION ||
abs(state->Gamepad.sThumbRY) > STICK_AIMING_DEFLECTION)
{
@@ -1256,7 +1444,7 @@ DWORD WINAPI XInputDebugGetKeystroke(PXINPUT_DEBUG_KEYSTROKE keystroke)
/* key ups always pass, so no key is left latched down; while typing,
escape does not (it cancels, as B: the game's own escape leaves the
menus, main.c) */
if (key_up || next.virtual_key == VK_OEM_3_BACKQUOTE || console_is_active() ||
if (key_up || next.virtual_key == VK_OEM_3_BACKQUOTE || console_is_active() || network_chat_typing() ||
(text_typing && next.virtual_key != 0x1B /* escape */))
{
keystroke->VirtualKey = next.virtual_key;
+420 -262
View File
@@ -1,307 +1,408 @@
/*
XISO.C
Copies the maps folder out of an Xbox disc image (an "xiso"), for the
desktop ports' first start without game data (sdl_platform.c).
The maps folder out of an Xbox disc image, for the desktop games (Linux and
Windows). When no data root has a maps folder, sdl_platform.c asks the player
for their disc image of Halo and this copies the image's maps folder next to
the executable. (The Android app's copy of this is XisoExtractor.java, the
web page's xiso-worker.js.)
The image's file system is XDVDFS, read as extract-xiso does
(https://github.com/XboxDev/extract-xiso, extract-xiso.c, whose format
handling this follows; its license is below and in
port/third_party/extract-xiso/LICENSE.TXT): 2048-byte sectors; a
volume descriptor at 0x10000 that starts and ends with
"MICROSOFT*XBOX*MEDIA" and gives the root directory's sector and size; and
directories whose entries form a binary tree (each entry: left and right
subtree offsets in 4-byte units, the start sector, the size, attributes, the
name's length and the name, 4-byte aligned). Images made from a whole disc
put the game partition further in, at one of the offsets below.
Written from a description of the Xbox's disc file system, XDVDFS
(xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS, and the format
facts OpenCE's readers rely on). What this file relies on:
The files are written to <destination>/maps.partial first, which becomes
<destination>/maps once they all are, so an interrupted extraction never
leaves a maps folder that looks complete.
- Sectors are 2048 bytes and integers little-endian. Sector numbers count
from the start of the game partition: an image of the partition alone has
it at 0, an image of a whole disc further in (0x0FD90000, 0x02080000 or
0x18300000 for XGD2, XGD3 and XGD1 discs). They are tried in that order.
- The volume descriptor is the partition's sector 32 (at 0x10000). It holds
"MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the root
directory table's start sector (u32 at 0x14) and size in bytes (u32 at
0x18).
- A directory table is a binary tree of entries whose root is the entry at
offset 0. An entry is a left and a right subtree link (u16 each, in 4-byte
units from the table's start, 0 for none), the start sector and the size
of the file or of the subdirectory's table (u32 each), the attributes (u8,
0x10 for a directory), the name's length (u8) and the name. Unused bytes of
a table are 0xFF, so a left link of 0xFFFF is padding, not an entry.
- A file is one contiguous run of bytes from the start of its sector.
Some parts of this code are copyright in@fishtank.com. This product
includes software developed by in <in@fishtank.com>.
The image is the player's file and nothing read from it is trusted. Only the
root's table and the maps folder's are read, each whole and at most 4 MB;
the walk of a table visits each offset once, goes at most 64 links deep and
looks at most 4096 entries; and a file is written only under a plain name
that no file before it had (ignoring case).
* Copyright (c) 2003 in <in@fishtank.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by in <in@fishtank.com>.
*
* 4. Neither the name of "in" nor the email address "in@fishtank.com"
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The game takes a data root as having data once it has a maps folder, so the
copy is written to maps.partial (emptied first of what an earlier attempt
left) and given the name maps only when every file is complete.
*/
/* (the desktop ports only: the Android app and the web page import the game
data themselves) */
#if !defined(HALO_ANDROID) && !defined(HALO_WEB)
#include "platform.h"
#include "posix.h"
#include "xiso.h"
#if !defined(HALO_ANDROID) && !defined(HALO_WEB)
#include "posix.h"
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* (images are larger than 4 GB; Windows has neither flag) */
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
enum
#define XISO_SECTOR_SIZE 2048
#define XISO_DESCRIPTOR_OFFSET 0x10000
#define XISO_MAGIC "MICROSOFT*XBOX*MEDIA"
#define XISO_MAGIC_LENGTH 20
#define XISO_SECOND_MAGIC_OFFSET 0x7EC
#define XISO_ENTRY_FIXED_SIZE 14
#define XISO_ATTRIBUTE_DIRECTORY 0x10
#define XISO_PADDING_LINK 0xFFFF
/* directory tables are a few sectors; anything much larger is not one */
#define XISO_MAXIMUM_TABLE_SIZE (4 * 1024 * 1024)
#define XISO_MAXIMUM_DEPTH 64
#define XISO_MAXIMUM_VISITS 4096
#define XISO_MAXIMUM_ENTRIES 256
#define XISO_MAXIMUM_PATH 4096
#define XISO_COPY_CHUNK (1024 * 1024)
#define XISO_PARTIAL_DIRECTORY "maps.partial"
/* where the game partition may start, in the order they are tried */
static const unsigned long xiso_partition_starts[] =
{
SECTOR_SIZE = 2048,
VOLUME_DESCRIPTOR_OFFSET = 0x10000,
ENTRY_HEADER_SIZE = 14,
ATTRIBUTE_DIRECTORY = 0x10,
/* directory tables are a few sectors; anything much larger is not one */
MAXIMUM_DIRECTORY_SIZE = 4 << 20,
MAXIMUM_FILES = 256,
COPY_BUFFER_SIZE = 1 << 20,
};
static const char volume_magic[] = "MICROSOFT*XBOX*MEDIA";
/* where the game partition starts: a plain image, and whole-disc images
(extract-xiso's GLOBAL, XGD3 and XGD1 offsets) */
static const unsigned long long partition_offsets[] = { 0, 0x0FD90000ull, 0x02080000ull, 0x18300000ull };
struct xiso_file
{
char name[256];
unsigned long sector;
unsigned long size;
0x00000000, /* an image of the game partition alone */
0x0FD90000, /* a whole XGD2 disc */
0x02080000, /* a whole XGD3 disc */
0x18300000, /* a whole XGD1 disc (the original Xbox's) */
};
struct xiso_image
{
int descriptor;
unsigned long long partition;
char *error;
int error_size;
/* the image's size in bytes, or ~0 when it could not be found */
unsigned long long size;
};
static int name_is_plain(const char *name);
static unsigned long read_u32(const unsigned char *bytes)
/* a file or folder found in a directory table */
struct xiso_entry
{
return (unsigned long)bytes[0] | (unsigned long)bytes[1] << 8 | (unsigned long)bytes[2] << 16 |
(unsigned long)bytes[3] << 24;
char name[256];
unsigned long sector;
unsigned long size;
};
struct xiso_walk
{
const unsigned char *table;
unsigned long size;
/* a bit for each 4-byte offset of the table, set once it is visited */
unsigned char *visited;
int visits;
int stopped;
/* whether folders are collected (or else files) */
int directories;
struct xiso_entry *entries;
int entry_count;
};
/* ---------- errors */
static void xiso_error(char *error, int error_size, const char *format, ...)
{
va_list arguments;
if (!error || error_size <= 0)
return;
va_start(arguments, format);
vsnprintf(error, (size_t)error_size, format, arguments);
va_end(arguments);
error[error_size - 1] = 0;
}
static int fail(struct xiso_image *image, const char *format, const char *detail)
/* ---------- names */
static int xiso_lower(int character)
{
snprintf(image->error, (size_t)image->error_size, format, detail ? detail : "");
return 0;
return character >= 'A' && character <= 'Z' ? character - 'A' + 'a' : character;
}
/* reads size bytes at offset (from the start of the file) */
static int read_at(struct xiso_image *image, unsigned long long offset, void *buffer, unsigned long size)
/* whether a name of length bytes is name (a C string), ignoring ASCII case */
static int xiso_name_is(const char *bytes, int length, const char *name)
{
posix_ulong low, high;
unsigned char *cursor = buffer;
int index;
if (posix_seek(image->descriptor, (posix_long)(offset & 0xFFFFFFFFu), (posix_long)(offset >> 32), SEEK_SET,
&low, &high) != 0)
{
if ((int)strlen(name) != length)
return 0;
}
while (size > 0)
for (index = 0; index < length; index++)
{
long count = (long)read(image->descriptor, cursor, size > COPY_BUFFER_SIZE ? COPY_BUFFER_SIZE : size);
if (count <= 0)
if (xiso_lower((unsigned char)bytes[index]) != xiso_lower((unsigned char)name[index]))
return 0;
cursor += count;
size -= (unsigned long)count;
}
return 1;
}
/* the partition's volume descriptor: the root directory's sector and size */
static int find_volume(struct xiso_image *image, unsigned long *root_sector, unsigned long *root_size)
/* no path, no . or .., and only printable ASCII that every desktop file
system takes as a plain name */
static int xiso_plain_name(const unsigned char *name, int length)
{
int index;
for (index = 0; index < (int)(sizeof(partition_offsets) / sizeof(*partition_offsets)); index++)
if (length <= 0 || (length == 1 && name[0] == '.') || (length == 2 && name[0] == '.' && name[1] == '.'))
return 0;
for (index = 0; index < length; index++)
{
unsigned char descriptor[SECTOR_SIZE];
unsigned long long offset = partition_offsets[index] + VOLUME_DESCRIPTOR_OFFSET;
if (!read_at(image, offset, descriptor, sizeof(descriptor)))
continue;
if (memcmp(descriptor, volume_magic, 20) || memcmp(descriptor + 0x7EC, volume_magic, 20))
continue;
image->partition = partition_offsets[index];
*root_sector = read_u32(descriptor + 20);
*root_size = read_u32(descriptor + 24);
return 1;
if (name[index] < 0x20 || name[index] > 0x7E || strchr("/\\:*?\"<>|", name[index]))
return 0;
}
return fail(image, "This is not an Xbox disc image.%s", NULL);
return 1;
}
/* a directory's table, read whole */
static unsigned char *read_directory(struct xiso_image *image, unsigned long sector, unsigned long size)
/* ---------- the image */
static unsigned long xiso_u16(const unsigned char *bytes)
{
return (unsigned long)bytes[0] | (unsigned long)bytes[1] << 8;
}
static unsigned long xiso_u32(const unsigned char *bytes)
{
return xiso_u16(bytes) | xiso_u16(bytes + 2) << 16;
}
/* reads size bytes at offset (from the start of the image file); returns
nonzero if all of them were read */
static int xiso_read(struct xiso_image *image, unsigned long long offset, void *buffer, unsigned long size)
{
posix_ulong position_low, position_high;
unsigned long count = 0;
if (posix_seek(image->descriptor, (posix_long)(offset & 0xFFFFFFFFUL), (posix_long)(offset >> 32), SEEK_SET,
&position_low, &position_high) != 0)
{
return 0;
}
while (count < size)
{
int result = (int)read(image->descriptor, (char *)buffer + count, (unsigned int)(size - count));
if (result < 0 && errno == EINTR)
continue;
if (result <= 0)
return 0;
count += (unsigned long)result;
}
return 1;
}
/* the byte offset of a sector of the game partition */
static unsigned long long xiso_sector_offset(struct xiso_image *image, unsigned long sector)
{
return image->partition + (unsigned long long)sector * XISO_SECTOR_SIZE;
}
/* finds the game partition: the first start whose volume descriptor has
both magics. Returns the root table's sector and size */
static int xiso_find_volume(struct xiso_image *image, unsigned long *root_sector, unsigned long *root_size)
{
unsigned char descriptor[XISO_SECTOR_SIZE];
int index;
for (index = 0; index < (int)(sizeof(xiso_partition_starts) / sizeof(xiso_partition_starts[0])); index++)
{
unsigned long long start = xiso_partition_starts[index];
if (!xiso_read(image, start + XISO_DESCRIPTOR_OFFSET, descriptor, sizeof(descriptor)) ||
memcmp(descriptor, XISO_MAGIC, XISO_MAGIC_LENGTH) != 0 ||
memcmp(descriptor + XISO_SECOND_MAGIC_OFFSET, XISO_MAGIC, XISO_MAGIC_LENGTH) != 0)
{
continue;
}
image->partition = start;
*root_sector = xiso_u32(descriptor + 0x14);
*root_size = xiso_u32(descriptor + 0x18);
return 1;
}
return 0;
}
/* reads a directory table whole into a new allocation; returns NULL if it
is empty, too large or cannot be read, setting *out_of_memory when that is
the reason */
static unsigned char *xiso_read_table(struct xiso_image *image, unsigned long sector, unsigned long size,
int *out_of_memory)
{
unsigned char *table;
if (!size || size > MAXIMUM_DIRECTORY_SIZE)
*out_of_memory = 0;
if (size == 0 || size > XISO_MAXIMUM_TABLE_SIZE)
return NULL;
table = malloc(size);
if (table && !read_at(image, image->partition + (unsigned long long)sector * SECTOR_SIZE, table, size))
if (!table)
{
*out_of_memory = 1;
return NULL;
}
if (!xiso_read(image, xiso_sector_offset(image, sector), table, size))
{
free(table);
table = NULL;
return NULL;
}
return table;
}
struct directory_walk
{
const unsigned char *table;
unsigned long size;
struct xiso_file *entries;
int entry_count;
int maximum_count;
int visited;
int directories;
};
/* ---------- directory tables */
/* collects the entries of the subtree at offset (4-byte units), files or
directories as asked */
static void walk_directory(struct directory_walk *walk, unsigned long offset, int depth)
static void xiso_walk_collect(struct xiso_walk *walk, const unsigned char *entry)
{
struct xiso_entry *collected;
int name_length = entry[13];
int index;
if (((entry[12] & XISO_ATTRIBUTE_DIRECTORY) != 0) != (walk->directories != 0))
return;
if (walk->entry_count >= XISO_MAXIMUM_ENTRIES || !xiso_plain_name(entry + XISO_ENTRY_FIXED_SIZE, name_length))
return;
/* (the destination's file system may ignore case) */
for (index = 0; index < walk->entry_count; index++)
{
if (xiso_name_is((const char *)entry + XISO_ENTRY_FIXED_SIZE, name_length, walk->entries[index].name))
return;
}
collected = &walk->entries[walk->entry_count++];
memcpy(collected->name, entry + XISO_ENTRY_FIXED_SIZE, (size_t)name_length);
collected->name[name_length] = 0;
collected->sector = xiso_u32(entry + 4);
collected->size = xiso_u32(entry + 8);
}
/* the subtree whose root entry is at offset: its left subtree, the entry,
its right subtree. A link to padding, past the table or back to an entry
already visited ends that branch */
static void xiso_walk_entry(struct xiso_walk *walk, unsigned long offset, int depth)
{
const unsigned char *entry;
unsigned long left, right;
int name_length;
unsigned long left, right, name_length;
offset *= 4;
/* a malformed table must not loop or run off its end */
if (depth > 64 || ++walk->visited > 4096 || offset + ENTRY_HEADER_SIZE > walk->size)
if (walk->stopped || depth > XISO_MAXIMUM_DEPTH)
return;
if (offset >= walk->size || walk->size - offset < XISO_ENTRY_FIXED_SIZE)
return;
entry = walk->table + offset;
left = (unsigned long)entry[0] | (unsigned long)entry[1] << 8;
right = (unsigned long)entry[2] | (unsigned long)entry[3] << 8;
/* 0xFFFF: padding, an empty directory */
if (left == 0xFFFF)
left = xiso_u16(entry);
right = xiso_u16(entry + 2);
if (left == XISO_PADDING_LINK)
return;
name_length = entry[13];
/* (links are in 4-byte units, so every offset is a multiple of 4) */
if (walk->visited[offset >> 5] & (1 << ((offset >> 2) & 7)))
return;
walk->visited[offset >> 5] |= (unsigned char)(1 << ((offset >> 2) & 7));
if (walk->visits >= XISO_MAXIMUM_VISITS)
{
walk->stopped = 1;
return;
}
walk->visits++;
if (left)
walk_directory(walk, left, depth + 1);
if (offset + ENTRY_HEADER_SIZE + (unsigned long)name_length <= walk->size && name_length > 0 &&
!(entry[12] & ATTRIBUTE_DIRECTORY) == !walk->directories && walk->entry_count < walk->maximum_count)
{
struct xiso_file *file = &walk->entries[walk->entry_count];
memcpy(file->name, entry + ENTRY_HEADER_SIZE, (size_t)name_length);
file->name[name_length] = 0;
file->sector = read_u32(entry + 4);
file->size = read_u32(entry + 8);
/* (as extract-xiso refuses them: no name may leave the folder, and
none but a plain file name is written) */
if (name_is_plain(file->name))
{
walk->entry_count++;
}
}
xiso_walk_entry(walk, left * 4, depth + 1);
name_length = entry[13];
if (name_length && name_length <= walk->size - offset - XISO_ENTRY_FIXED_SIZE)
xiso_walk_collect(walk, entry);
if (right)
walk_directory(walk, right, depth + 1);
xiso_walk_entry(walk, right * 4, depth + 1);
}
/* whether a name is one to write in the maps folder: no path, no "." or
"..", and only printable ASCII that every desktop file system takes as a
plain name (a disc's maps folder holds .map files and loading.tga) */
static int name_is_plain(const char *name)
/* collects the folders (or the files) of a table, with plain names, into
entries (XISO_MAXIMUM_ENTRIES of them); returns how many, or -1 when out of
memory */
static int xiso_walk_table(const unsigned char *table, unsigned long size, int directories,
struct xiso_entry *entries)
{
const char *at;
struct xiso_walk walk;
if (!*name || !strcmp(name, ".") || !strcmp(name, ".."))
return 0;
for (at = name; *at; at++)
memset(&walk, 0, sizeof(walk));
walk.table = table;
walk.size = size;
walk.directories = directories;
walk.entries = entries;
walk.visited = calloc(size / 32 + 1, 1);
if (!walk.visited)
return -1;
xiso_walk_entry(&walk, 0, 0);
free(walk.visited);
return walk.entry_count;
}
/* ---------- the copy */
/* removes what an earlier, interrupted copy left in the folder at path */
static void xiso_empty_directory(const char *path, char *file_path, size_t file_path_size)
{
void *directory = posix_directory_open(path);
char name[260];
if (!directory)
return;
while (posix_directory_next(directory, name, sizeof(name)))
{
unsigned char c = (unsigned char)*at;
int length = snprintf(file_path, file_path_size, "%s/%s", path, name);
if (c < 0x20 || c > 0x7e || strchr("/\\:*?\"<>|", c))
return 0;
if (length > 0 && (size_t)length < file_path_size)
remove(file_path);
}
return 1;
posix_directory_close(directory);
}
static int names_match(const char *a, const char *b)
/* copies one file of the image to path, adding to *done as it goes */
static int xiso_copy_file(struct xiso_image *image, const struct xiso_entry *entry, const char *path,
unsigned char *buffer, unsigned long long *done, unsigned long long total, xiso_progress_proc progress,
void *context, char *error, int error_size)
{
for (; *a && *b; a++, b++)
{
char x = *a >= 'A' && *a <= 'Z' ? (char)(*a - 'A' + 'a') : *a;
char y = *b >= 'A' && *b <= 'Z' ? (char)(*b - 'A' + 'a') : *b;
if (x != y)
return 0;
}
return !*a && !*b;
}
static int copy_file(struct xiso_image *image, const struct xiso_file *file, const char *path,
unsigned char *buffer, unsigned long long *done, unsigned long long total,
xiso_progress_proc progress, void *context)
{
unsigned long long offset = image->partition + (unsigned long long)file->sector * SECTOR_SIZE;
unsigned long remaining = file->size;
/* (not through a link left in the folder) */
unsigned long long offset = xiso_sector_offset(image, entry->sector);
unsigned long remaining = entry->size;
int output = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW, 0644);
if (output < 0)
return fail(image, "Could not write %s.", path);
while (remaining > 0)
{
unsigned long count = remaining > COPY_BUFFER_SIZE ? COPY_BUFFER_SIZE : remaining;
xiso_error(error, error_size, "Could not write %s.", path);
return 0;
}
while (remaining)
{
unsigned long count = remaining < XISO_COPY_CHUNK ? remaining : XISO_COPY_CHUNK;
unsigned long written = 0;
if (!read_at(image, offset, buffer, count))
if (!xiso_read(image, offset, buffer, count))
{
close(output);
return fail(image, "Could not read %s from the disc image (is it complete?).", file->name);
xiso_error(error, error_size, "Could not read %s from the disc image (is it complete?).", entry->name);
return 0;
}
while (written < count)
{
long result = (long)write(output, buffer + written, count - written);
int result = (int)write(output, buffer + written, (unsigned int)(count - written));
if (result < 0 && errno == EINTR)
continue;
if (result <= 0)
{
close(output);
return fail(image, "Could not write %s (is the disk full?).", path);
xiso_error(error, error_size, "Could not write %s (is the disk full?).", path);
return 0;
}
written += (unsigned long)result;
}
@@ -309,109 +410,166 @@ static int copy_file(struct xiso_image *image, const struct xiso_file *file, con
remaining -= count;
*done += count;
if (progress)
progress(context, file->name, *done, total);
progress(context, entry->name, *done, total);
}
if (close(output) != 0)
return fail(image, "Could not write %s (is the disk full?).", path);
{
xiso_error(error, error_size, "Could not write %s (is the disk full?).", path);
return 0;
}
return 1;
}
/* ---------- public code */
int xiso_extract_maps(const char *image_path, const char *destination, xiso_progress_proc progress, void *context,
char *error, int error_size)
{
struct xiso_image image;
struct xiso_file *entries = NULL;
struct xiso_entry *entries = NULL;
unsigned char *table = NULL;
unsigned char *buffer = NULL;
unsigned long root_sector, root_size;
unsigned long long total = 0, done = 0;
char partial[1024], final[1024], path[1300];
int result = 0;
int index;
char *partial_path = NULL, *file_path = NULL, *maps_path = NULL;
unsigned long root_sector, root_size, maps_sector = 0, maps_size = 0;
unsigned long long done = 0, total = 0;
posix_ulong size_low, size_high;
int count, index, found, out_of_memory, succeeded = 0;
image.error = error;
image.error_size = error_size;
memset(&image, 0, sizeof(image));
image.descriptor = open(image_path, O_RDONLY | O_LARGEFILE | O_CLOEXEC);
if (image.descriptor < 0)
return fail(&image, "Could not open %s.", image_path);
entries = calloc(MAXIMUM_FILES, sizeof(*entries));
buffer = malloc(COPY_BUFFER_SIZE);
if (!entries || !buffer)
{
fail(&image, "Out of memory.%s", NULL);
xiso_error(error, error_size, "Could not open %s.", image_path);
return 0;
}
image.size = ~0ULL;
if (posix_seek(image.descriptor, 0, 0, SEEK_END, &size_low, &size_high) == 0)
image.size = (unsigned long long)size_high << 32 | size_low;
entries = malloc(sizeof(*entries) * XISO_MAXIMUM_ENTRIES);
buffer = malloc(XISO_COPY_CHUNK);
partial_path = malloc(XISO_MAXIMUM_PATH);
file_path = malloc(XISO_MAXIMUM_PATH);
maps_path = malloc(XISO_MAXIMUM_PATH);
if (!entries || !buffer || !partial_path || !file_path || !maps_path)
{
xiso_error(error, error_size, "Out of memory.");
goto done;
}
if (!find_volume(&image, &root_sector, &root_size))
if (!xiso_find_volume(&image, &root_sector, &root_size))
{
xiso_error(error, error_size, "This is not an Xbox disc image.");
goto done;
}
/* the root's maps folder */
table = read_directory(&image, root_sector, root_size);
table = xiso_read_table(&image, root_sector, root_size, &out_of_memory);
if (!table)
{
fail(&image, "The disc image's file system is damaged.%s", NULL);
xiso_error(error, error_size, out_of_memory ? "Out of memory." : "The disc image's file system is damaged.");
goto done;
}
count = xiso_walk_table(table, root_size, 1, entries);
free(table);
table = NULL;
if (count < 0)
{
struct directory_walk walk = { table, root_size, entries, 0, MAXIMUM_FILES, 0, 1 };
walk_directory(&walk, 0, 0);
for (index = 0; index < walk.entry_count && !names_match(entries[index].name, "maps"); index++)
;
if (index == walk.entry_count)
xiso_error(error, error_size, "Out of memory.");
goto done;
}
for (found = 0, index = 0; index < count && !found; index++)
{
if (xiso_name_is(entries[index].name, (int)strlen(entries[index].name), "maps"))
{
fail(&image, "The disc image has no maps folder: it is not a Halo disc.%s", NULL);
goto done;
maps_sector = entries[index].sector;
maps_size = entries[index].size;
found = 1;
}
free(table);
table = read_directory(&image, entries[index].sector, entries[index].size);
if (!table)
{
fail(&image, "The disc image's maps folder is damaged.%s", NULL);
goto done;
}
root_size = entries[index].size;
}
if (!found)
{
xiso_error(error, error_size, "The disc image has no maps folder: it is not a Halo disc.");
goto done;
}
/* its files */
table = xiso_read_table(&image, maps_sector, maps_size, &out_of_memory);
if (!table)
{
struct directory_walk walk = { table, root_size, entries, 0, MAXIMUM_FILES, 0, 0 };
int has_ui = 0;
walk_directory(&walk, 0, 0);
for (index = 0; index < walk.entry_count; index++)
xiso_error(error, error_size, out_of_memory ? "Out of memory." : "The disc image's maps folder is damaged.");
goto done;
}
count = xiso_walk_table(table, maps_size, 0, entries);
free(table);
table = NULL;
if (count < 0)
{
xiso_error(error, error_size, "Out of memory.");
goto done;
}
for (found = 0, index = 0; index < count && !found; index++)
found = xiso_name_is(entries[index].name, (int)strlen(entries[index].name), "ui.map");
if (!found)
{
xiso_error(error, error_size, "The disc image's maps folder has no ui.map: it is not a Halo disc.");
goto done;
}
/* (an image that ends before a file does is refused before anything is
written; an empty file's sector need not be anywhere) */
for (index = 0; index < count; index++)
{
if (entries[index].size &&
xiso_sector_offset(&image, entries[index].sector) + entries[index].size > image.size)
{
total += entries[index].size;
has_ui |= names_match(entries[index].name, "ui.map");
}
if (!has_ui)
{
fail(&image, "The disc image's maps folder has no ui.map: it is not a Halo disc.%s", NULL);
xiso_error(error, error_size, "Could not read %s from the disc image (is it complete?).",
entries[index].name);
goto done;
}
snprintf(partial, sizeof(partial), "%s/maps.partial", destination);
snprintf(final, sizeof(final), "%s/maps", destination);
posix_make_directory(partial);
for (index = 0; index < walk.entry_count; index++)
total += entries[index].size;
}
/* the copy, to maps.partial */
if (snprintf(partial_path, XISO_MAXIMUM_PATH, "%s/" XISO_PARTIAL_DIRECTORY, destination) >= XISO_MAXIMUM_PATH ||
snprintf(maps_path, XISO_MAXIMUM_PATH, "%s/maps", destination) >= XISO_MAXIMUM_PATH)
{
xiso_error(error, error_size, "Could not create %s/maps.", destination);
goto done;
}
/* (an existing one is reused, emptied; a failure to make it shows as a
failure to write the first file) */
posix_make_directory(partial_path);
xiso_empty_directory(partial_path, file_path, XISO_MAXIMUM_PATH);
for (index = 0; index < count; index++)
{
platform_log("extracting maps/%s (%lu bytes)", entries[index].name, entries[index].size);
if (snprintf(file_path, XISO_MAXIMUM_PATH, "%s/%s", partial_path, entries[index].name) >= XISO_MAXIMUM_PATH)
{
snprintf(path, sizeof(path), "%s/%s", partial, entries[index].name);
platform_log("extracting maps/%s (%lu bytes)", entries[index].name, entries[index].size);
if (!copy_file(&image, &entries[index], path, buffer, &done, total, progress, context))
goto done;
xiso_error(error, error_size, "Could not write %s/%s.", partial_path, entries[index].name);
goto done;
}
if (rename(partial, final) != 0)
if (!xiso_copy_file(&image, &entries[index], file_path, buffer, &done, total, progress, context,
error, error_size))
{
fail(&image, "Could not create %s.", final);
goto done;
}
}
result = 1;
if (rename(partial_path, maps_path) != 0)
{
xiso_error(error, error_size, "Could not create %s.", maps_path);
goto done;
}
succeeded = 1;
done:
close(image.descriptor);
free(table);
free(entries);
free(maps_path);
free(file_path);
free(partial_path);
free(buffer);
return result;
free(entries);
close(image.descriptor);
return succeeded;
}
#endif
+24
View File
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org/>
+17
View File
@@ -0,0 +1,17 @@
# english-words
A list of 370,105 English words, by dwyl and its contributors, released into
the public domain (the Unlicense, see `LICENSE.md`).
Upstream: https://github.com/dwyl/english-words, commit
`20f5cc9b3f0ccc8ce45d814c532b7c2031bba31c`. `words_alpha.txt.gz` is its
`words_alpha.txt` (SHA-256
3ed0c94610d8bcf7c11bbb49c56aa49c7234d32b66824df91f554169e572da48), unchanged
but compressed (`gzip -9 -n`).
Nothing the game builds uses it. Streamer mode's tools do:
`tools/text_filter_terms.py` works out where each word it hides may be found
(inside a word, at a word's start, or only as a whole word) from which
English words contain it, and `tools/test_text_filter_terms.py` checks that
the words hidden in English are those expected
(`port/assets/text_filter/english.txt`).
Binary file not shown.
-75
View File
@@ -1,75 +0,0 @@
This is an xdvdfs (xbox iso) file creation/extraction utility for linux/darwin/
freebsd.
If you want to port it to your OS it shouldn't be too hard, just make sure your
fseek/ftell takes 64-bit file offsets.
I wrote this code completely from scratch today because xbiso (the one on
sourceforge) keeps seg-faulting and the code is buggy. I got useful
documentation on the xdvdfs file system from http://xbox-linux.sourceforge.net.
I will say thanks though to the author of xbiso, it was a good start and got me
thinking!
Regarding licensing:
I think the GPL sucks! (it stands for Generosity Poor License)
My open-source code is really *FREE* so you can do whatever you want with it, as
long as 1) you don't claim that you wrote my code and 2) you retain a notice
that some parts of the code are copyright in@fishtank.com and 3) you understand
there are no warranties. I only guarantee that it will take up disk space!
If you want to help out with this project it would be welcome, just email me at
in@fishtank.com.
This code is copyright in@fishtank.com and is licensed under a slightly
modifified version of the Berkeley Software License, which follows:
/*
* Copyright (c) 2003 in <in@fishtank.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by in <in@fishtank.com>.
*
* 4. Neither the name of "in" nor the email address "in@fishtank.com"
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Please send bug reports to me at in@fishtank.com
To compile, run 'make' in the source directory.
NOTE: You need to be running GNU make and /bin/bash must be executable
Enjoy!
in version 1.0
March 10, 2003
-16
View File
@@ -1,16 +0,0 @@
# extract-xiso
An Xbox disc image (xdvdfs) extraction and creation tool by in
<in@fishtank.com>, under a modified BSD license (see `LICENSE.TXT`, copied
unchanged from upstream).
Upstream: https://github.com/XboxDev/extract-xiso, commit
3f5b62cfe68f000b0e3c8a30104973f3a297948e.
None of its code is built as it is: `port/linux/src/xiso.c`, which copies
the maps folder out of a disc image when a desktop port starts without game
data, reads the format as `extract-xiso.c` does and carries its notice. The
desktop builds' artifacts include `LICENSE.TXT` as
`extract-xiso-LICENSE.txt`.
This product includes software developed by in <in@fishtank.com>.
+19 -1
View File
@@ -366,6 +366,23 @@ the `pages` job deploys the release build to GitHub Pages: only from `main`,
only once every platform built and the release is out, and never cancelled
halfway. The Discord post has a Web field and the site's address.
The game's wasm, most of a build, does not come from GitHub Pages, which
serves 100 GB a month: the `pages` job pushes it alone in a commit of the
`web-wasm` branch (over the last one, so the repository keeps one copy),
checks that jsDelivr serves that commit's file
(`https://cdn.jsdelivr.net/gh/OpenCommunityEdition/OpenCE@<commit>/halo.wasm`,
with CORS, which GitHub's release downloads lack), and names it and its
SHA-256 in `version.json` (`"wasm": {"url", "sha256"}`). The service worker
fetches the wasm from there as it caches the build, checks its SHA-256, and
takes the site's copy only when that fails; the page loads `halo.wasm` from
the site as before, from the worker's cache. jsDelivr serves files of at most
20 MB from GitHub: a larger wasm comes from the site, and the step says so.
The page counts its visits with Umami (`https://nexus.mrbruh.com/app-state`
in `index.html`, which sets no cookies). The page being cross-origin
isolated, the script is loaded with `crossorigin="anonymous"`: its host sends
CORS headers, not `Cross-Origin-Resource-Policy`.
Once, an owner of the organization sets it up:
1. Organization settings → Pages → **Add a verified domain**:
@@ -387,7 +404,8 @@ response header rule adding `Cross-Origin-Opener-Policy: same-origin`,
`Cross-Origin-Embedder-Policy: require-corp` and
`Cross-Origin-Resource-Policy: same-origin`: the first visit then needs no
reload, and Cloudflare's cache takes GitHub Pages' bandwidth (100 GB a month;
a first visit downloads about 10 MB, compressed).
a first visit downloads about 10 MB, compressed, most of it the wasm from
jsDelivr).
## Files
+11 -7
View File
@@ -1,7 +1,7 @@
"""Writes the web site's licenses.txt (tools/web_build.py): the notices of
the code and fonts that halo.wasm and the page carry, which their licences
ask copies to include, as the other builds' releases carry them
(tools/ci_build.py).
"""Writes the web site's licenses.txt (tools/web_build.py): OpenCE's licence,
and the notices of the code and fonts that halo.wasm and the page carry,
which their licences ask copies to include, as the other builds' releases
carry them (tools/ci_build.py).
python port/web/licenses.py OUTPUT SDL3-LICENSE
"""
@@ -21,7 +21,6 @@ NOTICES = [
("tomlc17 (config.toml, mod.toml, load_order.toml)", "port/third_party/tomlc17/LICENSE"),
("musl (the maths functions)", "port/third_party/musl-math/COPYRIGHT"),
("stb_vorbis (Custom Edition maps' and mods' sounds)", "port/third_party/stb_vorbis/LICENSE"),
("extract-xiso (how the disc image is read)", "port/third_party/extract-xiso/LICENSE.TXT"),
("Overpass (the menus' text and the page's)", "port/assets/fonts/Overpass-OFL.txt"),
("OpenCE (the title font, from Newtown)", "port/assets/fonts/OpenCE-OFL.txt"),
("Newtown", "port/assets/fonts/Newtown-LICENSE.txt"),
@@ -33,12 +32,17 @@ def main() -> None:
output, sdl_license = Path(sys.argv[1]), Path(sys.argv[2])
parts = [
"OpenCE for the web\n\n"
"OpenCE's own code is CC0 (https://github.com/OpenCommunityEdition/OpenCE). The game data\n"
"comes from the player's own disc. It carries the following, under their licences:\n",
"OpenCE is free software under the GNU Affero General Public License, version 3 or (at\n"
"your option) any later version; its text is at the end of this file. Its source is at\n"
"https://github.com/OpenCommunityEdition/OpenCE, and each release's at its tag. The game\n"
"data comes from the player's own disc. OpenCE carries the following, under their\n"
"licences:\n",
f"\n==================== SDL 3 (windows, input and audio)\n\n{sdl_license.read_text(encoding='utf-8')}",
]
for title, path in NOTICES:
parts.append(f"\n==================== {title}\n\n{(ROOT / path).read_text(encoding='utf-8')}")
parts.append(f"\n==================== OpenCE (GNU Affero General Public License)\n\n"
f"{(ROOT / 'LICENSE').read_text(encoding='utf-8')}")
output.write_text("".join(parts), encoding="utf-8")
+11 -1
View File
@@ -351,6 +351,7 @@ async function refreshMods() {
}));
$('mods-status').textContent = found.length ? `${found.length} mod${found.length === 1 ? '' : 's'} in this browser.` :
'No mods yet.';
summarize('summary-mods', null, found.length ? `${found.length} mod${found.length === 1 ? '' : 's'}` : 'None yet');
await refreshStorage();
}
@@ -513,10 +514,19 @@ function canPlay() {
return checksPassed && dataReady && !gameStarted;
}
// the Ready to play screen's rows: a row good or bad, and its value
function summarize(id, good, text) {
$(id).classList.toggle('good', good === true);
$(id).classList.toggle('bad', good === false);
$(id + '-value').textContent = text;
}
function updatePlay() {
$('play').disabled = !canPlay();
$('play-note').textContent = !checksPassed ? 'This browser cannot run the game (above).' :
$('play-note').textContent = !checksPassed ? 'This browser cannot run the game: see This browser, below.' :
!dataReady ? 'The game data is needed first.' : '';
summarize('summary-browser', checksPassed, checksPassed ? 'Runs the game' : 'Cannot run the game');
summarize('summary-data', dataReady, dataReady ? $('data-status').textContent : 'Needed first');
}
// init.txt in the data folder: the console commands the game runs as it
+137 -86
View File
@@ -5,109 +5,158 @@
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>OpenCE</title>
<meta name="description" content="Halo: Combat Evolved in your browser, from your own Xbox disc image. OpenCE, the decompilation's port.">
<meta name="theme-color" content="#0a0e14">
<meta name="theme-color" content="#072852">
<link rel="manifest" href="manifest.webmanifest">
<link rel="icon" href="icons/icon-32.png" sizes="32x32">
<link rel="apple-touch-icon" href="icons/icon-180.png">
<link rel="stylesheet" href="style.css">
<!-- visits counted with Umami (no cookies); crossorigin: the page is cross-origin isolated (sw.js), and the
script's host sends CORS headers but no Cross-Origin-Resource-Policy -->
<script async src="https://nexus.mrbruh.com/app-state" data-website-id="41f29092-7d68-41d8-b562-c1e3d851a778"
crossorigin="anonymous"></script>
</head>
<body>
<main id="launcher">
<header class="masthead">
<img src="icons/icon-192.png" alt="" width="72" height="72">
<div>
<h1>OpenCE</h1>
<p class="tagline">Halo: Combat Evolved in your browser, from your own Xbox disc.</p>
<div class="masthead-inner">
<img src="icons/icon-192.png" alt="" width="68" height="68">
<div>
<h1>OpenCE</h1>
<p class="tagline">Halo: Combat Evolved in your browser, from your own Xbox disc.</p>
</div>
</div>
</header>
<section class="panel" id="checks-panel" aria-labelledby="checks-title">
<h2 id="checks-title">This browser</h2>
<ul id="checks" class="checks"></ul>
<p id="checks-note" class="note" hidden></p>
</section>
<div class="stage">
<div class="layout">
<nav class="menu" aria-label="Launcher">
<a href="#play-panel" class="menu-current">Play</a>
<a href="#data-panel">Game data</a>
<a href="#mods-panel">Mods</a>
<a href="#room-panel">Play together</a>
<a href="#checks-panel">This browser</a>
<a href="#settings-panel">Settings and data</a>
<a href="#about-panel">About</a>
<p class="menu-note">Keyboard: as on the desktop, but crouch is C (Ctrl would close the tab).</p>
<p class="menu-note"><a href="https://discord.com/invite/OpenCE" rel="noopener">Join us on Discord</a></p>
</nav>
<section class="panel" id="data-panel" aria-labelledby="data-title">
<h2 id="data-title">Game data</h2>
<p id="data-status" class="status">Looking…</p>
<div class="actions">
<label class="button" id="image-label">Choose a disc image…
<input type="file" id="image-input" accept=".iso,.xiso,application/octet-stream" hidden>
</label>
<label class="button" id="folder-label">Choose a maps folder…
<input type="file" id="folder-input" webkitdirectory multiple hidden>
</label>
</div>
<div id="import-progress" class="progress" hidden>
<div class="progress-bar"><div id="import-bar"></div></div>
<p id="import-text" class="note"></p>
</div>
<p class="note">The maps are copied out of your own disc image (an .iso of Halo: Combat Evolved for the
Xbox) into this browser's storage for this site. Nothing is uploaded, and the site serves no game data.</p>
</section>
<div class="screens">
<section class="screen" id="play-panel" aria-labelledby="play-title">
<h2 id="play-title">Ready to play</h2>
<div class="rows">
<div class="row" id="summary-browser"><span class="row-label">This browser</span>
<span class="row-value" id="summary-browser-value">Looking…</span></div>
<div class="row" id="summary-data"><span class="row-label">Game data</span>
<span class="row-value" id="summary-data-value">Looking…</span></div>
<div class="row" id="summary-mods"><span class="row-label">Mods</span>
<span class="row-value" id="summary-mods-value">None yet</span></div>
</div>
<p class="help">The game starts in this tab. Its own menus, saved games and settings stay in this browser.</p>
<p id="play-note" class="help note"></p>
<div class="button-bar">
<button id="play" class="primary play" disabled>Play</button>
</div>
</section>
<section class="panel" id="mods-panel" aria-labelledby="mods-title">
<h2 id="mods-title">Mods</h2>
<p id="mods-status" class="status">No mods yet.</p>
<ul id="mods-list" class="mods"></ul>
<div class="actions">
<label class="button" id="mod-label">Add a mod folder…
<input type="file" id="mod-input" webkitdirectory multiple hidden>
</label>
</div>
<p class="note">A mod is a folder with a mod.toml and a tags folder of Halo PC tag files: sounds, textures and
text that play over the maps' for you alone. Each is played once added: the game's main menu's Mods turns them
off and sets the order they load in.</p>
</section>
<section class="screen" id="data-panel" aria-labelledby="data-title">
<h2 id="data-title">Game data</h2>
<div class="rows">
<div class="row selected"><span class="row-label">Maps</span>
<span class="row-value" id="data-status">Looking…</span></div>
<div id="import-progress" class="row progress" hidden>
<div class="progress-bar"><div id="import-bar"></div></div>
<p id="import-text" class="note"></p>
</div>
</div>
<p class="help">The maps are copied out of your own disc image (an .iso of Halo: Combat Evolved for the
Xbox) into this browser's storage for this site. Nothing is uploaded, and the site serves no game data.</p>
<div class="button-bar">
<label class="button" id="image-label">Choose a disc image…
<input type="file" id="image-input" accept=".iso,.xiso,application/octet-stream" hidden>
</label>
<label class="button" id="folder-label">Choose a maps folder…
<input type="file" id="folder-input" webkitdirectory multiple hidden>
</label>
</div>
</section>
<section class="panel" id="room-panel" aria-labelledby="room-title">
<h2 id="room-title">Play together</h2>
<p id="room-status" class="status">Play system link with friends in their browsers: create a room and send them
its link. Each of you then finds the others' games under Multiplayer.</p>
<div class="actions">
<button id="room-create">Create a room</button>
<button id="room-copy" hidden>Copy the room's link</button>
<button id="room-leave" hidden>Leave the room</button>
</div>
<p class="note">The browsers of a room connect to each other directly. They find each other through public
message brokers, which see nothing of the room: what they pass on is sealed with the link's secret. The
Linux, Windows and Android builds cannot join a room yet.</p>
</section>
<section class="screen" id="mods-panel" aria-labelledby="mods-title">
<h2 id="mods-title">Mods</h2>
<div class="rows">
<p id="mods-status" class="row status">No mods yet.</p>
<ul id="mods-list" class="mods"></ul>
</div>
<p class="help">A mod is a folder with a mod.toml and a tags folder of Halo PC tag files: sounds, textures
and text that play over the maps' for you alone. Each is played once added: the game's main menu's Mods
turns them off and sets the order they load in.</p>
<div class="button-bar">
<label class="button" id="mod-label">Add a mod folder…
<input type="file" id="mod-input" webkitdirectory multiple hidden>
</label>
</div>
</section>
<div class="play-row">
<button id="play" class="primary" disabled>Play</button>
<p id="play-note" class="note"></p>
<section class="screen" id="room-panel" aria-labelledby="room-title">
<h2 id="room-title">Play together</h2>
<p id="room-status" class="help">Play system link with friends in their browsers: create a room and send
them its link. Each of you then finds the others' games under Multiplayer.</p>
<p class="help note">The browsers of a room connect to each other directly. They find each other through
public message brokers, which see nothing of the room: what they pass on is sealed with the link's
secret. The Linux, Windows and Android builds cannot join a room yet.</p>
<div class="button-bar">
<button id="room-create">Create a room</button>
<button id="room-copy" hidden>Copy the room's link</button>
<button id="room-leave" hidden>Leave the room</button>
</div>
</section>
<section class="screen no-bar" id="checks-panel" aria-labelledby="checks-title">
<h2 id="checks-title">This browser</h2>
<div class="rows">
<ul id="checks" class="checks"></ul>
</div>
<p id="checks-note" class="help note" hidden></p>
</section>
<section class="screen" id="settings-panel" aria-labelledby="settings-title">
<h2 id="settings-title">Settings and data</h2>
<div class="rows">
<div class="row"><span class="row-label">This site</span>
<span class="row-value" id="storage-status"></span></div>
</div>
<p class="help">The game's own settings (Settings in its menus, and <code>config.toml</code>) travel with
exported saved games.</p>
<div class="button-bar">
<button id="persist">Keep this site's data</button>
<button id="export-saves">Export saved games</button>
<button id="download-log">Download the log</button>
<button id="delete-data" class="danger">Delete the game data</button>
</div>
</section>
<section class="screen" id="about-panel" aria-labelledby="about-title">
<h2 id="about-title">About</h2>
<p class="help">OpenCE is the Halo: Combat Evolved decompilation (Xbox build 01.01.14.2342), ported to
Linux, Windows, Android and the web. It is not affiliated with Microsoft or Bungie.</p>
<dl class="rows facts">
<div class="row"><dt class="row-label">Build</dt><dd class="row-value" id="about-build">–</dd></div>
<div class="row"><dt class="row-label">Commit</dt><dd class="row-value" id="about-commit">–</dd></div>
<div class="row"><dt class="row-label">Network version</dt>
<dd class="row-value" id="about-network">–</dd></div>
</dl>
<div class="button-bar links">
<a href="https://discord.com/invite/OpenCE" rel="noopener">Discord</a>
<a href="https://github.com/OpenCommunityEdition/OpenCE">Source</a>
<a href="https://github.com/OpenCommunityEdition/OpenCE/releases/latest">Linux, Windows and Android
builds</a>
<a href="licenses.txt">Licences</a>
</div>
</section>
</div>
</div>
</div>
<details class="panel" id="settings-panel">
<summary>Settings and data</summary>
<p id="storage-status" class="note"></p>
<div class="actions">
<button id="persist">Keep this site's data</button>
<button id="export-saves">Export saved games</button>
<button id="download-log">Download the log</button>
<button id="delete-data" class="danger">Delete the game data</button>
</div>
<p class="note">The game's own settings (Settings in its menus, and <code>config.toml</code>) travel with
exported saved games. Keyboard: as on the desktop, but crouch is C (Ctrl would close the tab).</p>
</details>
<details class="panel" id="about-panel">
<summary>About</summary>
<p>OpenCE is the Halo: Combat Evolved decompilation (Xbox build 01.01.14.2342), ported to Linux, Windows,
Android and the web. It is not affiliated with Microsoft or Bungie.</p>
<dl class="facts">
<dt>Build</dt><dd id="about-build">–</dd>
<dt>Commit</dt><dd id="about-commit">–</dd>
<dt>Network version</dt><dd id="about-network">–</dd>
</dl>
<p>
<a href="https://github.com/OpenCommunityEdition/OpenCE">Source</a> ·
<a href="https://github.com/OpenCommunityEdition/OpenCE/releases/latest">Linux, Windows and Android builds</a> ·
<a href="licenses.txt">Licences</a>
</p>
</details>
<footer class="site-footer">
<p>OpenCE is an unofficial fan project. It is not endorsed by or affiliated with Microsoft, Xbox Game Studios,
Halo Studios or Bungie. Halo and Halo: Combat Evolved are trademarks of Microsoft Corporation;
@@ -129,6 +178,8 @@
<button id="invite-close" aria-label="Hide">Hide</button>
</div>
<div class="toolbar" id="toolbar">
<a class="button" id="discord" href="https://discord.com/invite/OpenCE" target="_blank" rel="noopener"
title="Our Discord, in a new tab (the game goes on)">Join Discord</a>
<button id="fullscreen" title="Fullscreen">Fullscreen</button>
<button id="leave" title="Back to the launcher (the game stops)">Quit</button>
</div>
+2 -2
View File
@@ -6,8 +6,8 @@
"scope": "./",
"display": "fullscreen",
"orientation": "landscape",
"background_color": "#0a0e14",
"theme_color": "#0a0e14",
"background_color": "#02060c",
"theme_color": "#072852",
"icons": [
{ "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png" }
+365 -141
View File
@@ -1,5 +1,8 @@
/* The launcher page (index.html): the colours of the game's menus, the
fonts the port draws them with (Overpass, and OpenCE for the title). */
/* The launcher page (index.html), in the look of the menus' redraws
(port/assets/menus/svg): navy panels with a 2px blue edge, the selected
one brighter and glowing, the settings screens' gradient between a bright
rule and a button bar's, and the fonts the port draws the menus with
(OpenCE for titles, Overpass for the rest). */
@font-face {
font-family: "OpenCE";
@@ -12,29 +15,42 @@
src: url("fonts/Overpass-750.ttf") format("truetype");
font-display: swap;
}
@font-face {
font-family: "Overpass";
font-weight: 900;
src: url("fonts/Overpass-900.ttf") format("truetype");
font-display: swap;
}
:root {
color-scheme: dark;
--background: #0a0e14;
--panel: #111925;
--panel-edge: #23324a;
--text: #dbe4f0;
--muted: #8ea0b8;
--accent: #4fb3ff;
--accent-text: #04121f;
--good: #5ed39a;
--bad: #ff6b6b;
--warn: #f2c14e;
--radius: 10px;
/* the redraws' colours */
--ground: #02060c;
--navy: #002244;
--navy-deep: #000e23;
--row: rgba(0, 17, 34, 0.6);
--edge: #2299ff;
--edge-bright: #36afff;
--edge-dim: #1d4f86;
--label: #2896ff;
--text: #ffffff;
--soft: #c9daf0;
--glow: rgba(54, 175, 255, 0.45);
/* a problem: orange, apart from the blue in lightness too */
--bad: #ff9b42;
--bad-text: #ffd2a8;
--bad-ground: #2a1404;
--label-font: "Overpass", system-ui, sans-serif;
--title-font: "OpenCE", "Overpass", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
background: var(--background);
background: var(--ground);
color: var(--text);
font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
font: 750 16px/1.5 var(--label-font);
}
body {
@@ -42,110 +58,275 @@ body {
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent); }
code { font-size: 0.9em; }
a { color: var(--edge-bright); }
a:hover { color: #9fd6ff; }
code { font-size: 0.95em; }
#launcher {
max-width: 720px;
margin: 0 auto;
padding: 32px 16px 64px;
}
/* ---------- the masthead: the settings screens' header band */
.masthead {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 24px;
background: linear-gradient(180deg, #0b3466 0%, #072852 45%, #041a35 100%);
border-bottom: 1px solid var(--edge-bright);
}
.masthead img { border-radius: 16px; flex: none; }
.masthead-inner {
max-width: 1180px;
margin: 0 auto;
padding: 28px 32px 24px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
}
.masthead img { flex: none; border-radius: 14px; box-shadow: 0 0 0 2px var(--edge); }
.masthead h1 {
margin: 0;
font: 400 44px/1 "OpenCE", "Overpass", system-ui, sans-serif;
font: 400 60px/1 var(--title-font);
letter-spacing: 0.04em;
}
.tagline { margin: 6px 0 0; color: var(--muted); }
.panel {
background: var(--panel);
border: 1px solid var(--panel-edge);
border-radius: var(--radius);
padding: 16px 20px;
margin: 16px 0;
}
.panel h2, .panel summary, .sheet h2 {
margin: 0 0 8px;
font: 750 15px/1.3 "Overpass", system-ui, sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
color: var(--label);
text-shadow: 0 0 22px var(--glow);
}
details.panel summary { cursor: pointer; margin: 0; }
details.panel[open] summary { margin-bottom: 12px; }
.tagline { margin: 4px 0 0; color: var(--soft); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; }
.checks li::before {
content: "";
flex: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--muted);
transform: translateY(-1px);
/* ---------- the stage: the menu beside the screens */
.stage { background: linear-gradient(180deg, #072852 0px, #062247 320px, #031122 960px, var(--ground) 1500px); }
.layout {
max-width: 1180px;
margin: 0 auto;
padding: 40px 32px 64px;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 40px;
}
.checks li.good::before { background: var(--good); }
.checks li.bad::before { background: var(--bad); }
.checks li.warn::before { background: var(--warn); }
.checks .detail { color: var(--muted); font-size: 14px; }
.status { margin: 0 0 12px; }
.note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
/* the main menu's list: each item its words, the current one the redraws'
selected list item (a rounded left end, open on the right) */
.menu {
flex: 1 1 260px;
max-width: 340px;
display: flex;
flex-direction: column;
gap: 6px;
}
.menu > a {
display: block;
padding: 12px 22px;
border: 2px solid transparent;
border-right: none;
border-radius: 18px 0 0 18px;
color: var(--label);
text-decoration: none;
font: 900 22px/1.3 var(--label-font);
letter-spacing: 0.06em;
text-transform: uppercase;
}
.menu > a:hover, .menu > a:focus-visible, .menu > a.menu-current {
border-color: var(--edge);
background: var(--navy-deep);
color: var(--text);
text-shadow: 0 0 12px rgba(54, 175, 255, 0.8);
outline: none;
}
.menu-note { margin: 18px 22px 0; font-size: 14px; line-height: 1.55; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.screens {
flex: 999 1 560px;
min-width: 0;
display: flex;
flex-direction: column;
gap: 36px;
}
/* a screen: a title, its rows, its help and its button bar, between the
settings screens' bright rule and the button bar's */
.screen {
background: rgba(0, 10, 24, 0.55);
border-top: 1px solid var(--edge-bright);
border-bottom: 1px solid var(--label);
scroll-margin-top: 16px;
}
.screen h2 {
margin: 0;
padding: 22px 28px 14px;
font: 400 36px/1.1 var(--title-font);
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--label);
}
.rows {
margin: 0;
padding: 0 28px;
display: flex;
flex-direction: column;
gap: 8px;
}
.help { margin: 0; padding: 16px 28px 0; }
.screen h2 + .help { padding-top: 0; }
.help.note { color: var(--soft); font-size: 14px; }
.help:empty, .note:empty { display: none; }
/* (a screen without a button bar ends its rows as the bar would) */
.screen.no-bar { padding-bottom: 24px; }
.button-bar {
margin-top: 20px;
background: rgba(0, 0, 0, 0.7);
border-top: 1px solid var(--label);
padding: 16px 28px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12px;
}
.button-bar.links { gap: 8px 24px; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; }
/* a row: the unselected option's translucent bar, a selected one the
redraws' panel with the blue edge; its label in blue, its value white */
.row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 6px 16px;
min-height: 44px;
margin: 0;
padding: 8px 18px;
border: 2px solid transparent;
border-radius: 12px;
background: var(--row);
}
.row.selected { border-color: var(--edge); background: var(--navy); }
.row-label { margin: 0; color: var(--label); text-transform: uppercase; letter-spacing: 0.03em; }
.row-value { margin: 0; text-align: right; overflow-wrap: anywhere; text-transform: uppercase; }
/* (a tick: the bright blue's) */
.row.good .row-value, .checks li.good::after {
padding-left: 24px;
background: left center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2336afff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.row.bad, .checks li.bad { border-color: var(--bad); background: var(--bad-ground); }
.row.bad .row-label, .checks li.bad { color: #ffb46e; }
.row.bad .row-value { color: var(--bad-text); }
.status { color: var(--soft); text-transform: uppercase; letter-spacing: 0.03em; }
/* the browser's checks (app.js's addCheck: a class good, bad or warn, its
words, and a detail): rows, the label's words in blue and a mark at the end */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px 16px;
min-height: 44px;
padding: 8px 18px;
border: 2px solid transparent;
border-radius: 12px;
background: var(--row);
color: var(--label);
text-transform: uppercase;
letter-spacing: 0.03em;
}
.checks li::after { order: 2; margin-left: auto; color: var(--text); }
.checks li.good::after { content: "Yes"; }
.checks li.bad::after { content: "Missing"; color: var(--bad-text); }
.checks li.warn { border-color: var(--edge-dim); }
.checks li.warn::after { content: "Maybe"; color: var(--soft); }
.checks .detail {
order: 3;
flex-basis: 100%;
color: var(--soft);
font-size: 14px;
text-transform: none;
letter-spacing: 0;
}
/* the mods (app.js: a name with its folder, and Remove): rows */
.mods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mods:empty { display: none; }
.mods li {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px 16px;
min-height: 44px;
padding: 6px 8px 6px 18px;
border-radius: 12px;
background: var(--row);
color: var(--label);
text-transform: uppercase;
letter-spacing: 0.03em;
}
.mods .detail { color: var(--soft); font-size: 14px; text-transform: none; letter-spacing: 0; }
.mods button { min-height: 36px; padding: 0 16px; font-size: 13px; }
/* the copy of the maps: a meter in a row */
.progress { flex-direction: column; align-items: stretch; }
.progress-bar { height: 10px; border-radius: 5px; background: var(--navy-deep); box-shadow: inset 0 0 0 1px var(--edge-dim); overflow: hidden; }
.progress-bar > div {
height: 100%;
width: 0;
border-radius: 5px;
background: var(--edge);
box-shadow: 0 0 10px rgba(54, 175, 255, 0.6);
transition: width 0.2s;
}
.progress .note { margin: 0; color: var(--soft); font-size: 14px; }
.facts dd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; text-transform: none; }
/* ---------- buttons: the redraws' text button, the default one glowing */
button, .button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 40px;
padding: 8px 16px;
border: 1px solid var(--panel-edge);
border-radius: 8px;
background: #182436;
min-height: 44px;
padding: 0 22px;
border: 2px solid var(--edge);
border-radius: 10px;
background: var(--navy);
color: var(--text);
font: 750 14px/1 "Overpass", system-ui, sans-serif;
letter-spacing: 0.04em;
font: 750 15px/1 var(--label-font);
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
}
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
button:focus-visible, .button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled, .button.disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-text);
button:hover:not(:disabled), .button:hover { border-color: var(--edge-bright); box-shadow: 0 0 12px var(--glow); }
button:focus-visible, .button:focus-within { outline: 2px solid var(--edge-bright); outline-offset: 3px; }
button:disabled, .button.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
button.primary { border-color: var(--edge-bright); font-weight: 900; box-shadow: 0 0 14px var(--glow); }
button.play { min-height: 52px; min-width: 220px; padding: 0 36px; font-size: 22px; letter-spacing: 0.08em; }
button.danger { border-color: var(--bad); background: var(--bad-ground); color: var(--bad-text); }
button.danger:hover:not(:disabled) { border-color: #ffb46e; box-shadow: 0 0 12px rgba(255, 155, 66, 0.4); }
.note { color: var(--soft); font-size: 14px; }
.site-footer { background: #000000; border-top: 1px solid var(--label); }
.site-footer p {
max-width: 1180px;
margin: 0 auto;
padding: 24px 32px 32px;
color: #a9bfdc;
font-size: 13px;
line-height: 1.6;
}
button.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }
.mods { list-style: none; margin: 0 0 12px; padding: 0; }
.mods li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 4px 0; }
.mods .detail { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
.masthead-inner { padding: 20px 16px; gap: 14px; }
.masthead img { width: 52px; height: 52px; }
.masthead h1 { font-size: 44px; }
.layout { padding: 24px 16px 48px; gap: 24px; }
.menu { max-width: none; }
.menu > a { font-size: 19px; padding: 10px 18px; }
.screen h2 { padding: 18px 16px 12px; font-size: 30px; }
.rows { padding: 0 16px; }
.help { padding: 14px 16px 0; }
.button-bar { padding: 14px 16px; }
.site-footer p { padding: 20px 16px 28px; }
}
.play-row { margin: 24px 0; }
.play-row .primary { min-width: 200px; min-height: 52px; font-size: 18px; }
/* ---------- the game: the canvas fills the window */
.progress { margin-top: 12px; }
.progress-bar { height: 8px; border-radius: 4px; background: #1d2a3e; overflow: hidden; }
.progress-bar > div { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 14px; }
.site-footer { margin: 32px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.site-footer p { margin: 0; }
/* the game: the canvas fills the window */
#game { position: fixed; inset: 0; background: #000; }
#canvas {
display: block;
@@ -162,15 +343,18 @@ button.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad)
align-items: center;
justify-content: center;
gap: 16px;
color: var(--muted);
color: var(--label);
text-transform: uppercase;
letter-spacing: 0.08em;
pointer-events: none;
}
.spinner {
width: 36px;
height: 36px;
border: 3px solid #1d2a3e;
border-top-color: var(--accent);
width: 40px;
height: 40px;
border: 3px solid var(--edge-dim);
border-top-color: var(--edge-bright);
border-radius: 50%;
box-shadow: 0 0 14px var(--glow);
animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@@ -179,40 +363,50 @@ button.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad)
top: max(8px, env(safe-area-inset-top));
right: max(8px, env(safe-area-inset-right));
display: flex;
gap: 6px;
opacity: 0.25;
gap: 8px;
opacity: 0.3;
transition: opacity 0.2s;
}
.toolbar:hover, .toolbar:focus-within { opacity: 1; }
.toolbar button { min-height: 32px; padding: 6px 10px; font-size: 12px; background: rgba(10, 14, 20, 0.8); }
/* a game hosted for the internet: its invite link (app.js) */
.toolbar button, .toolbar .button { min-height: 36px; padding: 0 14px; font-size: 13px; background: rgba(0, 34, 68, 0.85); }
.toolbar .button { text-decoration: none; }
/* a game hosted for the internet: its invite link (app.js), in a pause box */
.invite {
position: absolute;
top: max(8px, env(safe-area-inset-top));
left: max(8px, env(safe-area-inset-left));
max-width: calc(100% - 200px);
max-width: calc(100% - 220px);
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 8px 10px;
border-radius: 8px;
background: rgba(10, 14, 20, 0.85);
color: var(--text);
font-size: 12px;
gap: 8px 10px;
padding: 12px 14px;
border: 2px solid var(--edge);
border-radius: 14px;
background: rgba(0, 14, 35, 0.92);
box-shadow: 0 0 24px rgba(54, 175, 255, 0.25);
color: var(--label);
font-size: 13px;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.invite span { flex: 1 1 100%; }
.invite input {
flex: 1 1 260px;
flex: 1 1 280px;
min-width: 0;
padding: 6px 8px;
border: 1px solid var(--panel-edge);
border-radius: 6px;
background: #0a0e14;
min-height: 40px;
padding: 0 12px;
border: 2px solid var(--edge-dim);
border-radius: 10px;
background: var(--navy-deep);
color: var(--text);
font: 12px ui-monospace, monospace;
font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.invite button { min-height: 30px; padding: 6px 10px; font-size: 12px; }
.invite button { min-height: 40px; padding: 0 16px; font-size: 13px; }
.invite #invite-copy { border-color: var(--edge-bright); box-shadow: 0 0 12px var(--glow); }
/* a question, or the game stopped: a pause box over the page */
.sheet {
position: fixed;
inset: 0;
@@ -220,46 +414,76 @@ button.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad)
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(0, 0, 0, 0.75);
background: rgba(0, 4, 10, 0.78);
z-index: 10;
}
#ask-text { white-space: pre-line; }
.sheet-body {
width: min(760px, 100%);
width: min(720px, 100%);
max-height: 100%;
overflow: auto;
background: var(--panel);
border: 1px solid var(--panel-edge);
border-radius: var(--radius);
padding: 20px;
border: 2px solid var(--edge);
border-radius: 16px;
background: var(--navy-deep);
box-shadow: 0 0 32px rgba(54, 175, 255, 0.25);
}
.sheet h2 {
margin: 0;
padding: 24px 28px 18px;
border-bottom: 1px solid var(--edge-bright);
background: linear-gradient(180deg, #0b3466 0%, #072852 100%);
font: 400 36px/1.05 var(--title-font);
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--label);
}
.sheet-body > p { margin: 0; padding: 20px 28px 0; }
.sheet pre {
max-height: 40vh;
overflow: auto;
padding: 12px;
background: #070a0f;
border-radius: 6px;
font-size: 12px;
margin: 16px 28px 0;
padding: 14px 16px;
border: 2px solid var(--edge-dim);
border-radius: 10px;
background: #00070f;
color: var(--soft);
font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.sheet .actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 12px;
margin-top: 20px;
padding: 16px 28px;
border-top: 1px solid var(--label);
background: rgba(0, 0, 0, 0.7);
}
/* a new build: a bar at the top */
.banner {
position: fixed;
left: 50%;
bottom: max(16px, env(safe-area-inset-bottom));
top: max(16px, env(safe-area-inset-top));
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 12px;
gap: 16px;
max-width: calc(100% - 32px);
padding: 10px 12px 10px 16px;
background: var(--panel);
border: 1px solid var(--accent);
border-radius: var(--radius);
padding: 8px 8px 8px 22px;
border: 2px solid var(--edge);
border-radius: 14px;
background: rgba(0, 14, 35, 0.95);
box-shadow: 0 0 24px rgba(54, 175, 255, 0.25);
text-transform: uppercase;
letter-spacing: 0.05em;
font-size: 15px;
z-index: 5;
}
.banner button { border-color: var(--edge-bright); box-shadow: 0 0 12px var(--glow); }
/* the on-screen touch controls (touch.js): circles over the game */
.touch { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
@@ -269,19 +493,19 @@ button.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad)
align-items: center;
justify-content: center;
border-radius: 50%;
border: 2px solid rgba(219, 228, 240, 0.45);
background: rgba(10, 14, 20, 0.28);
color: rgba(219, 228, 240, 0.85);
font-family: "Overpass", system-ui, sans-serif;
border: 2px solid rgba(54, 175, 255, 0.55);
background: rgba(0, 14, 35, 0.32);
color: rgba(255, 255, 255, 0.88);
font-family: var(--label-font);
font-weight: 750;
text-align: center;
line-height: 1;
pointer-events: none;
}
.touch-control.held { background: rgba(79, 179, 255, 0.45); border-color: var(--accent); }
.touch-stick-zone { background: rgba(10, 14, 20, 0.12); border-style: dashed; }
.touch-control.held { background: rgba(34, 153, 255, 0.45); border-color: var(--edge-bright); }
.touch-stick-zone { background: rgba(0, 14, 35, 0.14); border-style: dashed; }
.touch-stick-ring, .touch-stick-knob { position: absolute; display: none; border-radius: 50%; pointer-events: none; }
.touch-stick-ring { border: 2px solid rgba(219, 228, 240, 0.4); }
.touch-stick-knob { background: rgba(219, 228, 240, 0.55); }
.touch-stick-ring { border: 2px solid rgba(54, 175, 255, 0.45); }
.touch-stick-knob { background: rgba(54, 175, 255, 0.55); }
[hidden] { display: none !important; }
+40 -5
View File
@@ -13,7 +13,13 @@ The site's service worker:
its files; they are fetched together into a cache of their own, and a new
build replaces them as a whole only when the page asks (once the player
agrees). version.json?latest always asks the network, so that the page can
tell a new build is out.
tell a new build is out;
- it takes the game's wasm, most of a build, from the copy version.json
names (jsDelivr's, of the commit the deployment pushed it in:
.github/workflows/build.yml's pages job), checked against its SHA-256,
and from the site only when that copy cannot be had: GitHub Pages serves
100 GB a month. The page loads halo.wasm from the site as before, which
this worker then serves from its cache.
*/
'use strict';
@@ -38,13 +44,42 @@ async function setActiveVersion(version) {
await meta.put('active', new Response(JSON.stringify({ version })));
}
// a build's files into a cache of their own; then it is the one served, and
// the others go
const WASM = 'halo.wasm';
function hex(bytes) {
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, '0')).join('');
}
// the build's wasm from the copy its version.json names ({url, sha256}: an
// https address and the file's SHA-256), as a response to keep; null when
// there is none, or it cannot be fetched or is not that file
async function mirroredWasm(stamp) {
const mirror = stamp.wasm;
if (!mirror || typeof mirror.url !== 'string' || !mirror.url.startsWith('https://') ||
!/^[0-9a-f]{64}$/.test(mirror.sha256 || '')) {
return null;
}
try {
const response = await fetch(mirror.url, { mode: 'cors', credentials: 'omit' });
if (!response.ok) return null;
const bytes = await response.arrayBuffer();
if (hex(await crypto.subtle.digest('SHA-256', bytes)) !== mirror.sha256) return null;
return new Response(bytes, { status: 200, headers: { 'Content-Type': 'application/wasm' } });
} catch {
return null;
}
}
// a build's files into a cache of their own (its wasm from its copy where it
// has one); then it is the one served, and the others go
async function installVersion(stamp) {
const name = CACHE_PREFIX + stamp.version;
const cache = await caches.open(name);
const files = ['./', 'version.json', ...stamp.files.filter((file) => file !== 'version.json')];
const wasm = stamp.files.includes(WASM) ? await mirroredWasm(stamp) : null;
const files = ['./', 'version.json',
...stamp.files.filter((file) => file !== 'version.json' && !(wasm && file === WASM))];
await cache.addAll(files.map((path) => new Request(path, { cache: 'no-store' })));
if (wasm) await cache.put(new Request(WASM), wasm);
await setActiveVersion(stamp.version);
for (const other of await caches.keys()) {
if (other.startsWith(CACHE_PREFIX) && other !== name && other !== META_CACHE) await caches.delete(other);
@@ -129,5 +164,5 @@ self.addEventListener('message', (event) => {
// (for the tests: port/web/tests)
if (typeof module !== 'undefined') {
module.exports = { isolated, installVersion, activeVersion, cachedResponse, respond, CACHE_PREFIX };
module.exports = { isolated, installVersion, activeVersion, cachedResponse, respond, mirroredWasm, CACHE_PREFIX };
}
+201 -147
View File
@@ -1,211 +1,245 @@
/*
XISO-WORKER.JS
Copies the game's maps folder into the site's Origin Private File System,
where the game finds it (/data/maps: port/web/src/web_main.c), from the
player's own Xbox disc image of Halo: Combat Evolved (an "xiso", .iso), as
port/linux/src/xiso.c does for the desktop ports, or from a maps folder
already copied out of one. It runs in a Worker, which can write with
synchronous OPFS access handles (Safari has no OPFS writable streams), and
reads the image a slice at a time: an image is 4 to 7 GB, and nothing of it
is kept but the maps.
Copies the game data into the site's Origin Private File System, where the
game reads it (/data/maps: port/web/src/web_main.c): the maps folder of the
player's Xbox disc image of Halo: Combat Evolved, or the files of a maps
folder the player chose. It runs in a Worker, which can write with
synchronous OPFS access handles (Safari has no OPFS writable streams). Only
the maps and loading.tga are kept, and each map's header is checked as the
game checks it, so that a disc the game cannot play is refused here.
The image's file system is XDVDFS, read as extract-xiso does
(port/third_party/extract-xiso): 2048-byte sectors; a volume descriptor at
0x10000 that starts and ends with "MICROSOFT*XBOX*MEDIA" and gives the root
directory's sector and size; directories whose entries form a binary tree
(left and right subtree offsets in 4-byte units, the start sector, the size,
attributes, the name's length and the name). Images of a whole disc put the
game partition further in, at one of PARTITION_OFFSETS. The image is the
player's file, so it is untrusted: every offset and size is checked against
the image and the directory it is read from, and a directory's walk is
bounded.
Written from a description of the Xbox's disc file system, XDVDFS
(xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS, and the format
facts OpenCE's readers rely on). What this file relies on:
Each map is checked as the game checks it when it loads it (cache_files.c):
"head" and "foot" signatures, the Xbox's cache version, and the build of a
retail disc (01.10.12.2276) or of this decompilation's (01.01.14.2342).
- Sectors are 2048 bytes and integers little-endian. Sector numbers count
from the start of the game partition: an image of the partition alone has
it at 0, an image of a whole disc further in (0x0FD90000, 0x02080000 or
0x18300000 for XGD2, XGD3 and XGD1 discs). They are tried in that order.
- The volume descriptor is the partition's sector 32 (at 0x10000). It holds
"MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the root
directory table's start sector (u32 at 0x14) and size in bytes (u32 at
0x18).
- A directory table is a binary tree of entries whose root is the entry at
offset 0. An entry is a left and a right subtree link (u16 each, in 4-byte
units from the table's start, 0 for none), the start sector and the size
of the file or of the subdirectory's table (u32 each), the attributes (u8,
0x10 for a directory), the name's length (u8) and the name. Unused bytes of
a table are 0xFF, so a left link of 0xFFFF is padding, not an entry.
- A file is one contiguous run of bytes from the start of its sector.
Messages from the page: { type: 'image', file } or { type: 'folder', files }
(a maps folder's File objects). To the page: { type: 'progress', file, done,
total }, then { type: 'done', files, bytes } or { type: 'error', message }.
The image is the player's file (4 to 7 GB) and nothing read from it is
trusted: it is read a slice at a time, only the root's table and the maps
folder's (each at most 1 MB), and the walk of a table visits each offset
once, goes at most 64 links deep and looks at most 4096 entries.
Messages from the page: { type: 'image', file } (the disc image) or
{ type: 'folder', files } (a chosen folder's File objects). To the page:
{ type: 'progress', file, done, total }, then { type: 'done', files, bytes }
or { type: 'error', message }. A new copy first removes the old maps folder
and writes maps/.complete ({"files":[...],"bytes":n}) last: the page takes
the data as ready only once that marker is there.
*/
'use strict';
const SECTOR_SIZE = 2048;
const VOLUME_DESCRIPTOR_OFFSET = 0x10000;
const PARTITION_OFFSETS = [0, 0x0FD90000, 0x02080000, 0x18300000];
const DESCRIPTOR_OFFSET = 0x10000;
const MAGIC = 'MICROSOFT*XBOX*MEDIA';
const ENTRY_HEADER_SIZE = 14;
const SECOND_MAGIC_OFFSET = 0x7EC;
const ENTRY_FIXED_SIZE = 14;
const ATTRIBUTE_DIRECTORY = 0x10;
const MAXIMUM_DIRECTORY_SIZE = 1024 * 1024;
const MAXIMUM_ENTRIES = 4096;
const PADDING_LINK = 0xFFFF;
// where the game partition may start, in the order they are tried: an image
// of the partition alone, then whole XGD2, XGD3 and XGD1 discs
const PARTITION_STARTS = [0x00000000, 0x0FD90000, 0x02080000, 0x18300000];
// directory tables are a few sectors; anything much larger is not one
const MAXIMUM_TABLE_SIZE = 1024 * 1024;
const MAXIMUM_DEPTH = 64;
const COPY_CHUNK = 4 * 1024 * 1024;
const MAXIMUM_ENTRIES = 4096;
const MAP_HEADER_SIZE = 0x800;
const CACHE_VERSION = 5;
const BUILDS = ['01.10.12.2276', '01.01.14.2342'];
// written last: the page starts the game only when it is there
const COMPLETE_MARKER = '.complete';
const MAP_BUILDS = ['01.10.12.2276', '01.01.14.2342'];
const COPY_CHUNK = 4 * 1024 * 1024;
async function readAt(file, offset, size) {
const end = Math.min(offset + size, file.size);
if (offset < 0 || offset >= end) return new Uint8Array(0);
return new Uint8Array(await file.slice(offset, end).arrayBuffer());
// ---------- names
function asciiLower(text) {
return text.replace(/[A-Z]/g, (letter) => String.fromCharCode(letter.charCodeAt(0) + 32));
}
function text(bytes, start, length) {
let result = '';
for (let i = 0; i < length; i++) result += String.fromCharCode(bytes[start + i]);
return result;
function sameName(a, b) {
return asciiLower(a) === asciiLower(b);
}
function u16(bytes, at) {
return bytes[at] | bytes[at + 1] << 8;
// A name a file of the maps folder may have: no path, nothing hidden.
function plainName(name) {
return typeof name === 'string' && /^[A-Za-z0-9_. -]{1,64}$/.test(name) && !name.startsWith('.');
}
function u32(bytes, at) {
return (bytes[at] | bytes[at + 1] << 8 | bytes[at + 2] << 16 | bytes[at + 3] << 24) >>> 0;
function latin1(bytes) {
let text = '';
for (const byte of bytes) text += String.fromCharCode(byte);
return text;
}
// ---------- the image
async function readBytes(file, start, end) {
return new Uint8Array(await file.slice(start, end).arrayBuffer());
}
// The game partition: { partition, rootSector, rootSize }, from the first
// start whose volume descriptor has both magics; null if none has.
async function findVolume(file) {
for (const partition of PARTITION_OFFSETS) {
const descriptor = await readAt(file, partition + VOLUME_DESCRIPTOR_OFFSET, SECTOR_SIZE);
if (descriptor.length < SECTOR_SIZE) continue;
if (text(descriptor, 0, 20) === MAGIC && text(descriptor, 0x7EC, 20) === MAGIC) {
return { partition, rootSector: u32(descriptor, 20), rootSize: u32(descriptor, 24) };
for (const partition of PARTITION_STARTS) {
const start = partition + DESCRIPTOR_OFFSET;
if (start + SECTOR_SIZE > file.size) continue;
const descriptor = await readBytes(file, start, start + SECTOR_SIZE);
if (descriptor.length !== SECTOR_SIZE) continue;
if (latin1(descriptor.subarray(0, MAGIC.length)) !== MAGIC ||
latin1(descriptor.subarray(SECOND_MAGIC_OFFSET, SECOND_MAGIC_OFFSET + MAGIC.length)) !== MAGIC) {
continue;
}
const view = new DataView(descriptor.buffer, descriptor.byteOffset, descriptor.byteLength);
return { partition, rootSector: view.getUint32(0x14, true), rootSize: view.getUint32(0x18, true) };
}
return null;
}
// a name a file of the maps folder may have: no path, nothing hidden
function plainName(name) {
return name.length > 0 && name.length <= 64 && /^[A-Za-z0-9_.\- ]+$/.test(name) && !name.startsWith('.');
}
// the entries of a directory table: { name, sector, size, directory }
// A directory table's entries, { name, sector, size, directory }, for every
// entry that has a name, in the tree's order (left subtree, the entry, right
// subtree). A link to padding, past the table or to an offset already
// visited ends that branch.
function walkDirectory(table) {
const view = new DataView(table.buffer, table.byteOffset, table.byteLength);
const visited = new Set();
const entries = [];
const seen = new Set();
const walk = (offset, depth) => {
offset *= 4;
// (a cycle, a tree too deep or too wide, or an entry past the table:
// what is left of it is ignored)
if (depth > MAXIMUM_DEPTH || seen.has(offset) || seen.size >= MAXIMUM_ENTRIES ||
offset + ENTRY_HEADER_SIZE > table.length) {
return;
}
seen.add(offset);
const left = u16(table, offset);
const right = u16(table, offset + 2);
// (padding at the end of a sector)
if (left === 0xFFFF) return;
if (depth > MAXIMUM_DEPTH || offset + ENTRY_FIXED_SIZE > table.length) return;
const left = view.getUint16(offset, true);
const right = view.getUint16(offset + 2, true);
if (left === PADDING_LINK || visited.has(offset) || visited.size >= MAXIMUM_ENTRIES) return;
visited.add(offset);
if (left) walk(left * 4, depth + 1);
const nameLength = table[offset + 13];
if (left) walk(left, depth + 1);
if (nameLength > 0 && offset + ENTRY_HEADER_SIZE + nameLength <= table.length) {
const nameStart = offset + ENTRY_FIXED_SIZE;
if (nameLength && nameStart + nameLength <= table.length) {
entries.push({
name: text(table, offset + ENTRY_HEADER_SIZE, nameLength),
sector: u32(table, offset + 4),
size: u32(table, offset + 8),
name: latin1(table.subarray(nameStart, nameStart + nameLength)),
sector: view.getUint32(offset + 4, true),
size: view.getUint32(offset + 8, true),
directory: (table[offset + 12] & ATTRIBUTE_DIRECTORY) !== 0,
});
}
if (right) walk(right, depth + 1);
if (right) walk(right * 4, depth + 1);
};
walk(0, 0);
return entries;
}
async function readDirectory(file, volume, sector, size) {
if (!size || size > MAXIMUM_DIRECTORY_SIZE) return null;
const offset = volume.partition + sector * SECTOR_SIZE;
if (offset + size > file.size) return null;
const table = await readAt(file, offset, size);
return table.length === size ? table : null;
async function readTable(file, partition, sector, size, message) {
const start = partition + sector * SECTOR_SIZE;
if (size === 0 || size > MAXIMUM_TABLE_SIZE || start + size > file.size) throw new Error(message);
const table = await readBytes(file, start, start + size);
if (table.length !== size) throw new Error(message);
return table;
}
// why a map's header is not one the game loads, or null
// ---------- the maps
// Why the game would not load a map whose first bytes are header, or null.
function mapProblem(header) {
if (header.length < MAP_HEADER_SIZE) return 'it is too short';
if (text(header, 0, 4) !== 'daeh' || text(header, 0x7FC, 4) !== 'toof') return 'it is not a map';
if (u32(header, 4) !== CACHE_VERSION) return 'it is not an Xbox map (its cache version is ' + u32(header, 4) + ')';
const build = text(header, 0x40, 32).replace(/\0.*$/s, '');
if (!BUILDS.includes(build)) return 'its build, ' + JSON.stringify(build) + ', is not one the game loads';
if (latin1(header.subarray(0, 4)) !== 'daeh' || latin1(header.subarray(0x7FC, 0x800)) !== 'toof') {
return 'it is not a map';
}
const view = new DataView(header.buffer, header.byteOffset, header.byteLength);
const version = view.getUint32(4, true);
if (version !== 5) return `it is not an Xbox map (its cache version is ${version})`;
const field = header.subarray(0x40, 0x60);
const end = field.indexOf(0);
const build = latin1(end >= 0 ? field.subarray(0, end) : field);
if (!MAP_BUILDS.includes(build)) return `its build, ${JSON.stringify(build)}, is not one the game loads`;
return null;
}
// the files to copy, each { name, size, read(offset, size) }; the maps are
// checked, other files (loading.tga) copied as they are
// The files to copy, of those given ({ name, size, read }): the maps (each
// checked) and loading.tga, under plain names, the first of names that
// differ only in case; throws why they cannot be used.
async function checkedFiles(candidates) {
const files = [];
const kept = [];
for (const candidate of candidates) {
const lower = candidate.name.toLowerCase();
if (!plainName(candidate.name)) continue;
if (kept.some((file) => sameName(file.name, candidate.name))) continue;
const lower = asciiLower(candidate.name);
if (lower.endsWith('.map')) {
const problem = mapProblem(await candidate.read(0, MAP_HEADER_SIZE));
if (problem) throw new Error(`${candidate.name} cannot be used: ${problem}.`);
files.push(candidate);
kept.push(candidate);
} else if (lower === 'loading.tga') {
files.push(candidate);
kept.push(candidate);
}
}
if (!files.some((file) => file.name.toLowerCase() === 'ui.map')) {
if (!kept.some((file) => sameName(file.name, 'ui.map'))) {
throw new Error('There is no ui.map among the maps: this is not Halo: Combat Evolved for the Xbox.');
}
return files;
return kept;
}
// The maps folder's files in a disc image, as { name, size, read(offset,
// size) }; throws why it cannot be used.
async function imageFiles(file) {
const volume = await findVolume(file);
if (!volume) throw new Error('This file is not an Xbox disc image (no XDVDFS volume was found).');
const root = await readDirectory(file, volume, volume.rootSector, volume.rootSize);
if (!root) throw new Error("The disc image's file system is damaged.");
const maps = walkDirectory(root).find((entry) => entry.directory && entry.name.toLowerCase() === 'maps');
const { partition } = volume;
const root = await readTable(file, partition, volume.rootSector, volume.rootSize,
'The disc image\'s file system is damaged.');
const maps = walkDirectory(root).find((entry) => entry.directory && sameName(entry.name, 'maps'));
if (!maps) throw new Error('The disc image has no maps folder: it is not a Halo disc.');
const table = await readDirectory(file, volume, maps.sector, maps.size);
if (!table) throw new Error("The disc image's maps folder is damaged.");
return checkedFiles(walkDirectory(table).filter((entry) => !entry.directory).map((entry) => {
const offset = volume.partition + entry.sector * SECTOR_SIZE;
if (offset + entry.size > file.size) {
const table = await readTable(file, partition, maps.sector, maps.size, 'The disc image\'s maps folder is damaged.');
const candidates = [];
for (const entry of walkDirectory(table)) {
if (entry.directory) continue;
const start = partition + entry.sector * SECTOR_SIZE;
// (an empty file's sector need not be anywhere)
if (entry.size && start + entry.size > file.size) {
throw new Error(`The disc image ends before ${entry.name} does: is it complete?`);
}
return { name: entry.name, size: entry.size, read: (at, size) => readAt(file, offset + at, Math.min(size, entry.size - at)) };
}));
candidates.push({
name: entry.name,
size: entry.size,
read: (offset, size) => {
const count = Math.max(0, Math.min(size, entry.size - offset));
return readBytes(file, Math.min(start + offset, file.size), Math.min(start + offset + count, file.size));
},
});
}
return checkedFiles(candidates);
}
// The same, from the files of a chosen folder.
async function folderFiles(list) {
return checkedFiles(list.map((file) => ({ name: file.name, size: file.size, read: (at, size) => readAt(file, at, size) })));
return checkedFiles(list.map((file) => ({
name: file.name,
size: file.size,
read: (offset, size) => readBytes(file, offset, offset + size),
})));
}
async function writeFile(directory, source, onChunk) {
const handle = await directory.getFileHandle(source.name, { create: true });
const access = await handle.createSyncAccessHandle();
try {
access.truncate(0);
let position = 0;
while (position < source.size) {
const count = Math.min(COPY_CHUNK, source.size - position);
const bytes = await source.read(position, count);
if (bytes.length !== count) throw new Error(`Could not read ${source.name} (is the file complete?).`);
let written = 0;
while (written < count) {
const result = access.write(bytes.subarray(written), { at: position + written });
if (!result) throw new Error(`Could not write ${source.name}: is the device full?`);
written += result;
}
position += count;
onChunk(count);
}
access.flush();
} finally {
access.close();
// ---------- the copy
function writeAll(access, bytes, position, name) {
let written = 0;
while (written < bytes.length) {
const result = access.write(bytes.subarray(written), { at: position + written });
if (!result) throw new Error(`Could not write ${name}: is the device full?`);
written += result;
}
}
async function copy(files) {
const total = files.reduce((sum, entry) => sum + entry.size, 0);
const storage = await navigator.storage.getDirectory();
const total = files.reduce((sum, file) => sum + file.size, 0);
if (navigator.storage.estimate) {
const { quota, usage } = await navigator.storage.estimate();
if (quota && quota - usage < total) {
@@ -213,34 +247,54 @@ async function copy(files) {
`and the maps take ${Math.ceil(total / 1e6)} MB.`);
}
}
// a new copy replaces whatever an earlier, perhaps interrupted, one left
const storage = await navigator.storage.getDirectory();
// (a new copy replaces whatever an earlier, perhaps interrupted, one left)
await storage.removeEntry('maps', { recursive: true }).catch(() => {});
const directory = await storage.getDirectoryHandle('maps', { create: true });
const maps = await storage.getDirectoryHandle('maps', { create: true });
let done = 0;
let lastReport = 0;
for (const entry of files) {
await writeFile(directory, entry, (count) => {
done += count;
const now = Date.now();
if (now - lastReport > 100 || done === total) {
lastReport = now;
postMessage({ type: 'progress', file: entry.name, done, total });
for (const file of files) {
const handle = await maps.getFileHandle(file.name, { create: true });
const access = await handle.createSyncAccessHandle();
try {
access.truncate(0);
let position = 0;
while (position < file.size) {
const count = Math.min(COPY_CHUNK, file.size - position);
const bytes = await file.read(position, count);
if (bytes.length < count) throw new Error(`Could not read ${file.name} (is the file complete?).`);
writeAll(access, bytes.subarray(0, count), position, file.name);
position += count;
done += count;
const now = Date.now();
if (now - lastReport > 100 || done === total) {
lastReport = now;
postMessage({ type: 'progress', file: file.name, done, total });
}
}
});
access.flush();
} finally {
access.close();
}
}
// last: the sign that the copy is complete
const marker = await (await maps.getFileHandle('.complete', { create: true })).createSyncAccessHandle();
try {
marker.truncate(0);
const text = new TextEncoder().encode(JSON.stringify({ files: files.map((file) => file.name), bytes: total }));
writeAll(marker, text, 0, '.complete');
marker.flush();
} finally {
marker.close();
}
const marker = await directory.getFileHandle(COMPLETE_MARKER, { create: true });
const access = await marker.createSyncAccessHandle();
access.truncate(0);
access.write(new TextEncoder().encode(JSON.stringify({ files: files.map((f) => f.name), bytes: total })), { at: 0 });
access.flush();
access.close();
return { files: files.length, bytes: total };
}
if (typeof onmessage !== 'undefined' || typeof WorkerGlobalScope !== 'undefined') {
onmessage = async (event) => {
try {
const files = event.data.type === 'folder' ? await folderFiles(event.data.files) : await imageFiles(event.data.file);
const message = event.data;
const files = message.type === 'folder' ? await folderFiles(message.files) : await imageFiles(message.file);
postMessage({ type: 'done', ...(await copy(files)) });
} catch (error) {
postMessage({ type: 'error', message: error && error.message ? error.message : String(error) });
+49
View File
@@ -6,6 +6,7 @@
const test = require('node:test');
const assert = require('node:assert');
const { createHash } = require('node:crypto');
const ORIGIN = 'https://halocombatevolved.com';
@@ -65,9 +66,13 @@ class FakeCacheStorage {
}
}
// the addresses the fake network was asked for, in turn
let fetched = [];
globalThis.fetch = async (request) => {
const url = new URL(typeof request === 'string' ? request : request.url, ORIGIN + '/');
const name = url.pathname.replace(/^\//, '');
fetched.push(url.href);
if (!(name in served)) return new Response('missing', { status: 404 });
return new Response(served[name], { status: 200, headers: { 'Content-Type': 'text/plain' } });
};
@@ -132,3 +137,47 @@ test('a build whose files cannot all be fetched is not made the one served', asy
await assert.rejects(sw.installVersion(JSON.parse(served['version.json'])));
assert.strictEqual(await sw.activeVersion(), 'dddd');
});
// the wasm's copy on jsDelivr, as the deployment names it in version.json
const MIRROR = 'https://cdn.jsdelivr.net/gh/OpenCommunityEdition/OpenCE@0123abcd/halo.wasm';
function serveMirrored(version, wasm, sha256) {
serve(version, { 'index.html': `<page ${version}>`, 'halo.js': `js ${version}`, 'halo.wasm': `site ${wasm}` });
served[new URL(MIRROR).pathname.replace(/^\//, '')] = wasm;
const stamp = JSON.parse(served['version.json']);
stamp.wasm = { url: MIRROR, sha256: sha256 || createHash('sha256').update(wasm).digest('hex') };
served['version.json'] = JSON.stringify(stamp);
return stamp;
}
test("the wasm comes from its copy, not the site, when the copy is the file", async () => {
const stamp = serveMirrored('ffff', 'wasm f');
fetched = [];
await sw.installVersion(stamp);
assert.ok(fetched.includes(MIRROR));
assert.ok(!fetched.includes(ORIGIN + '/halo.wasm'), 'the site served the wasm');
assert.strictEqual(await (await sw.respond(new Request(ORIGIN + '/halo.wasm'))).text(), 'wasm f');
});
test("a copy that is not the file is not kept: the site's wasm is", async () => {
const stamp = serveMirrored('gggg', 'wasm g', '0'.repeat(64));
fetched = [];
await sw.installVersion(stamp);
assert.ok(fetched.includes(ORIGIN + '/halo.wasm'));
assert.strictEqual(await (await sw.respond(new Request(ORIGIN + '/halo.wasm'))).text(), 'site wasm g');
});
test("a copy that cannot be fetched leaves the site's wasm", async () => {
const stamp = serveMirrored('hhhh', 'wasm h');
delete served[new URL(MIRROR).pathname.replace(/^\//, '')];
await sw.installVersion(stamp);
assert.strictEqual(await (await sw.respond(new Request(ORIGIN + '/halo.wasm'))).text(), 'site wasm h');
});
test('a copy elsewhere than https is never fetched', async () => {
const stamp = serveMirrored('iiii', 'wasm i');
stamp.wasm.url = 'http://cdn.jsdelivr.net/x/halo.wasm';
fetched = [];
assert.strictEqual(await sw.mirroredWasm(stamp), null);
assert.deepStrictEqual(fetched, []);
});
+13 -3
View File
@@ -11,7 +11,10 @@
// messages of every size, split across SCTP's packets and not, which it
// sends back, and the browser checks them; then again with a tenth of the
// datagrams each way lost, when the channel must stay open (what was lost is
// given up, FORWARD-TSN) and carry the rest. No game data is needed.
// given up, FORWARD-TSN) and carry the rest. The channel is unreliable (no
// retransmissions, as the tunnel's), and a busy computer's loopback can drop
// a burst, so even without losses a few messages may not come back: every
// size must, nearly every time. No game data is needed.
import { spawn, spawnSync } from 'node:child_process';
import { mkdtempSync, readdirSync, rmSync } from 'node:fs';
@@ -122,6 +125,7 @@ async function run(program, kind, loss, rounds) {
// (as large as a tunnel packet: p2p.c's MAXIMUM_PACKET_SIZE)
const sizes = [1, 10, 100, 1000, 1100, 1101, 1200, 1431];
const sent = new Map();
const echoedBySize = {};
let echoed = 0;
let wrong = 0;
let lastEchoed = -1;
@@ -132,6 +136,7 @@ async function run(program, kind, loss, rounds) {
if (!expected || expected.length !== bytes.length || expected.some((b, i) => b !== bytes[i])) wrong++;
else {
echoed++;
echoedBySize[bytes.length] = (echoedBySize[bytes.length] || 0) + 1;
lastEchoed = Math.max(lastEchoed, number);
}
};
@@ -148,7 +153,7 @@ async function run(program, kind, loss, rounds) {
await new Promise((resolve) => setTimeout(resolve, 25));
}
await new Promise((resolve) => setTimeout(resolve, 2000));
return { sent: number, echoed, wrong, lastEchoed, open: dc.readyState === 'open' };
return { sent: number, echoed, wrong, lastEchoed, open: dc.readyState === 'open', rounds, echoedBySize };
}, { sdp: answer(await page.evaluate(() => window.mid)), rounds });
return result;
} finally {
@@ -163,7 +168,12 @@ try {
for (const kind of browsers) {
const clean = await run(program, kind, 0, 40);
console.log(`${kind}: ${clean.echoed} of ${clean.sent} messages back`);
if (clean.wrong || clean.echoed !== clean.sent) fail(`${kind}: ${JSON.stringify(clean)}`);
// (all but a dropped burst, every size nearly every time, and to the end)
const sizes = Object.values(clean.echoedBySize);
if (clean.wrong || clean.echoed < clean.sent * 0.97 || clean.lastEchoed !== clean.sent - 1 || sizes.length !== 8 ||
sizes.some((count) => count < clean.rounds - 2)) {
fail(`${kind}: ${JSON.stringify(clean)}`);
}
const lossy = await run(program, kind, 10, 120);
console.log(`${kind}, a tenth of the datagrams lost: ${lossy.echoed} of ${lossy.sent} messages back`);
// (a message comes back if its every datagram passed each way: about
+53 -65
View File
@@ -204,7 +204,6 @@ symbols in this file:
/* ---------- headers */
#define REAL_MATH_EXTERNAL_POINT_FROM_LINE3D
#include "cseries/cseries.h"
#include "cseries/errors.h"
#define PATH_EXTERNAL_FLEE_ROUTINES
@@ -235,7 +234,6 @@ symbols in this file:
#include "objects/objects.h"
#include "physics/collision_model_definitions.h"
#undef PATH_EXTERNAL_FLEE_ROUTINES
#undef REAL_MATH_EXTERNAL_POINT_FROM_LINE3D
/* ---------- constants */
@@ -655,24 +653,10 @@ void actor_move_transform_avoidance_vector(
real_vector3d const *avoidance_vector,
real_vector3d *direction_vector)
{
real component;
*direction_vector = *global_zero_vector3d;
component = avoidance_vector->i;
direction_vector->i += component * avoidance_data->forward.i;
direction_vector->j += component * avoidance_data->forward.j;
direction_vector->k += component * avoidance_data->forward.k;
component = avoidance_vector->j;
direction_vector->i += component * avoidance_data->left.i;
direction_vector->j += component * avoidance_data->left.j;
direction_vector->k += component * avoidance_data->left.k;
component = avoidance_vector->k;
direction_vector->i += component * avoidance_data->up.i;
direction_vector->j += component * avoidance_data->up.j;
direction_vector->k += component * avoidance_data->up.k;
point_from_line3d((real_point3d *)direction_vector, &avoidance_data->forward, (avoidance_vector->i), (real_point3d *)direction_vector);
point_from_line3d((real_point3d *)direction_vector, &avoidance_data->left, (avoidance_vector->j), (real_point3d *)direction_vector);
point_from_line3d((real_point3d *)direction_vector, &avoidance_data->up, (avoidance_vector->k), (real_point3d *)direction_vector);
return;
}
@@ -832,10 +816,8 @@ static short actor_move_test_avoidance_vector(
real *collision_t,
byte *collision_timer)
{
struct collision_bsp_test_vector_result collision_result;
real_vector3d offset;
real_vector3d divergence;
real scale;
real_vector3d divergence_direction;
real_vector3d origin_offset;
short result = _actor_vector_avoidance_clear;
short object_index;
@@ -854,46 +836,51 @@ static short actor_move_test_avoidance_vector(
*collision_t = REAL_MAX;
actor_move_transform_avoidance_vector(avoidance_data, &avoidance_ray->offset, &offset);
actor_move_transform_avoidance_vector(avoidance_data, &avoidance_ray->divergence, &divergence);
origin_offset = *global_zero_vector3d;
point_from_line3d((real_point3d *)&origin_offset, &avoidance_data->forward, (avoidance_ray->offset.i), (real_point3d *)&origin_offset);
point_from_line3d((real_point3d *)&origin_offset, &avoidance_data->left, (avoidance_ray->offset.j), (real_point3d *)&origin_offset);
point_from_line3d((real_point3d *)&origin_offset, &avoidance_data->up, (avoidance_ray->offset.k), (real_point3d *)&origin_offset);
divergence_direction = *global_zero_vector3d;
point_from_line3d((real_point3d *)&divergence_direction, &avoidance_data->forward, (avoidance_ray->divergence.i), (real_point3d *)&divergence_direction);
point_from_line3d((real_point3d *)&divergence_direction, &avoidance_data->left, (avoidance_ray->divergence.j), (real_point3d *)&divergence_direction);
point_from_line3d((real_point3d *)&divergence_direction, &avoidance_data->up, (avoidance_ray->divergence.k), (real_point3d *)&divergence_direction);
ray_origin->x = offset.i*avoidance_data->avoid_width + avoidance_data->origin.x;
ray_origin->y = offset.j*avoidance_data->avoid_width + avoidance_data->origin.y;
ray_origin->z = offset.k*avoidance_data->avoid_width + avoidance_data->origin.z;
point_from_line3d(&avoidance_data->origin, &origin_offset, (avoidance_data->avoid_width), ray_origin);
scale_vector3d(&divergence_direction, avoidance_ray->length*avoidance_data->avoid_distance, ray_direction);
scale = avoidance_data->avoid_distance*avoidance_ray->length;
ray_direction->i = divergence.i*scale;
ray_direction->j = divergence.j*scale;
ray_direction->k = divergence.k*scale;
vector_from_points3d(&avoidance_data->origin, ray_origin, &offset);
if (collision_bsp_test_vector(
FLAG(_collision_test_front_facing_surfaces_bit) |
FLAG(_collision_test_back_facing_surfaces_bit),
avoidance_data->bsp,
0,
NULL,
&avoidance_data->origin,
&offset,
1.f,
&collision_result))
{
result = _actor_vector_avoidance_obstructed_structure;
*collision_t = 0.f;
}
else if (collision_bsp_test_vector(
FLAG(_collision_test_front_facing_surfaces_bit) |
FLAG(_collision_test_back_facing_surfaces_bit),
avoidance_data->bsp,
0,
NULL,
ray_origin,
ray_direction,
1.f,
&collision_result))
{
result = _actor_vector_avoidance_obstructed_structure;
*collision_t = collision_result.t;
real_vector3d vector_to_origin;
struct collision_bsp_test_vector_result collision_result;
vector_from_points3d(&avoidance_data->origin, ray_origin, &vector_to_origin);
if (collision_bsp_test_vector(
FLAG(_collision_test_front_facing_surfaces_bit) |
FLAG(_collision_test_back_facing_surfaces_bit),
avoidance_data->bsp,
0,
NULL,
&avoidance_data->origin,
&vector_to_origin,
1.f,
&collision_result))
{
result = _actor_vector_avoidance_obstructed_structure;
*collision_t = 0.f;
}
else if (collision_bsp_test_vector(
FLAG(_collision_test_front_facing_surfaces_bit) |
FLAG(_collision_test_back_facing_surfaces_bit),
avoidance_data->bsp,
0,
NULL,
ray_origin,
ray_direction,
1.f,
&collision_result))
{
result = _actor_vector_avoidance_obstructed_structure;
*collision_t = collision_result.t;
}
}
for (object_index = 0;
@@ -902,7 +889,8 @@ static short actor_move_test_avoidance_vector(
{
struct vehicle_avoidance_cylinder *cylinder =
&avoidance_data->avoidance_objects[object_index];
real object_t;
real_vector3d dummy_normal;
real intersect_t;
if (pill_test_vector3d(
&cylinder->base,
@@ -910,12 +898,12 @@ static short actor_move_test_avoidance_vector(
cylinder->width,
ray_origin,
ray_direction,
&object_t,
&offset) &&
object_t < *collision_t)
&intersect_t,
&dummy_normal) &&
intersect_t < *collision_t)
{
result = _actor_vector_avoidance_obstructed_object;
*collision_t = object_t;
*collision_t = intersect_t;
}
}
-23
View File
@@ -1,23 +0,0 @@
/*
ACTOR_TYPE_DEFINITIONS.H
file has inline function assertions.
*/
#ifndef __ACTOR_TYPE_DEFINITIONS_H
#define __ACTOR_TYPE_DEFINITIONS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __ACTOR_TYPE_DEFINITIONS_H
-23
View File
@@ -1,23 +0,0 @@
/*
AI_CONSTANTS.H
header included in hcex build.
*/
#ifndef __AI_CONSTANTS_H
#define __AI_CONSTANTS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __AI_CONSTANTS_H
-23
View File
@@ -1,23 +0,0 @@
/*
BITMAP_MACROS.H
header included in hcex build.
*/
#ifndef __BITMAP_MACROS_H
#define __BITMAP_MACROS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __BITMAP_MACROS_H
+20 -3
View File
@@ -655,7 +655,19 @@ void DecodeBlockRGB__single_pixel(
if (pblockSrc == NULL)
{
memset(colorDst, 0, sizeof(*colorDst));
/* BUG (original, preserved for exact matching): January clears S3TC_BLOCK_PIXELS colors here,
* 0x40 bytes (0x45fc30 +0x11 push 0x40, +0x15 call _csmemset), as the full-block decoder
* DecodeBlockRGB does, but colorDst addresses ONE color. In bitmap_2d_get_pixel, the only caller
* chain, that color is the four-byte local pixel, so the clear would overwrite 60 further bytes of
* that function's frame.
* The clear is not executed in January: bitmap_2d_get_pixel decodes only when
* bitmap->base_address is not NULL and halts (display_assert, then an unconditional system_exit)
* unless block_address >= bitmap->base_address; it passes block_address here for dxt1, and
* DecodeBlockAlpha4__single_pixel and DecodeBlockAlpha3__single_pixel pass &source->rgb
* (block_address + 8) for dxt3 and dxt5. No other function references this one.
* January's bytes give the length (0x40) only; its spelling here is inferred from DecodeBlockRGB,
* not recovered source. A corrected build clears sizeof(*colorDst). */
memset(colorDst, 0, S3TC_BLOCK_PIXELS * sizeof(struct s3tc_color));
return;
}
@@ -692,8 +704,13 @@ void DecodeBlockRGB__single_pixel(
colors[3].rgba[S3TC_ALPHA] = 0;
}
match_assert("c:\\halo\\SOURCE\\bitmaps\\s3tc\\s3tc.c", 773, u >= 0 && u < 4);
match_assert("c:\\halo\\SOURCE\\bitmaps\\s3tc\\s3tc.c", 774, v >= 0 && v < 4);
/* BUG (original, preserved for exact matching): both assertions admit 4 (0x45fc30 +0x17c cmp si,4 /
* +0x180 jle; +0x1aa cmp bx,4 / +0x1ae jle; the assertion strings are January's "u>=0 && u<=4" and
* "v>=0 && v<=4"), although a block has four columns and four rows, 0..3. With u or v equal to 4 the
* selector shift below can reach 32 or more. bitmap_2d_get_pixel masks both coordinates with 3 before
* every call, so neither value exceeds 3 in January. A corrected build asserts u<4 and v<4. */
match_assert("c:\\halo\\SOURCE\\bitmaps\\s3tc\\s3tc.c", 773, u>=0 && u<=4);
match_assert("c:\\halo\\SOURCE\\bitmaps\\s3tc\\s3tc.c", 774, v>=0 && v<=4);
*colorDst = colors[(pblockSrc->bitmap >> (2 * (4 * v + u))) & 3];
-23
View File
@@ -1,23 +0,0 @@
/*
MEMORY_MANAGER.H
header included in hcex build.
*/
#ifndef __MEMORY_MANAGER_H
#define __MEMORY_MANAGER_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __MEMORY_MANAGER_H
+1 -1
View File
@@ -70,7 +70,7 @@ struct transport_address
/* ---------- prototypes */
short transport_initialize(
long transport_initialize(
void);
short transport_dispose(
void);
@@ -249,25 +249,27 @@ void transport_pop_key(
return;
}
short transport_initialize(
long transport_initialize(
void)
{
long result = _transport_error_none;
if (!transport_initialized)
{
WSADATA info = { 0 };
XNetStartupParams startup_params = { 0 };
DWORD link_status;
DWORD address_status;
unsigned long deadline;
FILE *bypass_file;
short wsa_error;
startup_params.cfgSizeOfStruct = sizeof(startup_params);
startup_params.cfgFlags = 0;
startup_params.cfgPrivatePoolSizeInPages = 24;
startup_params.cfgEnetReceiveQueueLength = 8;
startup_params.cfgIpFragMaxSimultaneous = 4;
startup_params.cfgIpFragMaxPacketDiv256 = 8;
startup_params.cfgSockMaxSockets = 128;
startup_params.cfgSockDefaultRecvBufsizeInK = 0;
startup_params.cfgSockDefaultSendBufsizeInK = 0;
startup_params.cfgKeyRegMax = 1;
startup_params.cfgSecRegMax = 32;
@@ -281,6 +283,9 @@ short transport_initialize(
(link_status & XNET_ETHERNET_LINK_FULL_DUPLEX) ? " in full-duplex mode" : "",
(link_status & XNET_ETHERNET_LINK_HALF_DUPLEX) ? " in half-duplex mode" : "");
/* January stores these two fields a second time here. */
startup_params.cfgSizeOfStruct = sizeof(startup_params);
startup_params.cfgFlags = 0;
bypass_file = fopen("d:\\bypass_security.txt", "r");
if (bypass_file)
{
@@ -290,35 +295,53 @@ short transport_initialize(
}
if (XNetStartup(&startup_params) != 0)
return _transport_error_not_initialized;
wsa_error = WSAStartup(MAKEWORD(2, 0), &info);
if (wsa_error != 0)
{
XNetCleanup();
winsock_error_to_string(wsa_error);
return _transport_error_not_initialized;
result = _transport_error_not_initialized;
}
deadline = system_milliseconds() + 10000;
do
else
{
address_status = XNetGetTitleXnAddr(&global_address);
if (system_milliseconds() > deadline ||
address_status == XNET_GET_XNADDR_NONE)
short wsa_error = WSAStartup(MAKEWORD(2, 0), &info);
if (wsa_error != 0)
{
WSACleanup();
XNetCleanup();
winsock_error_to_string(wsa_error);
return _transport_error_not_initialized;
}
}
while (address_status == XNET_GET_XNADDR_PENDING);
else
{
unsigned long deadline = system_milliseconds() + 10000;
DWORD address_status;
XNetRandom(global_nonce, sizeof(global_nonce));
transport_initialized = TRUE;
do
{
address_status = XNetGetTitleXnAddr(&global_address);
if (system_milliseconds() > deadline)
{
address_status = XNET_GET_XNADDR_NONE;
break;
}
}
while (address_status == XNET_GET_XNADDR_PENDING);
if (address_status == XNET_GET_XNADDR_NONE)
{
WSACleanup();
XNetCleanup();
result = _transport_error_not_initialized;
}
else
{
XNetRandom(global_nonce, sizeof(global_nonce));
result = _transport_error_none;
transport_initialized = TRUE;
}
}
}
}
return _transport_error_none;
return result;
}
void transport_client_stop(
@@ -468,18 +491,25 @@ static int __cdecl poll_ep_array_compare_proc(
void const *a,
void const *b)
{
struct transport_endpoint *endpoint_a = *(struct transport_endpoint *const *)a;
struct transport_endpoint *endpoint_b = *(struct transport_endpoint *const *)b;
int result;
if (!endpoint_a && endpoint_b)
a = *(struct transport_endpoint const *const *)a;
b = *(struct transport_endpoint const *const *)b;
if (!a && b)
{
return 1;
result = 1;
}
else if (endpoint_a && !endpoint_b)
else if (a && !b)
{
return -1;
result = -1;
}
return 0;
else
{
result = 0;
}
return result;
}
/* ---------- public code */
-23
View File
@@ -1,23 +0,0 @@
/*
CAMERA_TRACK_DEFINITIONS.H
header included in hcex build.
*/
#ifndef __CAMERA_TRACK_DEFINITIONS_H
#define __CAMERA_TRACK_DEFINITIONS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __CAMERA_TRACK_DEFINITIONS_H
-23
View File
@@ -1,23 +0,0 @@
/*
BUILD_NUMBER.H
header included in hcex build.
*/
#ifndef __BUILD_NUMBER_H
#define __BUILD_NUMBER_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __BUILD_NUMBER_H
-23
View File
@@ -1,23 +0,0 @@
/*
HEADERS.H
header included in hcex build.
*/
#ifndef __HEADERS_H
#define __HEADERS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HEADERS_H
-23
View File
@@ -1,23 +0,0 @@
/*
PLATFORM.H
header included in hcex build.
*/
#ifndef __PLATFORM_H
#define __PLATFORM_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __PLATFORM_H
+6 -9
View File
@@ -431,7 +431,6 @@ void cinematic_render(
if (!ui_widgets_active())
{
real_argb_color text_color;
long shadow_alpha;
pixel32_to_real_argb_color(
title->foreground_color,
@@ -454,15 +453,13 @@ void cinematic_render(
title->text_flags,
&text_color);
shadow_alpha = PIN(
fast_ftol(
(real)(long)(byte)(title->shadow_color >> 24) *
fade_amount),
0,
255);
rasterizer_text_set_shadow_color(
((pixel32)shadow_alpha << 24) |
((pixel32)PIN(
fast_ftol(
(real)(long)(byte)(title->shadow_color >> 24) *
fade_amount),
0,
255) << 24) |
(title->shadow_color & 0x00FFFFFF));
{
-23
View File
@@ -1,23 +0,0 @@
/*
DIALOGS.H
header included in hcex build.
*/
#ifndef __DIALOGS_H
#define __DIALOGS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __DIALOGS_H
-23
View File
@@ -1,23 +0,0 @@
/*
PARTICLE_DEFINITIONS.H
header included in hcex build.
*/
#ifndef __PARTICLE_DEFINITIONS_H
#define __PARTICLE_DEFINITIONS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __PARTICLE_DEFINITIONS_H
+18 -6
View File
@@ -571,6 +571,7 @@ symbols in this file:
#include "network_coop.h" /* port: port/linux/game/network_coop.c */
#include "network_votekick.h" /* port: port/linux/game/network_votekick.c */
#include "network_voice.h" /* port: port/linux/game/network_voice.c */
#include "network_chat.h" /* port: port/linux/game/network_chat.c */
/* (network_server_manager_internal.h's: the host's game record) */
struct network_game *network_game_server_get_game(struct network_game_server *server);
#include "objects.h"
@@ -1867,12 +1868,14 @@ static boolean scoreboard_team_columns(
/* a network game's scoreboard picks players with the mouse
(halo_scoreboard_pointer_update: a right click frees it): a player's name
picked opens a menu of what may be done to them, the players' vote to kick
them (network_votekick.c), muting their voice (network_voice.c), and the
host's Kick and Ban, Ban picked twice */
them (network_votekick.c), muting their voice and text chat on this
machine (network_voice.c, network_chat.c), and the host's Mute for everyone
(network_chat.c), Kick and Ban, Ban picked twice */
enum
{
_scoreboard_item_vote,
_scoreboard_item_mute,
_scoreboard_item_host_mute,
_scoreboard_item_kick,
_scoreboard_item_ban,
_scoreboard_item_cancel,
@@ -1932,20 +1935,26 @@ static void scoreboard_menu_items(
{
usprintf(labels[_scoreboard_item_vote], L"Start a vote to kick");
}
/* (its machine's voice: this machine's own choice) */
/* (its machine's voice and text chat lines: this machine's own choice) */
{
struct player_datum *player = player_try_and_get(scoreboard_menu.player_index);
if (player && network_voice_available())
if (player)
{
offered[_scoreboard_item_mute] = TRUE;
usprintf(labels[_scoreboard_item_mute],
network_voice_machine_muted(player->network_player_data.machine_index) ? L"Unmute voice" :
L"Mute voice");
network_voice_machine_muted(player->network_player_data.machine_index) ? L"Unmute voice and chat" :
L"Mute voice and chat");
}
}
if (network_votekick_host())
{
/* (the host's mute of their voice and lines, for every machine:
network_chat.c) */
offered[_scoreboard_item_host_mute] = TRUE;
usprintf(labels[_scoreboard_item_host_mute],
network_chat_host_mute_minutes((short)DATUM_INDEX_TO_ABSOLUTE_INDEX(scoreboard_menu.player_index)) ?
L"Unmute for everyone" : L"Mute for everyone");
offered[_scoreboard_item_kick] = TRUE;
offered[_scoreboard_item_ban] = TRUE;
usprintf(labels[_scoreboard_item_kick], L"Kick");
@@ -2016,6 +2025,9 @@ static void scoreboard_menu_pick(
}
break;
}
case _scoreboard_item_host_mute:
network_chat_host_mute(player_index, !network_chat_host_mute_minutes(player_index));
break;
case _scoreboard_item_kick:
network_votekick_host_kick(player_index, FALSE);
break;
+1 -1
View File
@@ -413,7 +413,7 @@ symbols in this file:
#include "ai/ai_script.h"
#include "hs/hs.h"
#include "hs/hs_library_internal.h"
#include "hs/hs_library_internal_compile.h"
/* Empty reconstructed header removed; no declarations to include. */
#include "hs/hs_scenario_definitions.h"
#include "interface/hud_definitions.h"
#include "interface/interface.h"
-23
View File
@@ -1,23 +0,0 @@
/*
HS_ENUM.H
header included in hcex build.
*/
#ifndef __HS_ENUM_H
#define __HS_ENUM_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HS_ENUM_H
-23
View File
@@ -1,23 +0,0 @@
/*
HS_FUNCTION.H
header included in hcex build.
*/
#ifndef __HS_FUNCTION_H
#define __HS_FUNCTION_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HS_FUNCTION_H
-23
View File
@@ -1,23 +0,0 @@
/*
HS_GLUE.H
header included in hcex build.
*/
#ifndef __HS_GLUE_H
#define __HS_GLUE_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HS_GLUE_H
-23
View File
@@ -1,23 +0,0 @@
/*
HS_LIBRARY_INTERNAL_COMPILE.H
file has inline function assertions.
*/
#ifndef __HS_LIBRARY_INTERNAL_COMPILE_H
#define __HS_LIBRARY_INTERNAL_COMPILE_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/HS_COMPILE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HS_LIBRARY_INTERNAL_COMPILE_H
-23
View File
@@ -1,23 +0,0 @@
/*
HS_LIBRARY_INTERNAL_RUNTIME.H
file has inline function assertions.
*/
#ifndef __HS_LIBRARY_INTERNAL_RUNTIME_H
#define __HS_LIBRARY_INTERNAL_RUNTIME_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/HS_RUNTIME.C */
/* ---------- globals */
/* ---------- public code */
#endif // __HS_LIBRARY_INTERNAL_RUNTIME_H
+1 -1
View File
@@ -266,7 +266,7 @@ symbols in this file:
#include "ai/ai_script.h"
#include "hs/hs.h"
#include "hs/hs_library_internal.h"
#include "hs/hs_library_internal_runtime.h"
/* Empty reconstructed header removed; no declarations to include. */
#include "hs/object_lists.h"
#include "hs/hs_scenario_definitions.h"
#include "math/real_math.h"
-23
View File
@@ -1,23 +0,0 @@
/*
INPUT_DEVICE_DEFAULTS.H
header included in hcex build.
*/
#ifndef __INPUT_DEVICE_DEFAULTS_H
#define __INPUT_DEVICE_DEFAULTS_H
#pragma once
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes/EXAMPLE.C */
/* ---------- globals */
/* ---------- public code */
#endif // __INPUT_DEVICE_DEFAULTS_H
Loaded 100 of 167 files, more files were not shown because too many files have changed in this diff. Show more