List of commits:
Subject Hash Author Date (UTC)
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
Right joystick moves mouse f59369b8be29e9910ef3e5e807495b46a6403c19 mse 2022-03-06 09:50:35
Add CLEARSCREEN command 57f55faa0fec4c558e8c9a7942cb0f47ddca07d7 mse 2022-03-01 09:35:11
Commit 5fbb734d07a2dcf0162245b5afc6b5b4b9021b6f - ADV-style text advance
Author: mse
Author date (UTC): 2022-04-12 12:25
Committer name: mse
Committer date (UTC): 2022-04-12 12:25
Parent(s): 345ce8d1ea9755f51365a2676cce0415f9cf68c2
Signer:
Signing key:
Signing status: N
Tree: 635829e51ac1c01ce9a3d4d0e006e7962b38ed95
File Lines added Lines deleted
include/vn.h 13 10
File include/vn.h changed (mode: 100644) (index e33d12b..e1a9c8c)
... ... bool vnDraw(
202 202 float tlines = float tlines =
203 203 ( tw > std::min( vn_width, sw / vnScale ) || hasNewline ) ( tw > std::min( vn_width, sw / vnScale ) || hasNewline )
204 204 ? 2.0f : ( convo.screen.caption.length() > 0 ? 1.0f : 0.0f ); ? 2.0f : ( convo.screen.caption.length() > 0 ? 1.0f : 0.0f );
205 double f = convo.screen.lines.empty() ? 0.95 : 0.7409;
205 206 float ypos = float ypos =
206 ( vn_height * 0.7409 - font.size * 1.2 * tlines - font.size * 0.17 ) * vnScale;
207 ( vn_height * f - font.size * 1.2 * tlines - font.size * 0.17 ) * vnScale;
207 208
208 209 // Hide the shade if noshade is non-zero. // Hide the shade if noshade is non-zero.
209 210 auto noshade_it = convo.numbers.find( "noshade" ); auto noshade_it = convo.numbers.find( "noshade" );
210 211 bool noshade = noshade_it != convo.numbers.end() && noshade_it->second; bool noshade = noshade_it != convo.numbers.end() && noshade_it->second;
211 if( convo.screen.ids.size() > 0 && !darken && !noshade ){
212 // There are buttons and something to draw a gradient over.
213 double y = ypos + ( tlines > 0.0f ? tlines : 8.0f ) * vnScale;
212 if( ( convo.screen.lines.size() > 0 || convo.screen.caption.length() > 0 )
213 && !darken && !noshade ){
214 // Draw a shade gradient.
214 215 vnDrawImage( vnDrawImage(
215 216 vn_tex_gradient, vn_tex_gradient,
216 217 vnOffX, vnOffX,
217 y,
218 ypos + ( tlines > 0.0f ? tlines : 8.0f ) * vnScale,
218 219 0.0f, 0.0f,
219 220 vn_width * vnScale / vn_tex_gradient.width, vn_width * vnScale / vn_tex_gradient.width,
220 221 ( sh - (vn_height * 0.7409 - font.size * 2.57) * vnScale ) / vn_tex_gradient.height ( sh - (vn_height * 0.7409 - font.size * 2.57) * vnScale ) / vn_tex_gradient.height
 
... ... bool vnDraw(
250 251 } }
251 252 } }
252 253
253 float buttonHeight = font.size * 1.333f;
254
255 // Draw buttons.
256 if( convo.screen.lines.size() > 0
257 && convo.screen.lines[0].length() > 4
254 if( convo.screen.lines.empty() ){
255 // Handle button-free screen advance.
256 choiceIndex = 0;
257 }else if( convo.screen.lines[0].length() > 4
258 258 && convo.screen.lines[0].substr( 0, 4 ) == "img-" ){ && convo.screen.lines[0].substr( 0, 4 ) == "img-" ){
259 // Draw image buttons.
259 260 double total_width = 0.0; double total_width = 0.0;
260 261 std::vector<fgl::Texture*> img_buttons; std::vector<fgl::Texture*> img_buttons;
261 262 for( auto &str : convo.screen.lines ){ for( auto &str : convo.screen.lines ){
 
... ... bool vnDraw(
315 316 fgl::setPipeline( fgl::colorModPipeline ); fgl::setPipeline( fgl::colorModPipeline );
316 317 fgl::setFog( { 1.0f, 1.0f, 1.0f, 1.0f } ); fgl::setFog( { 1.0f, 1.0f, 1.0f, 1.0f } );
317 318 }else{ }else{
319 // Draw text buttons.
318 320 std::string cont; std::string cont;
319 321 if( language == "el" ){ if( language == "el" ){
320 322 cont = u8"Συνέχισε →"; cont = u8"Συνέχισε →";
 
... ... bool vnDraw(
323 325 }else{ }else{
324 326 cont = u8"Continue →"; cont = u8"Continue →";
325 327 } }
328 float buttonHeight = font.size * 1.333f;
326 329 for( size_t i = 0; i < convo.screen.ids.size(); i++ ){ for( size_t i = 0; i < convo.screen.ids.size(); i++ ){
327 330 float ypos = ( vn_height * 0.7409 + buttonHeight * (float)i ) * vnScale; float ypos = ( vn_height * 0.7409 + buttonHeight * (float)i ) * vnScale;
328 331 bool hover = bool hover =
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