diff --git a/app/main.rb b/app/main.rb index de04205..8899386 100644 --- a/app/main.rb +++ b/app/main.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # first, third-party libraries -require 'lib/coalesce.rb' +require 'app/util/coalesce.rb' # then, some basic classes required for lists of assets require 'app/classes/sprite_instance.rb' @@ -9,9 +9,9 @@ require 'app/classes/sound_instance.rb' require 'app/classes/scene_instance.rb' # then, asset lists -require 'sprites/_list.rb' -require 'sounds/_list.rb' -require 'music/_list.rb' +require 'app/sprites_list.rb' +require 'app/sounds_list.rb' +require 'app/music_list.rb' # then, default keybindings require 'app/keybindings.rb' diff --git a/music/_list.rb b/app/music_list.rb similarity index 100% rename from music/_list.rb rename to app/music_list.rb diff --git a/app/scenes/cube_tube.rb b/app/scenes/cube_tube.rb index 223fe99..0d7b354 100644 --- a/app/scenes/cube_tube.rb +++ b/app/scenes/cube_tube.rb @@ -432,9 +432,9 @@ class CubeTubeGame < GameplayScene end def rotate_current_piece_right - @current_piece = @current_piece.transpose.map(&:reverse) - @current_piece = @current_piece.transpose.map(&:reverse) - @current_piece = @current_piece.transpose.map(&:reverse) + new_piece = @current_piece.transpose.map(&:reverse) + new_piece = new_piece.transpose.map(&:reverse) + new_piece = new_piece.transpose.map(&:reverse) new_rotation = (@current_piece_rotation + 1) % 4 rotate_current_piece(new_piece, new_rotation) end @@ -518,7 +518,7 @@ class CubeTubeGame < GameplayScene move_current_piece_up if Input.pressed?(@args, :up) if Input.pressed_or_held?(@args, :left) @next_move -= @current_speed / 3 - @lock_timer -= @current_speed / 3 if @lock_timer > 0 + @lock_timer -= 3 if @lock_timer.positive? end rotate_current_piece_left if Input.pressed?(@args, :rotate_left) rotate_current_piece_right if Input.pressed?(@args, :rotate_right) @@ -536,7 +536,7 @@ class CubeTubeGame < GameplayScene delta_x = cursor.x - @cursor_down.x if delta_x.negative? && delta_x.abs > (@blocksize * 2) && @cursor_piece_x_origin == @current_piece_x @next_move -= @current_speed / 3 - @lock_timer -= @current_speed / 3 if @lock_timer.positive? + @lock_timer -= 3 if @lock_timer.positive? return end @@ -559,7 +559,11 @@ class CubeTubeGame < GameplayScene @current_piece_x = max_delta else if !@cursor_down.nil? && (@cursor_down_tick + 30) >= @args.state.tick_count && @cursor_piece_x_origin == @current_piece_x - rotate_current_piece_left + if @cursor_down.x < 640 + rotate_current_piece_right + else + rotate_current_piece_left + end end @cursor_down = nil @cursor_down_tick = nil diff --git a/sounds/_list.rb b/app/sounds_list.rb similarity index 100% rename from sounds/_list.rb rename to app/sounds_list.rb diff --git a/sprites/_list.rb b/app/sprites_list.rb similarity index 100% rename from sprites/_list.rb rename to app/sprites_list.rb diff --git a/app/tick.rb b/app/tick.rb index d509d9d..8d8d5e2 100644 --- a/app/tick.rb +++ b/app/tick.rb @@ -4,6 +4,10 @@ def init(args) Input.reset_swipe(args) GameSetting.load_settings(args) + + if args.gtk.platform?(:mobile) + args.gtk.set_window_fullscreen(true) + end end # Code that runs every game tick (mainly just calling other ticks) diff --git a/lib/coalesce.rb b/app/util/coalesce.rb similarity index 100% rename from lib/coalesce.rb rename to app/util/coalesce.rb diff --git a/metadata/ios_metadata.txt b/metadata/ios_metadata.txt index 0ba387e..1fb2e66 100644 --- a/metadata/ios_metadata.txt +++ b/metadata/ios_metadata.txt @@ -2,12 +2,12 @@ # Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase # teamid needs to be set to your assigned Team Id which can be found at https://developer.apple.com/account/#/membership/ -teamid= +teamid=4JYKNQ5WRZ # appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list -appid= +appid=au.death.cube-tube # appname is the name you want to show up underneath the app icon on the device. Keep it under 10 characters. -appname= +appname=Cube Tube # devcert is the certificate to use for development/deploying to your local device. This is the NAME of the certificate as it's displayed in Keychain Access. -devcert= +devcert=Apple Development: Gordon Pedersen (4ALQVARFJQ) # prodcert is the certificate to use for distribution to the app store. This is the NAME of the certificate as it's displayed in Keychain Access. -prodcert= +prodcert=Apple Distribution: Gordon Pedersen (4JYKNQ5WRZ) diff --git a/run b/run new file mode 100755 index 0000000..5784beb --- /dev/null +++ b/run @@ -0,0 +1,5 @@ +#!/bin/sh +cd "`dirname "$0"`" + +cd .. +exec ./dragonruby cube-tube