Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jonas Johan Solsvik
Double Trouble
Commits
9560fac9
Commit
9560fac9
authored
Aug 29, 2020
by
Jonas Johan Solsvik
🎮
Browse files
main.cpp / add window TODOs
parent
591ed0b9
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
9560fac9
...
...
@@ -6,9 +6,18 @@
int
main
()
{
// # Create the main window and camera
sf
::
RenderWindow
window
(
sf
::
VideoMode
(
800
,
600
),
"Double trouble"
);
window
.
setFramerateLimit
(
90
);
sf
::
View
camera
(
sf
::
FloatRect
(
0
,
0
,
800
,
600
));
//
// ## TODO
// - [ ] Make framerate limit adjustable
// - [ ] Make video and camera size the same as hardware window size
// - [ ] Resize video and camera size when user resizes window.
//
const
int
WIDTH
=
800
;
const
int
HEIGHT
=
600
;
const
int
FRAMERATE_LIMIT
=
90
;
sf
::
RenderWindow
window
(
sf
::
VideoMode
(
WIDTH
,
HEIGHT
),
"Double trouble"
);
window
.
setFramerateLimit
(
FRAMERATE_LIMIT
);
sf
::
View
camera
(
sf
::
FloatRect
(
0
,
0
,
WIDTH
,
HEIGHT
));
camera
.
setCenter
(
0
,
0
);
window
.
setView
(
camera
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment