Copyright (c) Hyperion Entertainment and contributors.
Difference between revisions of "SDK FAQ"
Jump to navigation
Jump to search
Steven Solie (talk | contribs) (Created page with "= I'm getting all sorts of errors related to DOS = If you experiencing issues with DOS constants it is likely your code has not been updated to the newer definitions. To acce...") |
Steven Solie (talk | contribs) |
||
Line 1: | Line 1: | ||
− | = |
+ | = What are all these new DOS errors I'm seeing? = |
If you experiencing issues with DOS constants it is likely your code has not been updated to the newer definitions. To access the obsolete definitions add the following to your source file: |
If you experiencing issues with DOS constants it is likely your code has not been updated to the newer definitions. To access the obsolete definitions add the following to your source file: |
||
Line 5: | Line 5: | ||
#include <dos/obsolete.h> |
#include <dos/obsolete.h> |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
+ | |||
+ | = Why am I now getting warnings related to Image/Gadget and Object pointers? = |
||
+ | |||
+ | If you see warnings like the following: |
||
+ | <syntaxhighlight> |
||
+ | Prefs.cpp:97: error: cannot convert 'Image*' to 'Object*' in argument passing |
||
+ | </syntaxhighlight> |
||
+ | your code likely needs updating to use the proper BOOPSI types. |
||
+ | |||
+ | In BOOPSI, objects can be passed around as a pointer to type ''Object''. When Intuition functions expect a specific type they will require it to be passed as a ''struct Gadget *'' or ''struct Image *'' in arguments. They are still BOOPSI objects but they need to be type casted. This safety mechanism is there to prevent programmers from accidentally passing incorrect BOOPSI object pointers. |
Revision as of 19:21, 8 October 2013
What are all these new DOS errors I'm seeing?
If you experiencing issues with DOS constants it is likely your code has not been updated to the newer definitions. To access the obsolete definitions add the following to your source file:
#include <dos/obsolete.h>
If you see warnings like the following:
Prefs.cpp:97: error: cannot convert 'Image*' to 'Object*' in argument passing
your code likely needs updating to use the proper BOOPSI types.
In BOOPSI, objects can be passed around as a pointer to type Object. When Intuition functions expect a specific type they will require it to be passed as a struct Gadget * or struct Image * in arguments. They are still BOOPSI objects but they need to be type casted. This safety mechanism is there to prevent programmers from accidentally passing incorrect BOOPSI object pointers.