Run in windowed mode ?

Results 1 to 16 of 16
  1. #1
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Run in windowed mode ?

    Let's make this forum active again

    Main.cpp

    Orginal
    Code:
    void SetModeParams()
    {
    #ifdef _PUBLISH
    	g_ModeParams.bFullScreen = true;
    #else
    	#ifdef _DEBUG
    		g_ModeParams.bFullScreen = false;
    	#else
    		g_ModeParams.bFullScreen = ZGetConfiguration()->GetVideo()->bFullScreen;
    	#endif
    #endif
    
    	g_ModeParams.nWidth = ZGetConfiguration()->GetVideo()->nWidth;
    	g_ModeParams.nHeight = ZGetConfiguration()->GetVideo()->nHeight;
    	ZGetConfiguration()->GetVideo()->nColorBits == 32 ? 
    		g_ModeParams.PixelFormat = D3DFMT_X8R8G8B8 : g_ModeParams.PixelFormat = D3DFMT_R5G6B5 ;
    
    }
    Edited
    Code:
    void SetModeParams()
    {
    	if( MessageBoxA( NULL, "Run in windowed mode ?", "GunZ: The Duel", MB_YESNO ) == IDYES ) { 
    		g_ModeParams.bFullScreen = false;
    	} else {
    		g_ModeParams.bFullScreen = true;
    	}
    
    	g_ModeParams.nWidth = ZGetConfiguration()->GetVideo()->nWidth;
    	g_ModeParams.nHeight = ZGetConfiguration()->GetVideo()->nHeight;
    	ZGetConfiguration()->GetVideo()->nColorBits == 32 ? 
    		g_ModeParams.PixelFormat = D3DFMT_X8R8G8B8 : g_ModeParams.PixelFormat = D3DFMT_R5G6B5 ;
    }
    Last edited by qet123; 08-10-12 at 02:55 PM.


  2. #2
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: Run in windowed mode ?

    I'ts released by thunderz...But yours coded by other way so nice.
    http://forum.ragezone.com/f245/fulls...-1-5-a-837739/
    You did it shorter then thunderz.

  3. #3
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by MixBanana View Post
    I'ts released by thunderz...But yours coded by other way so nice.
    http://forum.ragezone.com/f245/fulls...-1-5-a-837739/
    You did it shorter then thunderz.
    I'm only done that http://forum.ragezone.com/f245/code-...2008-a-789051/

  4. #4
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by qet123 View Post
    Shame, the only release I thought is useful from you is just not yours. :C

  5. #5
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by qet123 View Post
    So where is the credits if you done it from there?

  6. #6
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by MixBanana View Post
    So where is the credits if you done it from there?
    About what? I only done the run as window mode same as the post i posted

  7. #7
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by qet123 View Post
    About what? I only done the run as window mode same as the post i posted

    Why you didn't code it by your self if you "c++ coder"?

  8. #8
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Run in windowed mode ?

    qet123, dont need to set the credits
    he is use only MessageBoxA that is orginal coded in C++
    so why he need to give credits?

    and Mixbanana if u real a C++ coder where is your perfect stuff, i see only easy stuff

  9. #9
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by Tankado View Post
    qet123, dont need to set the credits
    he is use only MessageBoxA that is orginal coded in C++
    so why he need to give credits?

    Yes he need to give credits.
    And you will see my server soon for world wide.
    I have server with 110 onlines with ip country blocked because my company is shit company.
    So i am waiting to my new vps.
    Last edited by MixBanana; 08-10-12 at 01:52 PM.

  10. #10
    Member qqq1 is offline
    MemberRank
    Apr 2011 Join Date
    koreaLocation
    73Posts

    Re: Run in windowed mode ?

    i like you ty

  11. #11
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by MixBanana View Post

    Yes he need to give credits.
    And you will see my server soon for world wide.
    I have server with 110 onlines with ip country blocked because my company is shit company.
    So i am waiting to my new vps.
    Credit for who? The messagebox not made by that guy... It's simple code, if the message box was pressed YES then it will run as window, what's your problem?! It's a default code and you can look At google and search some shit

    C++ Message Box? - Yahoo! Answers

  12. #12
    Member MixBanana is offline
    MemberRank
    Sep 2012 Join Date
    55Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by qet123 View Post
    About the picture i were from iPhone and it didn't load, same now in pc. About the code, take a look at the orginal code:

    Code:
    void SetModeParams()
    {
    #ifdef _PUBLISH
    	g_ModeParams.bFullScreen = true;
    #else
    	#ifdef _DEBUG
    		g_ModeParams.bFullScreen = false;
    	#else
    		g_ModeParams.bFullScreen = ZGetConfiguration()->GetVideo()->bFullScreen;
    	#endif
    #endif
    
    	g_ModeParams.nWidth = ZGetConfiguration()->GetVideo()->nWidth;
    	g_ModeParams.nHeight = ZGetConfiguration()->GetVideo()->nHeight;
    	ZGetConfiguration()->GetVideo()->nColorBits == 32 ? 
    		g_ModeParams.PixelFormat = D3DFMT_X8R8G8B8 : g_ModeParams.PixelFormat = D3DFMT_R5G6B5 ;
    
    }
    Now at my edited code:
    Code:
    void SetModeParams()
    {
    	if( MessageBoxA( NULL, "Run in windowed mode ?", "GunZ: The Duel", MB_YESNO ) == IDYES ) { 
    		g_ModeParams.bFullScreen = false;
    	} else {
    		g_ModeParams.bFullScreen = true;
    	}
    
    	g_ModeParams.nWidth = ZGetConfiguration()->GetVideo()->nWidth;
    	g_ModeParams.nHeight = ZGetConfiguration()->GetVideo()->nHeight;
    	ZGetConfiguration()->GetVideo()->nColorBits == 32 ? 
    		g_ModeParams.PixelFormat = D3DFMT_X8R8G8B8 : g_ModeParams.PixelFormat = D3DFMT_R5G6B5 ;
    }
    Still can't understand for who I should give credit?

    A really simple edit that you can't do.
    If you still can't understand so just go buy new glasses man and stop argue.
    @I done here.

  13. #13
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by MixBanana View Post
    If you still can't understand so just go buy new glasses man and stop argue.
    @I done here.
    You the one who started
    Quote Originally Posted by MixBanana View Post
    So where is the credits if you done it from there?
    Anyway...

    Admin can you delete spam messages?

  14. #14
    Retired. Don't PM. SecretsOThePast is offline
    DeveloperRank
    Jan 2009 Join Date
    643Posts

    Re: Run in windowed mode ?

    lol at this.

    Why not just use the config option, add an option ingame thru xmls, change the window style each time you reset the device (or better yet, uncomment out the fullscreen toggle) instead of a messagebox that pops up and can be quite annoying?

  15. #15
    Proficient Member [S]pirit is offline
    MemberRank
    Apr 2009 Join Date
    182Posts

    Re: Run in windowed mode ?

    Quote Originally Posted by SecretsOThePast View Post
    lol at this.

    Why not just use the config option, add an option ingame thru xmls, change the window style each time you reset the device (or better yet, uncomment out the fullscreen toggle) instead of a messagebox that pops up and can be quite annoying?
    Because this is ragezone. Nobody thinks logically around here- they just do simple half-ass shit.

  16. #16
    Wait wut PenguinGuy is offline
    MemberRank
    Apr 2010 Join Date
    United StatesLocation
    765Posts

    Re: Run in windowed mode ?

    Actually, I was the first to publicly show how to enable Window Mode via GunZ's internal functions (AFAIK).
    [Edit- I think an old friend of mine actually shown how to first, but with a different method. Gah, can't remember for the life of me.]
    http://forum.ragezone.com/f496/show-...ml#post6581807

    No need to ride someones ass for something like this. Even people like me who's been coding for 4+ years need help here and there.
    And MixBanna... One damn line isn't exactly necessary for credits.

    @qet, I'm not sure if you know/realize it but MessageBoxA is the MultiByte version of MessageBox (MessageBoxW being Unicode). You can change it to MultiByte by default in your project's properties or simply by doing:
    Code:
    #ifdef UNICODE
    #undef UNICODE
    #endif
    
    #ifdef _UNICODE
    #undef _UNICODE
    #endif
    Specifying the "MBCS" define shouldn't be necessary for MSVC since it will default to it if no char set is defined.
    Last edited by PenguinGuy; 08-10-12 at 07:09 PM.



Advertisement