
-----------------------------------
Paul Brenek
Sun May 02, 2004 2:32 pm

Importing Graphics in Mac version of Turing
-----------------------------------
Hi,

I am a newbie in using Turing on a Mac. I am using MacTuring 4.05.
I am trying to load an image onto the screen using the following code:

     var imgID : int
     imgID := Pic.FileNew ("triv.bmp" : string) : int

I am getting an error message saying that Pic has not been declared. Can anyone help me here please?

Also, the following code also generates similar errors.

var screenWidth : int := Config.Display (cdScreenWidth) 
var screenHeight : int := Config.Display (cdScreenHeight) 

global_windowset := Window.Open ("fullscreen") 
global_windowset := Window.Open ("position:top;center,graphics:200;200") 
Window.Set (global_windowset, "nocursor") 

Please help. Thank you.

-----------------------------------
Paul
Sun May 02, 2004 3:31 pm


-----------------------------------
Um... I dunno anything about mac version, but in windows version, doing a new pic would be like

var imgID : int 
imgID := Pic.FileNew ("triv.bmp")


Is it different in mac version?

-----------------------------------
Tony
Sun May 02, 2004 5:17 pm


-----------------------------------
well... I think that turing in question here is equivalent to DOS turing, not OOT :think:

also...

 imgID := Pic.FileNew ("triv.bmp" : string) : int 

the :string and :int are there just to show variable type to be passed/returned. You don't copy those from the help file :roll:

-----------------------------------
Paul Brenek
Sun May 02, 2004 5:40 pm

Mac Turing
-----------------------------------
I think you may be right. I think that MacTuring 4.05 is somehow equivalent to DOS Turing. I also have MacTuring 1.5 which is OOT but I am not using it because:

1. It does not allow you to read input from exteral data files...at least I don't know how to do it in OOT.

2. It does not allow you to use the include command. It has an import command but I don't know how to use it. Is it equivalent to the include command?

Also, don't you have to somehow import the GUI? I don't know how.

Any ideas? Thank you.

What I am trying to do is to write a Turing version of the game Trivial Pursuit.

-----------------------------------
Tony
Sun May 02, 2004 5:46 pm


-----------------------------------
well import is the 'proper' way for add-ons instead of include :roll: 

and you not suppost to use turing's GUI because it will kill you :twisted: well no, but it's bad, you're better off writing your own.

And the best advise I could give you is to run a windows vertual machine (or w/e simulator) on your mac and program in WinOOT 4.0.5 (not to be mistaken with what you using now... it is way different)

-----------------------------------
Paul Brenek
Sun May 02, 2004 6:00 pm

Mac Turing
-----------------------------------
I don't have Win OOT or virtual PC yet.
In the interim can you please tell me how I can:

1. read data from external files - what is the syntax
2. use the import command in OOT - what is the syntax
3.  import graphics into the screen - syntax

Thank you.

-----------------------------------
Paul Brenek
Sun May 02, 2004 6:41 pm

Mac Turing
-----------------------------------
Another thing:

I have tried to rerun the code in OOT. The problem I have run into is that my OOT compiler is in one directory (folder) and my program and other units are in another folder. When I use import, the main program is looking in the OOT complier folder for the unit programs instead of its own folder. How do I tell the main program to look in its own folder for the subprograms?

Thank you.
