I find that no matter how hard I try, the BBS simply will not display the BI properly. On the latest sprite I've been working on, the problem seems to co in the black characters. Not sure why. I posted some examples and some files on the Synchronet Facebook page if you're interested in looking:
I really want to get BINs to work because I want to use the sprite library. But for now I've had to make do simulating that library and just using frame with ANS data loaded.
But I still don't understand the color values stored by frame.data[x][y].attr. In my case, I'm using green as the mask. What I have found is that if I load an ANSI image into the frame, the .attr for green characters is usually "2". But if I load the same image in BIN format, suddenly the green characters are "514." Why should these numbers be different? I don't get it.
When you create the Frame() in which you are loading the BIN file, either use no attributes or set it to BG_BLACK. The problem is that if you give a frame default attributes, anywhere there is no data (no character or attribute for a particular sector) it will fill it in with the defaults,
I'm assuming from your screenshots that the attributes for the frame youre using are set to DARKGRAY, which would cause that anomaly.
However in a .bin file, each character is paired with an attribute, and Fram should (arguably) be setting the attribute of each cell to the value read fr the file. Evidently it doesn't do this, and the default attribute for the frame is being applied (as MCMLXXIX explained.) This may be by design, perh it's necessary for transparency or helpful in some other situation.
Yes, this makes the difference. If I initialize the frame with BG_BLACK, the BIN appears correctly. Thanks!
However, I can't set this value when I make a sprite.
I tried replacing "0" with BG_BLACK in the frame init routines on lines 874 and 1384 of sprite.js:
this.frame = new Frame(x, y, this.ini.width, this.ini.height, BG_BLACK, parentFrame);
if you pass "undefined" instead of "BG_BLACK" (without quotes) it will let you use transparency on the sprite. It's probably worth noting that if you really want that black outline around your sprite, you should explicitly draw it in the BIN file (instead of just leaving those spots empty) so that if you do use transparency that black outline wont be masked.
|Location:||Riverside County, California|
|Nodes:||15 (1 / 14)|