Advertisement Jump to content
  • Advertisement

Unreal

Member
  • Content Count

    221
  • Joined

  • Last visited

Community Reputation

124 Neutral

About Unreal

  • Rank
    Member
  1. Hello there!!! I have a noob question :P Is there any function that returns the Virtual Key Code of the Key that is pressed? Think the example of the key assignment in Video Games. A funtion like that: UINT getCurrentPressedKeyCode(); They only thing in my mind is to get all the keyboard status and then search which of they keys is pressed and then get the actual VK code. But this requires a loop. I want to do that with a singe function. Is there any? Any other idea to do that? Oh.. And i don't want to modify the windows message proc function!!! I want some Win32 Funtion and not a DInput Funtion. thanks for your time!
  2. Hello there! I Am trying to Make a Memeber Function that takes as argument other member funtions. I have the classes: class myClass1 : public Singleton < myClass1 > { public: void SetFunctionPointer ( char, void( *)(int, int ) ) }; void myClass1::SetFunctionPointer ( char token, void( *event)(int, int)) { } class myClass2 { public: void func1( int x, int y ); }; void myClass2::func1 ( int x, int y ) { std::cout<<"Mommy! Where Is Fluffy???"; } myClass1 *class1; class1 = new myClass1(); myClass1::GetSingletonPointer()->SetFunctionPointer( 'A', &myClass2::func1 ); // <---- Here I get the Error!! But I get this error.. error C2664: 'void myClass1::SetFunctionPointer(int,void (__cdecl *)(int,int))' : cannot convert parameter 2 from 'void (__thiscall myClass2::* )(int,int)' to 'void (__cdecl *)(int,int)' I am new to Function Pointers and i am a little confuzed :/ Anyone can explain me what is going on? thanks for your time!
  3. Hello There!!! I am planing to make an input System for my 3D engine. I was looking for DInput But i drop it cause Microsoft will also drop Dinput Development. And MS recommends to use Windows events for K/B and mouse!! I was looking on the internet to find some tutorials or example code of Input Systems that use only Windows Messages. I can't Find any! Exept this wonderfull nehe tutorial: http://nehe.gamedev.net/data/articles/article.asp?article=14 bu i want to check some more tutorials and I though to ask here if anybody know any good/advanced tutorial about input using windows messages to check out before i start making mine! Thanks for your time!
  4. Hello there! I want to save my Engine config files at: \documents and settings\<user>\application data\my engine\ for windows and /home/<user>/my engine/ for Linux where <user> is the current logged in user that runs the application. how i will get the username for both windows and linux? any idea? thanks for your time!
  5. I just include the .inl file after class declaration in the .h file and it works :D thank all of you guys! :D
  6. hello there! I want to ask some stuff about *.inl files It is said that you place there all the inline functions of a class. But how a simple file extension could change the compilation? I place my inline functions in *.cpp file. or *.hpp file and i get the same results! what is the difference if i place them in a *.inl file? If there is some difference.. in which compilers the inl files makes the difference? I want my code to compile at both MSVC++ 2005 and GCC (G++ actualy) for the Linux Port. And a final question.. Can I have the class definition in an *.h file, the inline class funtions definitions in an *.inl file and the rest class function definitions in a *.cpp file? thanks for your time!
  7. Thanks for your help guys!! really thanks! I will find my way now :D
  8. Hello there! I have a Class like this: namespace BEK { class myClass { enum MyEnum { ITEM1, ITEM2 } static MyEnum enum1; } and at the cpp file i have this: namespace BEK { MyClass::MyEnum MyClass::enum1; } When I try to Convert it to template like this: namespace BEK { template<classT> class myClass { enum MyEnum { ITEM1, ITEM2 } static MyEnum enum1; } namespace BEK { template<class T> MyClass<T>::MyEnum template<class T> MyClass<T>::enum1; } I get this errors/warnings: warning C4346: 'BEK::myClass<T>::MyEnum' : dependent name is not a type error C2143: syntax error : missing ';' before ''template<'' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2888: 'MyClass<T>::MyEnum MyEnum' : symbol cannot be defined within namespace 'BEK' I am a little confuzed :S Can somebody explain me what is going on? thanks for your time! [Edited by - Fruny on September 29, 2006 1:18:01 PM]
  9. so... which way you suggest? which is more correct? :P
  10. wow. Cool! it works! For both MSVC++ and GCC I want to ask.. is this corrent way to do this? Do i have to watch out for something? it laso works for inline functions! thats cool! or it is better to add this on the cpp file: template class Matrix<int>; template class Matrix<float>; template class Matrix<double>; ??? (I saw this from http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12 thanks Ryan_001)
  11. :D Hello there! :D I am working on a Math lib that uses SSE and 3DNow for some stuff. I want to Compile on MSVC 8 but also on GCC... go I have to write two times the ASM code (cause I write it inline). Some ppl told me to use some other external compiler (NASM for example) so I will not write the ASM code twice. And then to link the object file from NASM with the Project. But i dont know how to do that : Anyone can show me the steps to do this? Or have some turorial/guide on th internet? ( I also want the same thing for GCC under Linux :P ) thanks for your time! :D
  12. Hello there! I am Trying to make a some math libs for a 3d engine.. Matrix, Vector, Quaternion etc.. The class with the funtion definitions is getting big but I cant split my code in other files cause I use Templates for the classes and also a lot of inline funtions (for speed). Is there some way to split the funtion definitions to other cpp files without linker errors? Thanks for your time! :)
  13. Quote:Original post by b2b3 The only difference may be syntax that is supported by your compiler - for example Visual Studio uses Intel syntax and gcc uses AT&T syntax. Yeap i saw it.. but there is not some way to make compatible code for both of this compilers? thanks for your answers! They cleared my mind!
  14. Hello there guys! :D I am a bit confuzed with SSE and stuff.. I want to add SSE support to my math lib but the information on the internet are not very clear to me.. I just want to make the basic math operations (vector/matrix add,sub,mul,cross,inverse). I have found some resources but i am still confized and i haev some questions.. SSE2 can split XMM registers in two and not in four parts.. so we can have double precision. But this means that we need two XMM registers to save one 4D vector. Right? the XMM programming is the same no mater what SSE2 COmpatible CPU you have? I mean.. Can I write the same SSE2 code for An athlonXP, the same for a Pentium4, the same for Athlon64? is it matters that AthlonXP is 32bit and athlon64 is 64bit? What about 3DNow! and 3DNow!+? Do they have some similar XMM registers? if yes what is faster to use in a AMD CPU? 3DNow or SSE? Also an other question... What about SSE3? what is the Size of the XMM registers in SSE3? i can't find much information about SSE3 and 3DNow! And ofcouse no source code at all! :P Is this stuff OS independent? Thanks for your time and sorry for the silly questions! :D
  15. lol man!! I know what OGL and D3D is. and also win32. I also have made an 3d engine with them in the past. I just don't know/understand what WinFX is exactly. I also know that "The WinFX is something new coming in .NET 3.0". Anyway I will search google today to find the answer.But if someone still wants to answer my question with simple words.. its ok! thanks.
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!