Microsoft C/C++ 7.0?
I have been a programming in BASIC for 14 years, (I know, im pathetic!), and in that time I''ve learned all sorts of stuff about graphics. (All the basics of 3d rotations, translation, backface culling, shading, texturing, etc..)
I recently, within the past 2 years, started learning C++.
I thought i knew just about everything I was gonna know about the dos side of C++, and I''ve not yet moved on to windows programming. I saw a post on this sight talking about the book Black Art Of 3d Game Programming by Andre LaMothe, so I went out and ended up buying it. It looks really awesome, but I ran into a big wall. He uses examples from Microsoft C/C++ 7.0, but I have Microsoft Visual C/C++ 6.0.
I NEED to know how to set the video mode using the BIOS interrupt.... Here is an example, something that I cant get running in my version.
//My intention is not to offend the author by giving away
//his material, this was totally written by Andre LaMothe,
//so I cant really say feel free to use it any of your
//programs... sorry.
void Set_Graphics_Mode(int mode)
{
union REGS inregs, outregs;
inregs.h.ah = 0;
inregs.h.al = (unsigned char)mode;
_int86(0x10, &inregs, &outregs);
}
if anyone out there knows how to convert this function to MS Visual C/C++ 6.0, your help would be greatly appreciated!
P.S. The errors I get when compiling, say
''inregs'' uses undefined union ''REGS''
''outregs'' uses undefined union ''REGS''
left of ''.h'' must have union/class/structure type
left of ''.ah'' must have union/class/structure type
left of ''.al'' must have union/class/structure type
As far as I know, it''s not possible to do that in MSVC++ 7 or in other earlier versions.
You''re best bet is to learn DirectX or some other graphics API.
You''re best bet is to learn DirectX or some other graphics API.
LOL VC++ 7.0?! Ha! That book was published in 1995! That book is as old as the hills... it''s becoming more useless with every passing minute.
Programming::~Fredric(const Annoy_Ance)
Programming::~Fredric(const Annoy_Ance)
3D Math- The type of mathematics that'll put hair on your chest!
The answer: (as far as I know)
Visual c++ is 32-bit and works with the operating system. It doesn''t allow you to call interupts with inline asm or otherwise, this could comprimise the operating system. You''ll need a different compiler if you intend on useing vesa or other such nonesense![](smile.gif)
Directdraw isn''t too much harder than working with interupts, in my opinion.
One person said that the games industry is "a transfer of funds from the rich to the lucky"
Visual c++ is 32-bit and works with the operating system. It doesn''t allow you to call interupts with inline asm or otherwise, this could comprimise the operating system. You''ll need a different compiler if you intend on useing vesa or other such nonesense
![](smile.gif)
Directdraw isn''t too much harder than working with interupts, in my opinion.
One person said that the games industry is "a transfer of funds from the rich to the lucky"
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
thanx for the tips peoples, i tried using the inline assembly a couple of minutes ago to something like this...
_asm
{
mov ax, 3 //text mode after..
int 10h
}
and it totally locked up my computer!
i guess d3d might be the way to go, i guess i should have bought a newer book...
_asm
{
mov ax, 3 //text mode after..
int 10h
}
and it totally locked up my computer!
i guess d3d might be the way to go, i guess i should have bought a newer book...
Did I miss something? MSVC++ 7.0 ????
Still Learning...
Still Learning...
March 10, 2000 01:42 AM
MSC/C++ != MSVC++
The former is an older dos based compiler, Visual c++ (or at least the newer ones) won''t do any pure dos stuff at all
The former is an older dos based compiler, Visual c++ (or at least the newer ones) won''t do any pure dos stuff at all
I have no clue where you got that shit. Visual C++ 6 wasn''t even made by 1995 and Visual Studio 7 hasn''t been announced until recently (actaully VB 7 was announced so I am assuming visual studio 7 is coming)
I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
The book uses Microsoft C/C++ 7 which is the last DOS version. MSVC 7 will not be out until later this summer (as I understand it). Confusing, I know, but they are two different products.
So, thomBligh, as another post said, you won''t be able to compile those programs with MSVC6 as it is a pure 32 bit compiler and doesn''t do DOS. You will need to find a 16 bit compiler to compile those apps (I''ve got one if you want to buy it off me
MSVC 1.52))
A better solution would be to get a new book that is based around DirectX. I hate to do this (as I think Andre has some strange ideas about several things), but his latest books, Windows Game Programming for Dummies and Tricks of the Windows Game Programming Gurus look to be about the best newbie books available.
After getting around that stuff, you could probably convert the other book to DX (either that or get a book on D3D or OpenGL).
Mark Fassett
Laughing Dragon Entertainment
http:\\www.laughing-dragon.com
So, thomBligh, as another post said, you won''t be able to compile those programs with MSVC6 as it is a pure 32 bit compiler and doesn''t do DOS. You will need to find a 16 bit compiler to compile those apps (I''ve got one if you want to buy it off me
![](smile.gif)
A better solution would be to get a new book that is based around DirectX. I hate to do this (as I think Andre has some strange ideas about several things), but his latest books, Windows Game Programming for Dummies and Tricks of the Windows Game Programming Gurus look to be about the best newbie books available.
After getting around that stuff, you could probably convert the other book to DX (either that or get a book on D3D or OpenGL).
Mark Fassett
Laughing Dragon Entertainment
http:\\www.laughing-dragon.com
VC++ 4.0 was the first 32-bit version of Visual C++. Microsoft''s first 32-bit OS, Windows 95, came out in ''95, of course. So 5.0 didn''t come out until a couple of years later, and 6.0 came out like within the last year.
Also, are you sure you can''t make DOS programs with VC++? If you look under Project... Settings, and click on any tab that shows the compiler parameters (like the "C/C++" tab), you''ll see one of the compiler parameters is "/w". This tells the compiler to create a Windows program. If you delete that parameter, I am pretty sure your code will work.
~CGameProgrammer( );
Also, are you sure you can''t make DOS programs with VC++? If you look under Project... Settings, and click on any tab that shows the compiler parameters (like the "C/C++" tab), you''ll see one of the compiler parameters is "/w". This tells the compiler to create a Windows program. If you delete that parameter, I am pretty sure your code will work.
~CGameProgrammer( );
~CGameProgrammer( );
Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement