Jump to content
  • Advertisement

squirrel_of_death

Member
  • Content Count

    324
  • Joined

  • Last visited

Community Reputation

217 Neutral

About squirrel_of_death

  • Rank
    Member
  1. squirrel_of_death

    Carmack's QuakeCon Keynote Speech

    thanks for posting that, a very interesting presentation.
  2. squirrel_of_death

    This cannot be legal

    That settles it then. Thanks Agony.
  3. squirrel_of_death

    This cannot be legal

    Quoted from the 'Free Stuff on the internets' thread, so that I don't take that excellent thread off-topic, by Saurabh Torne * Wen it comes to freestuff MP3 come first: * www.seekasong.com is a cool site withot popups I've just been there, and I cannot believe this is legal. But then, how could this website not be taken down by the RIAA? But on the other hand, they don't have a comprehensive every-mp3-ever-ripped library, so maybe it is legal? I don't want getting sued if I download from there. Anyone know?
  4. squirrel_of_death

    Tablet advice requested

    I also have a Wacom Intuos 3 ( 6X8 inch ), and I cannot recommend it higher. A truly excellent piece of hardware. Regarding the tablet PC idea, I would generally avoid purchasing 'compact' machines like laptops if you can avoid it - they cannot be easily upgraded ( and certainly not by yourself ), they break often, and are frankly more expensive than desktops anway, matching specs.
  5. squirrel_of_death

    another port forwarding problem

    Yay, that is very good news. Thanks! But, then the question remains, why can't I see it? OK, so I type the ip:port, and this goes straight to the router ( it must, as my laptop does not know the real IP 68.174.140.19, it thinks its something else given to it by the router - therefore there is no short-cirtuiting going on, it must go to the router ). Then the router presumably says, aha, this is for me, let's redirect to the right computer - which is back to mine. Fine again. This actually works, without the port number in the address. But when I add the port address, I get 'can't connect', ie. no server at the other end. So any ideas what's up with this? It would be *really* nice if I could develop further with the pure IP / port variables. Not the end of the world mind you, but nice. [Edited by - squirrel_of_death on May 2, 2006 8:12:25 PM]
  6. Hi there. I am writing my first networking code, and made a little test app. I have Tomcat server, which is working fine, made a servlet, which also works fine on localhost, and now I made a c++ app using the WinHttp lib, which locally connects to the Tomcat, gets the 'hello world' from my servlet - all this is very cool. But I can't get this working outside of a localhost connection. I have a belkin router, model F5D7231-4, and I've done port forwarding before - I have azureus and emule all good with that. So I'm not sure what's up. As per advice here in earlier threads, I am using incoming port 15951 ( why not ), which I have also configured Tomcat to listen to. Tomcat used to be on port 80, but just for the sake of testing this problem I changed it to 15951 for now, until I solve this problem. My IP is 68.174.140.19. There is surely nothing wrong with my code, as this is working fine on localhost. The test of success should simply be that the address : 68.174.140.19:15951 should show the Tomcat front page. Any ideas here? [Edited by - squirrel_of_death on May 2, 2006 8:12:15 PM]
  7. squirrel_of_death

    making a drag element in win32

    Thank you yadango, that solved it perfectly :) [Edited by - squirrel_of_death on May 2, 2006 8:38:56 PM]
  8. squirrel_of_death

    making a drag element in win32

    hiya, thanks for the initial replies. StratBoy61, gotcha, but not applicable in this case. yadango, OK, here is a little more verbose description. I have an owner window, which is a popup style, hence no title bar to drag with. I have masking / transparency so my window can be any shape I like. I have a particular widget ( which is also a window ) that I am adding to this parent window, whose function is to behave like a drag element. Hence, when the user clicks and drags on this element, the entire window moves, as one would expect. Here is the part of my winProc that handles the mouse : case WM_LBUTTONDOWN: // record where the window starts from GetWindowRect(m_rootWnd, &rect); m_lastWinPosition.x = rect.left; m_lastWinPosition.y = rect.top; // record where the mouse is starting from in this drag GetCursorPos(&mouse_absolute); m_lastMousePosition.x = mouse_absolute.x; m_lastMousePosition.y = mouse_absolute.y; // set the tracker for this window tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; tme.dwHoverTime = HOVER_DEFAULT; tme.hwndTrack = m_hWnd; TrackMouseEvent(&tme); m_isTracking = true; m_isMousePressed = true; break; case WM_MOUSEMOVE: if(m_isMousePressed) { // sets up a tracker if(!m_isTracking) { tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE; tme.dwHoverTime = HOVER_DEFAULT; tme.hwndTrack = m_hWnd; TrackMouseEvent(&tme); m_isTracking = true; } // get absolute mouse coords GetCursorPos(&mouse_absolute); // find the difference x_diff = mouse_absolute.x - m_lastMousePosition.x; y_diff = mouse_absolute.y - m_lastMousePosition.y; m_lastMousePosition.x = mouse_absolute.x; m_lastMousePosition.y = mouse_absolute.y; // set the parent window accordingly if(abs(x_diff) > 0 || abs(y_diff) > 0) { m_lastWinPosition.x += x_diff; m_lastWinPosition.y += y_diff; SetWindowPos(m_rootWnd, NULL, m_lastWinPosition.x, m_lastWinPosition.y, 400, 400, SWP_NOSIZE); } } break; case WM_MOUSELEAVE: GetCursorPos(&mouse_absolute); x_diff = mouse_absolute.x - m_lastMousePosition.x; y_diff = mouse_absolute.y - m_lastMousePosition.y; m_lastMousePosition.x = mouse_absolute.x; m_lastMousePosition.y = mouse_absolute.y; m_lastWinPosition.x += x_diff; m_lastWinPosition.y += y_diff; SetWindowPos(m_rootWnd, NULL, m_lastWinPosition.x, m_lastWinPosition.y, 0, 0, SWP_NOSIZE); m_isTracking = false; break; case WM_LBUTTONUP: tme.cbSize = sizeof(TRACKMOUSEEVENT); tme.dwFlags = TME_LEAVE | TME_CANCEL; tme.dwHoverTime = HOVER_DEFAULT; tme.hwndTrack = m_hWnd; TrackMouseEvent(&tme); m_isMousePressed = false; m_isTracking = false; break; Please note that m_rootWnd is the window that is the parent of this 'drag element' window. Hence, moving the m_rootWnd moves that window and all children. The code above demonstrates the same problem as in my first post. The drag works perfectly if the delta of the mouse move is still within the (drag or parent) client area. If it goes outside, then I get the 'waiting update'. [Edited by - squirrel_of_death on May 2, 2006 8:52:47 PM]
  9. Hi. I am building a win32 gui system ( not too extravagent ), and it is going very well so far. Except for something I can't seem to solve - a drag element. Now, dragging a window by its client area is not a problem, either do it by handling the WM_NCHITTEST message, or handle all the mouseMove / etc messages, and use SetWindowPos to do things manually. What I am doing is the drag element is a child window. So, WM_NCHITTEST is fine for mouse interception, but here's the thing, I have to get the *parent* window to move. So I do this with SetWindowPos, and this works nicely. My problem is when the mouse moves so far that its goes 'in one step' outside the window area. Sure enough I use a TrackMouseEvent handler to detect this, and once this happens I do a SetWindowPos to get the parent window to the right place. This also works. The problem is, that while it is evidently moved, it is not visibly moved until I *lift the left mouse button* *move the mouse* it's at this point that the window 'moves'. But if I do a large mouse move ( window not moved ), lift the mouse button, click the app behind it (eg. vc++6.0), then click the tab to bring my gui back to focus, then it is now positioned correctly. I explain this to demonstrate that the SetWindowPos is working, but the window is not refreshing for some reason. Further curious is that lifting the left mouse button is not handled in the callback procedure, yet the window will not be refreshed in the correct place unless I *lift the left button* THEN *move the mouse*. Very curious. Any ideas? [Edited by - squirrel_of_death on May 2, 2006 8:12:38 PM]
  10. squirrel_of_death

    My upgrade disaster (issues with std::string)

    well, I don't have .net, I'm still using vc++6.0. But I did have a similar issue in the last year, and under my settings I had to be particular about debug/release single-threading/multithreading runtime library for compiling. Every module you have ( exe or dll ) that passes strings around should compile to the same runtime library, whichever you are using. I also came up with a StringHelper class at that time, which lived in a utility dll, and would allocate / deallocate dynamically, via a singleton allocation method ( if memory serves ). The class had an allocate() and release() function, and true enough you could use these in any module ( compiled to other runtime libs ), and thus pass them around without fear. But then I had a break from coding, and returning I realized it was perhaps too much work for something simple - I now work with const char * parameters, and char * parameters for return by reference. I also realized I didn't need a full blown dll, and compile to static libraries. Depends what you're working on. [Edited by - squirrel_of_death on May 2, 2006 8:40:20 PM]
  11. squirrel_of_death

    My upgrade disaster (issues with std::string)

    Quote:Original post by GD-Silver Quote:Original post by squirrel_of_death if I were you, I'd change the function to a const char * parameter, and forget std::string completely - see if that solves your problem. With DLLs, yes it's an issue of ( if this is really the problem ) of different runtime libraries ( that the dll was compiled with, for example with your older compiler ) having different implementations of the stl, and thus different memory management implementations; hence your bug. Following this, you could simply recompile your dll with your new compiler, that should fix the bug if you link it to the same runtime library that your app is running. But, again, go to a const char * parameter, and see if that fixes things first of all. *edit* d'oh, but if you change to const char *, then you must recompile anyway... *edit2* also, if you don't want to recompile, then you could just allocate the string as new string str;, and not bother deleting ( again for testing purposes ), and pass *str as the parameter. No delete == no destructor. I've already tried recompiling the DLLs with the new compiler... No luck. As for changing to char*, that would certainly fix the problem, but would take hours upon hours to implement, given that this is but one of MANY functions that use std::string. I would have to pour over thousands of lines of code, converting assignment operators to strcpy() and so on. A real headache. this should not take so long, as you are only changing the entry point to your dll function. Change the signature of your dll function to (const char *cstr), add a line of code to create a std::string(cstr) inside the dll function, and have it named as your old parameter, and the rest of the dll will not know the difference. Further, you have now centralized the string allocation / deallocation within the single DLL, which should resolve the problem. [Edited by - squirrel_of_death on May 2, 2006 8:02:33 PM]
  12. squirrel_of_death

    My upgrade disaster (issues with std::string)

    if I were you, I'd change the function to a const char * parameter, and forget std::string completely - see if that solves your problem. With DLLs, yes it's an issue of ( if this is really the problem ) of different runtime libraries ( that the dll was compiled with, for example with your older compiler ) having different implementations of the stl, and thus different memory management implementations; hence your bug. Following this, you could simply recompile your dll with your new compiler, that should fix the bug if you link it to the same runtime library that your app is running. But, again, go to a const char * parameter, and see if that fixes things first of all. *edit* d'oh, but if you change to const char *, then you must recompile anyway... *edit2* also, if you don't want to recompile, then you could just allocate the string as new string str;, and not bother deleting ( again for testing purposes ), and pass *str as the parameter. No delete == no destructor. [Edited by - squirrel_of_death on May 2, 2006 8:27:50 PM]
  13. squirrel_of_death

    I love the new layout

    thank god the www2 is now working, I really hope every user will have the option of using the old scheme. To those who said the old scheme is 'so 90's', I like the old scheme a lot, it is appropriate. The new scheme is too generic looking. So, point is, I shall be somewhat upset if I find at a later date the old scheme is available *but not for free*. That would be bad. [Edited by - squirrel_of_death on May 2, 2006 8:46:12 PM]
  14. squirrel_of_death

    I love the new layout

    Of course I appreciate the work that has gone into this already, but I too got a real fright when I opened my 'active topics' bookmark tonight. Whoa! My concern is that the new look is quite generic, and two aspects of the old Gamedev style I loved was 1. the dark scheme was calming, which is really a good thing considering the stress invovled with coding, and 2. it had a charming personality. And I have to concur with the others, it's too bright. Heck, even leave everything the same, but take the background color way down. It really is quite glaring, and as others have said, suddenly looks 'like any other website', whereas Gamedev should really look unique. Even typing this message is troublesome with all the white :(
  15. squirrel_of_death

    Learning piano

    yes, get a private teacher. Piano is hard, and without a teacher you will develop bad habits without knowing, and will ultimately get frustrated. Becoming a good musician requires two things : a good physical understanding of the instrument, and the right mental/intellectual approach to musical expression. It's not as easy as it looks ( and that's the trick, the pro's really make it look easy ), so a private teacher is really the only way. [Edited by - squirrel_of_death on May 2, 2006 8:51:28 PM]
  • 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!