@@ -9,7 +9,7 @@ use sdl2::keyboard::Keycode;
99#[ cfg( feature = "unsafe_textures" ) ]
1010use sdl2:: mouse:: MouseButton ;
1111#[ cfg( feature = "unsafe_textures" ) ]
12- use sdl2:: pixels:: Color ;
12+ use sdl2:: pixels:: RColor ;
1313#[ cfg( feature = "unsafe_textures" ) ]
1414use sdl2:: rect:: { Point , Rect } ;
1515#[ cfg( feature = "unsafe_textures" ) ]
@@ -140,20 +140,20 @@ fn dummy_texture<'a>(canvas: &mut Canvas<Window>) -> Result<(Texture, Texture),
140140 ] ;
141141 canvas
142142 . with_multiple_texture_canvas ( textures. iter ( ) , |texture_canvas, user_context| {
143- texture_canvas. set_draw_color ( Color :: RGB ( 0 , 0 , 0 ) ) ;
143+ texture_canvas. set_draw_color ( RColor :: RGB ( 0 , 0 , 0 ) ) ;
144144 texture_canvas. clear ( ) ;
145145 match * user_context {
146146 TextureColor :: Yellow => {
147147 for i in 0 ..SQUARE_SIZE {
148148 for j in 0 ..SQUARE_SIZE {
149149 if ( i + j) % 4 == 0 {
150- texture_canvas. set_draw_color ( Color :: RGB ( 255 , 255 , 0 ) ) ;
150+ texture_canvas. set_draw_color ( RColor :: RGB ( 255 , 255 , 0 ) ) ;
151151 texture_canvas
152152 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
153153 . expect ( "could not draw point" ) ;
154154 }
155155 if ( i + j * 2 ) % 9 == 0 {
156- texture_canvas. set_draw_color ( Color :: RGB ( 200 , 200 , 0 ) ) ;
156+ texture_canvas. set_draw_color ( RColor :: RGB ( 200 , 200 , 0 ) ) ;
157157 texture_canvas
158158 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
159159 . expect ( "could not draw point" ) ;
@@ -169,13 +169,13 @@ fn dummy_texture<'a>(canvas: &mut Canvas<Window>) -> Result<(Texture, Texture),
169169 if ( i + j) % 7 == 0 {
170170 // this doesn't mean anything, there was some trial and error to find
171171 // something that wasn't too ugly
172- texture_canvas. set_draw_color ( Color :: RGB ( 192 , 192 , 192 ) ) ;
172+ texture_canvas. set_draw_color ( RColor :: RGB ( 192 , 192 , 192 ) ) ;
173173 texture_canvas
174174 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
175175 . expect ( "could not draw point" ) ;
176176 }
177177 if ( i + j * 2 ) % 5 == 0 {
178- texture_canvas. set_draw_color ( Color :: RGB ( 64 , 64 , 64 ) ) ;
178+ texture_canvas. set_draw_color ( RColor :: RGB ( 64 , 64 , 64 ) ) ;
179179 texture_canvas
180180 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
181181 . expect ( "could not draw point" ) ;
@@ -191,13 +191,13 @@ fn dummy_texture<'a>(canvas: &mut Canvas<Window>) -> Result<(Texture, Texture),
191191 if ( i + j) % 7 == 0 {
192192 // this doesn't mean anything, there was some trial and serror to find
193193 // something that wasn't too ugly
194- texture_canvas. set_draw_color ( Color :: RGB ( 192 , 192 , 192 ) ) ;
194+ texture_canvas. set_draw_color ( RColor :: RGB ( 192 , 192 , 192 ) ) ;
195195 texture_canvas
196196 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
197197 . expect ( "could not draw point" ) ;
198198 }
199199 if ( i + j * 2 ) % 5 == 0 {
200- texture_canvas. set_draw_color ( Color :: RGB ( 64 , 64 , 64 ) ) ;
200+ texture_canvas. set_draw_color ( RColor :: RGB ( 64 , 64 , 64 ) ) ;
201201 texture_canvas
202202 . draw_point ( Point :: new ( i as i32 , j as i32 ) )
203203 . expect ( "could not draw point" ) ;
@@ -239,7 +239,7 @@ pub fn main() -> Result<(), String> {
239239 . map_err ( |e| e. to_string ( ) ) ?;
240240
241241 println ! ( "Using SDL_Renderer \" {}\" " , canvas. info( ) . name) ;
242- canvas. set_draw_color ( Color :: RGB ( 0 , 0 , 0 ) ) ;
242+ canvas. set_draw_color ( RColor :: RGB ( 0 , 0 , 0 ) ) ;
243243 // clears the canvas with the color we set in `set_draw_color`.
244244 canvas. clear ( ) ;
245245 // However the canvas has not been updated to the window yet, everything has been processed to
@@ -294,7 +294,7 @@ pub fn main() -> Result<(), String> {
294294 frame = 0 ;
295295 }
296296
297- canvas. set_draw_color ( Color :: RGB ( 0 , 0 , 0 ) ) ;
297+ canvas. set_draw_color ( RColor :: RGB ( 0 , 0 , 0 ) ) ;
298298 canvas. clear ( ) ;
299299 for ( i, unit) in ( & game) . into_iter ( ) . enumerate ( ) {
300300 let i = i as u32 ;
0 commit comments