New topic: Building SuperSpriteSurface2 for Cocoa?
<http://forums.realsoftware.com/viewtopic.php?t=38707> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message dpaanlka Post subject: Building SuperSpriteSurface2 for Cocoa?Posted: Thu Apr 21, 2011 12:07 am Joined: Sun Mar 23, 2008 3:30 pm Posts: 141 I'm trying to build a game I've written using SuperSpriteSurface2 using Cocoa. It doesn't work at the moment, but I've narrowed down the problem I think. If you go and download it from TinRocket's new website here: http://www.tinrocket.com/wp-content/plu ... d.php?id=4 it will build fine for Carbon but not Cocoa. I've gone through the code and it looks like some archaic compiler conditions dating from before RB could build for Cocoa. It checks for TargetCarbon in about four places and if it's false it builds for InterfaceLib (Mac OS 9). The Mac OS crash reports are complaining about requests for InterfaceLib, so I think these are the culprits. But now I'm stuck at this point. Those four lines need to be updated with Cocoa alternatives but I'm not sure what they would be (besides the obvious removal of the compiler conditions). They are reproduced below: Code: #if TargetCarbon then Declare Sub GetMe lib kCarbonLibrary Alias "GetCurrentProcess" (PSN As Ptr) Declare Sub GetFrontProcess lib kCarbonLibrary (proc as ptr) Declare function SameProcess Lib kCarbonLibrary (PSN1 as Ptr, PSN2 as Ptr, result as Ptr) as Short #else Declare Sub GetMe Lib "InterfaceLib" Alias "GetCurrentProcess" (PSN As Ptr) Inline68K("3F3C0037A88F") Declare Sub GetFrontProcess Lib "InterfaceLib" (proc as Ptr) Inline68K("70FF2F003F3C0039A88F") Declare Function SameProcess Lib "InterfaceLib" (PSN1 as Ptr, PSN2 as Ptr, result as Ptr) as Short Inline68K("3F3C003DA88F") #endif Code: //flush events #if TargetCarbon then Declare Sub FlushEvents Lib kCarbonLibrary (whichMask as Integer, stopMask as Integer) FlushEvents &hFFFF, 0 #endif // Any help would be much appreciated. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
