Jump to content
  • Advertisement

chowe6685

Member
  • Content Count

    280
  • Joined

  • Last visited

Community Reputation

349 Neutral

About chowe6685

  • Rank
    Member
  1. chowe6685

    Mac desktop zoom

    Edit: Never mind solved. Sorry for the clutter I was wondering if someone could give me a hand with a problem I'm having with a Mac running OS X 10.4.8. Somehow it's managed to become zoomed in. It's as though the desktop is at a constant resolution of 1400x1050ish while the monitor is just a sliding window to view it through. Moving the cursor to the edges of the screen scrolls the desktop. Changing the display resolution changes the resolution the monitor displays but the underlying desktop stays the same size - so it's effectively just a smaller sliding window to deal with. I'm not really a Mac person so I was wondering if anyone had encountered this problem before and could give me a hand in disabling this "feature" It's like tiny footprint mode but more annoying Thanks
  2. chowe6685

    Pointer problem

    The pointer is passed by value and thus cannot be changed within the scope of the function and retain those changes outside. You need to either pass a pointer to a pointer or a reference to a pointer to change the pointer in WinMain
  3. chowe6685

    Displaying frames per second

    Could you be more specific as to exactly what you are having trouble with? Generally you need to calculate the FPS and then display the FPS. Calculating the number of FPS requires measuring how long it takes to draw each frame (Seconds per frame) and then inverting. Usually people measure how long it takes to draw a fair number of frames to get a more average value. Displaying the FPS is just a matter of figuring out how to display text in DirectX - for this I'm sure google or the documentation can advise you better than I can
  4. chowe6685

    Help please (syntax error)

    err it should be cout<<mystring; not cout = << mystring; What tutorials are you looking at?
  5. chowe6685

    C++ - where to start

    Quote:Original post by MegaNeg 1) Be a great programmer, enhancing your ability to think logically, then C++ is what you need to start with. But be prepared for that hard work after you learn the basic syntax, because for most people it actually changes your thought process. At least it did for me ;) This is precisely why most of the more experienced members are steering people away from C++. Any programming langauge will force you to think logically and learn to program - C++ is not unique in that respect. What other langauges won't do is present you with difficult to debug memory errors, difficulties in basic string handling, and a mishmash of online tutorials that range from excellent to terrible and no easy way to tell them apart. If you want to learn logical thinking and programming then I highly recommend a functional language like lisp or scheme. Both will present you with a far more unusual and enlightening view of programming then you are likely to get from C++.
  6. Download OllyDgb Open it then run Pizza Tycoon within OllyDgb Set a breakpoint on the resolution setting function (SetCooperativeLevel maybe?) When you get there change the resolution parameters. Let the program run and hope for the best
  7. chowe6685

    operator overload

    Declare the Vector3d struct like so: struct Vector3d; before defining the Vector2d struct. That said you've got a really strange design here. Why does Vector3D inherit from Vector2D. A 3 dimensional vector isn't a special case of a 2 dimensional vector (if anything it's the other way around) they should be treated as entirely different types. It feels like your using inheritence Just Because rather than for any particular reason.
  8. chowe6685

    Basic C++ Windows Programming

    The warning comes from the line at the end of your main function return msg.wParam WinMain is returning an integer but msg.wParam is a WPARAM since these are not necessarily the same type the compiler is letting you know that there could be a loss of data (for example if msg.wParam were too large to fit in an int).
  9. chowe6685

    Basic C++ Windows Programming

    Alright the first is just a warning I'll ignore it for now. The second error tells you that you've created the wrong type of application. MSVC offers two types of projects. First a Win32 Console App - this opens with the black and white windows console and is where most people create text based games/programs. The linker expected you to have a main(...) function somewhere in your program as the entry point Second a Win32 App - this doesn't open a console window and the linker expects you to have a WinMain(...) function as an entry point. From glancing at your code and the error you've created a Win32 Console application but have provided code for a Win32 Application, in other words you have a main function not a WinMain function. There are a number of ways to fix this. The simplest is to create a new project and make sure you select Win32 App NOT Win32 Console App and just cut and paste your code into that. There's also a way to change the entry point in the IDE - I'll post as soon as I track it down.
  10. chowe6685

    Basic C++ Windows Programming

    You've got precompiler headers enabled. Forget about stdafx.h and go to: project->properties->configuration properties -> C/C++ -> Precompiled Headers and set Create/Use Precompiled Header to Not Using Precompiled Headers
  11. chowe6685

    Drawing text causes slowdown?

    Define major slowdown If your program is dropping from 900 to 300 frames per second or something like that then you have nothing to worry about
  12. chowe6685

    Let squares be squares

    No your computer is not making a rounding error - your code is wrong. C and C++ have somewhat confusing behavior when it comes to division. If both operands are integers then compiler performs integer division and will return the answer as an integer. This is an intentional part of the language. If you want to get floating point division you'll need to make one or both of the operands floats or doubles either by redefining the variables or by casting them appropriately
  13. chowe6685

    Random Number Generation Issue

    To reiterate since there is a lot of misinformation floating around you call srand() ONCE at the beginning of your program you call rand() every time you want a random number Using srand() multiple times is almost always asking for trouble unless you know EXACTLY what you are doing
  14. chowe6685

    C before C++?

    C and C++ are not the same language at all. They have almost exactly the same syntax and share common roots but treating them like the same language leads to really poor C++ code. C++ IS NOT just C with slightly more emphasis on classes - the real benefits of C++ come from it's extensive Standard Library which if used properly allows you to avoid almost all the dynamic memory management that C forces you to use. I'm not saying that learning C is a bad idea - just make sure you realize that C and C++ really are completely different languages and that what is considered good C code is generally terrible C++ code.
  15. If you are writing an implementation of RSA encryption for your own learning benefit then I would highly recommend using a different langauge like python that will avoid many of these difficulties. To do it properly in C++ you will need an much higher precision math library. For learning python should more than suffice. If you are writing an implementation of RSA encryption for any other reason then don't. There already exist libraries that do this for you and encryption shouldn't be messed around with. Existing libraries can do RSA fast and correctly without compile errors - there is absolutely no reason not to use them and every reason not to write your own.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!