Comments (12)
(by timfelgentreff)
Hi,
I added something very simple a while ago to play on HiRes touch screens, but simply by using OpenGL to scale it up (-Z command line option). Having something proper that scales at better quality would be nice, though
from stratagus.
(by andre-ng)
That sounds nice, but when I tried to use the -Z command line option, nothing changed when playing (although trying to change resolution with this enabled yielded some weird effects).
I've managed to add the xBRZ scaler code to Stratagus on my machine, but haven't yet managed to make the engine make use of it.
The function to use for scaling is apparently this one:
void xbrz::scale(size_t factor, const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight, const xbrz::ScalerCfg& cfg, int yFirst, int yLast)
The last three arguments are optional.
from stratagus.
(by timfelgentreff)
The scaling works for me if I do ./stratagus -F -Z -v 640x400 -d ../../war1gus/data.wc1/
, for example. Then the game runs fullscreen but scaled up large, and the mouse events should get translated appropriately.
from stratagus.
(by erstmap)
Can we scale down too? Gotta get 320x240 mode working!
from stratagus.
(by andre-ng)
Tim, I tried that now, but the results seem a bit worse than the default fullscreen rescaling algorithm.
In regards to xbrz, I tried using the code like this in CGraphic::DrawSub just to see if it would work:
xbrz::scale(2, (Uint32 *)Surface->pixels, (Uint32 *)TheScreen->pixels, w, h)
...but the result was quite bad (the result was just a couple of weird lines).
from stratagus.
(by andre-ng)
Kyran, scaling down should be much easier, and the result would probably look quite good, as long as the size is divided by 2 or 4. xBRZ can't scale down, but a rescaling algorithm like the one that handles the fullscreen rescaling should be able to rescale down by a factor of 2 well.
from stratagus.
(by iddqd-mail)
Why not just use a lower resolution?
from stratagus.
(by andre-ng)
For three reasons:
- The xBRZ scaler gives much better results than the current scaler used for full screen.
- To be able to have larger graphics while in windowed mode.
- To be able to have the interface remain the size it currently is, while increasing the size of the map graphics.
from stratagus.
(by timfelgentreff)
Kyran, scaling down also works with OpenGL viewport scaling. Quality is so-so.
from stratagus.
(by erstmap)
Cyber, because nothing would fit on the screen.
from stratagus.
(by andre-ng)
I was trying to scale the cursor with xBRZ, and I almost managed to do it:
https://dl.dropboxusercontent.com/u/1732902/Wyrmsun/screen_xbrz_cursor.png
Now I only need to fix the transparency...
from stratagus.
(by andre-ng)
Thanks to Chris Beck I managed to have the rescaling fully functional:
https://dl.dropboxusercontent.com/u/1732902/Wyrmsun/screen_xbrz_cursor_new.png
Now that it works, it's just a matter of adding the "zoom mode" as an option :) I'll begin working on that.
from stratagus.
Related Issues (20)
- Wargus 3.3.2 - Bug Extraction process HOT 5
- Wargus - Network out of sync in Single Player Campaign HOT 12
- building tolua.cpp.o: try to execute -L in sh HOT 1
- try to build with /usr/include/lua.h rather than /usr/include/lua-5.1/lua.h (I think) HOT 2
- Documentation typo/incorrect information? HOT 6
- Unexpected behavior when upgrading units to units with lower maximum health HOT 1
- Stratagus failed to load game data. HOT 1
- build stratagus make fatal error: mdns.h HOT 5
- Broken CI with icon with linuxdeploy HOT 2
- Network Desync. HOT 7
- Red Humans Glitch when loading games, followed by a Crash. (War1gus)
- crash on startup HOT 5
- PLEASE modify the uninstaller
- Warcraft 3 HOT 1
- [macOS] Regression: Black text on main menu in Wargus (Stratagus bug) HOT 5
- Crash to desktop when upgrading/morphing unit that is carrying resources into one that cannot
- [CRASH][wc1] Assertion failed RefsIncrease: !Refs || (Refs && !Destroyed) HOT 1
- Trigger: LoadGame memory issue by adding more triggers
- Pathfinder: Bad handling of failure results HOT 1
- [macOS] Crash when exiting program - Wargus & War1gus HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stratagus.