Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

242 Neutral

About bjogio

  • Rank
  1. I'm writing my little procedure that manage win32 LCID. I have already a function tha transform a LCID into a descriptive string (like 1033 -> English (United States) but I want something that do: 1033 -> en-US is it right to use ISO 3166-1 for 2 letters country code and ISO 639 for language 2 letters name? I mean, is this the standard naming convention? Win32 uses this? MSDN is a little confusionary in description and ISO is the same...
  2. bjogio

    What's wrong with Zidane?

    I'm italian. Yesterday I tried to read Materazzi's words through his lips. He said something like: "Stop it, you are only an old one"
  3. Yep right guys. My fault. The stupid and useless editor with the unicode bug steals 4 hours of my life. Sorry for my incompetence. Here there is the story of a day of madness for how want to read it. It's not a question, only a story. I got a problem when my program is run on a context in which the current directory isn't set by the win32 kernel (somebody know what I'm saying, consider to run a program from a drop-down menu with the filesystem tree, a lot of programs do not work cause the current folder is "documents and settings"). Then I decided to call GetModuleFileName in order to strip file name and call SetCurrentDirectory with the right folder but then I got an error on absolute path. I tried and tried and tried than I decided to log the value on a text file. Notepad and is stupidity shows me strange behavioura. The first thing I tought was: my fault but after the debug I've discovered that the string was right, I've only missed the last \ before the file-name. Weird. Thanks to everybody and remember never use notepad, NEVER, even if it's quick to use for a simple text file
  4. Hi gamedevelopers. I have a huge problem that afflict my mind. It's a very strange behaviour. Never seen in years of hobby programming. Let's consider this little program (extrapolated and isolated from a big project) #include <fstream> int main(int argc, char* argv[]) { char Buffer[256]; strcpy(Buffer, "\\aaaaaa\\aaaaaaaaaaaaaaaaaaa\\aa aaa aaaaa aaaaaa\\aa aaa aaaaa aaaaaa"); size_t Length = strlen(Buffer); while(Length > 0 && (Buffer[Length] != '\\')) Length--; Buffer[Length+1] = 0; std::ofstream ex1("test1.txt"); std::ofstream ex2("test2.txt"); //If I write this I got a corrupted file ex1 << Buffer; //If I add something like in this way there are no problems at all ex2 << Buffer << 'x'; return 0; } as you can see in comments in test1.txt I got a corrupted file, in test2.txt no. Now if I open test1.txt in a binary editor I can see the plain text but in a text editor like notepad the file can't be displayed (the 2 files opened both in a binary editor appears identical). The incredible thing is that this problem raise ONLY with that particular string. With one character more, one less it functions in the right way. The "while" loop is basically a simplified version of a procedure that strip away a filename and leave the path (and the string passed is a simplified file name). Try this if you want. I think that it can be something related to eof, or a std::ofstream bug. My compiler signature is: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86. Any help on understanding why this happens will be very appreciated.
  5. bjogio

    Odd obsessions

    1) Eveytime I have to set volume on a radio or other similar devices I always put on a even number. 2) I count in base 16. Steps on the road, leaves on a tree and so on. Let's imagine a quad like this: 04 03 15 16 01 02 14 13 09 10 06 05 12 11 07 08 this is the way I count all in my life. This is how numbers appear in my mind. When number gets bigger I construct other quad that are arranged in space in a similar quad. Example when a number gets bigger than 16 the result quad will be the step 01 of a new bigger quad that can carry other 15 quads and so on. Pretty difficult to explain.
  6. bjogio

    modem madness

    Yes ever. One day suddendly it starts to not respond. It was unplugged from the telephone line so I can't think of some electricity damage from the main line. I'm lost. If it is broken ati commands should not respond...
  7. bjogio

    modem madness

    Yes, I've tried all but nothing. I can't hear anything and hypertrm say no carrier. Can it be broken?
  8. bjogio

    modem madness

    Sorry for this post guys but my modem is making me crazy. I have a laptop and my internal modem is an agere system AC97 modem. Now this f__king peripheral give me error 680 "no carrier". Now: The telephone cable is correctly cabled The telephone cable is working I have tried it in 4 different houses I have latest driver I have tested all functionality (ati*) with hyperterminal I have made all updates for my WinXp sp2 I have already tried to reinstall driver I have already tried to deactivate it and back I have already tried x3 init string I have set the right country I have tried with another country I have deactivated "wait for ring-tones" (if I try this the error is "no response from server) I have tried with ,,,, in front of the telephone number I can't hear anything from my speaker Madness. If there is some hardware-hacker-guru in this forum that can help me I will be very happy. Thanks in advance.
  9. Hi gamedevelopers, if you want to write a particular feature that can exist only in one specific build how you code the null case? Let's take a little example (I write something like this: /*let's imagine we want to profile the code but eliminate this test in release build*/ #ifdef PROFILE_ENABLE #define PROFILE(name) Profile::AddNewScope(name); #else #define PROFILE(name) ((void)0) #endif /*I can use also { }*/ You can see that I write ((void)0) that will be eliminate by the compiler. It's a little tricky in my opinion. How do you solve this "problem"?
  10. bjogio

    std::mem_fun_ref problem

    oh thanks a lot. Stupid me...
  11. Currently I'm working in a big project. Now I find that the stdlib have not a mem_fun2_t and I need it. I've considered using the boost::mem_fn but it's too complicate for my needs. So I decided to write a little adaptor classes by myself. I got a bunch of compiler error (using vc2003). I've isolated the problem in this little program: #include <vector> #include <functional> #include <algorithm> #include <iostream> struct foo { void bar(int a) { std::cout << a; } }; int main( ) { std::vector<int> v(2); v[0] = 0; v[1] = 1; std::for_each(v.begin(), v.end(), std::mem_fun_ref(&foo::bar)); } WHY on hell this program gives me C2064? This is driving me nuts. Sorry for my incompetence and my poor english. Thanks in advance
  12. it's easy. By standard this code: int v = 0; std::cout << v+++v++; results in undefined behaviour. Cause you cannot access on the same statement two time over a post-incremented variable. My signature on italian forum was (for years) do you think that C++ is an easy language? int v = 0; std::cout << v+++v++; it was a question that one person ask me when I begin my first programming-related work.
  13. bjogio

    Hooking DirectX Present.

    if you need some help understanding how my code works (it's not easy to understand) email me at f.bigiariniATiltuomondofuturo.com, bye
  14. bjogio

    Hooking DirectX Present.

    here you will find the source of a program written by myself in which there's the code you need. The license is GPL. It's an hack to a specific game so it could be a little tricky to change but it's better than doing it from scratch.
  15. bjogio

    NT services

    No I can't touch local policy... noone with experience in NT services?
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!