CoolGamer48 65 Posting Pro in Training

Pointers allow you to alter the memory address itself, not just the contents of that memory address. The C++ gurus here can probably give you a lot better answer, but this FAQ might help a bit: http://www.parashift.com/c++-faq-lite/references.html

Err, what I got from that was essentially that you can't rewrite a reference, but you can assign multiple addresses to a pointer (other than how pointers and references actually work - I mean in terms of the uses of them). Is that the gist of it? Or not? Or is it sort of hard to explain the precise differences between them, and that you just "get it" after a while?

Also, if someone had an example of something you can do with C++ pointers that you can't do with Java references, that would help.

CoolGamer48 65 Posting Pro in Training

Er, there seem to be some awfully large gaps in your basic C++ knowledge to be writing a game.

File I/O is the first thing you typically learn how to do.

It wasn't for me.

Alright thanks, but what directive do you use to use ofstream and ifstream? If their stats are increasing as they progress through the game, how do you write it to the save file when they tell it to?

The code I showed you

1.
      ofstream fout("file.sav");
   2.
      fout << health << "\n" << mana << "\n" << etc;

is all you need to write the variables health, mana, and etc to a file. If you want to add more/different variables (im assuming you do), just add them following the above pattern. Make sure to #include <fstream> at the top of your file.

CoolGamer48 65 Posting Pro in Training

You would use ifstream to read data (much like cin), and ofstream to write it (like cout). (note: cout and cin are objects of classes that are already made. ifstream and ofstream are actual classes).

To write data:

ofstream fout("file.sav");
fout << health << "\n" << mana << "\n" << etc;

to read data:

ifstream fin("file.sav");
fin >> health >> mana >> etc;
CoolGamer48 65 Posting Pro in Training

It just ran toward a subjective assertion that C++ was better for everything rather than an objective view of the differences between the two.

Ya, that was probably because I don't know Java well enough to say anything good (or bad) about it, whereas C++ is the only real language I know well.

I didn't know that Java's references could create linked lists. So what exactly is the benefit of C++ pointers? That you can do something like: int* pnVar = &someOtherVar; ?

CoolGamer48 65 Posting Pro in Training

If you have a file, and you have pieces of data in the file seperated by whitespace, and you know the type and order of those pieces of data, you can just use an ifstream object. For example, if you have a file that has a string with someone's first name, their age, and their secret floating point number, do this:

std::string name;
int age;
float secretNum;
ifstream fin("file.txt");//create an input file stream that reads from file.txt
fin >> name >> age >> secrectNum;//read in the name, age, and secret number into the variables name, age, and secretNum.

If you have actual code that won't compile (or doesn't do what you think it should), post it here.

CoolGamer48 65 Posting Pro in Training

No one's going to do the homework for you. If you have some code that you're having problems with or if you have a basic layout for the program but need help moving forward, post that here.

CoolGamer48 65 Posting Pro in Training

It couldn't be written in Java, now could it? This is irrelevant.

I simply meant that Java is dependent on C++, while C++ is not dependent on Java.

No, it all relies on machine instructions, as does C++ itself.

I meant that in addition to programs that are actually written in C++, programs written in Java also rely on C++, since they rely on the JVM (which is partly why I mentioned the point above).

Seem more correct to whom? You? Computer scientists? Your third grade teacher? Jesus? "Seem more correct" is hardly an objective basis for any comparison.

Actually, one of my programming friends does looks a bit like Jesus. Mrs. Salisbury though, she wasn't a big programmer. No, just kidding. I meant myself. I do like to think of myself as a computer scientist in training, but like I mentioned, I'm young and have no actual industry experience, so to say that I'm speaking for "Computer Scientists" would be a bit arrogant. There are just certain things in C++ that just seem more "correct" to me (like the ability to have global functions, to name one).

It was originally designed with network computing needs in mind, yes, but there is plenty in Java that has nothing whatsoever to do with networks or the web.

Really? Like what (genuine curiosity)?

Not allowing direct operations on memory addresses is just part of being a managed-memory language.

What's that, exactly?

Certainly it's compiled. It's pre-compiled to bytecode …

CoolGamer48 65 Posting Pro in Training

Say you have a file like this:
file.txt
45
hello
4

You could read and display the data like this:

ifstream fin("file.txt");
int x, y;
string str;

fin >> x >> str >> y;
fin.close()

cout << x << "\n" << y << "\n" << str << "\n";

This would output:
45
4
hello

CoolGamer48 65 Posting Pro in Training
tempatures = "file.txt";

This will output to the file "file.txt" (it will be created if it isn't already - thought i'm not sure if ios::app changes that behavior).

But this variable is unnecceasry. You could simply do:

ofstream tempature("file.txt", ios::app);

And get rid of the variable tempatures.

CoolGamer48 65 Posting Pro in Training

I think you would use the system() function. I'm no expert on the windows command line, but I think you can run programs from it. If so, you could pass a command to run firefox or ie, thought I'm not sure if you can pass the url as a command line parameter.

CoolGamer48 65 Posting Pro in Training

The c-string temperatures is declared char *tempatures; , but never intialized. Then you try to use it in the constructor for temperature ofstream tempature(tempatures, ios::app); . You need to tell the compiler what file to open.

CoolGamer48 65 Posting Pro in Training

To call one of these functions, you first need to create an object of the quiz class. The constructor is automatically called when you do this. Then you could call one of your methods using the dot operator.

quiz myQuiz;
myQuiz.outQ1();
CoolGamer48 65 Posting Pro in Training

You would actually name the file myFile.h, not myFile.cpp. When you #include something you are basically taking the contents of the header (*.h) file and dumping them into your current .cpp file. If the file you need to include is in your current working directory (or if you're specifying an absoltue path), use "". If the file is in one of your compiler's include directories, use <>.

It is a bad idea to define functions in a header file. If you have this in myFile.h:

int MyFunc()
{
    return 5;
}

and you have two .cpp files in your project, and they both #include myFile.h, you'll get an error, because you're trying to re-define a function, a no-no. Instead, have prototypes in your header files. Like:
myfile.h

int MyFunc();

and have definitions in a .cpp file:
myfile.cpp

#include "myfile.h"

int MyFunc()
{
    return 5;
}

Then any amount of other files can #include myfile.h with no problem, as long as myfile.cpp is also in the project.

One last thing, it's good to put the code in your header files in #ifndef blocks. Like this:

#ifndef MY_FILE_H
#define MY_FILE_H

int MyFunc();

#endif

This way, if you end up #including the same file twice in one .cpp file (which can happen when you have lots of #includes), you won't have an issue, since the code is only executed once.

William Hemsworth commented: Nice post, easy to understand :P +2
CoolGamer48 65 Posting Pro in Training

C++ is powerful. As was mentioned, the JVM was written in C++. If you can't do something in another language, do it in C++. As is evident by the fact that the JVM is written in C++, you can create languages with C++. Almost all of the software you use relies in some way on C++. Certain things in C++ just seem like they're more correct than in other languages. I'm just beginning to learn Java, but Java seems to be a very web-oritented lanaguage (I read somewhere that its web oritentation iS why it doens't have pointers - since one of the qualities of being web-friendly is security, getting rid of pointers ensured that Java programs can't access memory outside of the JVM). Java code is not compiled. You can't create an .exe with Java. You create bytecode which is read by the JVM. Granted, getting the JVM is easy, and many machines have it, but still. You also can't make DLLs in Java, so if you want to create an API like DirectX - no Java.

One of the industries I have some minor knowledge of is the video game industry, and I know that C++ is big in games. The Unreal Engine is written in C++, and a lot of great games use the Unreal engine (Bioshock, Mass Effect, Oblivion (I think...),Gears of War, UT3, Rainbow Six, to name a few). I'm also very sure that the rest of these games and many other games are …

CoolGamer48 65 Posting Pro in Training

>but you actually named your post "Do my homework for me."?
I named the thread when I split the post from an existing thread.

>Also, doubly linked lists are NOT reffered to as DLLs.
Actually, they are. Especially in books you'll see mention of DLL and SLL to refer to double and single linked lists.

Err...I see. Now I feel stupid...

CoolGamer48 65 Posting Pro in Training

The exception to this rule is when the member is static and integral and const.

Oh, ok. To be honest I didn't actually know the exception - I just gave it based on the compiler error the OP gave.

CoolGamer48 65 Posting Pro in Training

Are you serious?

It's bad enough people come here and ask for homework, but you actually named your post "Do my homework for me."? Read the forum rules, no one is going to do your homework for you.

Also, doubly linked lists are NOT reffered to as DLLs. A DLL is a dynamic link library (or dynamically linked library - not exactly sure).

CoolGamer48 65 Posting Pro in Training

You misunderstood - on two accounts:

This:

string question1[80] = "What is the net?";

is not ok. You can only declare member variables in the class definition (e.g.: string question1[80]; . You cannot define them as you have done. The exception to this rule is when the member is static and integral. For example:

class MyClass
{
    public:
    //....
    private:
    static int identifier = 1;//ok
    double amount = 5.0;//not ok
}

To fix this, do:

class MyClass
{
    public:
    MyClass
    {
        amount = 5.0;//amount is declared below, but defined here, in the constructor
    }
    //....
    private:
    static int identifier = 1;//ok still
    double amount;//ok now
}

The other thing you misunderstood was the array thing.

You have 5 question variables. Instead of doing this, it would be more efficient to do this:

string questions[5];

. So, instead of accessing the second question like this: question2 = "Whatever" , you would do questions[1] = "Whatever" (remember, array indexing begins at 0, not 1, so the second question has an index of 1, not 2).

CoolGamer48 65 Posting Pro in Training

True, but that doesn't mean the program will interpret the data correctly. Example: move a file written in text mode on MS-Windows to *nix, then use a *nix text editor to read it. Or do the opposite -- move a text file writting on *nix to MS-Windows and use Notepad.exe to read it. In both cases the editor will mis-interpret the line feeds. In some cases the text editor may be smart enough to translate the file correctly, but most simple text editors such as Notepad.exe can not do that.

Ya I know. I was just saying that at first I assumed that a binary file stream would output with something other than chars, but then I realized that the fact that you output with chars disappears as soon as the file reaches the hard drive. It's all bytes by then.

CoolGamer48 65 Posting Pro in Training

from my experience you open up files like mp3's in binary, so that you can read any type of info (not just text) at precise position in files. Text mode is for reading/writing text.

That's what I assumed as well, but writing (and I'm assuming reading) from binary file streams uses chars to transmit the data, so you're still using text. Not that you can't type cast the char to become the type of data you want it to be, or type-cast an different data type to a char to be output.

After all, a hard drive doesn't see chars, or ints, or doubles - it just sees bits. So it really doesn't matter what we output the data as in C++. Once it gets to the hard drive, it becomes bits, and then any program can interpret the data in the file any way it wants.

CoolGamer48 65 Posting Pro in Training

There is no '}' ending main(). Btw, if you put your code in code tags and specify a language, like [ CODE=C++ ] (w/o spaces), the lines will be numbered, making it easier to read.

CoolGamer48 65 Posting Pro in Training

You can easily test your question yourself. Write a small program to find out how the >> operator behaves. I could easily tell you, but testing it out yourself is a much better teacher.

I had tried it, and the results I got led me to believe that the behavior I asked about above is correct (ie, >>: no spaces, get: spaces). I was just confirming it.

CoolGamer48 65 Posting Pro in Training

When using >> to extract data from an istream, are spaces skipped over? I.e., if I extracted every character from: "Hello, my name is not World.", would the 5 spaces not be read by >>?

If so, is this behavior omitted from istream::get()?

Thanks.

CoolGamer48 65 Posting Pro in Training

Like the others have said - post your specific problem.

This isn't your error, but it's a bad idea to put function implementations in .h files. If you include the same .h file more than once in different files that are within the same projects, you will get issues. The second time the .h is #included, the compiler will attempt to re-define all the functions within it, which will cause an error (even if the definitions are the same as the ones before). What's done a lot is to have one header file (in your case, perhaps quiz.h), that defines the class and has prototypes of all the class's methods, but doesn't actually define the methods themselves. Then, have a .cpp file (in your case, quiz.cpp), that #includes quiz.h, and define all your methods there (you would need to do something like:

void quiz::outQ1()
	{
	     cout<<question1<<endl;
	}

).

Er... as to your problem, I was looking over the code, and I'm not so sure something like string question3 = "What do chips mean to you?"; works. You need to simply define the member string question3; and initialize it in a constructor.

CoolGamer48 65 Posting Pro in Training

I've always wondered, is this:

int atr = amountToReturn;

a good/safe way of truncating the decimal portion of a float/double? Should it be type-cast? Or should you use the floor() function?

CoolGamer48 65 Posting Pro in Training

What's the difference exactly between opening a file stream in the default text mode and opening it in binary mode? The cplusplus.com article on file i/o mentioned a few things, but I really didn't get the gist of it. Could someone explain it?

Thanks.

CoolGamer48 65 Posting Pro in Training

Ok well i aint mean do it i guess ma question would be how would i read a file with this info into a linked list

So you want to know about file streames and linked lists. For reading files: ifstream, and for linked lists, see the link two posts above.

CoolGamer48 65 Posting Pro in Training

No one's going to do this for you. If you have a specific question - ask that. To start off, do you know what a linked list is?

CoolGamer48 65 Posting Pro in Training

I'm assuming it took many trained, experienced, professionals working an absolute minimum of 8 hours a day a couple of years to write the Unreal engine (again, an assumption). I'm not sure how much experience you have, but I don't think you're going to have too much luck witting an engine similar in quality to the Unreal engine.

Though, if by "similar to Unreal", you were merely giving an example of another engine of unrelated magnitude, then you would have luck with that (again, depending on your experience level, but definitely more possible).

However, the only development tool for the 360 that is available to the public is XNA, and I'm unsure as to how well you could write an engine with XNA. And I don't think there are any development kits for the PS3 available to the public. But for the PC you can use DirectX or OpenGL.

CoolGamer48 65 Posting Pro in Training

Hey, I'm attempting to write an XML parser in C++, and I have some questions on some XML syntax. First: what is the rule for what goes between the end of the last attribute and the end of a tag? E.g.:

is this ok: <tag attribute="value" > ?

is this ok: <tag attribute="value"> ?

and this: <tag attribute="value" /> ?

and this: <tag attribute="value"/> ?

Which of those are ok and which are not (if any)?


Second, can there be whitespace between the attribute name and the equal sign and the equal sign and the attribute value: (atr="value", atr = "value",atr ="value", or atr= "value")?

That's it for now, but I might have a couple more questions later.

CoolGamer48 65 Posting Pro in Training

And that won't happen with the #ifndef "protection", if I'm right.

I'm not so sure: if file A #includes file B, and file B #includes file A, and file A is #included by the main project first, then this will happen:

file A #includes file B
file B #includes file A (the code within the file will not be looked at, but the #ifndef will still need to be processed)
file A #includes file B
file B #includes file A
and so on...

the chain will never end (if I am correct, which I admit I may not be)

Also, (again not 100% sure), Breeture.h doesn't need to know anything about the class World (it needs to know it exists, but nothing else). so I think you can replace #include "World.h" with class World; (like a prototype).

Once again - I'm not too sure on any of this, but I think this should solve the problem.

CoolGamer48 65 Posting Pro in Training

Just fyi, I did some tests to see if the size of the window was actually SCREEN_WIDTH x SCREEN_HEIGHT. I made a 5x5 image and drew it on the screen at SCREEN_WIDTH-5 and SCREEN_HEIGHT-5 (I didn't actually write that - I wrote 635 and 475). At first it didn't work, but then I tried bringing the values back, and slowly approached 640 and 480. When I finally got to 635x475, I could see the square, but it was partially covered, as values a bit less that 640 and 480 showed the box close up the space with the edge of the window at 632 x. But I think the difference is due to the way DirectX draws images or makes the the device(or how windows makes the window). The amount of pixels that the board is off-center is much more than a few pixels.

CoolGamer48 65 Posting Pro in Training

Practically anything is possible in C++. They can be extremely difficult, but they tend to be possible.

How much experience do you have with C++? The project you're talking about seems very ambitious. I definitely don't think I would be able to do it, and I'm doubtful that programs like Yahoo messenger were written by one person.

CoolGamer48 65 Posting Pro in Training

I've tried this procedure and technique for several times. It doesn't work. If possible, please repost it. Maybe there is typing error

Err, what procedure exactly? The centering function?

If you've tried it multiple times and it doesn't work - then why do you think there's a typo? It doesn't work for me either, so that would indicate there's an error in the logic I'm using (which I can't find).

What exactly do you mean by: it's not working? Do you mean it won't compile? If so, it's because I only gave you a fraction of the code. The actual code in its entirety is much larger.

CoolGamer48 65 Posting Pro in Training

You need to link to that lib. Easiest way would be to add:

#pragma comment(lib,"winmm.lib")

somewhere in your code.

CoolGamer48 65 Posting Pro in Training

Your algorithm seems to be correct. How are you calling the method?

Hi, sorry I haven't responded for a while.

The method is called here:

if(!chess_board->Center(SCREEN_WIDTH,SCREEN_HEIGHT))
		return 0;

SCREEN_WIDTH and SCREEN_HEIGHT are defined here:

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

they are used to call the CreateWindow function here:

if((hWnd = CreateWindowEx(WS_EX_CLIENTEDGE,"WindowClass","Chess",myStyle,CW_USEDEFAULT,CW_USEDEFAULT,SCREEN_WIDTH,SCREEN_HEIGHT,NULL,NULL,hInstance,NULL)) == NULL)
	{
		MessageBox(NULL,"Error creating the window","Error",MB_OK | MB_ICONERROR);
		return 0;
	}

and are passed to the function GraphicsInit() here:

if(!GraphicsInit(hwnd,SCREEN_WIDTH,SCREEN_HEIGHT,!FULLSCREEN))
		return 0;

which uses them in the presentation parameters here:

d3dpp.BackBufferWidth = width;
d3dpp.BackBufferHeight = height;

width and height are the parameters that SCREEN_WIDTH and SCREEN_HEIGHT were passed to in the code two snippets above.


I've tried this with two images, one I got off the internet, and the other I drew myself. Both didn't work. I also used the debugger, and the values that are returned by the GetWidth() and GetHeight() for m_texture match the values that the images are (according to Windows and Paint).

CoolGamer48 65 Posting Pro in Training

hi am am rupak from india, i heard that java script is good for games

regards
rupak


<snipped false signature>

Um, you know I'm not sure, but I think that advertising is against some forum rule.

As for JavaScript, I don't know any games that were written in JavaScript alone (like, actual games with sprites, not text-based games). It may be possible to make a game with AJAX, but I don't know if that's ever been done. I do know that Java can and is used to make certain browser-based games like Runescape, but I doubt any retail console games or PC games of the same standard were written in Java, and definitely not in JavaScript.

CoolGamer48 65 Posting Pro in Training

Doesn't seem to work. Umm... i guess what i'm really looking for is an example to play a sound file while the user is going through the program and an example that would stop the sound.

Did you want to loop the sound? That still may be possible with the PlaySound() function, but it would depend on the structure of your program. Is it loop based? (i.e., there is some initialization code, then the program goes into a loop where it continually executes some code until either the user chooses to exit, or the program exits for some other reason).

CoolGamer48 65 Posting Pro in Training

This function:

void ENTITY::SetLife(int newLife)
{
	 
	if (life < 0)
		life = 0;
}

Doesn't set the life at all. All it does is check to see if the current life is less than zero, and if so, sets it to zero. The input parameter is ignored. That's why the constructor for the PLAYER class doesn't actually set life to 100. A better function would be:

void ENTITY::SetLife(int newLife)
{
       life = newLife;	
 
	if (life < 0)
		life = 0;
}

Are you familiar with pointers? To make better fighting, you would have a pointer to a PLAYER, and then pass this pointer as a parameter to your fight functions. The way you're doing it now (as Acidburn pointed out), you create a new player every battle, and every new player gets his health set to 100 (assuming you fix the problem I mentioned above).

CoolGamer48 65 Posting Pro in Training

There have been a few games that were cross platform. Shadowrun combined players from both Vista-PCs and Xbox 360s, though these are both Microsoft platforms. It is definitely not impossible, but the extra work it takes may be more than developers are willing to do given the benefits of the results. And there also may be some red tape involved.

CoolGamer48 65 Posting Pro in Training

Hey,

I'm starting out Java development, and I want to know exactly what I need to download. I believe I need to download the JVM, but what else? And I know there are IDEs like NetBeans where you can just press a button to build and/or run the program, but what other piece of software would I need to execute a Java program (not including the text-editor)?

CoolGamer48 65 Posting Pro in Training

I really need the Windows function to play it.

Here you go:http://msdn.microsoft.com/en-us/library/ms712879.aspx

Read the entire page to learn how to play it asynchronously (i.e., the program continues on as the sound plays).

CoolGamer48 65 Posting Pro in Training

If you want a good deal of control over the sound, you might want to consider DirectSound (though using it can be very annoying and complex). If not, I believe there is a simple Windows function that you can use to play sounds asynchronously, but I can't remember it on the spot.

CoolGamer48 65 Posting Pro in Training

Er... I'm not exactly sure what you're asking, but it sounds like you may be searching for the break command. Having break; anywhere in a loop will end the current iteration and end the loop. If that's not it, then continue; will end the current iteration, but instead of breaking out of the loop, control will return to the top of the loop, and another iteration will be executed (assuming the conditional is still true).

CoolGamer48 65 Posting Pro in Training

If you select 1 without first setting x with 2, you may receive unexpected results.

You haven't told us what's not working correctly, and I'm going to go ahead and assume that you want the variable x to retain its value even after the program closes. This is not what the static keyword does. A static variable simply retains its value even if the function it's called in ends. For example:

int GetNum()
{
    static int x = 0;
    return ++x;
}

int main()
{
    for(int i = 0; i < 100;i++)
        cout << GetNum() <<endl;

    return 0;
}

This will print out the numbers 1-100.

Also, if you're program isn't displaying any results after you give it input, it may be because you don't have system("PAUSE"); before return 0; (assuming you're running Windows).

CoolGamer48 65 Posting Pro in Training

Does this code look right for centering an image on the screen (in this case a chess board):

int Chess::Board::Center(int width,int height)
{
	if(m_texture == NULL)
		return 0;

	D3DXVECTOR2 center;
	center.x = (float)width/2.0f;
	center.y = (float)height/2.0f;

	m_position.x = center.x - (m_texture->GetWidth())/2;
	m_position.y = center.y - (m_texture->GetHeight())/2;

	return 1;
}

Chess is a namesapce, Board is a class, and Center is a method of Board.

width and height are the width and height of the screen, and m_position is a 2-coordinate vector (D3DXVECTOR2, for any DirectX people) containing the coordinates of where the upper-left hand corner of the image is.

m_texture is a pointer to a Texture, a wrapper class for the IDirectTexture9 interface.

Any ideas? The board isn't centered when I run the program.

CoolGamer48 65 Posting Pro in Training

Hey,

I'm working on a chess game, and I'm creating two enumerations - for piece_color and piece_type. I'm wondering what the difference is (whether it's an actual difference in the way the program executes or a matter of good object-oriented practice) between having the enums be global or having them as public members of a piece class.

Thanks.

CoolGamer48 65 Posting Pro in Training

Do you know any programming languages? Before using SDKs you're going to need some basic coding knowledge. C++ is probably what you should shoot for (if you've found XNA and used it, you would be using C#, Microsoft's variant of C++). Learn C++. Some people may say its too difficult to learn as a first language, but I learned it as my first real language, and it wasn't too bad.

CoolGamer48 65 Posting Pro in Training

Hey,

I'm trying to run a simple DirectX program, it loads a model and displays it. I run it once, and it works. I run it again, doesn't work. Didn't change any code. Just recompiled, and it doesn't work.

I'm not sure if the issue is with my computer (which has a pretty bad video card), or with my program.

Could someone look over my code or try to run it to see if there are any problems?

The entire thing is 7 files, but the relevant code should only be in 3 or 4 of them.

Graphics.h

//********************
//Graphics.h/cpp
//Encapsulated functionality for setting up Direct3D 9, setting up Direct3D to view
//a 3D world, rendering models and textures in a 3D world, drawing flat textures and
//fonts on the screen, and drawing fonts to the screen
//********************
#ifndef GRAPHICS_H
#define GRAPHICS_H

//Libraries
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#pragma comment(lib,"ReznebMath.lib")

//Includes
#include <d3d9.h>
#include <d3dx9.h>
#include <string>
#include <ReznebMath.h>

//Constant colors
const D3DCOLOR BLACK = D3DCOLOR_XRGB(0,0,0);
const D3DCOLOR WHITE = D3DCOLOR_XRGB(255,255,255);
const D3DCOLOR RED = D3DCOLOR_XRGB(255,0,0);
const D3DCOLOR GREEN = D3DCOLOR_XRGB(0,255,0);
const D3DCOLOR BLUE = D3DCOLOR_XRGB(0,0,255);

//Prototypes
int Direct3DInit(HWND hwnd,int width,int height,bool windowed);
void Direct3DEnd();

void Clear(D3DCOLOR color = BLACK);
void Present();

int BeginScene();
int EndScene();
void BeginSprite();
void EndSprite();

void SetCamera(float x,float y,float z,float lookx,float looky,float lookz,float upx = 0.0f,float  upy = 1.0f,float upz = 0.0f);
void SetPerspective(int screen_width,int screen_height,float fieldOfView = 45.0f,float close = 0.1f,float far = 10000.0f);

//Model Class
//Used for storing and …
CoolGamer48 65 Posting Pro in Training

@OP: What exactly do you mean by scripting? I think what you mean is programming (I myself am a bit sketchy as to the precise distinction between the two, but I'm pretty sure what you mean is programming.)