Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - REV2K7

Pages: [1] 2 3 4
1
Coding / [XNA] help
« on: October 04, 2011, 08:06:50 pm »
I am going over code that i wrote for this book about xna. My problem is i got stars running in background that works fine , i added asteroids they worked but i put in code to make them bounce if collided now they do not display at all i cant figure it out at all.

source code
heres link to my source

2
Coding / [SDL] Tutorial help
« on: May 26, 2011, 05:28:51 am »
i am doing lazy foos tutorial , and i cant figure out why the text wont draw and it crashes at startup.

Code: [Select]
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *screen = NULL;
SDL_Surface *message = NULL;

//The event structure
SDL_Event event;

//The font that's going to be used
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 255, 255, 255 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "TTF Test", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 28 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
SDL_FreeSurface( downMessage);
SDL_FreeSurface( leftMessage);
SDL_FreeSurface( rightMessage);
    //Close the font that was used
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Render the text
    upMessage = TTF_RenderText_Solid( font, "up was pressed", textColor );
downMessage = TTF_RenderText_Solid( font,"down was pressed",textColor);
leftMessage = TTF_RenderText_Solid(font, "left was pressed",textColor);
rightMessage = TTF_RenderText_Solid(font, "right was pressed",textColor);
apply_surface(0,0,background,screen);
    //If there was an error in rendering the text
    if( message == NULL )
    {
        return 1;
    }


    //Apply the images to the screen
   
   
    //While the user hasn't quit
    while( quit == false )
    {
        //While there's events to handle
        while( SDL_PollEvent( &event ) )
        {
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_UP : message = upMessage; break;
case SDLK_DOWN : message = downMessage; break;
case SDLK_LEFT : message = leftMessage; break;
case SDLK_RIGHT : message = rightMessage; break;
}

}
            //If the user has Xed out the window
else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }
    }


if (message != NULL)
{
apply_surface( 0, 0, background, screen );
apply_surface((SCREEN_WIDTH - message->w) / 2, (SCREEN_HEIGHT - message->h) / 2, message,screen);

message = NULL;

}

//Update the screen
    if( SDL_Flip( screen ) == -1 )
    {
        return 2;
    }


    //Free surfaces and font then quit SDL_ttf and SDL
    clean_up();

    return 0;
}
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *screen = NULL;
SDL_Surface *message = NULL;

//The event structure
SDL_Event event;

//The font that's going to be used
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 255, 255, 255 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "TTF Test", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 28 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
SDL_FreeSurface( downMessage);
SDL_FreeSurface( leftMessage);
SDL_FreeSurface( rightMessage);
    //Close the font that was used
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Render the text
    upMessage = TTF_RenderText_Solid( font, "up was pressed", textColor );
downMessage = TTF_RenderText_Solid( font,"down was pressed",textColor);
leftMessage = TTF_RenderText_Solid(font, "left was pressed",textColor);
rightMessage = TTF_RenderText_Solid(font, "right was pressed",textColor);
apply_surface(0,0,background,screen);
    //If there was an error in rendering the text
    if( message == NULL )
    {
        return 1;
    }


    //Apply the images to the screen
   
   
    //While the user hasn't quit
    while( quit == false )
    {
        //While there's events to handle
        while( SDL_PollEvent( &event ) )
        {
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_UP : message = upMessage; break;
case SDLK_DOWN : message = downMessage; break;
case SDLK_LEFT : message = leftMessage; break;
case SDLK_RIGHT : message = rightMessage; break;
}

}
            //If the user has Xed out the window
else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }
    }


if (message != NULL)
{
apply_surface( 0, 0, background, screen );
apply_surface((SCREEN_WIDTH - message->w) / 2, (SCREEN_HEIGHT - message->h) / 2, message,screen);

message = NULL;

}

//Update the screen
    if( SDL_Flip( screen ) == -1 )
    {
        return 2;
    }


    //Free surfaces and font then quit SDL_ttf and SDL
    clean_up();

    return 0;
}


Quote
The thread 'Win32 Thread' (0x958) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1464) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1674) has exited with code 1 (0x1).
The program '[5680] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x958) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1464) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1674) has exited with code 1 (0x1).
The program '[5680] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).

4
Discussion / drag and drop
« on: March 23, 2009, 11:34:20 pm »
I want to make a system like in wow where you can click a spell and drag it to bar. I just dont know how to go about doing it i got some ideas but i wanted to know what others think.

My basic idea is to make a object same size as the target and make it a boundary and once the mouse comes in contact with it and right clicks the spell would be dragged but im just not sure how to follow through with it.

Im using gm 7 atm. But i may crossover to XNA.

EDIT: i think i posted this in wrong forum my bad.

5
Entertainment / Combat Arms
« on: August 05, 2008, 09:40:47 am »
combat arms is a pretty cool fps game that's free, ironically theirs add on zfgc right when im typing this topic. check it out at combatarms.nexon.net


My name is GoinComandoz friend me.


6
First off Mugen (google) is a fighting engine, which allows you to add stages/characters/etc.
Last night i got bored and i started a lil project which will feature Anime characters and video game characters.

The Roster Will have 78 Characters. (some in 3d)
[Roster]
mario
luigi
Toon Link
Peter
Big Chicken
Omega Zero
Vent
Stewie
Burger King
sephiroth
cursor
The Internet
cloud strife(3d,,KH,reG)
meta knight
Cs2 Sasuke
Naruto
Itachi
Oro
Goten
Goku(ssj2,ss4,ult)
gojeta(s4)
hulk
dr.doom
kon
vegeta(ss1)
goten
complete cell
forte
ultimate gohan
venom
carnage
dark sonic
super buu
gotenks ssj3
hollow ichigo
ironman
cutman
koolaidman
and much more , to be exact 78 (its !@#$% load:P)









Screenshots




Rock Lee gets Pwned by Cursor!


Characters Completed !
Stages Working on ATM

7
MC & FS / [SOLVED] Mc Link Shield
« on: July 17, 2008, 11:57:27 pm »
I need the shield from Minish Cap. All the animations of it.
Thx in advance.

8
Entertainment / Wow-Burning Blade Horde ZFGC Come join me
« on: June 13, 2008, 04:35:53 am »
hey guys I rolled horde now i got 2 high levels on burning blade us.
IF anyone wants to join me there that's got wow that be cool. Im gonna run a raiding guild in the new expansion. IT will be casual probably just two day raid week.

So if you want to reach me
i got SOlight level 70 paladin and Quickerkillz lvl 66 rouge.

It would be cool if we were all on same server. I can supply a good leveling guide also.

If you want to reach me on Ventrilo im always on revive.typefrag.com 25452 name is brac on vent.

9
Discussion / New idea for Zelda Game
« on: June 13, 2008, 04:19:49 am »
Well i quit GMl, on to bigger and better C# and XNA.
I decided to just plan out a zelda game not necessarily make it but i wanted to see what everyone thinks about where my plot is going and such.

Quote
Story
A prophecy foretold 1,000 years after the events of Ocarina of Time Hyrule has dried out. There people went down back the destroyed kingdom. The people now called Hyliaties reclaimed old kingdom.
All Was not well… 100 years later the kingdom was in a golden age once more , it prospered greatly.
However the curse that was sealed 10,000 years ago. An ancient force ; that was once a goddesses.
This is the story of the Fourth god and the fourth side of force ….

Plot
Long Ago when the galaxy was infantile ; there existed four goddesses :Farore(Courage),Nayru(Wisdom),Din(power),and Sin(could be changed)The four goddesses did not get along. Sin argued that all life forms should obey there commands. While the other three goddesses thought otherwise. In attempt to save all life forms from sins control goddesses used they’re remaining power to seal her within worlds. With this the goddesses power were withered away helpless  to do anything more they sealed there power in the Triforce to allow Heroes if every needed to enter the Sacred Realm; if and only if the seal was lifted would this be possible.

The Story of the four goddesses was passed down by early tribes until the great awaking of Hylains. The Old world teachings were wiped from memory. Little by little people forgot about the story of the battle of the gods.
1,100 years after the events of Hyrule Flooding; Hyrule Kingdom enters a state of prosperity if only for a moment. 10,000 years since Sin was sealed ; the seal is beginning to break with the it broken Sin is free to set afire to Hyrule and rule the world and its inhabitants.
Little bit of information of gameplay of the game. It would be Turn based and feature 3 heroes not just link.

C+C plz

10
Recruitment / LF Help to get my engine in order
« on: November 18, 2007, 09:57:46 pm »
Im just looking for help to get my engine in order.
If you are interested we can talk on Vent, or MSN. And i will tell you the detail of my story.

FYI the game is short.

11
Other Discussion / PC shuts of in a millasecond
« on: August 05, 2007, 12:29:59 am »
Well i dont know whats wrong with my pc. I believe its the power suppy but i do not know what is the problem. After i try to turn on my pc it wont go on at all unless i pull plug out and put it back it goes back for a millasecond barely lighting the leds.

anyone know if i need to replace the power supply ?

12
Recruitment / Recruiting for PH Jap to googilzed english
« on: July 27, 2007, 10:39:41 pm »
Ok , i need a team to help me translate Zelda PH to googlizled english.

I got a program that makes it simple , it reads the bmg files and you copy the jap and put into google its simple! i just need help to finsh it quickly.

pm me or msg me via loz04.oldskoollink@gmail.com (msn).

if you know how to copy and paste you can help :D

and im also correcting some stuff like grammar. to make it make more sense :D

Quote
Phantom hourglass translation checkup page

battle.bmg 0/133
battlecommon.bmg 44/44 Complete
bosslast1.bmg 22/22 Complete
bosslast3.bmg 20/20 Complete
brave.bmg  0/100 Complete
collect.bmg 0/172 Complete
demo.bmg 6/341 Complete
field.bmg 2/88 Complete
flame.bmg 0/226 Complete
frost.bmg 0/224 Complete
ghost.bmg 17/95 Complete
hidari.bmg 0/162 Complete
kaitei.bmg 0/168 Complete
kaitei_F.bmg 0/70 Complete
kojima1.bmg 0/54 Complete
kojima2.bmg 0/49 Complete
kojima3.bmg 0/60 Complete
kojima5.bmg 0/58 Complete
main_isl.bmg 0/309 Complete
mainselect.bmg 42/42 Complete
myou.bmg 0/47 Complete
power.bmg 0/336 Complete
regular.bmg 2/2 Complete
sea.bmg 20/189  Complete
sennin.bmg 0/144 Complete
ship.bmg 0/309
staff.bmg 112/112 Complete
system.bmg 0/286 Complete
torii.bmg 0/76 Complete
wind.bmg 35/35 Complete
wisdom.bmg 19/32 Complete
wisdom_dngn.bmg 0/43

13
Well this problem really starts at gamespot.com and cant see videos and a pay money for this !@#$% and they wont help.
Also at imdb.com i was trying to watch trailers.

I got a router linksys befws114  , brighthouse internet , (roadrunner) any clues whats wrong ? firefox of course as my browser :D

14
Coding / Rolling problems.
« on: July 06, 2007, 08:19:41 pm »
Code: [Select]
Information about object: objLinkRoll

Sprite: sprLinkRollD
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
execute code:

image_speed=0.5

 Step Event:
execute code:

if global.facing="D"
{
sprite_index=sprLinkRollD
y+=1
vspeed=2
}

if global.facing="U"
{
sprite_index=sprLinkRollU
y-=1
vspeed=-2
}

if global.facing="R"
{
sprite_index=sprLinkRollR
x+=1
hspeed=2
}

if global.facing="L"
{
sprite_index=sprLinkRollL
x-=1
hspeed=-2
}
instance_create(x,y,objSmoke);

Other Event: Animation End:
execute code:

instance_destroy();
instance_create(x,y,objLink);

The problem is that link rolls ok but if ur not moving he rolls in place.

15
Entertainment / DS lite camera coming soon ?
« on: July 06, 2007, 03:59:25 pm »
from gbatemp
Quote
FROM IGN:
Ever since the original DS was launched, there's been speculation that its GBA slot could be used to host a camera. Now, all that is set to come true in Face Training, a collaboration between Intelligent Systems and beauty expert Fumiko Inudo.

Seriously, we're not even joking. Nintendo is releasing a game that teaches people (mainly women we imagine) to exercise their face by moving certain muscles. The bundled camera displays a real-time video of your face on the bottom screen so you know you're moving the right muscles.

Not a lot is known about the camera at the moment, apart from the fact it's white and it slots inside the dual-screen handheld's GBA cart. There may be some bad news for original DS owners though: the size of the camera - and the way it pokes out the bottom of the slot - implies it's only for use on DS Lite.

Otona No DS Kao Training launches in Japan on August 2 and we're already twitching our faces in anticipation.

Face training...whatever! So what do you think? I don't like the stand, I hope it can be removed so you can treat it as a handheld camera


16
Characters / <DEFEATED> The Rejected Ganon Pig
« on: July 05, 2007, 12:36:09 am »


Info:This lil evil pig , failed the auditions for the 1993 ALTTP.Now Residing in the internet,he is trying to heck his way into ALTTP and make his big appearance in the video game world.

17
Entertainment / Bleach
« on: July 04, 2007, 03:46:07 pm »
Anyone watch this , :P i started watching and now i got 131 eps on my pc lol.
I find it more funnier then naruto , naruto gets more serious. But in bleach they get so beat up , and never die lol.
But its a good series , but its got 131 eps but feels like 50 eps ,it had 2 filler arcs.

but what you think of the series ?

18
Other Discussion / Hosting
« on: July 04, 2007, 03:25:13 am »
is it possible to host a domain , on your pc , 2nd can a router host a domain , under  ip settings it says domain name ?

i dont know much about hosting really so ?

19
Other Discussion / tilenet down
« on: June 29, 2007, 01:11:01 am »
But RIP tilenet its down  :'(

4Sword Edit: If you are unsure of where to put it, then just put it here.  I am still unsure too, but this will do.
EDit: its back up so ill lock topic.

20
Other Discussion / Help Pc shuts off
« on: June 27, 2007, 09:21:26 pm »
IDk what happens , but sometimes it justs shuts off.

anyone know what the prob.

i got a 2gb ram , vista, 3.4 cpu ghz.

Pages: [1] 2 3 4

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.043 seconds with 33 queries.