File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,10 @@ mod game;
22use crate :: game:: GameState ;
33use ggez:: event:: { self } ;
44use ggez:: { ContextBuilder , GameResult } ;
5- use std:: path:: PathBuf ;
65const BIRD_IMAGE_BYTES : & ' static [ u8 ] = include_bytes ! ( "../resources/bird.png" ) ;
76
87fn main ( ) -> GameResult {
9- let resource_dir = std:: env:: var ( "CARGO_MANIFEST_DIR" )
10- . map ( |manifest_dir| {
11- let mut path = PathBuf :: from ( manifest_dir) ;
12- path. push ( "resources" ) ;
13- path
14- } )
15- . unwrap_or_else ( |_| PathBuf :: from ( "." ) ) ;
16-
178 let ( mut ctx, event_loop) = ContextBuilder :: new ( "flappy_bird" , "Carol" )
18- . add_resource_path ( resource_dir)
199 . window_setup ( ggez:: conf:: WindowSetup :: default ( ) . title ( "Flappy Bird!" ) )
2010 . window_mode ( ggez:: conf:: WindowMode :: default ( ) . dimensions ( 800.0 , 600.0 ) )
2111 . build ( ) ?;
You can’t perform that action at this time.
0 commit comments