AGS 2.71 Final 2 - Politically Correct Edition

Started by Pumaman, Sun 05/06/2005 23:32:14

Previous topic - Next topic

strazer

#240
Nice, thanks. Time to update my modules.
Btw, were you able to fix the stereo 8-bit wave file crash?

Edit:

I've just noticed in the manual for String.UpperCase and .LowerCase, in the code examples it says "newstring" instead of "mystring".

Edit 2:

Regarding String.AppendChar:

  String somestring;
  somestring = somestring.AppendChar('a');

The latter part causes a "Null string/pointer referenced" error unless I define somestring as
  String somestring = "";

Would it make sense for AppendChar to "activate" the String, for lack of a better word, if it is null when a character is added to it?

Rui 'Trovatore' Pires

I guess I might as well say this, it's been on my mind a lot...

I haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

QuoteBtw, were you able to fix the stereo 8-bit wave file crash?

Yes, sorry I might have forgotten to include it on the changelog. It should be fixed in 2.71 final.

QuoteI've just noticed in the manual for String.UpperCase and .LowerCase, in the code examples it says "newstring" instead of "mystring".

Thanks, I'll correct them.

Quote
Regarding String.AppendChar:

  String somestring;
  somestring = somestring.AppendChar('a');

The latter part causes a "Null string/pointer referenced" error unless I define somestring as
  String somestring = "";

Would it make sense for AppendChar to "activate" the String, for lack of a better word, if it is null when a character is added to it?

Yeah it's an interesting point ... we've discussed it briefly before as to whether Strings should be automatically initialized to "" rather than null ... they probably should be, thinking about it, but it's too late to do that for 2.71 now.

QuoteI haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?

What is it that doesn't work? I've tried adding the plugin to a game and compiling it and that seemed ok ... is it actually at runtime that you get the problem?
Without knowing how the code for the plugin works, it's probably not viable for me to fix it.

Rui 'Trovatore' Pires

Ah, you'd have to talk to Trisk, he's the one I remember right now that had trouble with it... I know it wasn't really my place place to mention it, but I thought it should be mentioned.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.


monkey0506

[In a pitiful attempt to relate this to the topic:]

I'd just like to say that initializing Strings to "" would be very useful to me.  In fact, if they could just never be null it would make things easier for me because I have all these checks running around (if (StringParam == null) return;) and whatnot...it's just kind of a hassle.

[Offtopic (kind of):]

Strazer, when this does go official, (please) don't put the ScrollingDialog module in the archive.  I broke it.  The last update crashes the game and I haven't uploaded a fixed version...I'll get on that soon, but I just wanted to let you know it's broken right now.


SSH

I tried searchign the forums to find out about this sprite corruption thing, but couldn't track it down. Howver, I have my own sprite corruption issue. In this test game. I try to "print" ABCDE with sprites using RawDrawImage. However, the sprites come up as crap. Also, the same sprites look OK in the GUI or as objects. Yes, the colour depth is OK and this is copied into a new blank game, so I dont know what is wrong!

The game is compiled with Final, but it was doing it in RC4 too. However, I'm pretty sure I've had Rawdraw working in RC4 earlier...
12

Pumaman

Your room background is 8-bit, which is why the 16-bit sprites are messing up when being drawn onto it.

SSH

#249
I'm sure it still did it with a 16-bitter. If so, I'll repload tomorrow.

No it doesnt. I'm sure that BG was not 8 bit - oh well. Humble pie for dinner!
12

GarageGothic

Quote from: Rui "Shodan" Pires (a divine AI) on Fri 02/12/2005 22:27:00I haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?

I didn't have any issues with the plugin in either of the betas and just compiled the game with final version, and the plugin does what it's supposed to. Has anyone but Trisk actually experienced this problem?

SSH

#251
Well, this time everything's 16bit, but I get a corruption when I grab the BG as a dynamic sprite. Test game is in the same place here

The background draws OK, but the Dynamic Sprite that I grab from it has all these vertical black stripes in it which looks like a resolution confusion again...

I hope its not my own screwup again...

Furtehr info: I tried replacing where I use DynamicSprite.CreateFromBackground with   DynamicSprite.CreateFromScreenshot and then cropping. This works, however, I am trying to draw and then capture in zero time so that it is invisible to the user and the screenshot one needs a Wait(1) to update the screen and also no overlying GUIs... Looks like a DS.CFB bug to me...
12

Trisk

#252
On the Snow/Rain plugin:

It worked fine on AGS 2.7 in Prodigal. But when I ported the game up to 2.71 RC3 and/or RC4, suddenly the rain disappeared. So I loaded the Snow/Rain demo game that comes with the plugin to see if that was any better, and neither the rain nor the snow show up.

Weird that nobody else is having this problem, since it worked fine for me in 2.7 and 2.62...

I'm running in 16bit color...maybe people who aren't having troubles are running in different color depths?

-**EDIT**- Other people are having this problem too. Check this topic:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23494.0

Pumaman

SSH: you have to be very careful when mixing colour depths.
In your case now, the room background is 32-bit but the game itself is 16-bit. This means that CreateFromBackground is creating a 32-bit sprite from the background, but then when you create a graphical overlay it gets created as 16-bit (since overlays are always created at the game's colour depth).
Then putting this 32-bit sprite into the 16-bit overlay and then drawing the 16-bit overlay onto the 32-bit background all gets rather messed up.

Trisk: interesting ... well, without speaking to Scorpiorus there's no way I can really know what's wrong with the plugin.

SSH

#254
But then, since there aren't really any 16-bit graphics file formats, how do you import a 16-bit BG? I thought AGS used to convert 32-bit BGs to 16-bit in a hicolour game, not at runtime but in the editor... has this changed?

btw, my guess with Rain/Snow is due to which version og the Allegro DLL people have installed...
12

Gilbert

Yes you're right I think.

If your game was setup as 16-bit already, the editor would automatically convert true colour images into 16 bit while importing.
If you setup a game as 32-bit first and imported some graphics, however, the graphics will not be converted back to 16-bit even if you changed the colour depth in the editor (which I suppose was what you did), so you need to reimport these images.

SSH

#256
But I never had the game as 32-bit...

Well, Irfanview converted the BG to a 16-bit PNG and now I get instead:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x004053D0 ; program pointer is +6, ACI version 2.71.892, gtags (108,20)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in SpriteFont (line 103)
from Room 2 script (line 21)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK   
---------------------------

line 103 is:

    RawDrawImageTransparent(x, y, spr, transparent);

which seems to occur when i call the function with transparent != 0

Also, now the sprites are displays as kack again...  ::)

Is there a way to find out what bit depth a background is imported as (as you can with sprite properties)? It used to be the game resolution it was imported at, but now seems to dpeend more on the file you import: GIFs always import as 8-bit, 32bit PNGs import as 32 bit. In fact, I no longer trust those sprites that say they are 16-bit. SOmething has changed in the file import.

btw, the mouse co-ords display on sprite import is wrong, as it says 40,40 when at 20,20 at zoom level 2 (default)...
12

Gilbert

Hmmm, maybe the PNGs had alpha channels which messed up the import, try converting them to 24-bit PCX (which does not support transparency) and see if that helps.

SSH

Thanks, Gil, that seems to work!

There's definately something funny in the PNG import, though...
12

Heimdal

With ags271rc2 all things work fine! But after installing ags271rc4 and ags271final I got 2 serious problem:

1. It's not longer possible to initialize the audiocard â€" Message: Unable to initialize your audio card (program Failed to init digital sound driver).

2. The computer freeze not every time but about every second time when running “Test game” or the compiled game. With freezing I mean Windows crash totally and it's only possible to turn the computer of and on.

I've try it with more than one game. Also I've have make the most simple game with just one room and one walkable area and nothing else.

My computer:
Dell Optiplex GX1p Pentium II, 450 MHz, 256 mb ram.
Video Card: Radeon 7000 series with 32 mb ram.
Sound Card: Roland CPU-401
System: Windows98SE.

SMF spam blocked by CleanTalk