File confec.cpp changed (mode: 100644) (index fe214e2..80cd6fa) |
... |
... |
std::string character_selected = "", character_next_screen = "", |
489 |
489 |
fworld::Entity *trading_entity; |
fworld::Entity *trading_entity; |
490 |
490 |
|
|
491 |
491 |
fgl::Texture tex_circle_grey, tex_circle_orange, tex_cursor, |
fgl::Texture tex_circle_grey, tex_circle_orange, tex_cursor, |
492 |
|
tex_notification_net, tex_notification, tex_recipe_overlay, |
|
493 |
|
tex_boxes, tex_box_select, tex_character_select; |
|
|
492 |
|
tex_notification_box, tex_notification_net, tex_notification, |
|
493 |
|
tex_recipe_overlay, tex_boxes, tex_box_select, tex_character_select; |
494 |
494 |
|
|
495 |
495 |
fgl::Framebuffer framebuffer; |
fgl::Framebuffer framebuffer; |
496 |
496 |
|
|
|
... |
... |
bool paused = false; |
631 |
631 |
// Enabled if the player character is sleeping. |
// Enabled if the player character is sleeping. |
632 |
632 |
bool sleep_mode = false; |
bool sleep_mode = false; |
633 |
633 |
|
|
|
634 |
|
// Enable to display frames per second. |
|
635 |
|
bool show_fps = false; |
|
636 |
|
|
634 |
637 |
// The name of the target entity to be displayed on the screen. |
// The name of the target entity to be displayed on the screen. |
635 |
638 |
std::string target_name = ""; |
std::string target_name = ""; |
636 |
639 |
|
|
|
... |
... |
int main( int argc, char* argv[] ){ |
1445 |
1448 |
tex_circle_grey = loadImage( data_path + "/circle-grey.png", false, false ); |
tex_circle_grey = loadImage( data_path + "/circle-grey.png", false, false ); |
1446 |
1449 |
tex_circle_orange = loadImage( data_path + "/circle-orange.png", false, false ); |
tex_circle_orange = loadImage( data_path + "/circle-orange.png", false, false ); |
1447 |
1450 |
tex_cursor = loadImage( data_path + "/ui/cursor.bmp", false, false ); |
tex_cursor = loadImage( data_path + "/ui/cursor.bmp", false, false ); |
|
1451 |
|
tex_notification_box = loadImage( data_path + "/ui/notification_box.png", true, false ); |
1448 |
1452 |
tex_notification_net = loadImage( data_path + "/ui/notification_net.png", true, false ); |
tex_notification_net = loadImage( data_path + "/ui/notification_net.png", true, false ); |
1449 |
1453 |
tex_notification = loadImage( data_path + "/ui/notification.png", true, false ); |
tex_notification = loadImage( data_path + "/ui/notification.png", true, false ); |
1450 |
1454 |
tex_recipe_overlay = loadImage( data_path + "/ui/recipe_overlay.png", false, false ); |
tex_recipe_overlay = loadImage( data_path + "/ui/recipe_overlay.png", false, false ); |
|
... |
... |
void vnDraw( double sw, double sh ){ |
2166 |
2170 |
// HUD. |
// HUD. |
2167 |
2171 |
fgl::setFog( statColor ); |
fgl::setFog( statColor ); |
2168 |
2172 |
fgl::drawText( |
fgl::drawText( |
2169 |
|
//dungeon.ready ? stats + "\n" + std::to_string( showFrames ) : stats, |
|
2170 |
|
stats, |
|
|
2173 |
|
show_fps ? stats + "\n" + std::to_string( showFrames ) : stats, |
2171 |
2174 |
font_mono, |
font_mono, |
2172 |
2175 |
hudOffX, |
hudOffX, |
2173 |
2176 |
0.0, |
0.0, |
|
... |
... |
void Render(){ |
4784 |
4787 |
convo.getVariable( "CALLBACK " + str.substr( 6 ) ); |
convo.getVariable( "CALLBACK " + str.substr( 6 ) ); |
4785 |
4788 |
if( result ){ |
if( result ){ |
4786 |
4789 |
Notify( |
Notify( |
4787 |
|
&tex_notification, |
|
|
4790 |
|
&tex_notification_box, |
4788 |
4791 |
"Callback returned:", |
"Callback returned:", |
4789 |
4792 |
convo.stringifyNumber( result ) |
convo.stringifyNumber( result ) |
4790 |
4793 |
); |
); |
|
... |
... |
void Render(){ |
4820 |
4823 |
result = convo.stringifyNumber( convo.getVariable( key ) ); |
result = convo.stringifyNumber( convo.getVariable( key ) ); |
4821 |
4824 |
} |
} |
4822 |
4825 |
Notify( |
Notify( |
4823 |
|
&tex_notification, |
|
|
4826 |
|
&tex_notification_box, |
4824 |
4827 |
result, |
result, |
4825 |
4828 |
"" |
"" |
4826 |
4829 |
); |
); |
|
... |
... |
void Render(){ |
4831 |
4834 |
if( space_at == std::string::npos |
if( space_at == std::string::npos |
4832 |
4835 |
|| space_at + 1 == param.length() ){ |
|| space_at + 1 == param.length() ){ |
4833 |
4836 |
Notify( |
Notify( |
4834 |
|
&tex_notification, |
|
|
4837 |
|
&tex_notification_box, |
4835 |
4838 |
"Key value pair required", |
"Key value pair required", |
4836 |
4839 |
"" |
"" |
4837 |
4840 |
); |
); |
|
... |
... |
void Render(){ |
4851 |
4854 |
o.valueKey = val_str; |
o.valueKey = val_str; |
4852 |
4855 |
convo.operate( o ); |
convo.operate( o ); |
4853 |
4856 |
} |
} |
|
4857 |
|
}else if( str == "/fps" ){ |
|
4858 |
|
show_fps = !show_fps; |
4854 |
4859 |
}else if( str.length() >= 5 |
}else if( str.length() >= 5 |
4855 |
4860 |
&& str.substr( 0, 5 ) == "/help" ){ |
&& str.substr( 0, 5 ) == "/help" ){ |
4856 |
4861 |
Notify( |
Notify( |
4857 |
|
&tex_notification, |
|
|
4862 |
|
&tex_notification_box, |
4858 |
4863 |
"Available commands:", |
"Available commands:", |
4859 |
|
"/me /call /get /set /help" |
|
|
4864 |
|
"/me /call /get /set /fps /help" |
4860 |
4865 |
); |
); |
4861 |
4866 |
}else{ |
}else{ |
4862 |
|
Notify( &tex_notification, "Syntax error:", str ); |
|
|
4867 |
|
Notify( &tex_notification_box, "Syntax error:", str ); |
4863 |
4868 |
} |
} |
4864 |
4869 |
vnDataDownload( data_path ); |
vnDataDownload( data_path ); |
4865 |
4870 |
}else{ |
}else{ |