Recent content by saw792

  1. saw792

    Z notation simple exercise

    You need to post the given types as well as the defined constants and then we can help you. It sounds like you're asking for us to do your homework question and I'm not willing to just solve it for you, although I will happily help you along the right track. Post what you currently have.
  2. saw792

    VS C++ added code acting weird

    void DrawCircle (HDC hdc, int radius, int num) { <=======================
  3. saw792

    Game Loop involving GLUT

    Pretty much right about the basic drawing display lists/transformations part. You're right about the state machine being the explanation for your second question. When you call glBindTexture() it binds the current GL_TEXTURE_2D name to your id. This means any operations involving GL_TEXTURE_2D...
  4. saw792

    Game Loop involving GLUT

    The whole point of display lists is to conserve the shape of the objects you are drawing. Unless you are actually distorting the shape you can use them in conjunction with glScale/glTranslate/glRotate operations to actually put them where you want them and move them. To take advantage of this...
  5. saw792

    Game Loop involving GLUT

    The binding of glBindTexture is persistent for the life of the program. That is, if you call it once then every primitive with texture coordinates that you draw will use that texture until you change it. The OpenGL environment is a big state machine. Most/all gl calls you make change the state...
  6. saw792

    Anyone have any idea how to parse over w3u,w3i,w3a, and wts files in mpq for icons?

    http://www.thehelper.net/forums/showthread.php/42787-Guide-Explanation-of-W3M-and-W3X-Files According to that, you should look up what the modification ID is for the icon path in the appropriate MetaData.slk files, then scan through the file. Each time you find a modified object record it. If...
  7. saw792

    Anyone have any idea how to parse over w3u,w3i,w3a, and wts files in mpq for icons?

    He's trying to map icon paths/files to their associated default and custom objects from the Object Editor. Which means he needs to find unit/ability/item/etc IDs for each custom or non-default icon he finds in each map. I imagine the simplest approach to the entire database would be to...
  8. saw792

    How does this code do what it does and why did the coder code it this way(pixel+SDL)

    Continuing the example given in the quote: If you want the blue pixel stored in row 1, column 1 you are actually requesting the pixel stored at index 6 in the pixel array. This is demonstrated in the pictures in the quote. So every time you go down a row you are actually jumping across in the...
  9. saw792

    Adding two 2D vectors.. ?

    Well generally if you want to change the velocity you do so by applying an acceleration. Eg: Your ball hits a powerup which pushes boosts it to the right. Implementation would simply involve adding a constant amount to the y acceleration for a few ticks (another option is just adding to the y...
  10. saw792

    Adding two 2D vectors.. ?

    Well the more common way to do something like this is to use multiple vectors for different parts of the balls movement. For example, you use one vector {x, y} for the ball's position, a vector {xvel, yvel} for the ball's velocity and (perhaps) another vector {xaccel, yaccel} for the ball's...
  11. saw792

    Adding two 2D vectors.. ?

    It's a strange thing to be representing vectors in polar form. It's much more common to use an {x, y, z} type representation as operations on the individual directional components tend to be more common. Why have you chosen a polar representation?
  12. saw792

    MySQL Connector/J not working when packaged into a jar

    The exception text should appear in the console window. If you are running it by double clicking the jar run it from a command line using 'java -jar JarName'.
  13. saw792

    Z-notation ?

    ... Languages are tools. You don't know a language the same way you don't know a hammer. You might know how to use a language, but overall it is just a tool you are using to perform some task. Courses that claim to teach you programming languages are misguided; they often teach you very little...
  14. saw792

    Avoiding Polar Projection

    I'm glad you understand, it just becomes misleading for people if you say things that can be interpreted as "sin and cos implementations are always slow". I also think that the results achieved from a GOOD hardware/efficient table/algorithm/whatever implementation are going to be significantly...
  15. saw792

    Avoiding Polar Projection

    Now that's going to need some serious proving.
Top