Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (frutza, Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mirror in lite-c with A8 PRO #484324
10/09/21 15:18
10/09/21 15:18
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline OP
Expert
slacer  Offline OP
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Hi all,

I installed my old A8 Pro again after a very long time and just wanted to create a simple scene with a real mirror in it.
This snippet from the manual does not even compile for me.
Code
// Code to emulate a horizontal mirror by generating a vertically flipped camera view
view mirror { }
function init_mirror_z()
{
  camera.portal = mirror;
 	mirror.noshadow = on; // suppress shadows in the mirror
 	mirror.portalclip = on;
 	while (1)
 	{
	  proc_late();   // place it at the end of the function list - the camera must be moved before
 	  mirror.genius = camera.genius;
 	  mirror.aspect = -camera.aspect;    // flip the image upside down
 	  mirror.arc = camera.arc;
 	  mirror.fog = camera.fog;
 	  mirror.x = camera.x;
 	  mirror.y = camera.y;
 	  mirror.z = 2*camera.portal_z-camera.z; //move the camera downwards by twice the portal distance
    mirror.pan = camera.pan;
 	  mirror.tilt = -camera.tilt; // flip the vertical camera angle
 	  mirror.roll = -camera.roll;
 	  wait(1);
  }
} 


The error message is:
Quote

A8 Egine - Pro Edition V8.47.1 - Mar 9 2016

Error in line 18:
'view' undeclared identifier
<view mirror {}>
Error E355: Startup Failure - any key to abort


Any ideas or a working sample?

I use the simple template with these header files:
Code
////////////////////////////////////////////////////////////////////////
// Template main script:
// Created by WED.
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
// entry: Start Level
// entry_help: Name of the level loaded at start
char* t_levelname = "sample.wmb";

////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
#include <atypes.h>
#include "t_player.h"


Kind regards
Michael

Re: Mirror in lite-c with A8 PRO [Re: slacer] #484334
10/10/21 12:08
10/10/21 12:08
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline OP
Expert
slacer  Offline OP
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Seems I confused C-Script with Lite-C as this code is in the A6 manual in the C-Script section as well. frown But I still don't know how to do it in A8 PRO.

Re: Mirror in lite-c with A8 PRO [Re: slacer] #484337
10/10/21 12:44
10/10/21 12:44
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey!

There is a mirror shader in the mtlFX.c, check it out!
You can see how it works from the shaderTest.c (which can be found in GStudio8\projects\shadertest).

Greets.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Mirror in lite-c with A8 PRO [Re: slacer] #484338
10/10/21 13:41
10/10/21 13:41
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline OP
Expert
slacer  Offline OP
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Great!
Thank you.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1