Welcome, Guest. Please login or register.

Author Topic: picasso96 development  (Read 2241 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline TinsaTopic starter

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 4
    • Show only replies by Tinsa
    • http://www.EtherealWorld.com
picasso96 development
« on: January 16, 2004, 08:16:39 AM »
Hi again.

I changed p96OpenScreenTagList to p96OpenScreenTags and managed to compile, but now the linker says: "Symbol "p96OpenScreenTags(...) Not defined"...

Any suggestions?

/*
I am trying to open a screen in picasso96 and it's driving me crazy....

I have this piece of code:
screen = p96OpenScreenTagList(P96SA_Width, 800, P96SA_HEIGHT, 600, P96SA_Depth, 24, P96SA_Title, "doodie", TAG_END);

The compiler (StormC3 from devcd) complains about : "Illegal argument"...
I have added the "Picasso96API.lib" library to the project...

I would really appreciate any halp on this matter...
*/

Thanks in advance
 

Offline Thomas

Re: picasso96 development
« Reply #1 on: January 16, 2004, 09:25:31 AM »

You could do it like this:

ULONG tags[] = {P96SA_Width, 800, P96SA_HEIGHT, 600, P96SA_Depth, 24, P96SA_Title, "doodie", TAG_END};
screen = p96OpenScreenTagList(tags);

But I'd rather use CGX than P96, because it runs on all graphics boards not only on P96 ones. CGX programs run on P96, not vice versa.

And additionally I would by all means avoid using graphics card-only funktions. If you'd use OpenScreenTags instead of p96OpenScreenTags, the program could run on non-graphics card systems also.

Bye,
Thomas

Offline TinsaTopic starter

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 4
    • Show only replies by Tinsa
    • http://www.EtherealWorld.com
Re: picasso96 development
« Reply #2 on: January 16, 2004, 10:54:54 AM »
Quote

Thomas wrote:

You could do it like this:

ULONG tags[] = {P96SA_Width, 800, P96SA_HEIGHT, 600, P96SA_Depth, 24, P96SA_Title, "doodie", TAG_END};
screen = p96OpenScreenTagList(tags);

But I'd rather use CGX than P96, because it runs on all graphics boards not only on P96 ones. CGX programs run on P96, not vice versa.

And additionally I would by all means avoid using graphics card-only funktions. If you'd use OpenScreenTags instead of p96OpenScreenTags, the program could run on non-graphics card systems also.

Bye,
Thomas


That did not work either, I still got "Illegal argument", it seems as if the error must be in the tag list, but i can not find it...
 

Offline Thomas

Re: picasso96 development
« Reply #3 on: January 16, 2004, 11:48:44 AM »

Perhaps you should try to learn C before you start programming ;-)

Of course you have to cast the type of the pointer to match the prototype. Or declare tags as struct TagItem.

So the correct call should look like this:

screen = p96OpenScreenTagList((struct TagItem *)tags);

There is a good text about AmigaOS 2.0 programming style on the Amiga Developer CD. IIRC it was called AmigaMail volume 2. It is about using tags in function calls and other useful things introduced with OS 2. You should really read it.

Bye,
Thomas

Offline Thomas

Re: picasso96 development
« Reply #4 on: January 16, 2004, 11:52:08 AM »

Oh and as we are at casting, this one has to be casted, too:

ULONG tags[] = {P96SA_Width, 800, P96SA_HEIGHT, 600, P96SA_Depth, 24, P96SA_Title, (ULONG)"doodie", TAG_END};

Because it is a pointer and the array only contains integers.

Bye,
Thomas


Offline Crumb

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1786
  • Country: 00
    • Show only replies by Crumb
    • http://cuaz.sourceforge.net
Re: picasso96 development
« Reply #5 on: January 16, 2004, 03:02:48 PM »
To use Picasso96 with stormc3 you should adapt the includes with FD2Pragma.

There's no need to add the Picasso96.lib...
The only spanish amiga news web page/club: Club de Usuarios de Amiga de Zaragoza (CUAZ)
 

Offline TinsaTopic starter

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 4
    • Show only replies by Tinsa
    • http://www.EtherealWorld.com
Re: picasso96 development
« Reply #6 on: January 19, 2004, 08:12:42 AM »
Quote

Crumb wrote:
To use Picasso96 with stormc3 you should adapt the includes with FD2Pragma.

There's no need to add the Picasso96.lib...


ok, thanks. But  how would the commandline look for fd2pragma?