porting $musicalias to zandronum 2.0

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

porting $musicalias to zandronum 2.0

#1

Post by ibm5155 » Thu Feb 06, 2014 4:13 pm

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
Last edited by ibm5155 on Sun Feb 09, 2014 2:15 pm, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
-Jes-
Frequent Poster Miles card holder
Posts: 975
Joined: Fri Aug 03, 2012 9:55 am
Location: Void Zone

RE: Does Zandronum 1.2 support $musicalias ?

#2

Post by -Jes- » Thu Feb 06, 2014 6:25 pm

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...

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: Does Zandronum 1.2 support $musicalias ?

#3

Post by Dusk » Thu Feb 06, 2014 7:58 pm

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]>

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Does Zandronum 1.2 support $musicalias ?

#4

Post by ibm5155 » Fri Feb 07, 2014 12:06 pm

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
Last edited by ibm5155 on Sun Feb 09, 2014 12:43 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Does Zandronum 1.2 support $musicalias ?

#5

Post by ibm5155 » Sun Feb 09, 2014 12:46 am

Double post
----------------
If "my" addon $musicalias works with zandronum. Will it be add into zandronum 2.0? (or 2.1?)
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Does Zandronum 1.2 support $musicalias ?

#6

Post by Torr Samaho » Sun Feb 09, 2014 10:01 am

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

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Does Zandronum 1.2 support $musicalias ?

#7

Post by ibm5155 » Sun Feb 09, 2014 12:49 pm

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]
Last edited by ibm5155 on Sun Feb 09, 2014 2:07 pm, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: porting $musicalias to zandronum 2.0

#8

Post by ibm5155 » Wed Jul 09, 2014 2:48 pm

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:
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Post Reply