i tried to use kb's/farbrausch Viruz2 libv2 replayer lib in an masm code, but got several link error's... after adding the needed c++ lib's , all what was asked for linking process.. but now stocking on an link error.
who has experients in mixing/linking c++ code into masm ?
there shouldn't be any problems if you define your masm file like this:
;GUI
.686
.model flat,stdcall
option casemap:none
;; put include files here
;; put lib files here OR in linker command line
.code
WinMain proc STDCALL public uses esi edi ebx, hInst:HINSTANCE,hPrevInstance:HINSTANCE,lpCmdLine:LPWSTR,nShowCmd:SDWORD
ret
WinMain endp
end
;CONSOLE
.686
.model flat,stdcall
option casemap:none
;; put include files here
;; put lib files here OR in linker command line
.code
main proc C uses esi edi ebx argc:dword,argv:ptr dword
ret
main endp
end
ie, you don't force your entrypoint with start label and you define correct functions that are called after c++ lib startup
i have converted the example from the package. :8)
"includelib libcmt.lib" in source reffers to lib file that is part of "Visual C++ Toolkit 2003"
libc.inc is file that i made
[attachment deleted by admin]
...Amazing! I'm shocked nobody else has commented about this, it's simply unbelievable!
Quote from: Mark Jones on October 10, 2007, 01:03:39 AM
...Amazing! I'm shocked nobody else has commented about this, it's simply unbelievable!
Mark Jones, you are absolutely right. Some guys here do incredibly good work but nobody comments, it's a shame. Let me fill the gap: VERY WELL DONE, DRIZZ! :clap:
hehe thanks guys!
...Now if only there was a tracker front-end for writing new songs. :wink
Hi drizz,
Nice job :U
V2 synthesizer system has been updated recently, now it's v1.5: http://www.1337haxorz.de/products.html
It supports more tunes and has more features now.
libv2 has been updated also, i tried it out but with no luck. First, there were problems converting libv.h to libv2.inc, it was solved by using h2incx with -u flag. But now i can't understand how to call all required functions, for example dsInit - it crashes my app if addressed to hWnd for some reason. Yeah, i'm a novice coder, so some things are too complicated for me now.
Will it be interesting enough for someone to help in sorting out all these things?
Yeah the new lib is not very straight forward like the previous.
Example provided in the new package uses c++ source player that needs to be copiled with libv2 to play songs (or to write your own (translate) in desired language). So i have created a new "library", it is libv2 with that c++ code player and a proxy that calls that player with "C" defined functions suitable for linking with masm (and any other COFF compatible compiler). Of course libcmt.lib still has to be included. "Tune" file is converted to .obj file and linked with the project.
This is only for playing songs, nothing more and nothing less...
cheers
[attachment deleted by admin]
I've made a workaround for libcmt, as to why the autors didn't compile their source with "/Zl" switch i don't know.
It seems to work without it...
[attachment deleted by admin]
Great work! Thank you, drizz! :thumbu
does the new lib work on vista and now also support loop playback?
diablo2oo2
I'm pretty sure it works on Vista, drizz's sample works at least. But unfortunately it crashes on many old tunes for me... At the other side it allows to play some new tunes created with updated V2-tracker.
And loop playback can be done using 'V2MIsPlaying' function in drizz's sample, dunno about original sources.
@Genl:
Thank you for this information. Since there are more old v2m tracks avaible on the web i think i will keep the old version of libv2...
Hi drizz:
I don't like the music but
I do like the code.
Great work.
Regards herge.