Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Keeping it portable
Keeping it portable[message #101039] Tue, 06 April 2004 07:04 Go to next message
PinkyAndThaBrain
Messages:2
Registered:April 2004
Defining a few coding conventions about now would seem like a good idea ...

For instance always have a ANSI-C fallback of every function, and splitting off all assembly into external files for nasm? This is pretty much the gold standard for portable code with x86 assembly at the moment. If SDL is ever adopted this will make porting to *nix and OSX so much less painfull.

Inline assembly can be a little more efficient, but that advantage it is only really relevant for intrinsic type functions with very few actual instructions. Where that is relevant some macros with ifdef'd inline assembly can be used, but I dont see any such code.
Re: Keeping it portable[message #101040] Wed, 07 April 2004 09:36 Go to previous messageGo to next message
Digicrab

 
Messages:254
Registered:December 2003

It's a bit difficult to "keep it portable" since it's not portable right now. =) We are working on making a gcc build.
Re: Keeping it portable[message #101041] Wed, 07 April 2004 20:50 Go to previous messageGo to next message
PinkyAndThaBrain
Messages:2
Registered:April 2004
If you say now "we want our codebase to have assembly functions in nasm" someone might actually try his hand at that who might otherwise spend his time coding inline asm code for gcc (which would then give you huge unreadable source with lots of ifdef'd inline assembly functions). Now is the time to set some ground rules, not for the existing code ... but for new code, to prevent people from wasting time.

To give a concrete example, I think it would be a mistake to let GCC only C code get into the main branch ...
Re: Keeping it portable[message #101042] Wed, 07 April 2004 21:00 Go to previous message
Crimson Rider

 
Messages:18
Registered:April 2004
Location: Netherlands
I agree.

This is a good time to set some ground rules. The excisting code is as is. Can't change much about that.

But the future code, well need to agree on how to handle that.
Previous Topic: The perfect Jagged Alliance
Next Topic: UC rankings
Goto Forum:
  


Current Time: Fri Mar 22 12:30:17 EET 2019

Total time taken to generate the page: 0.01153 seconds