From a5bbcbf5d78005746fb64c51a779f830d7667a57 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 26 May 2021 02:09:12 -0400 Subject: split off FelFlame --- app/lib/helpers/00_tileset.rb | 49 -------------------------- app/lib/helpers/01_component.rb | 76 ----------------------------------------- 2 files changed, 125 deletions(-) delete mode 100644 app/lib/helpers/00_tileset.rb delete mode 100644 app/lib/helpers/01_component.rb (limited to 'app/lib/helpers') diff --git a/app/lib/helpers/00_tileset.rb b/app/lib/helpers/00_tileset.rb deleted file mode 100644 index 3890550..0000000 --- a/app/lib/helpers/00_tileset.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Helper - # Returns a loaded map and its dependecies(images,json) - # If any are missing then it will load them from files - - @json_data = {} - class < 1 - return {} - end - - json_tiles = self.get_json_tiles(json_name) - raise Exception.new "Error, json file not a tileset" unless json_tiles['type'] == 'tileset' - return tile_index - json_tiles['tilecount'] if tile_index > json_tiles['tilecount'] - source_height_tiles = (tile_index.to_i / json_tiles['columns'].to_i).to_i# * json_tiles['tileheight'] - { w: json_tiles['tilewidth'], - h: json_tiles['tileheight'], - path: json_tiles['image'].split('mygame/').last.delete('\\'), - source_x: [((tile_index % json_tiles['columns']) - 1) * json_tiles['tilewidth'], 0].max, - # source_y gets special treatment - source_y: [json_tiles['imageheight'] - ((source_height_tiles + 1) * json_tiles['tileheight']), 0].max, - source_w: json_tiles['tilewidth'], - source_h: json_tiles['tileheight'] } - end - end -end diff --git a/app/lib/helpers/01_component.rb b/app/lib/helpers/01_component.rb deleted file mode 100644 index 4937ec9..0000000 --- a/app/lib/helpers/01_component.rb +++ /dev/null @@ -1,76 +0,0 @@ -class Helper - class BaseComponent - class <