Comments (5)
Hello! A little progress here: https://github.com/franciscod/openage/commit/6b5ab1dc6b03e7c17c5099f8ebd7cb96f03b04d8
As far as I could tell, there is currently no way of saving to a file in the codebase. So, for now the numbering restarts on each run.
Also, when should we create the ~/.openage and ~/.openage/screenshot directories? Should the engine create them as needed on each screenshot, or fail silently?
edit: maybe a ScreenshotManager is too much? π
from openage.
I lol'd at the screenshot π
I'd say a screenshot manager is just fine!
Next idea: You could check what files are there and chose the next free filename, when having many screenshots, this may fail though.
Better idea: Store the screenshot with the timestamp in the filename, openage_2014-10-30_14:18:20_xx.png
. As people can take n
screenshots per second, we still need a counter π, but the number of existence checks should probably fall down to 0
.
Don't worry about ~/.openage
yet, some other subsystem will create it sooner or later, especially when #28 is finished.
from openage.
lol, lord gaben is praised π
Yeah, I thought about the timestamp in the filename since that's what scrot and minecraft do, but since you stated _xxxx I went on that idea.
Should I also move the screenshot taking code (the SDL masking/copying and finally saving the PNG) to the ScreenshotManager?
from openage.
Yeah, will be a lot more modular that way.
from openage.
code moved: https://github.com/franciscod/openage/compare/screenshot
from openage.
Related Issues (20)
- Pure fixed-point math functions HOT 6
- Fixed point math constants HOT 3
- Fixed point intermediary type HOT 1
- CLI parameters for window settings HOT 2
- CLI parameter for engine start mode
- "error: βDictβ is not a member of βnyanβ" during build HOT 7
- Can't build with clang, error: "jthread is supported now, remove custom definition" HOT 4
- Asset conversion issue, AttributeError: 'NoneType' object has no attribute 'readable' HOT 6
- Adding PR/ISSUE Templates for this repo HOT 7
- Asset path type is incorrectly used HOT 5
- error: Couldn't find qml root folder HOT 15
- Test fail when building with GCC 13.2.1 HOT 10
- Error launching game, uncaught exception(s) HOT 25
- openage game: error: the following arguments are required: --modpacks HOT 4
- Running Error on Mac osx 13.4(Macbook M1 Pro ARM architecture) HOT 1
- FATAL: terminate has been called uncaught exception std::exception of type std::__1::system_error: thread::join failed: Invalid argument HOT 2
- Multiple cmake issues when trying to build HOT 4
- Submission to Steam HOT 2
- OpenGL error when launching on Wayland HOT 11
- CMake can't find toml11 on Linux Mint 21.2 HOT 4
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 openage.