Jump to content

  • Log In with Google      Sign In   
  • Create Account


Vortez

Member Since 15 Jun 2007
Offline Last Active Jul 14 2014 12:39 PM

Topics I've Started

My future on gamedev

31 May 2014 - 08:09 AM

Hi all, i just wanted to say that i might not be able to come here as often as i was able before, im currently looking for another place to live since my landlord is taking is appartment block back, so i have to move. I dunno if im gonna be able to have the internet after this but, we'll see.

 

When you say that an house hypoteque is lower than renting a 2 1/2 there's something seriously wrong with the economy.......


fix the tabs issue?

26 April 2014 - 04:59 AM

Something that annoy me when posting code is, when you press tab, instead of making a tab, you loose the keyboard/mouse focus instead.

 

Could this be fixed? And if you fix it, should as well do like vs and make it work on multiples selected lines as well, i find this feature incredibly usefull in visual studio.

But i would set up for a regular tab if that's fesable.

 

Just saying smile.png


How to get rid of this?

26 April 2014 - 02:48 AM

Hiya, i was wondering if someone could help me with a design flaw in my library's vector and matrice code. See, like i posted here, i always need to access the x,y,z part of the vector by the letter v, and m for matrices.

 

Another example would be

ApplyMatrixToVector(&p->ThrustVector.v, &p->JetMatrix.m);

It's kinda annoying to have those v and m letters appended everywhere, but im affraid to modify the code since it work perfectly well.

 

Also, I know the ApplyMatrixToVector() should be done by overriding the '*' operator but it's already overloaded for something else i think.

 

Here the source:

 

vector.h

vector.cpp

Matrix.h

Matrix.cpp

 

Thx

 

EDIT: Humm, i know the the header file look a bit strange, it was done that way to compile the library either normally or in dll for multiples languages, just don't mind the #defines (another thing to fix, i need to remove this, but that i dont need help with :) )


Need help to draw cursor properly

15 April 2014 - 09:34 AM

I noticed a small bug in my remote desktop application related to drawing the cursor of the remote machine and im not sure how to solve it. The problem is that sometime, the cursor is not drawn at the proper location depending on the cursor. Also im using a weird hack to make it work for windows 7 and above and i don't think that's the right way to do it.

 

Here's the code im using right now:

void CScreenshot::DrawScreenCursor(HDC hDC)
{
    CURSORINFO CursorInfo;
    CursorInfo.cbSize = sizeof(CURSORINFO);
    GetCursorInfo(&CursorInfo);

    static DWORD Version = WinVer.DetectWindowsVersion();
    //static HCURSOR hCur = LoadCursor(NULL, IDC_ARROW);

    DWORD CursorWidth = GetSystemMetrics(SM_CXCURSOR);
    DWORD CursorHeight = GetSystemMetrics(SM_CYCURSOR);

    POINT CursorPos;
    GetCursorPos(&CursorPos);

    // Needed for XP or older windows
    if(Version < _WIN_VISTA_){
        CursorPos.x -= CursorWidth >> 2;
        CursorPos.y -= CursorHeight >> 2;
    }

    DrawIconEx(hDC, CursorPos.x, CursorPos.y, CursorInfo.hCursor, CursorWidth, CursorHeight, 0, NULL, DI_NORMAL);
}

If the cursor is the default arrow, this work fine, but if the cursor change for, let say, the resize cursor, then it's offset a little.

 

Now, after reading this post, im pretty sure this function could solve my problem, but im not sure how to do it.

 

The question is, how do i get the icon from the current cursor (so i can call GetIconInfo() with the right cursor)?


And, why do i need to divide the cursor width by 4 in recent version of windows? It's like i have all the pieces of the puzzle but i don't know how to make them fit togeter... Maybe if i could debug this or something that could help a lot.

 

Note: The mouse click always happen at the right spot, it's just the cursor that's offset a little.

 

EDIT: I just realised im already getting the cursor from GetCursorInfo(), but im still lost on how to solve the problem. Maybe the width and height im getting are wrong?

 

Any help appreciated.


Embedded Python 3.3 problem...

28 March 2014 - 03:47 AM

Hey, i just ran into a little snag with an app i've made that use python 3.3. The thing is, it work perfectly on a machine with python installed on it, but when i tried it on another machine, at first, it complained about Python33.dll. So, i found the file in the system32 folder and copied it in the app directory, but now, it crash, giving me the error 0x40000015. From what i could dig up, i though it was some missing msvc runtime dlls, so i tryed installing vs2012 redist, to no avail (i have vs2010 installed on my machine, so no need for those). I even tryed copying all files starting with msvcxxxx.dll i could find, didn't fixed it either. Im a bit lost. Do they really expect us to install python on every machine we want our app to run?

 

How the hell can i know what file is missing... I tryed dependency walker on the dev machine, didn't even detect any python dll... It seem i just can't find the problem. To be honest, it seem that previous python version where better(no @#$@ unicode everywhere, delphi/cpp builder did that too and i hate that), but i haven't tryed them.

 

What the heck with forcing us to use unicode everywhere??? It's really fun to convert from UnicodeString, AnsiString, string and C-String in a c++ builder app, really fun........

Most old python code in c++ don't work either because of that too, and it's really pissing me off. For example, today i typed the 'é' char in a save file dialog box, only to see it transformed to an '@'....... angry.pngangry.pngangry.png


PARTNERS