MCPcopy Create free account
hub / github.com/AdRoll/rustenstein / new

Method new

src/cache.rs:168–182  ·  view source on GitHub ↗
(
        pics: Vec<Picture>,
        textures: Vec<Vec<u8>>,
        sprites: Vec<(CompShape, Vec<u8>)>,
        sounds: Vec<Vec<u8>>,
        maps: Vec<Map>,
    )

Source from the content-addressed store, hash-verified

166
167impl Cache {
168 pub fn new(
169 pics: Vec<Picture>,
170 textures: Vec<Vec<u8>>,
171 sprites: Vec<(CompShape, Vec<u8>)>,
172 sounds: Vec<Vec<u8>>,
173 maps: Vec<Map>,
174 ) -> Cache {
175 Cache {
176 pics,
177 textures,
178 sprites,
179 sounds,
180 maps,
181 }
182 }
183
184 pub fn get_pic(&self, index: usize) -> &Picture {
185 &self.pics[index - 3]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected