destoyersinc.freeforums.org

Where anything Can And WILL Happen!
Home Page Play games in the arcade Home Page Home Page Home Page
  Register
Login 
View unanswered posts View active topics

Delete all board cookies

All times are UTC



Welcome
Welcome to destoyersinc

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Home Page Home Page  [ 2 posts ] 
  Print view
Previous topic | Next topic 
Author Message
Offline 
 Post subject: Loading Graphics
PostPosted: Sun Nov 09, 2008 10:22 pm 
User avatar

Joined: Sat Nov 08, 2008 9:17 pm
Posts: 80
Quote:
bool gfx_loadpalette()
{
gfx_freepalette();

SDL_Surface * palette = IMG_Load(convertPathCP("gfx/packs/palette.bmp", gamegraphicspacklist.current_name()));

if ( palette == NULL )
{
printf("Couldn't load color palette: %s\n", SDL_GetError());
return false;
}


THis is important because all we need to do is when an item/this/that/etc is triggered, we order whatever to Load graphics

ANother way of looking at this is

Quote:
bool gfx_loaditem()
{
gfx_item7();

SDL_Surface * item = IMG_Load(convertPathCP("Get line X from Txt document", gamegraphicspacklist.current_name()));

if ( palette == NULL )
{
printf("Couldn't load graphis: %s\n", SDL_GetError());
return false;
}

However, this (probably obviously) needs some fine tuning.
But, its a start.


Image


Top
 Profile  
 
Offline 
 Post subject: Re: Loading Graphics
PostPosted: Sun Nov 09, 2008 11:01 pm 
User avatar
Site Admin

Joined: Thu Nov 06, 2008 8:52 pm
Posts: 361
Keep at it!


Top
 Profile  
 
Search for:
Display posts from previous:  Sort by  
Home Page Home Page  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cron