Page 1 of 1

porting $musicalias to zandronum 2.0

Posted: Thu Feb 06, 2014 4:13 pm
by ibm5155
NOP it doesn't

ehm, this is my first try to make something to zan, and here's the situation:
-Zandronum compiling right into Visual Studio 2012 (there's only a problem related to the output directory but it compile xD)
-$musicalias compiled for zandronum 1.2 (without memory fix)
-$musicalias compiled for zandronum 2.0 (with memory fix)
-$musicalias tested and working :D

I'll now try to port each commit from the end of 2.5.0 and the start from the memory fix commit.
So it'll not create new problems to devs :rolleyes: :lol:

all commits from this guys below from august 12 to november 10 will be ported :)
https://github.com/rheit/zdoom/commits/ ... vsound.cpp
https://github.com/rheit/zdoom/commits/ ... _sound.cpp
https://github.com/rheit/zdoom/commits/ ... /s_sound.h

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Thu Feb 06, 2014 6:25 pm
by -Jes-
Why don't you check for yourself?

TL;DR, unlikely.
It's not present on the ZDoom Wiki anno 2.3.0, so unless it's been backported...

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Thu Feb 06, 2014 7:58 pm
by Dusk
If you so want to get into programming, why not learn how to use the swiss army knife known as grep?

Code: Select all

─[21:57:13]─[~/Sources/za-1.2/src]> grep -ir musicalias
─[21:57:24]─[~/Sources/za-1.2/src]>
─[21:57:35]─[~]> cd Sources/zandronum/src/ # <-- this is 2.0
─[21:57:40]─[~/Sources/zandronum/src]> grep -ir musicalias
─[21:57:48]─[~/Sources/zandronum/src]>

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Fri Feb 07, 2014 12:06 pm
by ibm5155
Ok since It's a working thing on zdoom, I'll try to fix it :D
but, should I start with zandronum 1.2 or 2.0 code to fix it?

EDIT:
-musicalias was add into 2.6.0.
-Zandronum compiled with visual studio 2012 :D
-It's time to make a test :D

EDIT2:
-Changelog about the files that were changed ehm,I think I'll find a software to copare files to find where it's different :s (I could make one, but I'm too lazzy for complex codes now)
also, a fix for clearing memory
EDIT3:
uh perfect

EDIT4:
uh, I discovered that each file inside commit have a "diff" that shows the difference from the older file and the newer file :D

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Sun Feb 09, 2014 12:46 am
by ibm5155
Double post
----------------
If "my" addon $musicalias works with zandronum. Will it be add into zandronum 2.0? (or 2.1?)

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Sun Feb 09, 2014 10:01 am
by Torr Samaho
ibm5155 wrote: If "my" addon $musicalias works with zandronum. Will it be add into zandronum 2.0? (or 2.1?)
http://zandronum.com/forum/showthread.p ... =2#pid4474

RE: Does Zandronum 1.2 support $musicalias ?

Posted: Sun Feb 09, 2014 12:49 pm
by ibm5155
I understand how the port works (and I saw it "sucks" because you need to port commit by commit).
Hmm musicalias was the code that I expected, a simple name checker to see if there's the other file, if exist, erase the first music file from memory and change the music pointer to the new music :D

Well from what I checked till the musicaliases fix commit, there was only 3 changes at sound core, and only one is not related to
-------------------------
ok it compiled, but, the music didn't changed, (facepalm)
EDIT:
(facepalm)(facepalm) I wrote $musicaliases :v: but the code is $musicalias.
Now it works \o/ (ported to zan 1.2, and it looks like there wasn't such changes at that sound files)

EDIT2:
Hmm is always compiling zan slow? I think my dual core i7 isn't enough xD
also, I'll not update the fixes for musicalias because It'll require to change other parts from zan code :s, I may try to fix now zan 2.0 :D

EDIT3:
with zandronum 2.0 I could compile the soundalias change + soundalias memory fix :D
here's an resume about what changed:
[spoiler]August 11 2010, zdoom version that zan 2.0 have the "last update"
July 2 2012, zdoom version that zan 2.? will have the "last update"

Commit:2fcf1af
: Added a $musicalias command to SNDINFO that allows remapping of music tracks. Mapping to 'none' means that starting the remapped song will have no effect at all. There's one limitation though: If you load a WAD with the same music name after the one with the SNDINFO lump the mapping will be ignored. This is so that music resources can use this command without interfering with WADs that replace the music with their own.

Changes to:
src/s_advsound.cpp
src/s_sound.cpp
src/s_sound.h

Commit f0f17e5 (not fully ported)
Fixed: MidiDevices and MusicAliases were not cleared before reloading local SNDINFOs.

Changes to:
src/s_advsound.cpp
src/s_sound.cpp
src/s_sound.h

4 changes was made betw this 2 commits[/spoiler]

RE: porting $musicalias to zandronum 2.0

Posted: Wed Jul 09, 2014 2:48 pm
by ibm5155
Since a long time ago passed since this test, I remembered now that I didn't released the source and the compiled test :rolleyes:

So, if someone was waiting for that feature, here's it :D

Compiled source with demo

and

Here is the source code

Also, it was compiled on Visual Studio 2012, there were an updating tutorial to compile the project on newer version, but if I remember right it wasn't working, and, I deleted my tutorial :rolleyes: :cry: