QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Isolating PSP specific code

This is a discussion on Isolating PSP specific code within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I'm sure I've seen this somewhere but I can't find it now. Is there a way for isolating PSP specific ...

Reply
 
LinkBack Thread Tools
Old 01-15-2007, 12:36 AM   #1
 
Join Date: Oct 2006
Posts: 25
Trader Feedback: 0
Default Isolating PSP specific code

I'm sure I've seen this somewhere but I can't find it now.

Is there a way for isolating PSP specific code? I'm trying to make my code cross platform so I can easily compile it for both Linux and the PSP.

Cheers,

Glenn
GlennNZ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-15-2007, 01:54 AM   #2

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Yes, it is a matter of software design. Seperate the rendering/sound/input/setup code from all the game logic which should generally be cross platform. It should be literrally a matter of compiling several different files for each platform.

The other thing you may be thinking of is using #ifdefs.

Code:
#ifdef PSP
// PSP specific code
#else
// Whatever other platform
#endif
Then you ever define PSP in the makefile or in a source file somewhere.
Code:
#define PSP 1
Bear in mind that the latter is a pain in the ass to maintain on a large project long term.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
code , isolating , psp , specific

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 06:03 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us