Well I'm jumping into the deep end while I have the time lol. I'm just doing a tutorial now for a DirectDraw Encapsulation. LOL, I might be able to do a 3D emuparadise gameOriginally Posted by pkt-zer0
Well I'm jumping into the deep end while I have the time lol. I'm just doing a tutorial now for a DirectDraw Encapsulation. LOL, I might be able to do a 3D emuparadise gameOriginally Posted by pkt-zer0
Nope, I was trying to WRITE that code. 'bitpos' was just a static variable that wasn't declared in that piece of code, only outside the main function.
You could still mess around with bit fields, but if you're trying to do stuff on the bit level other than flags, you'd best use the bitwise operators.
lol, I wrote 1357 lines of code and finally finished this DirectDraw Encapsulation, and I get an error at line 10 of the header file lol. Something about not finding <studio.H> so I'll have to look at that, I think it might be the visual studio I'm using though.
sos I'm not able to help you pkt-zer0 and kohlrak, I'd have to read up on it as I'm still a newbie .
Wouldn't that be the compiler-specific header that you'd need to copy from the SDK? Don't take my word for it, I've only dabbled in a physics simulation SDK, not DDraw. Lower/uppercase might matter. Or maybe not.Originally Posted by TheotheImpaler
I reckon it's the compiler in the end, maybe I should find something better suited to DirectX programs. I'm compiling it with Visual Studio 2005 Beta 2.Originally Posted by pkt-zer0
Well, I'm going to give that a rest for the time being, and play around with Java a bit more, it seems I'm going to need it.
Last edited by Stark; 3rd-October-2005 at 23:57.
Download Links:
Links are hidden from guests. Please register to be able to view these links. In case anyone was wondering, this is how I did bitwise file manipulation it in the end. A lot more clear, I think. You need to flush the buffer to the file before you close it, but that's pretty easy so I omitted that short code. The only thing I'm wondering is how to stop the excess bits from being read, in an elegant way. (That would be the other half of the problem, bitwise reading, what I'm talking about now)
If you don't define test than it would never equal 2, so it's an infinte loop. Why not just have like while(1=1) or something?
I don't know c++ so I can't really help, but...what was the math problem?
Some linear combination of two numbers or something it looks.
i keep screwing up when i type it... the main issue is... Woah... i just tried to do it again and it worked... weird... problem is the original source code put it in a loop which tested the values incrementing and decrementing values which would eventually make values that would match but it refused to exit the loop when the values matched which would have made the condition return false instead of true (because it was a!=b).
Hmm, I think I figured out what my problem was (with some help from a helpful friend on MSN )
Example of Hello world program I was using
#include <iostream.h>
int main ()
{
cout << "Hello World!";
return 0;
}
Correct one I was told to use
#include <iostream>
using namespace std;
void main()
{
cout<<"Hello World\n";
getchar();
}
Also making it a Console application as opposed to a Win32 Project helped
Edit: bit ashamed of this after the level of skill I got for Java.
Namespaces are good... Let's say you are working with many header files and you make a render thing that just happens to be teh name of a render function in the API just one that you don't use or see because it's called by anotehr function. In reality, you're adding to that other function and calling the entire function. Namespaces are important.
And anyone have a winapi tutorial? One that works with visual studio and with lots of comments?
Hmm, would this be of any help?Originally Posted by kohlrak
http://www.hal-pc.org/~johnnie2/windows.html
http://people.montana.com/~bowman/Software/winAPI.htm
Edit: I'm making a nice bit of progress on this book, I can see why half of this code is actually here (Like for what purpose).
Last edited by Stark; 25th-September-2005 at 12:26.
Thank you, now to wait till next weekend to look into it. (basically what i want is that because it supports UNICODE as wchar_t. That way i can actually compair strings and such and make programs that allow multi-language input. ANd because it's much much better looking also.)
ADDITION: Dude... what the heck is with microsoft and unsigned shorts!? If you make a class, you can have void type functions. Yet when you use it's pointer as a parameter for a function that can only take void types, it comes up with an error... this makes no sence...
yea... i hate you too....Originally Posted by VISUAL C++ 6.0
Originally Posted by Function DYes... windows.h was included..... Yes everything mentioned here is in the basic namespace i made to organize the things... It makes no sence to me what the error is... but i see it's a bit odd that unsigned long was mentioned... unsigned short, unsigned long... do these things even have a purpose in C++ other than microsoft's little scape goat for not doing their job? Is this an error with just visual studio or all of them?Originally Posted by Thing that caused error
Last edited by kohlrak; 29th-September-2005 at 02:08.
Thought I would post that I've reached 1000 lines of code now
I'll finish off this DirectDraw Encapsulation ( probably 100 lines code tops ) Then I can start on an introduction to Direct3D
Good job, you sick bastard. Maybe you should sleep more and code less.Originally Posted by TheotheImpaler
...Or maybe I should sleep less and code more. Yikes.
I hate the direct x api... it's a mess... They send you through a load of loops and never give you much of a tutorial to it... More like "look this up and this and this, oh and if you have no clue what this does look here."