浏览代码

moving lesson 2 assets to common asset directory

jmelesky 7 年之前
父节点
当前提交
3d7ed5dfcf
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 0 0
      assets/hello_world.bmp
  2. 2 2
      lesson02/src/main.rs

+ 0 - 0
lesson02/assets/hello_world.bmp → assets/hello_world.bmp


+ 2 - 2
lesson02/src/main.rs

@@ -48,7 +48,7 @@ fn init() -> Canvas<Window> {
 }
 }
 
 
 
 
-fn load_media(filename:&str) -> Surface { // -> &'static Texture {
+fn load_media(filename:&str) -> Surface {
     // having difficulty with lifetimes. Going to try to use a TextureCreator
     // having difficulty with lifetimes. Going to try to use a TextureCreator
     // to get around that problem for now.
     // to get around that problem for now.
 
 
@@ -67,7 +67,7 @@ fn main() {
     let mut canvas = init();
     let mut canvas = init();
 
 
 
 
-    let surface = load_media("assets/hello_world.bmp");
+    let surface = load_media("../assets/hello_world.bmp");
 
 
 
 
     let tc = canvas.texture_creator();
     let tc = canvas.texture_creator();