aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index ead9d8c..64ebe92 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -437,10 +437,11 @@ namespace ui {
dialogOptCount--;
};
- dialogOptChosen=0;
+ dialogOptCount = 0;
+ dialogOptChosen = 0;
memset(&dialogOptLoc,0,sizeof(float)*12);
- if(opt){
+ if(opt != NULL){
soptbuf = new char[strlen(opt)+1];
strcpy(soptbuf,opt);
@@ -815,9 +816,12 @@ DONE:
case SDLK_RIGHT:
player->inv->sel++;
break;
- case SDLK_f:
+ case SDLK_l:
player->light^=true;
break;
+ case SDLK_f:
+ currentWorld->addLight({player->loc.x + SCREEN_WIDTH/2, player->loc.y},{1.0f,1.0f,1.0f});
+ break;
default:
break;
}