30
30
#include " widget_manager.hh"
31
31
#include " font.hh"
32
32
#include " text.hh"
33
+ #if defined(TMS_BACKEND_LINUX) && defined(DEBUG)
34
+ #define CREATE_SANDBOX_TEXTURES
33
35
#include " savepng.h"
36
+ #endif
34
37
35
38
#ifndef UINT32_MAX
36
39
#define UINT32_MAX (4294967295U )
@@ -250,7 +253,7 @@ game::delete_entity(entity *e)
250
253
if (e == adventure::player) {
251
254
adventure::player = 0 ;
252
255
}
253
- /* *
256
+ /* *
254
257
* For these special cases, we need to figure out
255
258
* which part of the objects we're dealing with.
256
259
* After that, we disconnect them from eachother and
@@ -828,7 +831,7 @@ game::menu_handle_event(tms::event *ev)
828
831
this ->recent [0 ] = (int )pending_ent[pid]->g_id ;
829
832
}
830
833
831
- /* readd the entity to the scene, since the update method
834
+ /* readd the entity to the scene, since the update method
832
835
* has changed */
833
836
this ->remove_entity (pending_ent[pid]);
834
837
this ->add_entity (pending_ent[pid]);
@@ -918,7 +921,7 @@ game::menu_handle_event(tms::event *ev)
918
921
}
919
922
tdown_p[pid].y = sp.y ;
920
923
} else {
921
- /* not added yet, determine whether we are sliding the menu or
924
+ /* not added yet, determine whether we are sliding the menu or
922
925
* moving out an object */
923
926
if (std::abs (tdown_p[pid].x - sp.x ) > _tms.xppcm *.4f ) {
924
927
tvec3 pos;
@@ -1091,17 +1094,7 @@ game::widget_clicked(principia_wdg *w, uint8_t button_id, int pid)
1091
1094
ui::message (" No description available for this level." );
1092
1095
}
1093
1096
} else {
1094
- if (W->is_puzzle ()) {
1095
- ui::open_help_dialog (
1096
- " Level help" ,
1097
- W->level .descr ,
1098
- false );
1099
- } else {
1100
- ui::open_help_dialog (
1101
- " Level description" ,
1102
- W->level .descr ,
1103
- false );
1104
- }
1097
+ ui::open_help_dialog (" Level description" , W->level .descr , false );
1105
1098
}
1106
1099
}
1107
1100
return true ;
@@ -2567,14 +2560,14 @@ game::init_sandbox_menu()
2567
2560
}
2568
2561
}
2569
2562
2570
- /* *
2571
- * Should only be called when we are generating new sandbox menu textures
2563
+ /* *
2564
+ * Should only be called when we are generating new sandbox menu textures
2572
2565
* to be bundled in the release version.
2573
2566
**/
2574
2567
void
2575
2568
game::create_sandbox_menu ()
2576
2569
{
2577
- #if defined TMS_BACKEND_LINUX && defined DEBUG
2570
+ #ifdef CREATE_SANDBOX_TEXTURES
2578
2571
glDisable (GL_BLEND);
2579
2572
2580
2573
tms_assertf (glGetError () == 0 , " VAFAN s 1" );
@@ -3539,10 +3532,10 @@ game::render_sandbox_menu()
3539
3532
if (o.e ->flag_active (ENTITY_IS_BETA)) {
3540
3533
/* render beta label */
3541
3534
tms_ddraw_set_color (this ->get_surface ()->ddraw , 1 .f *menu_tint, 1 .f *menu_tint, 0 .2f *menu_tint, 1 .f );
3542
- tms_ddraw_sprite (this ->get_surface ()->ddraw ,
3535
+ tms_ddraw_sprite (this ->get_surface ()->ddraw ,
3543
3536
betasprite,
3544
3537
x1 + a_x +btn_outer_x/2 .f ,
3545
- cy+pp - betasprite->height /2 .f ,
3538
+ cy+pp - betasprite->height /2 .f ,
3546
3539
// roundf(p.x), roundf(p.y-30),
3547
3540
betasprite->width *.8 , betasprite->height *.8 );
3548
3541
tms_ddraw_set_color (this ->get_surface ()->ddraw , 1 .f *menu_tint, 1 .f *menu_tint, 1 .0f *menu_tint, 1 .f );
@@ -3563,7 +3556,7 @@ game::render_sandbox_menu()
3563
3556
tms_ddraw_sprite (this ->get_surface ()->ddraw ,
3564
3557
o.name ,
3565
3558
x1 + a_x +btn_outer_x/2 .f ,
3566
- cy+pp - _tms.yppcm /2 .5f ,
3559
+ cy+pp - _tms.yppcm /2 .5f ,
3567
3560
// roundf(p.x), roundf(p.y-30),
3568
3561
o.name ->width *.8 , o.name ->height *.8 );
3569
3562
// s_size,//o.name->width*scale,
@@ -3854,7 +3847,7 @@ game::render_inventory(void)
3854
3847
} else {
3855
3848
tms_ddraw_set_color (this ->get_surface ()->ddraw , .4f , .4f , .4f , 0 .3f );
3856
3849
}
3857
- tms_ddraw_square (this ->get_surface ()->ddraw , iw*2 .f , y,
3850
+ tms_ddraw_square (this ->get_surface ()->ddraw , iw*2 .f , y,
3858
3851
iw*3 .f , ih*1 .5f );
3859
3852
3860
3853
this ->render_num (x, y, iw, ih, adventure::player->get_num_resources (n), 0 , 0 .f , false );
@@ -3867,13 +3860,13 @@ game::render_inventory(void)
3867
3860
3868
3861
if (base_y > _tms.window_height ) {
3869
3862
tms_ddraw_set_color (this ->get_surface ()->ddraw , .7f +cp, .7f +cp, .7f +cp, .35f +(cp*.2f ));
3870
- tms_ddraw_circle (this ->get_surface ()->ddraw , iw*3 .f , _tms.window_height +ih,
3863
+ tms_ddraw_circle (this ->get_surface ()->ddraw , iw*3 .f , _tms.window_height +ih,
3871
3864
iw*4 .f , ih*1 .3f );
3872
3865
}
3873
3866
3874
3867
if (this ->inventory_highest_y < -(ih*1 .75f )) {
3875
3868
tms_ddraw_set_color (this ->get_surface ()->ddraw , .7f +cp, .7f +cp, .7f +cp, .35f +(cp*.2f ));
3876
- tms_ddraw_circle (this ->get_surface ()->ddraw , iw*3 .f , -ih,
3869
+ tms_ddraw_circle (this ->get_surface ()->ddraw , iw*3 .f , -ih,
3877
3870
iw*4 .f , ih*1 .3f );
3878
3871
}
3879
3872
}
0 commit comments