Suggestion: warning levels

Started by Kweepa, Fri 02/06/2006 22:38:17

Previous topic - Next topic

Kweepa

I'm using RawDrawImage a lot, and end up with a huge warnings log full of:
Code: ags

RawDrawImage: Sprite 0 colour depth 8-bit not same as background depth 16-bit


When this is in a module it can be annoying to another developer.

It would be nice to be able to specify that I don't care about this and other warnings, either by classifying the warnings by severity (this one is harmless but may slow the game down slightly), or by giving the warnings unique IDs and something like this:
Code: ags

System.WarningDisable(eWarning_RawDrawImageDepth);
RawDrawImage(im, x, y);
System.WarningRestore(eWarning_RawDrawImageDepth);

where Disable pushes the current state of the warning, then disables it, and Restore pops.
Still waiting for Purity of the Surf II

Pumaman

Well, generally you shouldn't be trying to mix colour depths with RawDraw, as it can have unfortunate side effects (although in the case of 8-bit on 16-bit, you'll usually get away with it). However I see your point, I'll have a think about it.

Ishmael

Using RawDraw sometimes tosses a load of warnings about being unalbe to RawRestoreScreen since there is no saved screen. This is one of the cases where the warning level dealy would be useful, no?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Radiant

#3
Sounds reasonable.

I would also appreciate a warning level of "treat all warnings as errors" so that e.g. mixing up ChangeCharView and SetCharView stops the game instead of making a cryptic log entry without any line numbers. That would make it far easier to track down those errors.

Edit by strazer: Already on the tracker.

SMF spam blocked by CleanTalk