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 is currently offline 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.

Report message to a moderator

Civilian
Re: Keeping it portable[message #101040] Wed, 07 April 2004 09:36 Go to previous messageGo to next message
Digicrab is currently offline Digicrab

 
Messages:253
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.

Report message to a moderator

Master Sergeant
Re: Keeping it portable[message #101041] Wed, 07 April 2004 20:50 Go to previous messageGo to next message
PinkyAndThaBrain is currently offline 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 ...

Report message to a moderator

Civilian
Re: Keeping it portable[message #101042] Wed, 07 April 2004 21:00 Go to previous message
Crimson Rider is currently offline Crimson Rider

 
Messages:19
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.

Report message to a moderator

Private
Previous Topic: The perfect Jagged Alliance
Next Topic: UC rankings
Goto Forum:
  


Current Time: Fri Mar 29 08:21:39 GMT+2 2024

Total time taken to generate the page: 0.01002 seconds