fnky / studiomdl Goto Github PK
View Code? Open in Web Editor NEWA cross-platform compatible version of studiomdl for Half-Life.
License: Other
A cross-platform compatible version of studiomdl for Half-Life.
License: Other
Change the parser for QC and SMD files to be system specific for line endings. Currently only looks for CLRF
(DOS) line endings \r\n
, should look for LF
(Unix) line endings on Unix systems \n
.
For now, make sure to save QC and SMD files using LF
line endings on when compiling on macOS/Linux.
I get an error when trying to compile the code as described on Ubuntu 18.04.
It appears to be an issue with linking the math libraries.
gcc -m32 -Wint-to-pointer-cast -lm -pthread build/build-i386/bmpread.o build/build-i386/cmdlib.o build/build-i386/mathlib.o build/build-i386/scriplib.o build/build-i386/studiomdl.o build/build-i386/trilib.o build/build-i386/tristrip.o build/build-i386/write.o -o build/bin-i386/studiomdl
build/build-i386/cmdlib.o: In function `Q_getwd':
cmdlib.c:(.text+0x488): warning: the `getwd' function is dangerous and should not be used.
build/build-i386/mathlib.o: In function `VectorLength':
mathlib.c:(.text+0x61): undefined reference to `sqrt'
build/build-i386/mathlib.o: In function `Q_rint':
mathlib.c:(.text+0x101): undefined reference to `floor'
build/build-i386/mathlib.o: In function `VectorNormalize':
mathlib.c:(.text+0x408): undefined reference to `sqrt'
build/build-i386/mathlib.o: In function `AngleMatrix':
mathlib.c:(.text+0x5cf): undefined reference to `sin'
mathlib.c:(.text+0x5e7): undefined reference to `cos'
mathlib.c:(.text+0x612): undefined reference to `sin'
mathlib.c:(.text+0x62a): undefined reference to `cos'
mathlib.c:(.text+0x652): undefined reference to `sin'
mathlib.c:(.text+0x66a): undefined reference to `cos'
build/build-i386/mathlib.o: In function `AngleIMatrix':
mathlib.c:(.text+0x775): undefined reference to `sin'
mathlib.c:(.text+0x78d): undefined reference to `cos'
mathlib.c:(.text+0x7b8): undefined reference to `sin'
mathlib.c:(.text+0x7d0): undefined reference to `cos'
mathlib.c:(.text+0x7f8): undefined reference to `sin'
mathlib.c:(.text+0x810): undefined reference to `cos'
build/build-i386/mathlib.o: In function `AngleQuaternion':
mathlib.c:(.text+0xebc): undefined reference to `sin'
mathlib.c:(.text+0xed4): undefined reference to `cos'
mathlib.c:(.text+0xeff): undefined reference to `sin'
mathlib.c:(.text+0xf17): undefined reference to `cos'
mathlib.c:(.text+0xf3f): undefined reference to `sin'
mathlib.c:(.text+0xf57): undefined reference to `cos'
build/build-i386/mathlib.o: In function `QuaternionSlerp':
mathlib.c:(.text+0x136e): undefined reference to `acos'
mathlib.c:(.text+0x1386): undefined reference to `sin'
mathlib.c:(.text+0x13a7): undefined reference to `sin'
mathlib.c:(.text+0x13c7): undefined reference to `sin'
mathlib.c:(.text+0x1497): undefined reference to `sin'
mathlib.c:(.text+0x14bf): undefined reference to `sin'
build/build-i386/studiomdl.o: In function `TextureCoordRanges':
studiomdl.c:(.text+0x57eb): undefined reference to `fmin'
studiomdl.c:(.text+0x581b): undefined reference to `fmin'
studiomdl.c:(.text+0x5866): undefined reference to `fmax'
studiomdl.c:(.text+0x5896): undefined reference to `fmax'
studiomdl.c:(.text+0x5a56): undefined reference to `fmin'
studiomdl.c:(.text+0x5a86): undefined reference to `fmin'
studiomdl.c:(.text+0x5ad1): undefined reference to `fmax'
studiomdl.c:(.text+0x5b01): undefined reference to `fmax'
studiomdl.c:(.text+0x5f88): undefined reference to `fmax'
studiomdl.c:(.text+0x5fe0): undefined reference to `fmin'
studiomdl.c:(.text+0x6038): undefined reference to `fmax'
studiomdl.c:(.text+0x6090): undefined reference to `fmin'
build/build-i386/studiomdl.o: In function `ResizeTexture':
studiomdl.c:(.text+0x65d9): undefined reference to `pow'
build/build-i386/studiomdl.o: In function `Grab_Animation':
studiomdl.c:(.text+0x8ce3): undefined reference to `cos'
studiomdl.c:(.text+0x8d03): undefined reference to `sin'
build/build-i386/studiomdl.o: In function `.L944':
studiomdl.c:(.text+0xc0c3): undefined reference to `cos'
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'build/bin-i386/studiomdl' failed
make: *** [build/bin-i386/studiomdl] Error 1
I was able to get it compiling by moving to -ld
flag in the compile line to come after the objects (as per this Stack Overflow issue answer.
Because of the data types used within the mstudio*_t
types, running a 64-bit build is not possible. The data types should be changed to explicit types, such as int32_t
.
Also the ALIGN(a)
macro in should be updated to avoid casting—as that also can lead to indifferences between architectures.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.