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 - MG-Zero

Pages: 1 ... 7 8 [9] 10 11 ... 20
161
Entertainment / The Room
« on: October 25, 2009, 03:07:15 pm »
So this movie..I HIGHLY recommend all of you watch this movie.  It's an amazing movie with nothing short of great acting, comedy, and a deep storyline like I've never seen before.  Seriously, watch this movie.  It will become your new favorite.  Has anyone else here seen this?

162
Entertainment / mm I love me some rats for dinner!
« on: August 20, 2009, 03:30:01 pm »
http://www.msnbc.msn.com/id/32478588/?GT1=43001

It's...a rat eating plant.  Yes, it might as well be a venus-rat trap.  It has enzymes in it that break down flesh and then well...you can figure the rest out from there =)

163
Coding / Memory Allocation Issue
« on: August 19, 2009, 10:12:52 pm »
Quote
//read in tileSet URL
   length = ReadCompressed(mapFile);
   temp = new char[length];
   for (int i = 0; i < length; i++)
   {
      fread(&temp, 1, 1, mapFile);
      if (temp[ i] == '\\')
         temp[ i] = '/';
   }
   //HVSTGFX::loadPNGTiles(temp, tempHMD.tileSet, 16, 16);
   delete temp;

I have this little algorithm for reading in a string from a file.  The string is prefixed with the length, so I read that into length first and it returns 79 in this case.  Now that's all fine, but when I call new on temp..the array is bigger than 79.  As you can imagine, this is causing problems when using the string as the directory for loading an image from.  Why the hell is it allocating more memory than it should?  Either that, or does anyone know of another way to read the string into a char array?  This is reading from a binary file btw

164
Coding / reading a binary file (C++)
« on: August 13, 2009, 10:33:36 pm »
I dumped some data out to a binary file using C# (strings and integers to be exact.)  and I need to read them into a C++ program.  The strings don't confuse me too much, but the integers are giving me problems.  I used the write7bitencodedInt function to write the integers to the file from C#, I'm just not sure how to read it into my C++ app.  For example, the first part of the file is:

Code: [Select]
PC:\Harvest Engine\HVSTCORE\HVSTCORE\resource\sprites\tiles\hyrule\house2Tile.png
Where the P is an integer representing the number of characters in the string.  I'm assuming that what I'll need to do is read it in as a char and then cast it to an int?  The other thing then is what do I about numbers that are greater than 255?  read7bitencodedint in C# takes care of this nicely, but it seems a bit tricker on the C++ end.  There will be other points in the file where I'll need to read in numbers like 500, 700 and possibly 1000.

165
Coding / Redrawing in xna *solved..that was quick O_o*
« on: August 07, 2009, 01:35:57 am »
I'm working on a forms app that uses xna, and I've modified this example to my needs (just made some changes to the Draw function in the control):

http://creators.xna.com/en-GB/sample/winforms_series1

However, I have no idea how to refresh the control and redraw it.  What I'm trying to do is load an image into it using a file dialog.  When I select the file and hit ok, I need the control to refresh.  The image is loaded into memory and it refreshes when the window loses and regains focus, but how can I redraw it manually?

EDIT:  Nevermind, I poked around a bit more and got it

166
Entertainment / Prototype
« on: July 28, 2009, 11:54:37 pm »
So, why hasn't there been a thread for this amazing game yet?  I've never played a game that gave me so much control and freedom.  It's like..Assassin's parkour on Steroids.  I love nothing more than jumping from a helicopter at the highest altitudes and just plummeting down with a bulletdive drop with muscle mass and launching cars and people 20+ feet into the air.  My only gripe about this game is that hunters are a paaaiiiin in the ass with their infinite combos. 
Also, talk about a confusing storyline.

167
Coding / Confused about this syntax >_>
« on: July 20, 2009, 05:54:08 pm »
I've been confused about this one for quite some time now.  None of the textbooks I've used have ever explained what it means.  The line in question is:  MyClass(int i) : m_i(i) {}

Code: [Select]
class MyClass {
public:
   MyClass(){}
   MyClass(int i) : m_i(i) {}

private:
   int m_i;
};

168
Entertainment / The true sacred combo!
« on: June 19, 2009, 06:17:59 am »
http://www.youtube.com/watch?v=LyeVgyzMhsU

Captain Falcon, even Chuck Norris fears the force of your knee.

169
MC & FS / [Solved] Minish Cap Water Tiles
« on: June 16, 2009, 06:47:01 pm »
I need a sheet of water tiles from MC, preferably each frame for the waves.  I'd rip them myself, but I really can't tell which frame goes with which from the map rips that are floating around.

170
Entertainment / Interview with Miyamoto
« on: June 15, 2009, 02:52:02 pm »
http://www.zeldauniverse.net/zelda-news/everybody-wave-yo-hands/

Just posted yesterday.  Look, they're actually working on gameplay this time!!!

171
Entertainment / Advent Children Complete
« on: June 03, 2009, 04:38:19 am »
Oh My God.  I've never seen anyone get raped as badly as Cloud did this time in a Final Fantasy world before.  Has anyone else watched it?  Those scenes at the end of the movie were nothing short of brilliant.

<a href="http://www.youtube.com/watch?v=EHWPv_xeKzQ" target="_blank">http://www.youtube.com/watch?v=EHWPv_xeKzQ</a>

A little bit shitty quality, but the epitome of rape and bloodshed in Final Fantasy is at about 5:28.

172
Other Projects / Harvest Engine Map Editor
« on: May 13, 2009, 08:00:46 pm »
I've been working for about the past 2 weeks on the map editor for the Harvest Engine and I've finally got something working.  I'm gonna need a few tests though to pick up on bugs that I missed and to get some feedback on the UI.  The editor is written in VB 2008 as opposed to the Core Engine, which is in C++.  So, you'll need the VB runtime if you don't already have it.  Play around with it, see what you like and don't like.  Oh, let me also mention that you can't save or open map files just yet.  You also can't place any entities, as I don't have any from the engine ready to be used yet.

Known issues:
crashes if you try to remove a tile or a hitbox on an empty layer
By default, you should have the same tileset selected that I have in my screenshot.  Not
really an issue, but when you change a tileSet, the default will dissapear.

http://forum.gd-u.com/fileslol/Harvest%20Earth.rar - map editor
http://www.softwarepatch.com/windows/vbrun6.html - VB runtime

screenshot (a bit outdated):

173
Coding / What the hell is *& as a parameter?
« on: April 27, 2009, 07:37:06 pm »
A friend of mine saw some code that took a variable with *& as a parameter.  can someone tell me what the hell this means?  I figured a pointer to a reference, but I'm not really sure.

174
Entertainment / Next TF2 update due to be awesome
« on: April 21, 2009, 11:24:38 pm »
http://kotaku.com/5220736/team-fortress-2-patch-hints-at-new-headgear-huge-gameplay-changes

Headgear?  Grenades?  Gameplay changes?!  Oh this can only get better and better, guys.

175
Entertainment / Link's Awakening 3D? :O!
« on: April 12, 2009, 09:17:39 pm »
http://balladofthewindfish.blogspot.com/

Wow, I have to say, this looks pretty damn good!  Link's face looks a little funny, but looking past that, all I can say is wow :O!

176
MC & FS / [SOLVED] Minish Cap bomb and explosion sheet
« on: April 07, 2009, 03:09:50 am »
I'm in need of a sheet of the bomb from Minish Cap exploding..can anyone help? =)

177
Audio / Need a VST for FL Studio..
« on: March 22, 2009, 05:33:59 pm »
Can someone music savy recommend me a good VST for FL Studio?  I'm looking for something I can make some strange sounds with.  I had a pretty good one on my old computer, but I can't remember the name of it for the life of me...

178
MC & FS / [SOLVED] : Minish Cap letters
« on: March 11, 2009, 04:56:10 am »
I need a sheet of the font used in Minish Cap.  I'd appreciate anyone who can provide me with it =)

179
Coding / Black Alpha Channel (OpenGL)
« on: March 03, 2009, 03:14:35 pm »
I've been playing around with the png format with FreeImage as of late. I've managed to load in PNG images and get them onto a quad as a texture, however the alpha channel shows up as black. I've enabled GL_BLEND and looked around quite a bit on google, but I've turned up nothing to help me. Here's my code that I'm using..

   
Code: [Select]
    void HVSTGFX::initGL()
    {
    glEnable(GL_DEPTH_TEST);
    glEnable(GL_CULL_FACE);
    glFrontFace(GL_CCW);
    glEnable(GL_TEXTURE_2D);
    glEnable(GL_BLEND);


    }

This is called on WM_CREATE. As you can see, I have GL_BLEND in there.

   
Code: [Select]
    unsigned char * HVSTGFX::loadPNGFile(char *fileName, PNGFILE *pngfile)
    {
    FREE_IMAGE_FORMAT fif = FIF_PNG;

    //pointer to the image, once loaded
    FIBITMAP *dib(0);
    //pointer to the image data
    unsigned char* bits(0);
    unsigned char tempRGB;


    if(FreeImage_FIFSupportsReading(fif))
    dib = FreeImage_Load(fif, fileName);

    if(!dib)
    return NULL;


    bits = FreeImage_GetBits(dib);
    pngfile->width = FreeImage_GetWidth(dib); pngfile->height = FreeImage_GetHeight(dib);
    int size = pngfile->width*pngfile->height;//(FreeImage_GetWidth(dib) * FreeImage_GetHeight(dib));

    for (int imageIDx = 0; imageIDx < size*(pngfile->width/16); imageIDx += 4)
    {
    tempRGB = bits[imageIDx];
    bits[imageIDx] = bits[imageIDx + 2];
    bits[imageIDx + 2] = tempRGB;
    }
    //FreeImage_Unload(dib);
    return bits;
    }


This is my PNG loader.

   
Code: [Select]
    void HVSTGFX::createSpritePNG(float width, float height, float x, float y, CSprite sprite)
    {

    if (!sprite.loaded)
    {
    //glGenTextures(texCount++, &sprite.texture);
    //glBindTexture(GL_TEXTURE_2D, sprite.texture);
    sprite.loaded = true;
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    }
    else
    glColor4f(1.0f,1.0f,1.0f, .0f );

    glBegin(GL_QUADS);
    glTexCoord2f(0.0f, 0.0f); glVertex3f(x, y, 0.0f);
    glTexCoord2f(1.0f, 0.0f); glVertex3f(x + width, y, 0.0f);
    glTexCoord2f(1.0f, 1.0f); glVertex3f(x + width, y + height, 0.0f);
    glTexCoord2f(0.0f, 1.0f); glVertex3f(x, y + height, 0.0f);
    glEnd();
    }

This actually draws the given image.

   
Code: [Select]
    glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, pngTest.pngFile.width, pngTest.pngFile.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pngTest.sprite);
    HVSTGFX::createSpritePNG(.4f, .54f, -.5f, -.5f, pngTest);

And this is in my main loop. As I said, the image gets textured and draws without a problem, but the alpha channel is just black. Anyone able to help?

180
Coding / OpenGL running slow as !@#$%
« on: February 15, 2009, 06:33:09 am »
Whoevers been following Sword of Divination lately knows I've moved over to C++ with openGL.  So I implemented some tiling capabilities..and when a bunch of tiles are drawn on the screen, the program runs slow as !@#$%.  Now wait a minute, from what I understood, applying a texture map to a quad and drawing the quad was supposed to be fast, so why is this slowing down so damn much? 

This is what's on the screen:


And it's not like I've loaded a bunch of images up, I just loaded the entire tileset and split it into coordinates.

Code: [Select]
void HVSTGFX::CTileSheet::createTile(int tileID, float x, float y)
{

float widthAdd = (tiles[tileID].pixWidth/2)*WIDTHSCALE;
float heightAdd = (tiles[tileID].pixHeight/2)*HEIGHTSCALE;

glBindTexture(GL_TEXTURE_2D, sheet.texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, sheet.bitmapInfoHeader.biWidth, sheet.bitmapInfoHeader.biHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, sheet.sprite);

glColor3f(1.0f,1.0f,1.0f );
glBegin(GL_QUADS);
glTexCoord2f(tiles[tileID].glX, tiles[tileID].glY);                                                  glVertex3f(x, y, 0.0f);
glTexCoord2f(tiles[tileID].glX + tiles[tileID].glWidth, tiles[tileID].glY);                          glVertex3f(x + widthAdd, y, 0.0f);
glTexCoord2f(tiles[tileID].glX + tiles[tileID].glWidth, tiles[tileID].glY + tiles[tileID].glHeight); glVertex3f(x + widthAdd, y + heightAdd, 0.0f);
glTexCoord2f(tiles[tileID].glX, tiles[tileID].glY + tiles[tileID].glHeight);                         glVertex3f(x, y + heightAdd, 0.0f);
glEnd();


}

Pages: 1 ... 7 8 [9] 10 11 ... 20

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



Page created in 0.034 seconds with 30 queries.