Author Topic: Life's A Bitch  (Read 4161 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 390
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Life's A Bitch
« on: June 02, 2015 »
There's a theme going on here....another Lost Boys remake, this time the main menu from Life's a Bitch featuring the Bittner rap.
Thanks to wab.com for help with the code.
I'll eventually add some of the demo screens when I get back from France this month, when I have more time.
The exe is a lot larger than I would have liked but the track was is actually a custom Jochen Hippel (Mad Max) tune with lots of digi samples in it.
No routine I have will play the file I downloaded from wab.com. The Oldskool music engine won't do it, neither will any mod play routines.  I tried hacking around with the file and there are some odd addresses being poked which I have tried fixing but to no avail.
So the tune had to be converted to mp3 and with a bit of jiggery pokery it now plays. 
I've attached the downloaded file in case anyone can get it working in PB or FB.


Challenge Trophies Won:

Offline padman

  • Senior Member
  • Pentium
  • ********
  • Posts: 990
  • Karma: 260
    • View Profile
Re: Life's A Bitch
« Reply #1 on: June 02, 2015 »
Nice work as always mate! :)

The winamp plugin trickery I used in my Amiga music playback thingy does the magic an replays your file. I quickly hacked together an example, how to use it:

Code: [Select]

; compiled with PB 5.31 (x86)
;don't compile this as an unicode exe as it won't work! you have been warned ^^


Structure Winamp
DllPtr.l
InitWinamp.l
SetWinampPlugin.l
PlayWinamp.l
StopWinamp.l
CloseWinamp.l
EndStructure

Global Winamp.Winamp

Procedure InitWinampReplay()

With Winamp
\DllPtr=LoadLibraryM(?PLAY)
\InitWinamp=GetProcAddressM(\DllPtr,"InitWinamp")
\SetWinampPlugin=GetProcAddressM(\DLLPtr,"SetWinampPlugin")
\PlayWinamp=GetProcAddressM(\DLLPtr,"PlayWinamp")
\StopWinamp=GetProcAddressM(\DLLPtr,"StopWinamp")
\CloseWinamp=GetProcAddressM(\DLLPtr,"CloseWinamp")
EndWith
EndProcedure


InitWinampReplay()


     CallFunctionFast(Winamp\InitWinamp)
     CallFunctionFast(Winamp\SetWinampPlugin,?dll,?enddll-?dll)
     CallFunctionFast(Winamp\PlayWinamp,?song,?songend-?song)

              MessageRequester("Info","Playing the Bittner Rap...",0)

     CallFunctionFast(winamp\StopWinamp)
     CallFunctionFast(winamp\CloseWinamp)

     
End


DataSection 
 
dll:
IncludeBinary "in_sk00l.dll"                    ;winamp plugin by surfsmurf
enddll:

play:
IncludeBinary "wplay.dll"                      ;winamp routines from testaware's old'fun_extension" userlib


song:
IncludeBinary "bittner_rap.mod"             
songend:


EndDataSection

It makes use of a(ny) winamp plugin to replay the music. In this case the in_sk00l.dll (can be found  here ) This is achieved by using the functions in wplay.dll. I created this dll using a userlib by Peace^Testaware, which he created for PB 4.x a long time ago. This way I can still use the functions with PB 5.x.  8)
Both dlls are packed with UPX. All in all it should add an extra 100kb to your exe. Hope that is small enough. It might be a good idea to unpack the dlls though and pack the whole exe. Otherwise modern AV will go bananas... Oh and it uses the PBOSL_LoadDllMemory userlib to load the dlls from memory. But I guess you've got that installed already.

Happy shoehorning it in!

ZIP with source+exe attached

Pad  :cheers:
Challenge Trophies Won:

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 390
  • Karma: 131
    • View Profile
    • KrazyK Remakes
Re: Life's A Bitch
« Reply #2 on: June 02, 2015 »
Thanks for this Padman, you sir are a genius !
New version attached here using your routine, and 200k smaller.  Great that it also loops automatically rather than having to check to see if it's still playing too.  I see some interesting possibilities with these winamp plugins now.
 :cheers:
Challenge Trophies Won:

Offline padman

  • Senior Member
  • Pentium
  • ********
  • Posts: 990
  • Karma: 260
    • View Profile
Re: Life's A Bitch
« Reply #3 on: June 03, 2015 »
You are welcome. ;)

Challenge Trophies Won:

Offline Dr.Death

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 445
  • Karma: 9
    • View Profile
Re: Life's A Bitch
« Reply #4 on: June 06, 2015 »
Very nice job mate.
Proud member of DAWN