Plugin request: arbitrary sprite scaler

Started by SSH, Tue 11/11/2003 16:33:34

Previous topic - Next topic

SSH

I don't know if this is possible as a plugin, but if one of those marvellous people with a C or Delphi compiler want to make it for me, I'd be very grateful (or even CJ do it native, but I've already asked for that)

I'd need a function like

DisplayScaledSprite(int sprite_slot, int x, int y, int width, int height);

Actually, I only need to scale the x dimension, so I'd enter height as the sprite's true height always, but I'm looking at general applicability here. It can be done as an overlay or however you like but transparent bits need to remain transparent. Ideally, it would have a baseline and things could be in front, but that's work-aroundable.

Many thanks if someone wants to do it!
12

Pumaman

are you looking for a RawDraw type function or an overlay type function?

MrColossal

i think he'd rather an overlay cause then you can at least have characters walk behind it

but imagine being able to do it with objects and characters.... mmm imagine...
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

SSH

Well, I think what I really want is:

SetObjectXScale( int objnum, int width);

Where you can set the scaling of an object's X dimension. Probably a similar function for Y (or a combined one) would be implemented along with it.

Basically, there's a room with the side walls closing in, and the perspective needs to be maintained correctly.

12

Isegrim

Great idea, could use someting like that, too!
This post was generated automatically and therefore bears no signature.

Pumaman

#5
So basically, a manual way to override the scaling features? For example, how about two new functions:

SetCharacterSize(CHARID, int width, int height);
SetObjectSize(int object, int width, int height);

or would it be more useful with a percentage scaling rather than an absolute width/height?

Isegrim

This post was generated automatically and therefore bears no signature.

quintaros (at work)

I'd prefer percentage scaling over an absolute value.

SSH

I think absoluate values would be better, because percentages would mean that you maybe can't get exactly the size you want, but you could always write a bit of script to calculate percentages.

12

Ishmael

SetCharacterSize(CHARID, int width, int height, int abs);
SetObjectSize(int object, int width, int height, int abs);

and if abs is difrent then zero, the width and height are set as absolute pixel dimension, and if it's zero, they are set as percentages of the original.

?
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.

After

#10
I would say use whatever the engine does most efficiently, except ... that I just had visions of integer percentages :horrifed: and so it had better not be that ::)

(21*33)/100=6?

Make it absolute (if it goes ahead) so that whoever uses it knows exactly what to expect and can make their own functions based on arithmetic instead of experiment, and isn't compelled to quantize in 100ths. :P

Finer

Think about how absolute values would affect different screen resolutions, as these can be set by the user irrespective of how the game was intended to be played.

Pumaman

Well, absolute values would be specified in 320x200 co-ordinates like all the other script commands, and automatically multiplied up by AGS if necessary, so that's not really an issue.

SMF spam blocked by CleanTalk