New Release Preview - Stress Test

No. Extensions don't have anything to do with a file's contents, and OpenBOR knows the difference. Only non-interlaced, 8-bit color .png files will be accepted.

You can batch convert every .gif in a module to .png with Photoshop in five minutes. If you don't have that, use @Plombo's PalApply tool:


DC
I assuem the best way to edit the ,txt files with ,gif extensions is with a custom .bat file as well. Tell it to search every .txt file and change .gif to .png?
 
Yes, but there's a GUI in resources for that too.


DC


Sorry I may be slightly confused.

First I would use Plombo's too to convert my current gifs into useable pngs. Next, I am looking to change the reference to each gif in every txt file whether it is a background layer or entity. For example:

FROM
frame data/chars/1billy/grab01.gif

TO
frame data/chars/1billy/grab01.png

Can the batch file renamer do this or will it only change the file name?
You also mentioned that OpenBOR will know the difference? Are you saying I can leave the frame line and as .gif and the actual file as .png and everything will still work?
 
Sorry I may be slightly confused.

First I would use Plombo's too to convert my current gifs into useable pngs. Next, I am looking to change the reference to each gif in every txt file whether it is a background layer or entity. For example:

FROM
frame data/chars/1billy/grab01.gif

TO
frame data/chars/1billy/grab01.png

Can the batch file renamer do this or will it only change the file name?
You also mentioned that OpenBOR will know the difference? Are you saying I can leave the frame line and as .gif and the actual file as .png and everything will still work?

When I say OpenBOR knows the difference, I mean you can’t just change the extension and expect the file to work. That’s like changing the badge on a car - it’s still the same machine underneath.

You have to change the extension and convert the file.

If OpenBOR sees the wrong extension, it won’t bother reading further - it will reject the file outright. If you use the right extension but the wrong file type, OpenBOR will attempt to read it, but .gif images are not .png images. The compression is different, and the data layout is different. The image loader library will send back a code that basically means "I don’t know what the f*** this is.” OpenBOR will then assume the file is corrupted or invalid and handle it accordingly.

For the batch renamer, yes, it can rename extensions only - that’s how I fixed some of my older projects and why I placed in Resources.

Photoshop would probably be the fastest way to convert the files, because it can read every file in the entire project and save .png versions with the same palette using its Save for Web dialog. Plombo’s PalApply tool can do it too, but you’ll need to go folder by folder to avoid screwig up your image palettes, since it’s meant to apply a single palette to groups of images. Still, that should be reasonably quick.

This is why I’ve been telling y’all to stop using .gif since around 2010. Eventually, support for it had to go.

DC
 
Already on my mind along with keyboard support, but I/O hardware interface is not my area of expertise, so no promises in the short term.

DC

Further to that, just adding the clock turned out to be an interesting experience. Mostly because Windows handles time a little differently. I also wanted millisecond precision instead of stopping at whole seconds, so the implementation needed a small platform split. See, computers don't really “know” what time it is, because again, computers don't "know" anything. The system keeps track of time as a count from a fixed starting point called an epoch, then converts that count into years, months, days, hours, and so on.

Most systems use Unix time, which counts from:

1970-01-01 00:00:00 UTC

Traditional APIs return whole seconds, while higher-precision APIs also provide a fractional part - ex. milliseconds. Windows uses a different native format called FILETIME. It stores the number of 100-nanosecond intervals since:

1601-01-01 00:00:00 UTC

Why 1601? Because Windows. :cautious:

That means OpenBOR has to convert Windows time into the same Unix-based value used by everything else. Once that conversion is done, the rest of the API can behave the same everywhere.

Then there are time zones to consider, so I provided a switch between local time and UTC. UTC refers to Coordinated Universal Time - the internationally agreed standard used as a common reference worldwide, independent of local time zones and daylight-saving changes.

IOW, that little clock on the wall represents a page full of code I pulled my hair out over, so you better appreciate it. :P

DC
 
Back
Top Bottom