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
1867 1868 |
# File 'docs/0_Dependencies.rb', line 1867 def animation(filename, _hue = 0) end |
.animation_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1861 1862 |
# File 'docs/0_Dependencies.rb', line 1861 def animation_exist?(filename) end |
.autotile(filename, _hue = 0) ⇒ Texture
Load an autotile image
1882 1883 |
# File 'docs/0_Dependencies.rb', line 1882 def autotile(filename, _hue = 0) end |
.autotile_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1876 1877 |
# File 'docs/0_Dependencies.rb', line 1876 def autotile_exist?(filename) end |
.b_icon(filename, _hue = 0) ⇒ Texture
Load a Pokemon icon image
2162 2163 |
# File 'docs/0_Dependencies.rb', line 2162 def b_icon(filename, _hue = 0) end |
.b_icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2156 2157 |
# File 'docs/0_Dependencies.rb', line 2156 def b_icon_exist?(filename) end |
.ball(filename, _hue = 0) ⇒ Texture
Load ball animation image
1897 1898 |
# File 'docs/0_Dependencies.rb', line 1897 def ball(filename, _hue = 0) end |
.ball_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1891 1892 |
# File 'docs/0_Dependencies.rb', line 1891 def ball_exist?(filename) end |
.battleback(filename, _hue = 0) ⇒ Texture
Load a battle back image
1912 1913 |
# File 'docs/0_Dependencies.rb', line 1912 def battleback(filename, _hue = 0) end |
.battleback_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1906 1907 |
# File 'docs/0_Dependencies.rb', line 1906 def battleback_exist?(filename) end |
.battler(filename, _hue = 0) ⇒ Texture
Load a battler image
1927 1928 |
# File 'docs/0_Dependencies.rb', line 1927 def battler(filename, _hue = 0) end |
.battler_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1921 1922 |
# File 'docs/0_Dependencies.rb', line 1921 def battler_exist?(filename) end |
.character(filename, _hue = 0) ⇒ Texture
Load a character image
1942 1943 |
# File 'docs/0_Dependencies.rb', line 1942 def character(filename, _hue = 0) end |
.character_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1936 1937 |
# File 'docs/0_Dependencies.rb', line 1936 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
1823 1824 |
# File 'docs/0_Dependencies.rb', line 1823 def default_bitmap end |
.dispose_bitmaps_from_cache_tab(cache_tab)
Dispose every bitmap of a cache table
1827 1828 |
# File 'docs/0_Dependencies.rb', line 1827 def dispose_bitmaps_from_cache_tab(cache_tab) end |
.fog(filename, _hue = 0) ⇒ Texture
Load a fog image
1957 1958 |
# File 'docs/0_Dependencies.rb', line 1957 def fog(filename, _hue = 0) end |
.fog_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1951 1952 |
# File 'docs/0_Dependencies.rb', line 1951 def fog_exist?(filename) end |
.foot_print(filename, _hue = 0) ⇒ Texture
Load a foot print image
2147 2148 |
# File 'docs/0_Dependencies.rb', line 2147 def foot_print(filename, _hue = 0) end |
.foot_print_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2141 2142 |
# File 'docs/0_Dependencies.rb', line 2141 def foot_print_exist?(filename) end |
.icon(filename, _hue = 0) ⇒ Texture
Load an icon
1972 1973 |
# File 'docs/0_Dependencies.rb', line 1972 def icon(filename, _hue = 0) end |
.icon_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1966 1967 |
# File 'docs/0_Dependencies.rb', line 1966 def icon_exist?(filename) end |
.interface(filename, _hue = 0) ⇒ Texture
Load an interface image
1987 1988 |
# File 'docs/0_Dependencies.rb', line 1987 def interface(filename, _hue = 0) end |
.interface_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
1981 1982 |
# File 'docs/0_Dependencies.rb', line 1981 def interface_exist?(filename) end |
.interface_image(filename) ⇒ Image
Load an interface “Image” (to perform some background process)
1992 1993 |
# File 'docs/0_Dependencies.rb', line 1992 def interface_image(filename) end |
.load_animation(flush_it = false)
Load/unload the animation cache
1856 1857 |
# File 'docs/0_Dependencies.rb', line 1856 def load_animation(flush_it = false) end |
.load_autotile(flush_it = false)
Load/unload the autotile cache
1871 1872 |
# File 'docs/0_Dependencies.rb', line 1871 def load_autotile(flush_it = false) end |
.load_b_icon(flush_it = false)
Load/unload the pokemon icon cache
2151 2152 |
# File 'docs/0_Dependencies.rb', line 2151 def load_b_icon(flush_it = false) end |
.load_ball(flush_it = false)
Load/unload the ball cache
1886 1887 |
# File 'docs/0_Dependencies.rb', line 1886 def load_ball(flush_it = false) end |
.load_battleback(flush_it = false)
Load/unload the battleback cache
1901 1902 |
# File 'docs/0_Dependencies.rb', line 1901 def load_battleback(flush_it = false) end |
.load_battler(flush_it = false)
Load/unload the battler cache
1916 1917 |
# File 'docs/0_Dependencies.rb', line 1916 def load_battler(flush_it = false) end |
.load_character(flush_it = false)
Load/unload the character cache
1931 1932 |
# File 'docs/0_Dependencies.rb', line 1931 def load_character(flush_it = false) end |
.load_fog(flush_it = false)
Load/unload the fog cache
1946 1947 |
# File 'docs/0_Dependencies.rb', line 1946 def load_fog(flush_it = false) end |
.load_foot_print(flush_it = false)
Load/unload the foot print cache
2136 2137 |
# File 'docs/0_Dependencies.rb', line 2136 def load_foot_print(flush_it = false) end |
.load_icon(flush_it = false)
Load/unload the icon cache
1961 1962 |
# File 'docs/0_Dependencies.rb', line 1961 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)
1845 1846 |
# File 'docs/0_Dependencies.rb', line 1845 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
1852 1853 |
# File 'docs/0_Dependencies.rb', line 1852 def load_image_from_file_data(filename, file_data, image_class) end |
.load_interface(flush_it = false)
Load/unload the interface cache
1976 1977 |
# File 'docs/0_Dependencies.rb', line 1976 def load_interface(flush_it = false) end |
.load_panorama(flush_it = false)
Load/unload the panorama cache
1996 1997 |
# File 'docs/0_Dependencies.rb', line 1996 def load_panorama(flush_it = false) end |
.load_particle(flush_it = false)
Load/unload the particle cache
2011 2012 |
# File 'docs/0_Dependencies.rb', line 2011 def load_particle(flush_it = false) end |
.load_pc(flush_it = false)
Load/unload the pc cache
2026 2027 |
# File 'docs/0_Dependencies.rb', line 2026 def load_pc(flush_it = false) end |
.load_picture(flush_it = false)
Load/unload the picture cache
2041 2042 |
# File 'docs/0_Dependencies.rb', line 2041 def load_picture(flush_it = false) end |
.load_poke_back(flush_it = false)
Load/unload the pokemon back cache
2182 2183 |
# File 'docs/0_Dependencies.rb', line 2182 def load_poke_back(flush_it = false) end |
.load_poke_front(flush_it = false)
Load/unload the pokemon front cache
2166 2167 |
# File 'docs/0_Dependencies.rb', line 2166 def load_poke_front(flush_it = false) end |
.load_pokedex(flush_it = false)
Load/unload the pokedex cache
2056 2057 |
# File 'docs/0_Dependencies.rb', line 2056 def load_pokedex(flush_it = false) end |
.load_tileset(flush_it = false)
Load/unload the tileset cache
2086 2087 |
# File 'docs/0_Dependencies.rb', line 2086 def load_tileset(flush_it = false) end |
.load_title(flush_it = false)
Load/unload the title cache
2071 2072 |
# File 'docs/0_Dependencies.rb', line 2071 def load_title(flush_it = false) end |
.load_transition(flush_it = false)
Load/unload the transition cache
2106 2107 |
# File 'docs/0_Dependencies.rb', line 2106 def load_transition(flush_it = false) end |
.load_windowskin(flush_it = false)
Load/unload the windoskin cache
2121 2122 |
# File 'docs/0_Dependencies.rb', line 2121 def load_windowskin(flush_it = false) end |
.panorama(filename, _hue = 0) ⇒ Texture
Load a panorama image
2007 2008 |
# File 'docs/0_Dependencies.rb', line 2007 def panorama(filename, _hue = 0) end |
.panorama_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2001 2002 |
# File 'docs/0_Dependencies.rb', line 2001 def panorama_exist?(filename) end |
.particle(filename, _hue = 0) ⇒ Texture
Load a particle image
2022 2023 |
# File 'docs/0_Dependencies.rb', line 2022 def particle(filename, _hue = 0) end |
.particle_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2016 2017 |
# File 'docs/0_Dependencies.rb', line 2016 def particle_exist?(filename) end |
.pc(filename, _hue = 0) ⇒ Texture
Load a pc image
2037 2038 |
# File 'docs/0_Dependencies.rb', line 2037 def pc(filename, _hue = 0) end |
.pc_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2031 2032 |
# File 'docs/0_Dependencies.rb', line 2031 def pc_exist?(filename) end |
.picture(filename, _hue = 0) ⇒ Texture
Load a picture image
2052 2053 |
# File 'docs/0_Dependencies.rb', line 2052 def picture(filename, _hue = 0) end |
.picture_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2046 2047 |
# File 'docs/0_Dependencies.rb', line 2046 def picture_exist?(filename) end |
.poke_back(filename, hue = 0) ⇒ Texture
Load a pokemon back image
2194 2195 |
# File 'docs/0_Dependencies.rb', line 2194 def poke_back(filename, hue = 0) end |
.poke_back_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder
2188 2189 |
# File 'docs/0_Dependencies.rb', line 2188 def poke_back_exist?(filename, hue = 0) end |
.poke_front(filename, hue = 0) ⇒ Texture
Load a pokemon face image
2178 2179 |
# File 'docs/0_Dependencies.rb', line 2178 def poke_front(filename, hue = 0) end |
.poke_front_exist?(filename, hue = 0) ⇒ Boolean
Test if the image exist in the folder
2172 2173 |
# File 'docs/0_Dependencies.rb', line 2172 def poke_front_exist?(filename, hue = 0) end |
.pokedex(filename, _hue = 0) ⇒ Texture
Load a pokedex image
2067 2068 |
# File 'docs/0_Dependencies.rb', line 2067 def pokedex(filename, _hue = 0) end |
.pokedex_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2061 2062 |
# File 'docs/0_Dependencies.rb', line 2061 def pokedex_exist?(filename) end |
.test_file_existence(filename, path, file_data = nil) ⇒ Boolean
Test if a file exist
1834 1835 |
# File 'docs/0_Dependencies.rb', line 1834 def test_file_existence(filename, path, file_data = nil) end |
.tileset(filename, _hue = 0) ⇒ Texture
Load a tileset image
2097 2098 |
# File 'docs/0_Dependencies.rb', line 2097 def tileset(filename, _hue = 0) end |
.tileset_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2091 2092 |
# File 'docs/0_Dependencies.rb', line 2091 def tileset_exist?(filename) end |
.tileset_image(filename) ⇒ Image
Load a tileset “Image” (to perform some background process)
2102 2103 |
# File 'docs/0_Dependencies.rb', line 2102 def tileset_image(filename) end |
.title(filename, _hue = 0) ⇒ Texture
Load a title image
2082 2083 |
# File 'docs/0_Dependencies.rb', line 2082 def title(filename, _hue = 0) end |
.title_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2076 2077 |
# File 'docs/0_Dependencies.rb', line 2076 def title_exist?(filename) end |
.transition(filename, _hue = 0) ⇒ Texture
Load a transition image
2117 2118 |
# File 'docs/0_Dependencies.rb', line 2117 def transition(filename, _hue = 0) end |
.transition_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2111 2112 |
# File 'docs/0_Dependencies.rb', line 2111 def transition_exist?(filename) end |
.windowskin(filename, _hue = 0) ⇒ Texture
Load a windowskin image
2132 2133 |
# File 'docs/0_Dependencies.rb', line 2132 def windowskin(filename, _hue = 0) end |
.windowskin_exist?(filename) ⇒ Boolean
Test if the image exist in the folder
2126 2127 |
# File 'docs/0_Dependencies.rb', line 2126 def windowskin_exist?(filename) end |