Pages: [1]
  Print  
Author Topic: Extended Binary  (Read 1010 times)
Offline (Unknown gender) TheStolenBattenberg
Posted on: October 04, 2014, 08:48:17 AM
Member
Joined: Oct 2014
Posts: 2

View Profile Email
Hi,

I'm interested in extending the functions of Enigma, and I'd be happy to upload the code for people when I'm done. But I'd like to ask, is modifying the source directly preferred to creating an Enigma extension? I guess it all depends on if what I want is do-able in Extensions, which is as follows:

    - More data type reading: Byte, Short, Int, Long, Float and Double; with unsigned, signed and big/ little endian versions where possible. This is already done, but only enough for personal use atm.
    - Extended binary model loading: I'm gonna do .MS3D, .3DS and .TMD (playstation hacking ftw). I've already done .MS3D, with vertex, normal and texture support.
    - Extended binary image loading: I plan to add some other image formats, such as .tga, .tim and .dds.


I've not got much C++ experience outside of the realm of binary and file manipulation, it's all I've ever done with the language.

I guess if extensions are preferred, they'd be a template for adding them?

Thanks,
- TSB
Logged
Offline (Male) Goombert
Reply #1 Posted on: October 04, 2014, 09:02:20 AM

Contributor
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2992

View Profile
Howdy, and welcome to the forums!

Quote from: TheStolenBattenberg
But I'd like to ask, is modifying the source directly preferred to creating an Enigma extension?
It depends really, we try to keep a solid and stable base of functions from GM, but just about everything that some particular user would not directly need we try to throw into an extension. Simple rule of thumb is that if not everybody needs it; put it into an extension.

Quote from: TheStolenBattenberg
I guess if extensions are preferred, they'd be a template for adding them?
Yes sir, there is, just follow the other extensions in engima-dev/ENIGMASystem/SHELL/Universal_System/Extensions
Logged
Welcome to ENIGMO, the game engine built by fucking aliens.

Offline (Unknown gender) TheExDeus
Reply #2 Posted on: October 04, 2014, 10:15:06 AM

Developer
Joined: Apr 2008
Posts: 1886

View Profile
Currently all image data loading and saving is implemented in ENIGMAsystem/SHELL/Universal_System/image_formats.cpp . If you add a format loading there, then you automatically would add it to sprite_add, background_add and so on. It's harder to extend those functions with extensions though. It would be easier for you to add sprite_add_tiff or something like that in an extension. But I think you should look into image_formats.cpp and see if you can extend that functionality there.
Logged
Offline (Unknown gender) TheStolenBattenberg
Reply #3 Posted on: October 04, 2014, 10:42:38 AM
Member
Joined: Oct 2014
Posts: 2

View Profile Email
Quote
Howdy, and welcome to the forums!
Thanks, I've been lurking for about a month or so now, decided I should finally register. ^-^

Quote
It depends really, we try to keep a solid and stable base of functions from GM, but just about everything that some particular user would not directly need we try to throw into an extension. Simple rule of thumb is that if not everybody needs it; put it into an extension.
Binary would fit pretty snug with an extension then, I guess.

Quote
Yes sir, there is, just follow the other extensions in engima-dev/ENIGMASystem/SHELL/Universal_System/Extensions
Thanks, I'll take a look into extensions then.

Quote
Currently all image data loading and saving is implemented in ENIGMAsystem/SHELL/Universal_System/image_formats.cpp . If you add a format loading there, then you automatically would add it to sprite_add, background_add and so on. It's harder to extend those functions with extensions though. It would be easier for you to add sprite_add_tiff or something like that in an extension. But I think you should look into image_formats.cpp and see if you can extend that functionality there.
I'll take a look into the image_formats.cpp file, I did see it but didn't check the source out.
Logged
Pages: [1]
  Print