Jump to content

3 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hey everyone, I started work on a plugin that would add a RTS-style 3D camera to the game using the Middle Mouse (M3). It's very experimental- a total WIP. But I thought I'd throw it out there to the community to take a look at.

https://github.com/UncleUncleRj/SC4-3DMouseCam

Remember, it's currently an alpha-stage plugin, so BACKUP any important cities/regions you have before trying it. In fact, I suggest making a whole new region and city just to play around with it.
✌️

  • Like 5

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Interesting idea, it is nice to have more people developing SC4 DLLs :). Other DLLs may also hook the middle click message in the city view, but there is no way to know if that would be a conflict.

From the Mac symbols, Maxis defined button up/down message codes for the middle mouse button, but they never got around to checking for those messages in the game's window procedure or adjusting the rest of the code to provide middle mouse button support. I find that a shame as you could do some fun things with a ViewInputControl that had middle click filtering, such as implement this type of mod. The city right click scrolling is implemented as a ViewInputControl.

Looking at the code I have a few notes:

  • Deriving from cRZMessage2COMDirector could have saved you the effort of reimplementing the QueryInterface/AddRef/Release logic.
  • SC4 has a built-in way of hooking window messages, the AddWinProcFilter function in the cIGZCanvasW32 interface.
    • My Region Census UI DLL uses that interface to implement a middle click hook in the region view.
  • Like 2

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    @Null 45 Cool! Thank you for the advice. I went ahead and tested this out and got a huge performance boost while dragging the camera around over the previous model. I'll merge the code and make a new release probably later today.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections