PDA

View Full Version : Old master merge thread



DarkDragon
12-31-2016, 02:39 AM
I'm now looking into the (somewhat daunting) task of looking at the changelog from the old master branch, and figuring out which changes should be re-applied to the current repository.

Ok, it looks like 2.50.x was split from the trunk at revision 1704. I've gone through the SVN history and done a quick triage of the commits there.

Refactoring of message and room code (Saffith 1705--1711)
SFX refactoring (incomplete) (Saffith 1712)
Consolidation of Din's Fire et al code into new source files (Saffith 1713)
Copy/paste DMaps with C/V (Gleeok 1714--1715)
Fixes for all of the above (including downgrading C++11 -> C++03) (All 1716--1722)
Smart pointer for sprites (Saffith 1723)
Encryption now optional; refactored (Saffith 1724)
Remove pthreads in soundlib (Saffith 1725)
Split sound stuff into separate soundlib (Gleeok 1728)
Fix bug where scripts drawing had wrong offset on bitmaps (Gleeok 1730)
FFC code refactoring (Saffith 1732--1734)
Limit script saving to once per frame (Saffith 1736)
GTK GUI work (Saffith 1737--1738, 1746, 1750, 1753--1755, 1758, 1761, 1808, 1810, 885132d51fa50c76f0707c1ab5a2804f7717adcb)
Wealth medal fixes (Saffith 1740)
Fixes to Link->Item and Game->SetDMapEnhancedMusic
Tile grabbing from old quests fix (Saffith 1744)
Continue with full life fix (Safftih 1745)
Very fast scrolling quest rule, and offset weapon collisions fix (Gleeok 1747)
Better script error logging (Saffith 1749)
Link->Jump fix (Saffith 1751--1752)
itemdata files; subscreen item while scrolling fix (Saffith 1756)
Smart scrolling crash fix when using big link (Saffith 1757)
DrawLayer logging fix (Gleeok 1759)
Weapons with no collision detection move offscreen rule (Saffith 1760)
Conveyor belt at edge of screen fix; copy&paste level palettes (Saffith 1762, 2162a4bafba159b6b0f0c0edb2fab2bab78723a9)
5th Quest (Gleeok 1763--1764, 1766)
Save file path improvement (Saffith 1765)
Tweak of border at which weapons die (Saffith 1767)
Sprite and enemy code cleanup (Saffith 1768--1771)
Refactoring of zc_sys.cpp (Saffith 1772)
Link class refactoring (Saffith 1773--1775, 1780, 1781)
Tall grass animation etc. refactoring (Saffith 1776)
Refactoring of persistent item effects; sparkles (Saffith 1777-1779)
Frozen screen refactoring (Saffith 1782)
Lock blocks, projective shooter fixes (Saffith 1783, 9baa0efd0d451a5a255ef7571e63708c69374e67)
Animation sequence refactoring (Saffith 1784)
ZQuest combo editing mouse improvements (Saffith 1785)
Better handling of hung scripts (Saffith 1786--1787, 7a54a5dae110325e7af25d588de9395cdc3c6506)
Mass recoloring (Safftih 1788, 1793)
Mass combo creation improvements (Saffith 1789)
-scale fixes (Saffith 1790, 1792)
Moldorm fixes (Saffith 1791)
MIDI improvements by zaphod77 (Saffith 1794)
No single instance file for Windows build (Saffith 1795)
Hookshot fixes (Safftih 1796)
Import combos crash fix (Saffith 1798)
Get/SetCombo* fixes (Saffith 1799, 1819, dcbe122e8322c901c84d35091008edffdcb999d6)
SFX file load crash fix (Gleeok 1800)
Angelscript enemy conversion (Saffith 1802, 1804--1807, 1815)
qst.dat cleanup (Saffith 1820)

END OF SVN REPOSITORY

AngelScript for walkflags; room pickup fixes(?) (Saffith 27bd54b4d7e1afa91a27e51892f9ce367eff116f)
Context pool for scripts (Gleeok 188605aafd3805e0dbd8def34264d95e4fd4cfad)
AngelScript stuff (All 83b5592224596b4edb07774478476a411ed79780 -- f51ebe23ff17829bdc5b230c7edd2d02a320bceb)
Macro cleanup in dialog code (Saffith 860026b1b47820a021c3e52d68c156bda0a5586e)
Sprite::add fixes (partial? for reflected weapons only) (Gleeok f3a6fd56916b06799fdc3aeefdb3e11966c6082f, Saffith 1e31bbe348188faf7ecf778ecd5bb87b362101fa)
Many ZScript drawing commands (Gleeok 08c176a3bbcd5e796e7daa6dfa659c0ae9162660, fb71098d45f27767947123fbe2d6fd6350b2a80b)
Link class cleanup (Saffith 48a457a8ebd0392cf74f3c809b4f008a0cd7c8f5, 816814a3dfa4d8fc739348ebfdaa2f4041bc0a36, 06e15ba046223988139dc30e74f7cf91f1149dc7)
Weapon blocking overhaul (Saffith c4d57bb821aae94e058ff4dd28b93e991fbcf16b)[
Strange edits to sprite.* (Gleeok 6804a52a83fbde708471d9a4695e19a3e0f42f64)
Windows uses windowed mode by default (probably a good idea on all OSes until the fullscreen issues are fully resolved) (Gleeok e991072feb7ba91bd2848e85697c6f90bda7047f)
Broken statue compatibility fix (Saffith 2db5783b9a44e61c0cecfbdd64f695c1b10ac6ed)
Buggy script drawing compatibility support (Saffith 69ba9d665c51d313794462619c30cf1ef186be4d)
Old quest loading when max enemies > 255 (Saffith 55cefdee211ca4006edfd2a7f288c52264d27b73)
ZScript compiler crash on long errors (Saffith 926d9406d50003538a4e0842d81c0c23862a8853)
Cheat menu crash fix (Saffith 0277dd95d223e9a298f3b8d20a7fe74779fecb88)
Hammer reach fix (Saffith f36dd7a5660ce59357dbdf4e4a9b416aee55200e)
ZScript drawing while scrolling fix (Saffith 22446a8b7a81c95028e697aa7d78c8acb565ceff)
Fixed Screen->DrawString() (stale) (Saffith cc939717be70fdb6aab4a002295ce89f89519392)
Translucent string drawing (Saffith f158b785420b092e44c06e17d7f7d48edbd827ad)
Enemy tile determination fix (Saffith 0c0b37cc997a21c7cc363b1239154f70e01c8156)
Hammer impact location fix (Saffith 074d6640a8dbd41ad72903ed0de57bbcc78c007f)
Disallow setting LA_HOPPING (Saffith 33e0ef2a440ef26bcf337865ab9bcc9880b526f3)
Clear scripts on quest load (Saffith f49749065a8a67fc35b9242dc7c44b533b9ac9ce)
Fix for accelerator keys (Saffith a14b884220f79b984e871d8fa4c502d7d68b1ff5)
Message editing crash (Saffith 1e03ca59f753fd250ec107aec57ee2ba83e34254)
Remove bogus (none) in item list (Saffith c487e8d5c1ec4ceec46baffe36204601a579615c)
Fix in infamous copy_tiles_united code (Saffith 29c152c60968304f436efce64c428575652fc3ee)
Drawing mode toggle fix (Saffith b90c73d2a2fcede60d9f5e5bfc80830c8c0a191d)
Fix both buttons sometimes having same item assigned at game start (Saffith fab4a62537dd78aa07281bde0ece4f2ee19dd662)
Ganon roar sound stops correctly (Saffith 8b760c4b31fc1a29cf464284504a2f7ea88de6fc)
FFC swap flags have correct description in GUI (Saffith 89a1bceeee6f02f29f3516889dd7faee672c235d)
Truncated MP3s fix (Saffith 6ffab5d40d8a0be70b664f25f0e1bf83ef8a9e33)
Overhead combo help text edit (Saffith 359e75cab52a1e981b3683ac0e4adacdda63ca55)
Fix icon palettes when saving (why needed?) (Saffith 912c3d611c1960ae2f31bb2c6e2589aa3d61deac)
ZScript error code numbering (Saffith fbd8ebcb1996d88268e6f39d7f2eed826de0dac2)

Gleeok
12-31-2016, 04:22 AM
Browse the old repo and then go to tags->2.50->history... Yeah, somewhere around there.

We should definitely communicate to try to avoid working on the same thing. I told ZoriaRPG I'd give the script drawing stuff priority, so as soon as I have a sizable chunk of time I'll do that.

DarkDragon
12-31-2016, 05:56 AM
I've edited my post above with a quick triage of changes to the master in the SVN and git repositories.

The color code above is
Green: previously incorporated into 2.50.x, and so already in the current code
Blue: seems worth doing without too many problems
Red: dubious/requires discussion.

If you have more information about the intents of some of these refactorings and their value, please let me know. There are also two BIG items above, Saffith's new GUI framework and the push to reimplement the enemy and weapon logic using Angelscript. What is the status of these changes (the Angelscript stuff was completely stripped out?)

Gleeok
12-31-2016, 07:17 AM
I was looking through the history last night as well and was relieved that it should be easier than I thought. There are a few I saw from the old github master, but those may require testing or are easy enough to incorporate at leisure. I think instead of my previous plan I can just put in my script stuff plus /all [1] of ZoriaRPGs script improvements at once. (If you wouldn't mind taking a quick look at that commit when it happens DD, and then I can test it, and just get that done.)

[1] -provided we don't need to change anything.

Everything in blue or red is what Saffith was referring to as "garbage" so I really don't know. The moving enemy code to scripts had a few bugs and should be discussed first as debugging enemy code becomes very hard at that point. This caused some drama as well.

We need to refactor ffc code away from mapscr before the next version release though, as it can consume hundreds of megabytes of RAM and is by far the best "non-bug" fix available (Seriously, were you guys smoking crack back then or something?! :P ). ~See the memory consumption thread in coding issues.

DarkDragon
12-31-2016, 02:21 PM
Ok, do you want to start by merging in your drawing changes (08c176a3bbcd5e796e7daa6dfa659c0ae9162660, fb71098d45f27767947123fbe2d6fd6350b2a80b)? Those seem pretty clearly useful.

As for ZoriaRPG's changes, from looking at the posts in this forum and the discussion on GitHub they seem to fall into several categories
- very useful new commands that fill in holes in the current implementation
- marginal new features that I'm not clear are really needed, but don't object to, provided they are very thoroughly tested (e.g. function pointers)
- unfinished/buggy changes that "crash ZC instantly"
- changes that would be a mistake to introduce because they severely limit how much we can change the ZC backend in the future.

Because there are so many changes and they are of different levels of usefulness, I don't think it is a good idea to try to merge them all in at once. I think your drawing commands are highest priority. I trust you to then look through his changes and pick out the useful/working stuff, but would prefer they were added (and tested!) in one small chunk at a time.

Also I believe that some of Zoria's changes need Allegro 4.4, and since 4.4 also fixes some hardware issues, I suppose we may as well switch over. I'll keep working on that.



We need to refactor ffc code away from mapscr before the next version release though, as it can consume hundreds of megabytes of RAM and is by far the best "non-bug" fix available (Seriously, were you guys smoking crack back then or something?! :P ). ~See the memory consumption thread in coding issues.

Hey don't look at me! :) That was (slightly) before my time. I completely agree that the FFC refactoring and script context pool stuff is high priority, though.

Saffith
12-31-2016, 02:44 PM
GTK GUI work (Saffith 1737--1738, 1746, 1750, 1753--1755, 1758, 1761, 1808, 1810, 885132d51fa50c76f0707c1ab5a2804f7717adcb)
The GUI stuff was not well thought out from the start and made worse by poorly adapting to changing plans and priorities. That more than anything


SFX refactoring (incomplete) (Saffith 1712)
It's definitely worth having an SFX class in some form. Trying to figure out which sounds to stop looping has probably led to more random crashes than anything else, and I'm sure there are still cases where sounds should stop but don't (two were just fixed for 2.50.3).
It's trivial, though, and probably easier to write a new class than integrate the existing one. And there's no reason to have a manager class. That was just silly.


Sprite and enemy code cleanup (Saffith 1768--1771)
There's a lot of dummy data that's totally unused, and it's certainly worth removing. Mostly trivial, but there are a couple of things in dummy_int[] and dummy_bool[] that are actually used, and those need to be accounted for.


Tweak of border at which weapons die (Saffith 1767)
That might be worth keeping, and maybe even exposing to ZScript.


Refactoring of persistent item effects; sparkles (Saffith 1777-1779)
The sparkle stuff is worth doing. It's ridiculous for LinkClass to handle that.


We need to refactor ffc code away from mapscr before the next version release though, as it can consume hundreds of megabytes of RAM and is by far the best "non-bug" fix available (Seriously, were you guys smoking crack back then or something?! :P ). ~See the memory consumption thread in coding issues.
I did a big chunk of that already for 2.50.3; all the FFC script data was separated out, and there's now a single, global instance. The data for the FFCs themselves could still be handled better, but that's significantly harder.


Also I believe that some of Zoria's changes need Allegro 4.4, and since 4.4 also fixes some hardware issues, I suppose we may as well switch over. I'll keep working on that.
Oh, speaking up which, I added the Allegro fixes to 4.4. Here are the altered files: https://www.dropbox.com/s/kegi0zcymg0t0ib/all44fixed.zip?dl=0

The changes to alsa9.c are already part of 4.4.

ZoriaRPG
01-02-2017, 08:14 PM
Oh, speaking up which, I added the Allegro fixes to 4.4. Here are the altered files: https://www.dropbox.com/s/kegi0zcymg0t0ib/all44fixed.zip?dl=0

The changes to alsa9.c are already part of 4.4.

Saffith, have you compiled using these changes with the 4.4 libs?

Saffith
01-05-2017, 12:00 PM
Yes. I've compiled Allegro itself, and I've compiled ZC with that Allegro build.

ZoriaRPG
01-06-2017, 06:33 AM
Yes. I've compiled Allegro itself, and I've compiled ZC with that Allegro build.


Do you feel up to adding the missing MinGW files to the repo? If so, please do. My sanity thanks you.

Saffith
01-06-2017, 01:16 PM
Which files do you mean? The compiled libraries? I don't have them anymore, but I could probably rebuild it.

ZoriaRPG
01-06-2017, 06:56 PM
Which files do you mean? The compiled libraries? I don't have them anymore, but I could probably rebuild it.

Right. The Compiled library files, to replace those in /libs/MiNGW/, and /bin/win32

If you could do that, it would be brilliant.