Jump to content

Garath

Members
  • Joined

Everything posted by Garath

  1. What about working to improve the lives of the people attakcing you instead of going to war against them?
  2. Garath posted a post in a topic in Computer Discussion
    You're just starting VB. Don't bother. Go for C++. http://www.cprogramming.com/tutorial.html
  3. Yes, this is clearly the best policy, you Machiavellian asshole. You've raged me.
  4. This shit's good, whoever thinks otherwise is an uncultured swine.
  5. Garath posted a post in a topic in Computer Discussion
    Well, if you're talking about IDEs (which I assume you are)... well... I'm used to bloodshed's... I've used Microsoft's Visual Studio, and it's fine too. It doesn't really matter which one you use, as far as I know. GCC and MSVC are pretty much the same (or so I've heard).
  6. Garath posted a post in a topic in General Discussion
    One could argue that since he didn't put the / through the 0, it's a capital O... It's been done before.
  7. Garath posted a post in a topic in Computer Discussion
    Any of you bitches know the Win32 function that return the selected file handle? I can't find it.
  8. This is the only thing I've ever seen where I came close to gagging. This shit gets 10/5 goatses, no question.
  9. Asterix and ViperX are pretty knowlegable. I already asked you anyway, and I already got the answer... I'm using elliptical detection. I was just wondering if any of these guys might think up a better idea.
  10. Okay... back when I was using SDL, I used to have 35 different images for one sprite, rotated at 10x degrees for each image, x being the image number. Now that I'm using OpenGL I dithced that system, and just used glRotate. Much better. However, I'm getting into a problem of per pixel collision detection. Back in SDL, I just found the area of the overlapping rectangles, checked to see if the alpha values were above 0 in the same places, and if they were, return true. Now, since I only have a copy of the image facing north, how exactly would I go about collision detection?
  11. Garath posted a post in a topic in Computer Discussion
    Yes, of course you do. Of course.
  12. Garath posted a post in a topic in General Discussion
    You made me shut off my speakers for that shit? Yuo sir, have raged me. Slightly. But only slightly.
  13. Thank you for showing us how to use our internets.
  14. Garath posted a post in a topic in Computer Discussion
    bool LoadPNG(const char* filename, ImageData* structure) { char header[8]; int x; int y; int width; int height; int number_of_passes; long int count3 = 0; unsigned char* buffer; png_byte color_type; png_byte bit_depth; png_structp png_ptr; png_infop info_ptr; FILE *fp = fopen(filename, "rb"); if (!fp) return false; fread(header, 1, 8, fp); if (png_sig_cmp((png_byte*)header, 0, 8)) return false; png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) return false; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) return false; if (setjmp(png_jmpbuf(png_ptr))) return false; png_init_io(png_ptr, fp); png_set_sig_bytes(png_ptr, 8); png_read_info(png_ptr, info_ptr); structure->w = info_ptr->width; structure->h = info_ptr->height; width = info_ptr->width; height = info_ptr->height; number_of_passes = png_set_interlace_handling(png_ptr); png_read_update_info(png_ptr, info_ptr); if (setjmp(png_jmpbuf(png_ptr))) return false; png_bytep* row_pointers = new png_bytep[height]; for (int y=0; y<height; y++) row_pointers[y] = new png_byte[info_ptr->rowbytes]; png_read_image(png_ptr, row_pointers); buffer = new unsigned char[4*width*height]; for (int count = 0; count < height; count++){ for (int count2 = 0; count2 < width*4; count2++){ buffer[count3] = row_pointers[count][count2]; count3++; } [color="Red"][b]Code Was Added Here[/b][/color] delete[] row_pointers[count]; } delete[] row_pointers; GenerateTexture(buffer,structure); delete[] buffer; fclose(fp); return true; } There's my LoadPNG function. It just suddenly stopped working on one of the two images I'm trying to load, a 1024x1024 starfield. So I added in the following code into the spot indicated above: if (count > 1022){ char temp[5]; char line[60]; itoa(count3,temp,10); strcpy(line,"Pixels Counted: "); strcat(line,temp); itoa(count,temp,10); strcat(line,"\nHeight: "); strcat(line,temp); MessageBox(NULL,line,APP_NAME,MB_OK); } And now it works. Why the hell would it work?
  15. Garath posted a post in a topic in Computer Discussion
    Nvm... I did something stupid. The image was 65x65, so I used paint to cut it down to 64x64 in a hurry, but paint removed the alpha channel. Oh well :)
  16. Garath posted a post in a topic in Computer Discussion
    Oh, it compiles fine, it just doesn't blend. The alpha section is just plain not blending.
  17. Garath posted a post in a topic in General Discussion
    Not sure if this shit's been posted before: http://www.fl-tw.com/Infinity/ That game looks like it'll be the shit. I mean, fuck. Just check out the two videos.
  18. Garath posted a post in a topic in Computer Discussion
    I didn't use NeHe's tuts for this one.... :) But that doesn't help. Nothing changes if I disable depth testing...
  19. Garath posted a post in a topic in Computer Discussion
    I have a texture mapped onto a quad. It has an alpha component, it has a texture generated with an alpha component, but it's not blending. I've put these while initializing OpenGL: glEnable(GL_BLEND); and glBlendFunc(GL_SRC_ALPHA,GL_ONE); Anyone have any idea why it's not working?
  20. Garath posted a post in a topic in General Discussion
    I thought the movie was shit. Then again, that's just me.
  21. Garath posted a post in a topic in Computer Discussion
    Or just by clicking the X on the console window.
  22. Garath posted a post in a topic in Computer Discussion
    Uh, did you even notice what I quoted before I said that? That's what I was referring to.