Setting position and resolution of interesting screen
This commit is contained in:
parent
5a2eef7a7e
commit
57b813ef57
6 changed files with 15 additions and 6 deletions
2
run
2
run
|
@ -17,7 +17,7 @@ then
|
||||||
run_target=$2
|
run_target=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run_command="./build-$build_configuration/src/$run_target ${3:-}"
|
run_command="./build-$build_configuration/src/$run_target ${@:3}"
|
||||||
|
|
||||||
if [ $build_configuration = "mingw" ]; then
|
if [ $build_configuration = "mingw" ]; then
|
||||||
if [ ! -d "build-$build_configuration" ]; then
|
if [ ! -d "build-$build_configuration" ]; then
|
||||||
|
|
3
run_it
Executable file
3
run_it
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
./run Release client 1280 1024 &
|
||||||
|
osascript set_position.scpt
|
BIN
set_position.scpt
Normal file
BIN
set_position.scpt
Normal file
Binary file not shown.
|
@ -91,6 +91,8 @@ namespace games {
|
||||||
scale = Scale::load_from_file(*current_scale);
|
scale = Scale::load_from_file(*current_scale);
|
||||||
|
|
||||||
// simulation
|
// simulation
|
||||||
|
sim.bounds.xmax = window_width_;
|
||||||
|
sim.bounds.ymax = window_height_;
|
||||||
beat.notes.emplace_back(note_type::kQuarterNote, note_info{100.0f, 100.0f});
|
beat.notes.emplace_back(note_type::kQuarterNote, note_info{100.0f, 100.0f});
|
||||||
cheap_line_type line{{{50.0f, 100.0f}, {150.0f, 200.0f}, simulation::kOneWay}};
|
cheap_line_type line{{{50.0f, 100.0f}, {150.0f, 200.0f}, simulation::kOneWay}};
|
||||||
add_line(line);
|
add_line(line);
|
||||||
|
|
|
@ -8,11 +8,15 @@ typedef games::Client Game;
|
||||||
constexpr char Game::bundle_name[];
|
constexpr char Game::bundle_name[];
|
||||||
motor::Bundle const bundle(Game::bundle_name);
|
motor::Bundle const bundle(Game::bundle_name);
|
||||||
|
|
||||||
int main(int __unused argc, __unused char** argv){
|
int main(int argc, char** argv){
|
||||||
const bool fullscreen = false;
|
if(argc != 3) {
|
||||||
|
CERR << "too few arguments\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const int window_width = 800;
|
const bool fullscreen = true;
|
||||||
const int window_height = 600;
|
const int window_width = atoi(argv[1]);
|
||||||
|
const int window_height = atoi(argv[2]);
|
||||||
|
|
||||||
GenericMain<Game> m(fullscreen, window_width, window_height);
|
GenericMain<Game> m(fullscreen, window_width, window_height);
|
||||||
m.main();
|
m.main();
|
||||||
|
|
|
@ -39,7 +39,7 @@ private:
|
||||||
|
|
||||||
SDL_Surface * screen = nullptr;
|
SDL_Surface * screen = nullptr;
|
||||||
if(fullscreen){
|
if(fullscreen){
|
||||||
screen = SDL_SetVideoMode(0, 0, 32, SDL_OPENGL | SDL_FULLSCREEN);
|
screen = SDL_SetVideoMode(wanted_resolution_width, wanted_resolution_height, 32, SDL_OPENGL | SDL_NOFRAME);
|
||||||
} else {
|
} else {
|
||||||
screen = SDL_SetVideoMode(wanted_resolution_width, wanted_resolution_height, 32, SDL_OPENGL);
|
screen = SDL_SetVideoMode(wanted_resolution_width, wanted_resolution_height, 32, SDL_OPENGL);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue