List of commits:
Subject Hash Author Date (UTC)
Fix menu bugs and bump to v0.7.11 ae193263f4b8461c299f6db66f130beae94724cc mse 2022-07-07 04:52:30
Bump version to 0.7.10 5f70f1aba48d3df67d5e4a70d9595e92aeac4afb mse 2022-05-11 10:54:09
ADV-style text advance 5fbb734d07a2dcf0162245b5afc6b5b4b9021b6f mse 2022-04-12 12:25:24
Switch interaction to mouse-up 345ce8d1ea9755f51365a2676cce0415f9cf68c2 mse 2022-04-10 21:07:15
Use gradient for text backdrop 6ad98cdaf4df37e8b24d9c1e8e2f9b0e904da9aa mse 2022-04-10 13:04:29
Improve vn button highlight 51b2c6c07b0cfb0efdb8cdf5cbeba49ef54d9ccb mse 2022-04-09 06:54:39
Darken the screen when drawing a menu with non-VN text 8f3bcee6d57817ea8c1dd999c68cb129dea1550c mse 2022-04-08 16:01:52
Upgrade the UI 45561487af001c5a790343690a792faeb14945d4 mse 2022-04-06 23:45:31
Progress on getting Emscripten builds working again (almost) e4276b7823027c7ac3a3afe30c3c30241f1c6642 mse 2022-04-01 11:16:56
Bump to version 0.7.9 1c93b011603bd953df0628fa39c586c11eeb7138 mse 2022-03-30 08:31:00
Some progress on Android support dd2d0eb6d4ee42149b605526ce304e67243d90b4 mse 2022-03-20 00:28:35
Android support (work in progress) a8f26dd2d83d66fb8e3b634991084fbdc9faa640 mse 2022-03-19 20:08:09
Add IFGOSUB db52bc04bac0af4d668696580b1312920a47d9e5 mse 2022-03-19 17:11:36
Remove Poco from the makefile e6274074304b40f0eaae0e591acadc604388fbaa mse 2022-03-19 17:00:54
Disable texture wrapping in VN 75ed1c845f4643fa4e012f22f5a2bbeacca9d51e mse 2022-03-18 21:39:00
Menu improvements 2ee4efdb3fedb69cbf56711841fc961bd1b4877c mse 2022-03-17 19:32:45
Menu navigation fixes 362878a56a72a43f671d4c6022e53ce124a0cf99 mse 2022-03-17 18:47:50
Rewrite VN engine 4c88d574d4f72794ab17fb5ecdc57fbd2a93cb7e mse 2022-03-16 07:19:06
Add commandKey() function 066858b9a80610248bed69ac7095129a9f142a78 mse 2022-03-14 00:05:46
Fix a multiple selection bug on the trading screen 0c64d03fed96234183bf7bb69819f48472c1aafd mse 2022-03-10 07:14:13
Commit ae193263f4b8461c299f6db66f130beae94724cc - Fix menu bugs and bump to v0.7.11
Author: mse
Author date (UTC): 2022-07-07 04:52
Committer name: mse
Committer date (UTC): 2022-07-07 04:52
Parent(s): 5f70f1aba48d3df67d5e4a70d9595e92aeac4afb
Signing key:
Tree: 6d409ac278dd94f1e72bd376612150d4646199c6
File Lines added Lines deleted
confec.cpp 23 8
include/vn.h 6 5
File confec.cpp changed (mode: 100644) (index bb8cd86..87c44a7)
... ... struct SpecialItem {
378 378 int32_t special_item_result = 0; int32_t special_item_result = 0;
379 379
380 380 // App variable definitions. // App variable definitions.
381 std::string app_version = "v0.7.10";
381 std::string app_version = "v0.7.11";
382 382 #ifdef __DEMO__ #ifdef __DEMO__
383 383 app_version += " demo"; app_version += " demo";
384 384 std::string app_name = "Confectioner Engine Demo"; std::string app_name = "Confectioner Engine Demo";
 
... ... float dead_zone = 0.1f, speed_zone = 0.9f;
486 486 float stickX = 0.0f, stickY = 0.0f, moveX = 0.0f, moveY = 0.0f; float stickX = 0.0f, stickY = 0.0f, moveX = 0.0f, moveY = 0.0f;
487 487 int moveXInt = 0, moveYInt = 0, moveXDown = 0, moveYDown = 0; int moveXInt = 0, moveYInt = 0, moveXDown = 0, moveYDown = 0;
488 488 bool bool
489 actionButton = false, actionButtonDown = false,
490 interactButton = false, interactButtonDown = false,
489 actionButton = false, actionButtonDown = false, actionButtonUp = false,
490 interactButton = false, interactButtonDown = false, interactButtonUp = false,
491 491 recipesButton = false, recipesButtonDown = false, recipesButton = false, recipesButtonDown = false,
492 492 meleeButton = false, meleeButtonDown = false, meleeButton = false, meleeButtonDown = false,
493 493 entityButton = false, entityButtonDown = false, entityButton = false, entityButtonDown = false,
 
... ... void Render(){
4377 4377 static bool actionButtonLast; static bool actionButtonLast;
4378 4378 actionButton = fgl::enterKey() || fgl::aButton(); actionButton = fgl::enterKey() || fgl::aButton();
4379 4379 actionButtonDown = actionButton && !actionButtonLast; actionButtonDown = actionButton && !actionButtonLast;
4380 actionButtonUp = !actionButton && actionButtonLast;
4380 4381 actionButtonLast = actionButton; actionButtonLast = actionButton;
4381 4382
4382 4383 // In-game and menu interaction. // In-game and menu interaction.
4383 4384 static bool interactButtonLast; static bool interactButtonLast;
4384 4385 interactButton = GetButtonState( k_interact ) || ( actionButton && (inputTarget || !show_cursor) ); interactButton = GetButtonState( k_interact ) || ( actionButton && (inputTarget || !show_cursor) );
4385 4386 interactButtonDown = interactButton && !interactButtonLast; interactButtonDown = interactButton && !interactButtonLast;
4387 interactButtonUp = !interactButton && interactButtonLast;
4386 4388 interactButtonLast = interactButton; interactButtonLast = interactButton;
4387 4389
4388 4390 static bool recipesButtonLast; static bool recipesButtonLast;
 
... ... void DrawCharacterSelect(){
5134 5136 } }
5135 5137 offset_x += increment_x; offset_x += increment_x;
5136 5138 if( ( hover && mouseUpLeft ) if( ( hover && mouseUpLeft )
5137 || ( (size_t)choiceIndex == i && (actionButtonDown || interactButtonDown) ) ){
5139 || ( (size_t)choiceIndex == i && (actionButtonUp || interactButtonUp) ) ){
5138 5140 // Do not propagate the click or button press. // Do not propagate the click or button press.
5139 5141 mouseUpLeft = false; mouseUpLeft = false;
5140 5142 actionButtonDown = false; actionButtonDown = false;
5143 actionButtonUp = false;
5141 5144 interactButtonDown = false; interactButtonDown = false;
5145 interactButtonUp = false;
5142 5146 character_select_display = false; character_select_display = false;
5143 5147 character_selected = item_ptr->entity.itemName; character_selected = item_ptr->entity.itemName;
5144 5148 // Clear every drawing buffer, even with triple buffering. // Clear every drawing buffer, even with triple buffering.
 
... ... void GameLoop( double d ){
5827 5831 auto &ent = world.entities[world.facingEntity]; auto &ent = world.entities[world.facingEntity];
5828 5832 if( ent.task != fworld::TASK_SLEEP || ent.type != "regrow" ) if( ent.task != fworld::TASK_SLEEP || ent.type != "regrow" )
5829 5833 target_name = ent.name; target_name = ent.name;
5830 if( interactButtonDown ){
5834 if( interactButtonUp ){
5831 5835 // Do not propagate the button press. // Do not propagate the button press.
5832 interactButtonDown = false;
5833 5836 actionButtonDown = false; actionButtonDown = false;
5837 actionButtonUp = false;
5838 interactButtonDown = false;
5839 interactButtonUp = false;
5840 // Do not propagate the click either, as left-clicking
5841 // is triggered by controller mouse emulation.
5842 mouseUpLeft = false;
5834 5843 // Trigger an interaction. // Trigger an interaction.
5835 5844 WorldInteract( world.facingEntity ); WorldInteract( world.facingEntity );
5836 5845 } }
 
... ... void GameLoop( double d ){
5858 5867 // If there is interaction, do not propagate the click. // If there is interaction, do not propagate the click.
5859 5868 mouseUpLeft = mouseUpLeft =
5860 5869 !WorldInteract( world.cursorOverEntity ); !WorldInteract( world.cursorOverEntity );
5870 // Mouse-up cancellation trickles down to possible constituent button-up states.
5871 if( actionButtonUp ) actionButtonUp = mouseUpLeft;
5872 if( interactButtonUp ) interactButtonUp = mouseUpLeft;
5861 5873 } }
5862 5874 } }
5863 5875
 
... ... void GameLoop( double d ){
6072 6084 convo, convo,
6073 6085 choiceIndex, choiceIndex,
6074 6086 moveXDown + moveYDown, moveXDown + moveYDown,
6075 mouseLeft || mouseUpLeft,
6076 mouseUpLeft || actionButtonDown || interactButtonDown,
6087 show_cursor,
6088 mouseLeft || actionButton || interactButton,
6089 mouseUpLeft || actionButtonUp || interactButtonUp,
6077 6090 pauseButtonDown ) ){ pauseButtonDown ) ){
6078 6091 // Do not propagate the click or button press. // Do not propagate the click or button press.
6079 6092 mouseUpLeft = false; mouseUpLeft = false;
6080 6093 actionButtonDown = false; actionButtonDown = false;
6094 actionButtonUp = false;
6081 6095 interactButtonDown = false; interactButtonDown = false;
6096 interactButtonUp = false;
6082 6097 } }
6083 6098
6084 6099 // HUD. // HUD.
File include/vn.h changed (mode: 100644) (index e1a9c8c..08ceef6)
... ... bool vnDraw(
124 124 int &choiceIndex, int &choiceIndex,
125 125 int choiceMove, int choiceMove,
126 126 bool useMouse, bool useMouse,
127 bool pressing,
127 128 bool activate, bool activate,
128 129 bool &pauseButtonDown ){ bool &pauseButtonDown ){
129 130 double sw = fgl::getDisplayWidth(), sh = fgl::getDisplayHeight(); double sw = fgl::getDisplayWidth(), sh = fgl::getDisplayHeight();
 
... ... bool vnDraw(
253 254
254 255 if( convo.screen.lines.empty() ){ if( convo.screen.lines.empty() ){
255 256 // Handle button-free screen advance. // Handle button-free screen advance.
256 choiceIndex = 0;
257 if( convo.screen.ids.size() > 0 ) choiceIndex = 0;
257 258 }else if( convo.screen.lines[0].length() > 4 }else if( convo.screen.lines[0].length() > 4
258 259 && convo.screen.lines[0].substr( 0, 4 ) == "img-" ){ && convo.screen.lines[0].substr( 0, 4 ) == "img-" ){
259 260 // Draw image buttons. // Draw image buttons.
 
... ... bool vnDraw(
272 273 for( size_t i = 0; i < img_buttons.size(); i++ ){ for( size_t i = 0; i < img_buttons.size(); i++ ){
273 274 auto w = img_buttons[i]->width, h = img_buttons[i]->height; auto w = img_buttons[i]->width, h = img_buttons[i]->height;
274 275 bool hover = bool hover =
275 //useMouse &&
276 useMouse &&
276 277 fgl::mouseY >= ypos && fgl::mouseY >= ypos &&
277 278 fgl::mouseY < ypos + ( h + 2.0 ) * vnScale && fgl::mouseY < ypos + ( h + 2.0 ) * vnScale &&
278 279 fgl::mouseX >= xpos && fgl::mouseX >= xpos &&
 
... ... bool vnDraw(
282 283 } }
283 284 if( i == (size_t)choiceIndex ){ if( i == (size_t)choiceIndex ){
284 285 // Draw an outline. // Draw an outline.
285 if( useMouse )
286 if( pressing )
286 287 fgl::setFog( { 0.0f, 0.9f, 1.0f, 999.0f } ); fgl::setFog( { 0.0f, 0.9f, 1.0f, 999.0f } );
287 288 else else
288 289 fgl::setFog( { 1.0f, 1.0f, 1.0f, 999.0f } ); fgl::setFog( { 1.0f, 1.0f, 1.0f, 999.0f } );
 
... ... bool vnDraw(
329 330 for( size_t i = 0; i < convo.screen.ids.size(); i++ ){ for( size_t i = 0; i < convo.screen.ids.size(); i++ ){
330 331 float ypos = ( vn_height * 0.7409 + buttonHeight * (float)i ) * vnScale; float ypos = ( vn_height * 0.7409 + buttonHeight * (float)i ) * vnScale;
331 332 bool hover = bool hover =
332 //useMouse &&
333 useMouse &&
333 334 fgl::mouseY >= ypos && fgl::mouseY >= ypos &&
334 335 fgl::mouseY < ( vn_height * 0.7409 + buttonHeight * (float)( i + 1 ) ) * vnScale && fgl::mouseY < ( vn_height * 0.7409 + buttonHeight * (float)( i + 1 ) ) * vnScale &&
335 336 fgl::mouseX >= vnOffX && fgl::mouseX >= vnOffX &&
 
... ... bool vnDraw(
340 341 // Draw button. // Draw button.
341 342 glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
342 343 vnDrawImage( vnDrawImage(
343 i == (size_t)choiceIndex ? (useMouse ? vn_tex_button_p : vn_tex_button_s) : vn_tex_button_n,
344 i == (size_t)choiceIndex ? (pressing ? vn_tex_button_p : vn_tex_button_s) : vn_tex_button_n,
344 345 vnOffX, vnOffX,
345 346 ypos, ypos,
346 347 0.0, 0.0,
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using git:
git clone git://git.rocketgit.com/user/mse/ConfectionerEngine

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main