Help to compile a c code for the ea HUFF compression

Programming related discussions related to game research
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Help to compile a c code for the ea HUFF compression

Post by Alpha1001 »

Hi aluigi, I've seen the quickbms source and I managed to use the c code for JDLZ algorithm in my tool, but the c code for HUFF algorithm won't compile. There are many warnings in Devc++. I have an own project to create tools for the Need for Speed games (PS2 version), and I'm using the quickbms source to help me.
Link with my attemp to compile this code using the Devc++ and a picture showing the warnings:
https://drive.google.com/file/d/1G9EiQn ... sp=sharing

Thanks in advance!
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Help to compile a c code for the ea HUFF compression

Post by atom0s »

Error shows that there is a missing function call being made: msfastcall_call

Looking at the code, it appears that the header that probably includes that call is commented out:

Code: Select all

//#include "calling_conventions.h"
However, that header isn't included with the code you posted, so you'll have to find where its from and add it to the project or at least copy in the function that is missing. If it's from aluigi's stuff, then the header it may be from is:
https://aluigi.altervista.org/mytoolz/c ... ventions.h
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Help to compile a c code for the ea HUFF compression

Post by Alpha1001 »

Hi, I've seen your personal site here, it's nice! Really is missing the calling_conventions library, I will add this library and try to compile again and I'll post here the results.
Thanks!
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Help to compile a c code for the ea HUFF compression

Post by Alpha1001 »

Hi ato0ms, I've inserted the "calling_conventiosn.h" in the source and some warnings disappeared, now there is only the warnings below and I can't fix it:
[Warning] cast from pointer to integer of different size [-Wpointer-to-int-cast]
[Note] in expansion of macro 'PATCHIT'

I believe that solve this warnings above will allow to compile the source. One more time I would like to ask your help.
Link with the new source: https://drive.google.com/file/d/12qSm3P ... sp=sharing
The password is "huff"
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Help to compile a c code for the ea HUFF compression

Post by Alpha1001 »

Hi atom0s, I got it to compile now! Finally, that code just compile in the 32 bits mode, thank you very much by help until here.