1
Fork 0

Setting position and resolution of interesting screen

This commit is contained in:
Joshua Moerman 2013-04-17 12:31:21 +02:00
parent 5a2eef7a7e
commit 57b813ef57
6 changed files with 15 additions and 6 deletions

2
run
View file

@ -17,7 +17,7 @@ then
run_target=$2
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 [ ! -d "build-$build_configuration" ]; then

3
run_it Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
./run Release client 1280 1024 &
osascript set_position.scpt

BIN
set_position.scpt Normal file

Binary file not shown.

View file

@ -91,6 +91,8 @@ namespace games {
scale = Scale::load_from_file(*current_scale);
// simulation
sim.bounds.xmax = window_width_;
sim.bounds.ymax = window_height_;
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}};
add_line(line);

View file

@ -8,11 +8,15 @@ typedef games::Client Game;
constexpr char Game::bundle_name[];
motor::Bundle const bundle(Game::bundle_name);
int main(int __unused argc, __unused char** argv){
const bool fullscreen = false;
int main(int argc, char** argv){
if(argc != 3) {
CERR << "too few arguments\n";
exit(1);
}
const int window_width = 800;
const int window_height = 600;
const bool fullscreen = true;
const int window_width = atoi(argv[1]);
const int window_height = atoi(argv[2]);
GenericMain<Game> m(fullscreen, window_width, window_height);
m.main();

View file

@ -39,7 +39,7 @@ private:
SDL_Surface * screen = nullptr;
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 {
screen = SDL_SetVideoMode(wanted_resolution_width, wanted_resolution_height, 32, SDL_OPENGL);
}