View a summary of what's new in 2.55.
Features
- publish a Linux build for aarch64 (arm64) devices
7c016cf8e9Releases now include
{version}-linux-aarch64.tar.gzalongside the x86-64 Linux package, which is renamed from{version}-linux.tar.gzto{version}-linux-x64.tar.gz. - publish a Windows build for arm64 devices
5a00e569b1Releases now include
{version}-windows-arm64.zip, a native build for Windows on arm64. - publish a universal mac app supporting Apple Silicon and Intel
7604077af3The mac release is now a single universal dmg, named
{version}-mac-universal.dmginstead of{version}-mac.dmg(which was Intel-only). Apple Silicon users no longer run under Rosetta. The ZScript JIT is still Intel-only, so scripts are interpreted on Apple Silicon; in a test on one large quest, interpreting natively was about twice as fast as the JIT under Rosetta.
Player
- say when a replay assert passes
bc74518c6cA replay loaded in assert mode said when the assert failed, but nothing when it passed, so there was no way to tell it had been checked.
Editor
- add history navigation for viewed screens
6ed2caf871You can now go back and forward through recently viewed screens with the side buttons on the mouse, or with the "Go Back" and "Go Forward" hotkeys.
- allow binding hotkeys to mouse buttons
ef0d83c522DiscordHotkeys can now be bound to the middle mouse button, the side buttons, or any other extra mouse buttons (optionally with modifier keys). The "Go Back" and "Go Forward" hotkeys are now bound to the mouse side buttons by default, and can be rebound like any other hotkey.
- label player weapons "L" in weapon type lists
f10a2cd985DiscordPlayer weapons in weapon type dropdowns are now prefixed with "L" (e.g. "L Arrow"), matching the existing "E" prefix on enemy weapons. The Weapon Type dropdown in the Shooter and Step Effects combo wizards also has a tooltip explaining whether the chosen weapon can hit the Hero or only enemies.
Bug Fixes
- prevent crashes from long file names and paths
503b142efdDiscordGrabbing colors from an image whose file name was longer than 64 characters crashed the editor. Fixed several similar crashes from long file names or paths:
- Grabbing tiles from a file with a very long name and no extension
- Changing the file type filter in the built-in file picker when the current file has a very long name
- Opening a quest with a very long path from the Recent quests menu
- File and music names with many non-English characters
- Very long paths for quests, images, MIDIs and music in the editor
The palette grab crash regressed in 2.55-alpha-113 (bc22503603), and the Recent quests crash was introduced when that menu was added in 2.55-alpha-103 (d530a2fba3). The rest are long-standing.
- fix memory leak when loading quests with custom type names
2566df6f45Loading a quest that has custom names for item classes, combo types, map flags, etc. leaked those names every time it was loaded.
Regressed in 2.55-alpha-107 (6b0abe1f8a).
- prevent crash on startup with some gamepads, like some 8BitDo controllers
03b6b78d27Controllers that report more than 32 buttons, such as some 8BitDo controllers on Windows, crashed the program at startup or soon after. Extra buttons and sticks beyond what the engine supports are now ignored.
Also fixes a rarer crash when a controller was connected or disconnected while controllers were being detected.
Regressed in 2.55.17 (3f58ea5b73).
- fix gauges from old subscreens sometimes drawing as a grid
0433139c99Life and magic gauges converted from a quest's old-format subscreens got random values for settings the old format doesn't have, such as the gauge's grid size and spacing, so a gauge could draw as a grid of pieces. Saving the quest in the editor also stored the random values.
Bug introduced when new life gauge settings were added in 2.55-alpha-117 (99462bf6b0).
- fix item selector and button presses misbehaving on old-format subscreens
ae977a1486Subscreen widgets converted from a quest's old-format subscreens kept random values for settings the old format doesn't have, such as whether the widget can be selected, its selector position, and what pressing a button on it does. Depending on those values, the item selector could stop on the wrong widget, or a button press could change the subscreen page.
Bug introduced when the subscreen backend was rewritten in 2.55-alpha-117 (872925132a).
- snapshots taken from the menu showing the menu itself
99c04b0b74DiscordTaking a snapshot from the editor's Etc menu captured the open menu, and snapshots in both apps could show an out-of-date frame.
Regressed in 2.55.17 (a4ce9a3bb3).
- draw accented letters and symbols in older quests' text again
b043f88e19DiscordText with characters that weren't stored as UTF-8 drew each of them as "^" (or as the wrong character) in messages, DMap titles, DMap intros, item names, script-drawn strings and the editor. Quests made before 2.55 store accented letters this way (such as "Générique" in a French quest), and some use the 128-255 range of the Zelda NES font for symbols like hearts and arrows. These draw as they did in 2.53 again.
Regressed in 2.55-alpha-117 (134c2fd7af).
- explain a missing X11 display on Linux instead of crashing
233ef98c31DiscordOn Linux, starting the player, editor or launcher without a reachable X11 display (for example from a remote shell with DISPLAY unset, or on a system with no X server or XWayland) crashed immediately. It now exits with a message saying an X11 display is required and how to set DISPLAY.
Bug introduced when the program moved to Allegro 5 in 2.55-alpha-108 (a7fccd1f21).
- prevent crash loading a quest with a damaged combo alias
f57539d1abA combo alias in a quest file that claims more combos than an alias can hold crashed the program while the quest loaded. Such a quest now fails to load with an error.
Bug present since at least 2.53-Beta-11 (429df347a1).
- stop a damaged save or quest from reserving memory for a huge list
c79df0da81Some lists in save and quest files are stored with their length first. Room for that many entries was reserved before any were read, so a file with a bad length could use up all memory. Only a modest amount is reserved up front now.
Bug introduced when generic script data was added in 2.55-alpha-112 (f7901fa547).
- stop a damaged quest from reserving memory for a huge string
d239a479ebLoading a damaged quest could try to reserve gigabytes of memory for one string, because the string's stated length was used before it was checked.
Bug introduced when long strings were added in 2.55.2 (4ed3e71bca).
- save strings longer than 65535 characters in full
0f093cb758Saving a string longer than 65535 characters, such as long screen notes, cut it short.
Bug introduced when long strings were added in 2.55.2 (4ed3e71bca).
- [win] prevent crash when the MIDI device can't be opened
5b96ef2436If Windows refused to open the MIDI output device (for example, when another program holds it or there is none), the first MIDI to play crashed the program. MIDIs are now silent instead.
Bug introduced when the program moved to Allegro 5 in 2.55-alpha-108 (a7fccd1f21).
- ignore an invalid mirror DMap when using a Magic Mirror
ef18b1f2f5A script could set a DMap's mirror DMap (dmapdata->MirrorDMap) to one past the last DMap, and the value in a quest file was never checked. Using a Magic Mirror on such a DMap then used invalid data. Now the mirror does nothing.
Bug introduced when the Magic Mirror was added in 2.55-alpha-100 (fa8db52d6d).
- fall back to the built-in file dialog when the native one fails
9ea1140a13On Linux systems without xdg-desktop-portal (such as Batocera or minimal window manager setups), the native file dialog cannot open, so picking a quest or any other file silently did nothing. Now the built-in file dialog is used instead, and its "File Explorer" button is hidden for the rest of the session.
Regressed in 2.55.16 (67a920f924).
- fix crash on some corrupt OGG files, mixed-up gamepad mappings, and two platform issues
243b94f040- Loading a corrupt OGG sound or music file could write outside of its buffer and crash.
- Some gamepad mappings (such as the "xinput" entries) could get mixed up with another device's mapping.
- On macOS, the window no longer goes blank while it is being resized.
- The Linux builds no longer need libGLU.so.1 to start.
Player
- Manhandla and Patra bodies drawn 1px off when moving diagonally
51849a007fDiscordWhen moving up-right or down-left, the body of a Manhandla or Patra was drawn one pixel to the right of its heads or orbiting parts.
Bug present since at least 2.50.
- Hero with Large Hitbox could not walk up a slope to the screen above
8504f04d48DiscordIn sideview, with the Large Hitbox quest rule on, walking up a slope that continues onto the screen above made the Hero stop at the top edge and fall back down, instead of scrolling to the next screen.
Regressed in 2.55.7 (4e45313545).
- reflected weapons could randomly run their death effects
0c52df49fdWhen a weapon was reflected (which creates a copy of it), the copy started with random values for a few properties. It could then randomly spawn its death item/sprite/sound when it died, draw the wrong shadow tile, or use the wrong weapon/defense type for bomb-style weapons.
Bug introduced when lifted combos as bombs were added in 2.55-alpha-114 (21447f7517).
- prevent freeze when an FFC light beam loops back into a prism
b85d86e8aaA light beam from an FFC spotlight that came back around into a Magic Prism split again every time it passed through, freezing the game. This happened when the beam bounced off a light target (with the broken light beam hitbox compat rule on) or travelled around a loop of mirrors.
Bug introduced when spotlights were made to work on FFCs in 2.55-alpha-119 (fd039e8087).
- continuing could leave the Hero with no life
eee1254db6When continuing, the Hero could be given 0 life and so die again immediately, over and over. This happened when the continue health is a percentage that rounds down to less than one heart (for example, 3% of 3 hearts), or when it is set to 0. Continuing now always gives at least one heart when rounding to whole hearts, and never less than 1 HP.
Bug present since at least 2.53-Beta-11 (429df347a1).
Context: https://www.purezc.net/index.php?page=comments&t=comments&id=6777
- fix portals sometimes warping the Hero on arrival
e99a54b77dEntering a screen with a portal on it, such as the one left by the Magic Mirror, could warp the Hero as soon as they were standing on the portal, instead of waiting for them to step off of it first. Whether it happened was random. Portals created by scripts could also start animating from a random frame and draw the wrong tile.
Bug introduced when user-created portals were added in 2.55-alpha-114 (ca30be23d1).
- save file replays could desync after the game was closed
dd2bb842d1A save file's replay continues each time the save is loaded. If the previous session ended without a recorded quit (quitting while paused, or closing the program right after saving), playback did not end that session and fed it the next session's inputs, so it went out of sync.
Quitting while paused is now recorded, and a continued recording picks up from the last save instead of the last input. Replays that already have this problem now play back correctly, and updating such a replay repairs it.
Bug introduced when save file replays were added in 2.55-alpha-110 (923a1031c9).
- a Quickload Slot that no longer exists stopped the program
143f50a6f6If the launcher's Quickload Slot setting (or -load) named a save slot that doesn't exist, for example because that save was deleted, the player showed a fatal "Cannot load slot" error on every launch. It now logs the error and shows the file select screen instead.
Bug introduced when invalid save slots were made an error in 2.55.1 (d6cefc9da4).
- old save file replays desynced after the game was reloaded
c5af81dcc6Until it was fixed in 2.55.11, loading a save removed the item assigned to the A button. Replays recorded before then expect that to happen when a save is loaded after restarting the program, so since 2.55.11 they went out of sync at that point.
Regressed in 2.55.11 (8bd1cdc08f).
- prevent running out of memory loading a damaged save file
2c1c2131b2A damaged save could give a size for its script arrays far beyond what a script can make, and loading it used up all memory before reading any of them. Such a file now fails to load.
Bug present since at least 2.53-Beta-11 (429df347a1).
- prevent crash drawing a combo whose tile is past the last tile
140439c455A combo using the CSet 2 setting whose tile was past the last tile crashed the game when drawn. A combo's tile can be past the end through its animation, or a script setting ComboData->Tile.
Bug present since at least 2.53-Beta-11 (429df347a1).
- ignore a DMap's onMap script if that script doesn't exist
bfc5371ce2A DMap's onMap script is stored in the quest as a number that wasn't checked when it loaded. A damaged quest could give one past the last DMap script, and opening the map then read invalid data as a script. Such a DMap now has no onMap script.
Bug introduced when onMap scripts were added in 2.55-alpha-92 (9d6415a92b).
- 'Transform' defense into a Gleeok left the old enemy alive
b8cbd0de46An enemy whose 'Transform' defense turned it into a Gleeok spawned the Gleeok but was never removed itself, so both stayed on the screen. This also removes two leftover debug messages ("Gleeok head count" and "Replacing a gleeok") that were logged as errors.
Bug introduced when Transform was changed for boss enemies in 2.55-alpha-26 (016904d773).
- prevent crash when an enemy fires an invalid weapon
510609b111An enemy whose weapon was set to an invalid weapon (which scripts can do) crashed the game when it fired while no other enemy weapons were on screen.
Bug present since at least 2.53-Beta-11 (429df347a1).
- replays dropped a button pressed on the last frame of a door walk-in
7f66f54b15A button pressed on the last frame of the automatic walk through a dungeon door (or into a dungeon at the start of the game) was ignored when the replay was played back, though the game had acted on it while recording. From then on the replay could go out of sync - for example, a sword swing that never happens.
Regressed in 2.55-alpha-115 (656bb76282).
- prevent crash reflecting an enemy weapon at the Hero's weapon limit
38c47b4c03When a shield reflected an enemy weapon while the Hero already had the maximum number of weapons on screen, the weapon was deleted but the game kept using it. Now the shield just blocks it.
Bug present since at least 2.53-Beta-11 (429df347a1).
- ending text could end with random characters
9f2d6508d9A quest's custom ending text is two strings, each shown as three lines of 24 characters. If a string did not fill its first two lines (48 characters), the lines after its end showed random characters, which could differ from one playthrough to the next.
Regressed in 2.55-alpha-104 (e77ec8fdc7).
- 'Transform' defense effect sprite sometimes not showing
717405e920When an enemy changed into another through the 'Transform' defense with a sprite as its 'Transform Effect' (such as a puff of smoke), the sprite could disappear early, often before it was drawn at all. Whether it did varied from one playthrough to the next.
Regressed in 2.55-alpha-113 (67feca5384).
- prevent crash from the bomb blast 'Transform Effect'
dda4a24b81An enemy's 'Transform Effect' can be a harmless bomb or super bomb blast. Choosing either crashed the game when the enemy transformed, unless the enemy was two tiles wide. The blast was created with the wrong settings; it is now a plain blast with no item or power.
Bug introduced when the 'Transform' defense was reworked in 2.55-alpha-26 (93a8ad8f5a).
- play the quest given on the command line in standalone mode
d88768ecafWhen a standalone save file already existed, the player kept loading the quest from the path stored in that save, ignoring the quest given on the command line. A quest that was moved kept loading its old copy if that still existed. Under Flatpak, a quest opened from outside the sandbox stayed tied to a temporary path, so its enhanced music never loaded, even after access to the quest's folder was granted.
Bug introduced when standalone save files were added in 2.55-alpha-117 (b6b151149c).
- portals not working properly with DMap offsets
f4ee8f90ebDiscordThe Magic Mirror did nothing when the mirror DMap had a map offset, or warped to the wrong screen if that offset was a whole number of rows. Its return portal did not appear on DMaps with an offset, and led to the wrong screen if the original DMap had one. A warp that was undone because of a blocked landing could also return to the wrong screen.
Bug introduced when the Magic Mirror was added in 2.55-alpha-100 (fa8db52d6d).
Editor
- music failing to load after opening the DMap editor many times
002c81978eDiscordEach time the DMap editor opened, it loaded its enhanced music file nine times and never closed any of them. After enough opens the editor could no longer open any files: every music file reported "failed to load", the enhanced music fields stayed disabled, and the editor had to be restarted.
Bug introduced when the loop preview buttons were added to the DMap editor in 2.55-alpha-120 (1822e0e47a).
- fix see-through transparent pixel marks in the tile editor
9b49e214dcDiscordThe X marks drawn over transparent pixels in the tile editor could turn see-through, showing whatever was behind the editor, for some choices of color 0 (for example a dark gray). They are now always drawn with one of the standard editor colors.
Regressed in 2.55-alpha-113 (93f18c3ef0).
- keep non-ASCII characters in quest package names
06e13161cePackaging a quest whose title has characters outside ASCII, like "Créateur", named the package folder and exe "Cr-ateur". Those characters are now kept; only ones not allowed in file names are replaced with "-".
Regressed in 2.55-alpha-119 (e64f888d24).
- [mac/linux] fix the editor sometimes closing after a compile
2faf65e387On macOS and Linux, the editor could close right after compiling scripts, most often on a slow or busy computer.
Regressed in 2.55-alpha-108 (c05576d9da).
- report how the compiler ended when it crashes
701181b7a9If the script compiler crashed or quit partway through compiling, the editor closed without any message on macOS and Linux, and showed a timeout error on Windows. It now shows an error saying how the compiler process ended (for example, which signal killed it).
Bug introduced when the compiler was moved into its own process on Linux in 2.55-alpha-103 (7667238ef9).
- prevent crash when jumping to a map the quest doesn't have
e212451da9The editor could move to one map past the last and then crash drawing the screen. This happened when clicking a map tab left over from a larger quest (quests from before 2.55 don't store map tabs, so they kept those of the last quest opened), and from anything else that asked for a map that doesn't exist.
Bug present since at least 2.53-Beta-11 (429df347a1).
- show an error when no window can be created, instead of crashing
a716e1f1fdWhen the editor could not find a usable graphics driver (for example, over some remote desktop sessions), it crashed without saying why.
Regressed in 2.55-alpha-51 (6d1aa3a665).
- prevent crash in quest browser when update check finishes
ced878aa9bThe quest browser could crash when its check for updates finished in the background.
Regressed in 2.55.17 (cda324c7e9).
ZScript Standard Library (std.zh)
- wrong values for NPCDT_SWITCH and some combo type constants
65016de0b1NPCDT_SWITCH was 50 instead of 51, so using it as an enemy defense set an unimplemented defense rather than 'Switch w/ Player'. CT_CUSTOM_BLOCKER and CT_SHOOTER were each one too low, because the Button Prompt type was missing from the list. They actually referred to Button Prompt and Block Weapon (Custom).
Also adds constants for the combo types that had none (CT_BUTTON_PROMPT through CT_CRUMBLE), and for the Split, Transform, explosion and Summon enemy defenses.
Bug introduced when the 'Switch w/ Player' defense was added in 2.55-alpha-100 (ffe999c23c), and for the combo types when their constants were added in 2.55-alpha-108 (9d7d25cedb), after Button Prompts had already shifted the combo type list.
ZScript
- scripted weapons imitating a bomb blast now open bomb doors
0b3204a765DiscordAn lweapon such as
LW_SCRIPT1with itsWeaponattribute set to a bomb blast would trigger bomb secret flags and combo triggers, but left NES bomb doors shut. Only the engine's own blast opened them, on a detonation timer that scripted weapons never run.Bug introduced when weapon imitation via the
Weaponattribute was added in 2.55-alpha-44 (2ab35aaba1). - memory of scripted weapons, enemies and items was never freed
55a7ebdb53Every weapon, enemy or item sprite that runs a script needs about 20 KB of memory for it. That memory was meant to be freed when the sprite was removed, but never was, so memory use grew with every scripted sprite that spawned until the game was restarted.
Playing the Stellar Seas Randomizer replay peaked at 932 MB in the player; it now peaks at 487 MB.
Regressed in 2.55.0 (ce8062e192).
- memory leak when a scripted eweapon was reflected
bdf8623d5bA scripted enemy weapon that bounced off a mirror shield becomes a player weapon. The memory used by its script, including every object and array the script owned, was then never freed until the game was restarted.
Regressed in 2.55.0 (27c41e1f2a).
- reflected scripted eweapons ran an lweapon script
fcd4358010A scripted enemy weapon that bounced off the Hero's mirror shield kept its script number after becoming a player weapon, so it started running whichever lweapon script happened to have the same number. A reflected enemy weapon now stops running its script.
Regressed in 2.55.0 (27c41e1f2a).
- trigger group counts wrong after a script changes a combo's triggers
bd771c6559Changing a placed combo's 'Contributes To TrigGroup' flag or its TrigGroup from a script didn't adjust the per-screen trigger group counts (Game->TrigGroups[]), and removing the combo afterwards subtracted using the new settings, so a count could end up negative. FFCs at the end of a screen's list also kept contributing after their Data was set to 0.
Bug introduced when trigger groups were added in 2.55-alpha-114 (8841692cb6).
- characters outside ASCII in script strings are now 0-255 on every platform
84b5af665cBreaking change: characters outside ASCII (such as the two bytes of "é") in script strings were negative numbers on Windows, macOS and x86 Linux, but positive on ARM Linux. They are now 0-255 on every platform, matching File->ReadBytes, so a script that expects them to be negative needs updating. This covers string literals, strings the engine gives to scripts (item and DMap names, File->ReadString, ...), and character literals such as '\xE9' once a script is compiled again.
File->ReadChars also stopped at the first such character on Windows, macOS and x86 Linux, as if it were the end of the file. It now reads them.
Bug present since at least 2.53-Beta-11 (429df347a1). File->ReadChars bug introduced when file functions were added in 2.55-alpha-75 (ef54b03d25).
- make stricmp() give the same result on every platform
2f810b89dfstricmp() compared characters outside ASCII differently per platform: stricmp("é", "a") was -1 on macOS and x86 Linux but 1 on Windows and ARM Linux, and only some platforms treated "É" and "é" as equal. It now matches strnicmp(), which already behaved the same everywhere and ignores the case of letters like "É".
Bug introduced when stricmp() was added in 2.55-alpha-75 (db4eb36a6c).
- destructors of saved objects could freeze the game after a quest update
59e9af7f96When an object loaded from a save file was destroyed after the quest's scripts had been recompiled (for example, the player updated to a new version of the quest), finding its destructor could loop forever, freezing the game - or, depending on the compiler the player was built with, skip the destructor entirely.
Bug introduced when objects began being saved to the save file in 2.55-alpha-112 (e9bc106b91).
- Screen->D[] errors showed the screen instead of the index
e771ba200dThe error for an invalid Screen->D[] index (or Game->GetScreenD / SetScreenD) showed the screen instead of the index.
Bug present since at least 2.50.
- don't crash when bitmap->Read() can't load the image
d212d2bc41Reading a file that exists but isn't an image the player can load crashed. It now logs an error and makes a blank bitmap, the same as for a file that doesn't exist.
Regressed in 2.55-alpha-26 (5ee0c64964).
- Game->FFRules[] read and wrote one past the last rule
1f1ebccc02The index was clamped to the number of rules, which is one past the last rule, so that index read and wrote just past the quest rules.
Bug introduced when Game->FFRules[] was added in 2.55-Alpha-21 (88c3658fc1).
- npcdata->MatchInitDLabel() read outside the enemy's labels
ed9ce97e06The InitD index wasn't checked, so any index other than 0-7 compared the string against memory outside the enemy's InitD labels. It now logs an error.
Bug introduced when npcdata->MatchInitDLabel() was added in 2.55-alpha-16 (6fbbe5fce3).
- Game->MiscSprites[] and MiscSFX[] read and wrote one past the end
570bbb8c6dBoth accepted the number of entries as an index, one past the last entry, so that index read and wrote just past them.
Bug introduced when these were added in 2.55-alpha-100 (699e38450d).
- npcdata->Defense[] read and wrote two past the end
e84506ec42npcdata->Defense[] accepted indices up to 42, but enemies have 41 defenses, so the last two indices read and wrote past them.
Bug introduced when npcdata->Defense[] was added in 2.54-Alpha-21 (9a4276623b).
- setting Hero->ItemA/B/X/Y to -1 could corrupt memory
d52eb95021Setting a button's item to -1 (no item) also wrote to memory just before the list of disabled items.
Bug present since at least 2.55-alpha-1 (5e97128dc5).
- combodata arrays read and wrote one past the end
cebb773fa0combodata->Attributes[], InitD[], BlockWeapon[] and Strike[], and the function versions of BlockWeapon, Strike and Expansion, accepted the number of entries as an index, one past the last one. That index read and wrote just past the array.
Bug introduced when the combodata functions were added in 2.54-Alpha-1 (0ecc4bf680).
- waiting for zero frames paused the script for a frame with the JIT
98fcd78ec2Waiting for zero frames (such as Waitframes(0)) does nothing, but with the JIT enabled it suspended the script until the next frame.
Bug introduced when the JIT was added in 2.55-alpha-112 (36fd73c209).
- some old quests' scripts branched differently with the JIT on
f53aba130eScripts compiled between 2016 and 2019, or written by hand in ZASM, could take the wrong branch of a "less than" comparison when the two values were equal and the JIT was on. This sent Lost Isle's circular cave sparks on a different path than without the JIT.
Bug introduced when the JIT was added in 2.55-alpha-112 (36fd73c209).
- JIT script misbehaved after running another script
c5a7e186fdWhen a script running under the JIT ran another script partway through (for example, by running a frozen generic script), it could then skip commands or run some twice.
Bug introduced when the JIT was added in 2.55-alpha-112 (36fd73c209).
- scripts could change their own Script with the JIT on
edc0f0ab19It's forbidden for a script to directly change its own
Scriptvariable, and such a write is ignored. With the JIT on, that check was missing, so the write went through and the script could behave differently than it does without the JIT.Bug introduced when the JIT was added in 2.55-alpha-112 (36fd73c209).
- lweapon scripts lifting themselves not resuming with the JIT
22ffee9575An lweapon script that lifts itself stops there for the frame, like a Waitframe, and continues after the lift once the weapon is back in the weapon list. With the JIT, lifting with Hero->LiftWeapon() made the script start over from the top (or from its last Waitframe) instead, and lifting by setting Hero->LiftedWeapon to itself didn't stop the script at all.
Bug introduced when script access to lifting was added in 2.55-alpha-114 (530f7c6898).
- ClearTrace() could hang or crash during JIT compilation
e627c4317dA script calling ClearTrace() while the JIT was compiling scripts in the background could hang or crash the player, most often with JIT logging enabled.
Regressed in 2.55-alpha-120 (3e720b62d3).
- script draws offset wrongly in old quests after drawing to a bitmap
9bffa6a7dfQuests with the "Use DrawBitmap() Offsets Prior to 2.50.2" quest rule rely on an old drawing quirk: once a script draw on a layer targets an offscreen bitmap, later draws to the screen on that layer ignore the subscreen offset. Quests that compensated for this drew 56 pixels too low, such as the dark room lighting in the original
Quest 744.Regressed in 2.55.8 (7bd9da16da).
- 'Transform' defense effect sprite had TileWidth and TileHeight swapped
5245407d81The effect sprite shown when an enemy changes into another through the 'Transform' defense (an LW_SPARKLE lweapon) had the enemy's TileHeight as its TileWidth and the enemy's TileWidth as its TileHeight. It draws as a single tile unless a script sets its Extend, so this mostly showed to scripts reading its size.
Bug introduced when the 'Transform' defense was reworked in 2.55-alpha-26 (09604ce8d7).
2 * f()and2 ^^^ f()evaluatedf()twice8fb987cf07Multiplying a constant by an expression (
2 * f()), or raising a constant to the power of an expression (2 ^^^ f()), ran the expression twice. So2 * f()calledftwo times, and10 * Cos(time++)advancedtimeby two.The other order (
f() * 2,f() ^^^ 2) was not affected.Scripts must be recompiled to pick up the fix.
Regressed in 2.55-alpha-108 (dd9753202c).
- #option ignored by global and namespace variables
84ea279e65The initializer of a global variable ignored any #option set in its file, and a variable declared directly in a namespace also ignored the namespace's own #option. Both were always compiled with the quest's default options.
Bug introduced when compiler options were added in 2.55-alpha-16 (5ef54be4fa).
ZLauncher
- fix cursor and alternate text colors for built-in themes
7e35357c21The built-in themes (chosen in the config file) left the cursor, read-only text and disabled colors unset (or set to the wrong value), instead of using their defaults.
Regressed in 2.55.2 (702396d7fd).
Build
- support AArch64 targets, including native arm64 macs
39a15962a7Native arm64 mac builds previously failed to compile. The fast tile blitters now have NEON implementations (matching the SSE versions pixel for pixel) on all AArch64 platforms, including Windows on ARM.
- compress the mac .dmg with LZMA
3560042a52The mac download is about 17% smaller (29 MB -> 24 MB for 2.55.17). LZMA disk images need macOS 10.15, and the minimum supported version is already 12.0.
- strip symbol tables from mac and Linux binaries
50577acb57Shrinks the mac download by about 1 MB and the Linux download by about 1.2 MB. Debug info was already kept out of the packages, but the symbol tables were not.
- upgrade sentry-native from 0.6.6 to 0.17.4
640cc51c6f - vendor libvorbis and libogg for mac builds
8a59ab7403The mac app no longer needs libogg and libvorbis from Homebrew: they are built from source kept in the repository. Windows and Linux builds are unchanged.
- make the mac and Linux editor about 12% smaller
f964a46f20Dialog code is now built for size, which shrinks zeditor on mac and Linux by about 12% (6% compressed) with no effect on gameplay. Windows builds are unchanged.
- update fmtlib to 11.2.0
3ac19f5cc3
Refactors
- reduce memory usage of fixed-point values
e71602c27dDiscordEvery fixed-point number (positions, speeds, and other fractional values) used 16 bytes of memory instead of 4. Shrinking them reduces peak memory usage by roughly 55-320 MB depending on the quest, in both the player and the editor. For example, The ROSEMASTER went from 1.04 GB to 0.72 GB.
Player
- share one buffer between all blank tiles
2495c7ecf1DiscordEvery one of the 214500 tile slots had its own memory allocated, even though most are blank. Blank tiles now share a single buffer in the player, which saves about 30-60 MB of memory.
ZScript
- halve the memory used to hold compiled scripts
7e6caf93e2DiscordEvery instruction of a compiled script took 32 bytes, most of which were for the string or array that a few instructions carry. They now take 12 bytes, which lowers memory usage by about 260 MB for Yuurand and 30-50 MB for Stellar Seas, in both the player and the editor.
New limit: a script can now have at most 65535 strings and arrays. Compiling a script with more shows an error, and a quest that has one fails to load. No quest in the quest database has such a script.
CI
- test AArch64 Linux
885c7c176c - test Windows arm64
03daeac8f9