ID:135113
 
This is probably an old request, but I can't imagine it'd be that difficult to add and it'd add a lot of additional uses for BYOND programming. The ability to add specific byte values to files (insert or modify) and the ability to retreive byte values from a specific offset within a file. It'd make it possible to use BYOND to create editors and such for non-BYOND programs.

This is "almost" possible using text2file/file2text along with ascii2text/text2ascii, but there's some issues there with certain values making it (as far as I can tell) impossible.
"Download today! BYONDhex: Now complete with src_code2files()!"

_>
I honestly don't see it happening, but, meh, it's their choice and not mine.
Foomer wrote:
This is probably an old request, but I can't imagine it'd be that difficult to add and it'd add a lot of additional uses for BYOND programming. The ability to add specific byte values to files (insert or modify) and the ability to retreive byte values from a specific offset within a file. It'd make it possible to use BYOND to create editors and such for non-BYOND programs.


Agreed. In fact, it could be used with BYOND file formats! For example, if this were implemented, then it would be possible for one to make his own GetPixelColor() proc.
In response to Hell Ramen
I honestly think you have no idea what I'm talking about.
In response to Foomer
Foomer wrote:
I honestly think you have no idea what I'm talking about.

I concur. If anyone wishes to attempt to explain it to the guy...
In response to Teh Governator
Actually, I think he does know what he's talking about (this time) - it sounds like you want the ability to read the contents of binary files. If this was possible, you could parse a DMI file to determine, say, the colour of a given pixel in the icon.
In response to Crispy
Crispy wrote:
Actually, I think he does know what he's talking about (this time) - it sounds like you want the ability to read the contents of binary files. If this was possible, you could parse a DMI file to determine, say, the colour of a given pixel in the icon.

and thats the problem with viewing all posts in the thread =P
In response to OneFishDown
OneFishDown wrote:
Crispy wrote:
Actually, I think he does know what he's talking about (this time) - it sounds like you want the ability to read the contents of binary files. If this was possible, you could parse a DMI file to determine, say, the colour of a given pixel in the icon.

and thats the problem with viewing all posts in the thread =P

Well that explains whats going on in this conversation. :P
In response to Wizkidd0123
Wizkidd0123 wrote:
Foomer wrote:
This is probably an old request, but I can't imagine it'd be that difficult to add and it'd add a lot of additional uses for BYOND programming. The ability to add specific byte values to files (insert or modify) and the ability to retreive byte values from a specific offset within a file. It'd make it possible to use BYOND to create editors and such for non-BYOND programs.


Agreed. In fact, it could be used with BYOND file formats! For example, if this were implemented, then it would be possible for one to make his own GetPixelColor() proc.

Uhh can't you all ready do that?
In response to Green Lime
No, it is something we have been wanting and waiting for. It is supposed to be added in some future update.
In response to Loduwijk
Loduwijk wrote:
No, it is something we have been wanting and waiting for. It is supposed to be added in some future update.

hmm O.o so If I made a GetPixelColor() function you would download and use it? I just dont want to do somthing like that and no one use it.

Ps what would you want this function to do exactly? Like GetPixelColor(x,y) and it would output what RRGGBB?
In response to Green Lime
Green Lime wrote:
hmm O.o so If I made a GetPixelColor() function you would download and use it? I just dont want to do somthing like that and no one use it.

If you made a GetPixelColor() proc, then yes, we would download it. However, at the moment, as far as I can tell, it's completely impossible. The only efficient way to do it is to binarily read the icon. Although we know the .dmi format, to binarily read a file, as Foomer is requesting, ascii2text() would have to be used. Unfortunately, since BYOND can't doesn't handle certain ASCII characters very well, the most notable one being 0, it isn't possible, at the moment, for BYOND to read a file binarily.

Ps what would you want this function to do exactly? Like GetPixelColor(x,y) and it would output what RRGGBB?

Yup: GetPixelColor(px,py). However, preferably, it would output a hexidecimal RGB value: all of the other rgb-related procs do. rgb() itself, is, in fact, just a dec2hex() proc: it converts its three numerical arguments and returns them as a hexidecimal value. The return value of rgb() is a text value.
In response to Crispy
Crispy wrote:
Actually, I think he does know what he's talking about (this time) - it sounds like you want the ability to read the contents of binary files. If this was possible, you could parse a DMI file to determine, say, the colour of a given pixel in the icon.

Crispy,

Hell Ramen wrote:
"Download today! BYONDhex: Now complete with src_code2files()!"

_>
I honestly don't see it happening, but, meh, it's their choice and not mine.

I think you replied to the wrong post =P.
Yes, I would very much like that as well. It will allow for some very neat applications to be made :)
In response to OneFishDown
Whoops! My bad. Normally I check to make sure people are replying to who I think they're replying to; must've forgot this time. =)

Typical - the one time I don't check...!
In response to Wizkidd0123
I feel so...insulted. :(
Plus, with Byte Manipulation, couldn't you also use it to the point where you could make a file editor like function?
In response to Hell Ramen
Hell Ramen wrote:
with Byte Manipulation, couldn't you also use it to the point where you could make a file editor like function?

Yeah, thats the point.
In response to Foomer
Yes, I see this as a great use to BYOND then...
_>
What? It's not like I'll make something to use on Gunbound or something, geez.
In response to Crispy
/me Bookmarks this event to use when Crispy tells him off for not replying in the right post =P
In response to DeathAwaitsU
I replied to the right post. I just thought the person I was replying to was replying to a post that he wasn't. Difference. =P
Page: 1 2