medfall

A super great game engine
Log | Files | Refs

commit 8a0877252ad0af973b07dc091ec773f62cfb1c18
parent 236e4df4c19f2205c579f05696a4f31e6be03305
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Jul  2 21:53:10 +0300

try_get

Diffstat:
pp.cc | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/pp.cc b/pp.cc @@ -207,12 +207,7 @@ static void write_tile( int global_x = left + local_x; int global_y = top + local_y; - if( data.in_range( global_x, global_y ) ) { - tile( local_x, local_y ) = data( global_x, global_y ); - } - else { - tile( local_x, local_y ) = border; - } + tile( local_x, local_y ) = data.try_get( global_x, global_y, border ); } }