Module: RPG::Cache
- Defined in:
- docs/0_Dependencies.rb
Overview
Script that cache bitmaps when they are reusable.
Constant Summary collapse
- LOADS =
Array of load methods to call when the game starts
%i[load_animation load_autotile load_ball load_battleback load_battler load_character load_fog load_icon load_panorama load_particle load_pc load_picture load_pokedex load_title load_tileset load_transition load_interface load_foot_print load_b_icon load_poke_front load_poke_back]
- GIF_EXTENSION =
Extension of gif files
'.gif'- Common_filename =
Common filename of the image to load
'Graphics/%s/%s'- Common_filename_format =
Common filename with .png
format('%s.png', Common_filename)
- Notification_title =
Notification message when an image couldn't be loaded properly
'Failed to load graphic'- Autotiles_Path =
Path where autotiles are stored from Graphics
'autotiles'- Animations_Path =
Path where animations are stored from Graphics
'animations'- Ball_Path =
Path where ball are stored from Graphics
'ball'- BattleBacks_Path =
Path where battlebacks are stored from Graphics
'battlebacks'- Battlers_Path =
Path where battlers are stored from Graphics
'battlers'- Characters_Path =
Path where characters are stored from Graphics
'characters'- Fogs_Path =
Path where fogs are stored from Graphics
'fogs'- Icons_Path =
Path where icons are stored from Graphics
'icons'- Interface_Path =
Path where interface are stored from Graphics
'interface'- Panoramas_Path =
Path where panoramas are stored from Graphics
'panoramas'- Particles_Path =
Path where particles are stored from Graphics
'particles'- PC_Path =
Path where pc are stored from Graphics
'pc'- Pictures_Path =
Path where pictures are stored from Graphics
'pictures'- Pokedex_Path =
Path where pokedex images are stored from Graphics
'pokedex'- Titles_Path =
Path where titles are stored from Graphics
'titles'- Tilesets_Path =
Path where tilesets are stored from Graphics
'tilesets'- Transitions_Path =
Path where transitions are stored from Graphics
'transitions'- Windowskins_Path =
Path where windowskins are stored from Graphics
'windowskins'- Pokedex_FootPrints_Path =
Path where footprints are stored from Graphics
'pokedex/footprints'- Pokedex_PokeIcon_Path =
Path where pokeicon are stored from Graphics
'pokedex/pokeicon'- Pokedex_PokeFront_Path =
Path where pokefront are stored from Graphics
['pokedex/pokefront', 'pokedex/pokefrontshiny']
- Pokedex_PokeBack_Path =
Path where pokeback are stored from Graphics
['pokedex/pokeback', 'pokedex/pokebackshiny']
Class Method Summary collapse
-
.animation(filename, _hue = 0) ⇒ Texture
Load an animation image.
-
.animation_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.autotile(filename, _hue = 0) ⇒ Texture
Load an autotile image.
-
.autotile_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.b_icon(filename, _hue = 0) ⇒ Texture
Load a Pokemon icon image.
-
.b_icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.ball(filename, _hue = 0) ⇒ Texture
Load ball animation image.
-
.ball_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.battleback(filename, _hue = 0) ⇒ Texture
Load a battle back image.
-
.battleback_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.battler(filename, _hue = 0) ⇒ Texture
Load a battler image.
-
.battler_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.character(filename, _hue = 0) ⇒ Texture
Load a character image.
-
.character_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.default_bitmap
Gets the default bitmap.
-
.dispose_bitmaps_from_cache_tab(cache_tab)
Dispose every bitmap of a cache table.
-
.fog(filename, _hue = 0) ⇒ Texture
Load a fog image.
-
.fog_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.foot_print(filename, _hue = 0) ⇒ Texture
Load a foot print image.
-
.foot_print_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.icon(filename, _hue = 0) ⇒ Texture
Load an icon.
-
.icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.interface(filename, _hue = 0) ⇒ Texture
Load an interface image.
-
.interface_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.interface_image(filename) ⇒ Image
Load an interface "Image" (to perform some background process).
-
.load_animation(flush_it = false)
Load/unload the animation cache.
-
.load_autotile(flush_it = false)
Load/unload the autotile cache.
-
.load_b_icon(flush_it = false)
Load/unload the pokemon icon cache.
-
.load_ball(flush_it = false)
Load/unload the ball cache.
-
.load_battleback(flush_it = false)
Load/unload the battleback cache.
-
.load_battler(flush_it = false)
Load/unload the battler cache.
-
.load_character(flush_it = false)
Load/unload the character cache.
-
.load_fog(flush_it = false)
Load/unload the fog cache.
-
.load_foot_print(flush_it = false)
Load/unload the foot print cache.
-
.load_icon(flush_it = false)
Load/unload the icon cache.
-
.load_image(cache_tab, filename, path, file_data = nil, image_class = Texture) ⇒ Texture
Loads an image (from cache, disk or virtual directory).
-
.load_image_from_file_data(filename, file_data, image_class) ⇒ Texture
Loads an image from virtual directory with the right encoding.
-
.load_interface(flush_it = false)
Load/unload the interface cache.
-
.load_panorama(flush_it = false)
Load/unload the panorama cache.
-
.load_particle(flush_it = false)
Load/unload the particle cache.
-
.load_pc(flush_it = false)
Load/unload the pc cache.
-
.load_picture(flush_it = false)
Load/unload the picture cache.
-
.load_poke_back(flush_it = false)
Load/unload the pokemon back cache.
-
.load_poke_front(flush_it = false)
Load/unload the pokemon front cache.
-
.load_pokedex(flush_it = false)
Load/unload the pokedex cache.
-
.load_tileset(flush_it = false)
Load/unload the tileset cache.
-
.load_title(flush_it = false)
Load/unload the title cache.
-
.load_transition(flush_it = false)
Load/unload the transition cache.
-
.load_windowskin(flush_it = false)
Load/unload the windoskin cache.
-
.panorama(filename, _hue = 0) ⇒ Texture
Load a panorama image.
-
.panorama_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.particle(filename, _hue = 0) ⇒ Texture
Load a particle image.
-
.particle_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.pc(filename, _hue = 0) ⇒ Texture
Load a pc image.
-
.pc_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.picture(filename, _hue = 0) ⇒ Texture
Load a picture image.
-
.picture_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.poke_back(filename, hue = 0) ⇒ Texture
Load a pokemon back image.
-
.poke_back_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder.
-
.poke_front(filename, hue = 0) ⇒ Texture
Load a pokemon face image.
-
.poke_front_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder.
-
.pokedex(filename, _hue = 0) ⇒ Texture
Load a pokedex image.
-
.pokedex_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.test_file_existence(filename, path, file_data = nil) ⇒ Boolean
Test if a file exist.
-
.tileset(filename, _hue = 0) ⇒ Texture
Load a tileset image.
-
.tileset_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.tileset_image(filename) ⇒ Image
Load a tileset "Image" (to perform some background process).
-
.title(filename, _hue = 0) ⇒ Texture
Load a title image.
-
.title_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.transition(filename, _hue = 0) ⇒ Texture
Load a transition image.
-
.transition_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
-
.windowskin(filename, _hue = 0) ⇒ Texture
Load a windowskin image.
-
.windowskin_exist?(filename) ⇒ Boolean
Test if the image exist in the folder.
Class Method Details
.animation(filename, _hue = 0) ⇒ Texture
Load an animation image
2062 2063 |
# File 'docs/0_Dependencies.rb', line 2062 def animation(filename, _hue = 0) end |
.animation_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2056 2057 |
# File 'docs/0_Dependencies.rb', line 2056 def animation_exist?(filename) end |
.autotile(filename, _hue = 0) ⇒ Texture
Load an autotile image
2077 2078 |
# File 'docs/0_Dependencies.rb', line 2077 def autotile(filename, _hue = 0) end |
.autotile_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2071 2072 |
# File 'docs/0_Dependencies.rb', line 2071 def autotile_exist?(filename) end |
.b_icon(filename, _hue = 0) ⇒ Texture
Load a Pokemon icon image
2357 2358 |
# File 'docs/0_Dependencies.rb', line 2357 def b_icon(filename, _hue = 0) end |
.b_icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2351 2352 |
# File 'docs/0_Dependencies.rb', line 2351 def b_icon_exist?(filename) end |
.ball(filename, _hue = 0) ⇒ Texture
Load ball animation image
2092 2093 |
# File 'docs/0_Dependencies.rb', line 2092 def ball(filename, _hue = 0) end |
.ball_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2086 2087 |
# File 'docs/0_Dependencies.rb', line 2086 def ball_exist?(filename) end |
.battleback(filename, _hue = 0) ⇒ Texture
Load a battle back image
2107 2108 |
# File 'docs/0_Dependencies.rb', line 2107 def battleback(filename, _hue = 0) end |
.battleback_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2101 2102 |
# File 'docs/0_Dependencies.rb', line 2101 def battleback_exist?(filename) end |
.battler(filename, _hue = 0) ⇒ Texture
Load a battler image
2122 2123 |
# File 'docs/0_Dependencies.rb', line 2122 def battler(filename, _hue = 0) end |
.battler_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2116 2117 |
# File 'docs/0_Dependencies.rb', line 2116 def battler_exist?(filename) end |
.character(filename, _hue = 0) ⇒ Texture
Load a character image
2137 2138 |
# File 'docs/0_Dependencies.rb', line 2137 def character(filename, _hue = 0) end |
.character_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2131 2132 |
# File 'docs/0_Dependencies.rb', line 2131 def character_exist?(filename) end |
.default_bitmap
Should be used in scripts that require a bitmap be doesn't perform anything on the bitmap
Gets the default bitmap
2018 2019 |
# File 'docs/0_Dependencies.rb', line 2018 def default_bitmap end |
.dispose_bitmaps_from_cache_tab(cache_tab)
Dispose every bitmap of a cache table
2022 2023 |
# File 'docs/0_Dependencies.rb', line 2022 def dispose_bitmaps_from_cache_tab(cache_tab) end |
.fog(filename, _hue = 0) ⇒ Texture
Load a fog image
2152 2153 |
# File 'docs/0_Dependencies.rb', line 2152 def fog(filename, _hue = 0) end |
.fog_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2146 2147 |
# File 'docs/0_Dependencies.rb', line 2146 def fog_exist?(filename) end |
.foot_print(filename, _hue = 0) ⇒ Texture
Load a foot print image
2342 2343 |
# File 'docs/0_Dependencies.rb', line 2342 def foot_print(filename, _hue = 0) end |
.foot_print_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2336 2337 |
# File 'docs/0_Dependencies.rb', line 2336 def foot_print_exist?(filename) end |
.icon(filename, _hue = 0) ⇒ Texture
Load an icon
2167 2168 |
# File 'docs/0_Dependencies.rb', line 2167 def icon(filename, _hue = 0) end |
.icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2161 2162 |
# File 'docs/0_Dependencies.rb', line 2161 def icon_exist?(filename) end |
.interface(filename, _hue = 0) ⇒ Texture
Load an interface image
2182 2183 |
# File 'docs/0_Dependencies.rb', line 2182 def interface(filename, _hue = 0) end |
.interface_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2176 2177 |
# File 'docs/0_Dependencies.rb', line 2176 def interface_exist?(filename) end |
.interface_image(filename) ⇒ Image
Load an interface "Image" (to perform some background process)
2187 2188 |
# File 'docs/0_Dependencies.rb', line 2187 def interface_image(filename) end |
.load_animation(flush_it = false)
Load/unload the animation cache
2051 2052 |
# File 'docs/0_Dependencies.rb', line 2051 def load_animation(flush_it = false) end |
.load_autotile(flush_it = false)
Load/unload the autotile cache
2066 2067 |
# File 'docs/0_Dependencies.rb', line 2066 def load_autotile(flush_it = false) end |
.load_b_icon(flush_it = false)
Load/unload the pokemon icon cache
2346 2347 |
# File 'docs/0_Dependencies.rb', line 2346 def load_b_icon(flush_it = false) end |
.load_ball(flush_it = false)
Load/unload the ball cache
2081 2082 |
# File 'docs/0_Dependencies.rb', line 2081 def load_ball(flush_it = false) end |
.load_battleback(flush_it = false)
Load/unload the battleback cache
2096 2097 |
# File 'docs/0_Dependencies.rb', line 2096 def load_battleback(flush_it = false) end |
.load_battler(flush_it = false)
Load/unload the battler cache
2111 2112 |
# File 'docs/0_Dependencies.rb', line 2111 def load_battler(flush_it = false) end |
.load_character(flush_it = false)
Load/unload the character cache
2126 2127 |
# File 'docs/0_Dependencies.rb', line 2126 def load_character(flush_it = false) end |
.load_fog(flush_it = false)
Load/unload the fog cache
2141 2142 |
# File 'docs/0_Dependencies.rb', line 2141 def load_fog(flush_it = false) end |
.load_foot_print(flush_it = false)
Load/unload the foot print cache
2331 2332 |
# File 'docs/0_Dependencies.rb', line 2331 def load_foot_print(flush_it = false) end |
.load_icon(flush_it = false)
Load/unload the icon cache
2156 2157 |
# File 'docs/0_Dependencies.rb', line 2156 def load_icon(flush_it = false) end |
.load_image(cache_tab, filename, path, file_data = nil, image_class = Texture) ⇒ Texture
This function displays a desktop notification if the image is not found. The resultat bitmap is an empty 16x16 bitmap in this case.
Loads an image (from cache, disk or virtual directory)
2040 2041 |
# File 'docs/0_Dependencies.rb', line 2040 def load_image(cache_tab, filename, path, file_data = nil, image_class = Texture) end |
.load_image_from_file_data(filename, file_data, image_class) ⇒ Texture
Loads an image from virtual directory with the right encoding
2047 2048 |
# File 'docs/0_Dependencies.rb', line 2047 def load_image_from_file_data(filename, file_data, image_class) end |
.load_interface(flush_it = false)
Load/unload the interface cache
2171 2172 |
# File 'docs/0_Dependencies.rb', line 2171 def load_interface(flush_it = false) end |
.load_panorama(flush_it = false)
Load/unload the panorama cache
2191 2192 |
# File 'docs/0_Dependencies.rb', line 2191 def load_panorama(flush_it = false) end |
.load_particle(flush_it = false)
Load/unload the particle cache
2206 2207 |
# File 'docs/0_Dependencies.rb', line 2206 def load_particle(flush_it = false) end |
.load_pc(flush_it = false)
Load/unload the pc cache
2221 2222 |
# File 'docs/0_Dependencies.rb', line 2221 def load_pc(flush_it = false) end |
.load_picture(flush_it = false)
Load/unload the picture cache
2236 2237 |
# File 'docs/0_Dependencies.rb', line 2236 def load_picture(flush_it = false) end |
.load_poke_back(flush_it = false)
Load/unload the pokemon back cache
2377 2378 |
# File 'docs/0_Dependencies.rb', line 2377 def load_poke_back(flush_it = false) end |
.load_poke_front(flush_it = false)
Load/unload the pokemon front cache
2361 2362 |
# File 'docs/0_Dependencies.rb', line 2361 def load_poke_front(flush_it = false) end |
.load_pokedex(flush_it = false)
Load/unload the pokedex cache
2251 2252 |
# File 'docs/0_Dependencies.rb', line 2251 def load_pokedex(flush_it = false) end |
.load_tileset(flush_it = false)
Load/unload the tileset cache
2281 2282 |
# File 'docs/0_Dependencies.rb', line 2281 def load_tileset(flush_it = false) end |
.load_title(flush_it = false)
Load/unload the title cache
2266 2267 |
# File 'docs/0_Dependencies.rb', line 2266 def load_title(flush_it = false) end |
.load_transition(flush_it = false)
Load/unload the transition cache
2301 2302 |
# File 'docs/0_Dependencies.rb', line 2301 def load_transition(flush_it = false) end |
.load_windowskin(flush_it = false)
Load/unload the windoskin cache
2316 2317 |
# File 'docs/0_Dependencies.rb', line 2316 def load_windowskin(flush_it = false) end |
.panorama(filename, _hue = 0) ⇒ Texture
Load a panorama image
2202 2203 |
# File 'docs/0_Dependencies.rb', line 2202 def panorama(filename, _hue = 0) end |
.panorama_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2196 2197 |
# File 'docs/0_Dependencies.rb', line 2196 def panorama_exist?(filename) end |
.particle(filename, _hue = 0) ⇒ Texture
Load a particle image
2217 2218 |
# File 'docs/0_Dependencies.rb', line 2217 def particle(filename, _hue = 0) end |
.particle_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2211 2212 |
# File 'docs/0_Dependencies.rb', line 2211 def particle_exist?(filename) end |
.pc(filename, _hue = 0) ⇒ Texture
Load a pc image
2232 2233 |
# File 'docs/0_Dependencies.rb', line 2232 def pc(filename, _hue = 0) end |
.pc_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2226 2227 |
# File 'docs/0_Dependencies.rb', line 2226 def pc_exist?(filename) end |
.picture(filename, _hue = 0) ⇒ Texture
Load a picture image
2247 2248 |
# File 'docs/0_Dependencies.rb', line 2247 def picture(filename, _hue = 0) end |
.picture_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2241 2242 |
# File 'docs/0_Dependencies.rb', line 2241 def picture_exist?(filename) end |
.poke_back(filename, hue = 0) ⇒ Texture
Load a pokemon back image
2389 2390 |
# File 'docs/0_Dependencies.rb', line 2389 def poke_back(filename, hue = 0) end |
.poke_back_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder
2383 2384 |
# File 'docs/0_Dependencies.rb', line 2383 def poke_back_exist?(filename, hue = 0) end |
.poke_front(filename, hue = 0) ⇒ Texture
Load a pokemon face image
2373 2374 |
# File 'docs/0_Dependencies.rb', line 2373 def poke_front(filename, hue = 0) end |
.poke_front_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder
2367 2368 |
# File 'docs/0_Dependencies.rb', line 2367 def poke_front_exist?(filename, hue = 0) end |
.pokedex(filename, _hue = 0) ⇒ Texture
Load a pokedex image
2262 2263 |
# File 'docs/0_Dependencies.rb', line 2262 def pokedex(filename, _hue = 0) end |
.pokedex_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2256 2257 |
# File 'docs/0_Dependencies.rb', line 2256 def pokedex_exist?(filename) end |
.test_file_existence(filename, path, file_data = nil) ⇒ Boolean
Test if a file exist
2029 2030 |
# File 'docs/0_Dependencies.rb', line 2029 def test_file_existence(filename, path, file_data = nil) end |
.tileset(filename, _hue = 0) ⇒ Texture
Load a tileset image
2292 2293 |
# File 'docs/0_Dependencies.rb', line 2292 def tileset(filename, _hue = 0) end |
.tileset_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2286 2287 |
# File 'docs/0_Dependencies.rb', line 2286 def tileset_exist?(filename) end |
.tileset_image(filename) ⇒ Image
Load a tileset "Image" (to perform some background process)
2297 2298 |
# File 'docs/0_Dependencies.rb', line 2297 def tileset_image(filename) end |
.title(filename, _hue = 0) ⇒ Texture
Load a title image
2277 2278 |
# File 'docs/0_Dependencies.rb', line 2277 def title(filename, _hue = 0) end |
.title_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2271 2272 |
# File 'docs/0_Dependencies.rb', line 2271 def title_exist?(filename) end |
.transition(filename, _hue = 0) ⇒ Texture
Load a transition image
2312 2313 |
# File 'docs/0_Dependencies.rb', line 2312 def transition(filename, _hue = 0) end |
.transition_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2306 2307 |
# File 'docs/0_Dependencies.rb', line 2306 def transition_exist?(filename) end |
.windowskin(filename, _hue = 0) ⇒ Texture
Load a windowskin image
2327 2328 |
# File 'docs/0_Dependencies.rb', line 2327 def windowskin(filename, _hue = 0) end |
.windowskin_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2321 2322 |
# File 'docs/0_Dependencies.rb', line 2321 def windowskin_exist?(filename) end |