Have I Destroyed Gravity?

This is a discussion on Have I Destroyed Gravity? within the Game Programming forums, part of the General Programming Boards category; What ways are there that I can get my program to show me the results of my cos and sin ...

  1. #16
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    What ways are there that I can get my program to show me the results of my cos and sin calculations?

  2. #17
    Registered User
    Join Date
    Dec 2006
    Posts
    17
    Quote Originally Posted by bumfluff
    What ways are there that I can get my program to show me the results of my cos and sin calculations?
    Output them somewhere?

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    If it's a full-screen app, preferably to the screen or to a file.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Yeah, I don't actually know how to draw text to the screen.

  5. #20
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I believe D3DX contains some utilities for that.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #21
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    I am afraid that doesn't really help. I don't really know anything about outputting text to the screen in Direct X or Win32. Any help on this matter is appreciated.

  7. #22
    Registered User
    Join Date
    Dec 2006
    Posts
    17
    Quote Originally Posted by bumfluff
    I am afraid that doesn't really help. I don't really know anything about outputting text to the screen in Direct X or Win32. Any help on this matter is appreciated.
    Creating text with D3D, retrieved after an intense 2 minutes googling (Google).

    Or you could just create a plain text file and output everything to that (probably a better idea if you have no clue).

  8. #23
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Thanks for that, how do I get the function to output an integer as its argument is a string?

  9. #24
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Convert the integer to a string.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  10. #25
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Ok I have it drawing text and I have my integer as a std::string but it still won't accept that and it wants an LPCSTR string instead. How do I turn my string into this?

  11. #26
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    c_str()
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lifetime of temporary during exception throw
    By brewbuck in forum C++ Programming
    Replies: 3
    Last Post: 05-22-2009, 05:08 PM
  2. Platform game gravity problem
    By Akkernight in forum Game Programming
    Replies: 33
    Last Post: 02-22-2009, 01:10 PM
  3. Need help with gravity engine
    By madmech in forum Game Programming
    Replies: 11
    Last Post: 07-03-2005, 03:41 PM
  4. gravity effecting velocity
    By Josh Kasten in forum Game Programming
    Replies: 4
    Last Post: 02-08-2003, 09:22 AM
  5. Gravity? We don't need no steenking gravity!
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 03-28-2002, 07:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21