Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: foxstudio on Sat 16/05/2020 14:56:51

Title: Panorama Not working on AGS 3.5.0
Post by: foxstudio on Sat 16/05/2020 14:56:51

Hello everyone.

Sorry if I ask in the wrong place and I don't understand English well ...

The problem with the panorama script is not working for me under AGS 3.5.0

I get this error message:

Panorama.asc (107): Error (line 107): Undefined token 'RawDrawImageResized'

The resolution of my game is 32 bit 640x480

It was written with this also works as a panorama script ...

Is there a tutorial video or plugin somewhere that would make it easier, or would someone describe to me step by step how to?

Thank you very much.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: Crimson Wizard on Sat 16/05/2020 15:14:31
It cannot find an old script function that was deprecated.

Go to "General Settings" and set "Script compatibility level" to 3.2.1 and "Enforce object-oriented scripting" to "false" - that will enable oldest functions.

EDIT: the option is called "Enforce post-2.62 scripting" now since 3.5.1.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: foxstudio on Sat 16/05/2020 15:58:48
 Thank you very much.

A half done!

The panorama that appears on one side of my screen shows a still image on the other side. This is definitely a step forward, I would not have known it myself.

 Thanks again!
Title: Re: Panorama Not working on AGS 3.5.0
Post by: Crimson Wizard on Sat 16/05/2020 16:28:36
Unfortunately I never used this module and don't know how it works, hope someone else does.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: LimpingFish on Mon 18/05/2020 00:12:16
I've just tested the module with the latest version of AGS and it works fine.

Is your player character (cEgo) set to coordinates X: 160, Y: 0? If not, this can mess up the effect.

If you follow the step-by-step instructions found in the PanoramaManual.txt file that comes with the module, you should be able to get things working correctly. :)
Title: Re: Panorama Not working on AGS 3.5.0
Post by: InfernalGrape on Mon 02/05/2022 17:46:15
I'm using 3.5.1 and i can't find "Enforce object-oriented scripting" anywhere thus i'm stuck with "Undefined token 'RawDrawImageResized'" error.

Do i have to downgrade to 3.5.0? This seems unfortunate.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: Crimson Wizard on Mon 02/05/2022 17:50:04
Quote from: InfernalGrape on Mon 02/05/2022 17:46:15
I'm using 3.5.1 and i can't find "Enforce object-oriented scripting" anywhere thus i'm stuck with "Undefined token 'RawDrawImageResized'" error.

It's General Settings -> Backwards Compatibility -> Enforce post-2.62 scripting. The option has been renamed to clarify what it means.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: InfernalGrape on Mon 02/05/2022 18:05:02
Oh, thank you!

Hopefully later documentation (e.g. the one on GitHub) will mention such a change.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: Creamy on Sun 16/03/2025 10:31:00
Quote from: Crimson Wizard on Mon 02/05/2022 17:50:04
Quote from: InfernalGrape on Mon 02/05/2022 17:46:15I'm using 3.5.1 and i can't find "Enforce object-oriented scripting" anywhere thus i'm stuck with "Undefined token 'RawDrawImageResized'" error.

It's General Settings -> Backwards Compatibility -> Enforce post-2.62 scripting. The option has been renamed to clarify what it means.

In the last versions of AGS you cannot set script compatibility level below 3.2.1.

So you'll have to replace:
RawDrawImageResized(x, 120 - halfScale, gSprites[gSpriteIndex].Graphic, 1, 2*halfScale);
By something like this:
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(x, 120-halfScale, gSprites[gSpriteIndex].Graphic, 0, 1, 2*halfScale);

The code above is set for the resolution of the demo (320*240).

Here's a link for the demo (https://drive.google.com/file/d/16C5jaqcKL_50b0-nBURWQH5H--ZA2kiS/view?usp=sharing) with this correction.
Title: Re: Panorama Not working on AGS 3.5.0
Post by: Crimson Wizard on Sun 16/03/2025 14:35:12
Quote from: Creamy on Sun 16/03/2025 10:31:00In the last versions of AGS you cannot set script compatibility level below 3.2.1.

That's true if you are referring to AGS 4.0, but 3.6.2 can still do that.

Of course it's still better and future proof to update the script.