List of commits:
Subject Hash Author Date (UTC)
Start work on animation system d2aafd6f46c719342054e3f256f972f4917f2231 mse 2021-09-05 02:41:28
Add string scripting with $ operator 20034a2b658ee8ad4f2082c44301c231b0323fc7 mse 2021-09-03 10:20:55
Enhance console /set command to support operators 61032844fcb833f04e2f6d1e123f8f0f89333107 mse 2021-09-02 11:06:00
Add scriptable bribing & remove hard-coded karma increment 41b4d79da6331b4b1ffd96f36ae1b032a869b482 mse 2021-08-31 17:51:29
Add floor operator (_) 819304b561d474e962afa7397ef68ffae83e8649 mse 2021-08-31 13:49:57
Switch inventories and stats to floating-point c6e4142e664648ca8f4aa913b48526093c985987 mse 2021-08-31 13:35:20
Switch scripting to floating-point & code comments eb067496f4edb4420c05a09dc034ad0a25ad1e56 mse 2021-08-31 11:06:01
Add top-level command: GOSUB 62e9520aec0471fe023ead290595f735a30eb806 mse 2021-08-26 09:31:27
Add persistent VN stats 2d1ffc35afd8ae0f477cbd5aac0559fc02571600 mse 2021-08-23 10:44:16
Bribes increase karma 643f0fc6da65316aa799bbe00cea2030e2c1ccd6 mse 2021-08-17 08:16:36
Add command: #RUMBLE <intensity> <milliseconds> 02964b2ecc57a48192522ef369e33c4912d2f0d2 mse 2021-08-16 07:17:40
Reset position in non-mouse menu selection c21eb6a9d238fa1909dbbbc49907ad09bfca52c8 mse 2021-08-16 03:30:49
Add haptic rumble for combat 65ff172308b0ba26b8930e8e83eb41bd36c6b008 mse 2021-08-15 06:11:25
Reduce joystick sensitivity 3804492a52d36c40cd51d42a971fe92f4fdd52ba mse 2021-08-14 22:37:19
Set audio buffer 1024 to reduce latency b1733b33b3342b32f08e1bafb5baf63ed7db419e mse 2021-07-11 02:56:22
Update readme, deps, bump to v0.5.0 2f96bc1fe9af48874750f2ba507eda5d704313b0 mse 2021-07-05 12:14:52
New license c9932a52aaa81e6b136510157bfc3ce3e10ab800 mse 2021-07-04 16:01:57
Fix joystick dead zone 303dc3276d27f2a123e5370b31b79cdf87afc879 mse 2021-06-26 07:09:28
Windows-compatible locale 65244a8360ad6a65fea64f43f115f5c93bf966dd mse 2021-06-11 17:13:26
Detect language using std::locale 60f1680d73e559dc85f6b85e9ca69cb9be717ae6 mse 2021-06-09 16:11:30
Commit d2aafd6f46c719342054e3f256f972f4917f2231 - Start work on animation system
Author: mse
Author date (UTC): 2021-09-05 02:41
Committer name: mse
Committer date (UTC): 2021-09-05 02:41
Parent(s): 20034a2b658ee8ad4f2082c44301c231b0323fc7
Signing key:
Tree: 77650fe9705c505eb9e0207ab4a23885a5b11f07
File Lines added Lines deleted
confec.cpp 46 0
File confec.cpp changed (mode: 100644) (index d3fc62a..4a393ea)
... ... std::vector<Image> foregrounds;
196 196
197 197 int bgIndex = -1, fgIndex = -1, choiceIndex = -1; int bgIndex = -1, fgIndex = -1, choiceIndex = -1;
198 198
199 // Get the index to the specified background image, or -1 if failure.
199 200 int findBackground( std::string imgName ){ int findBackground( std::string imgName ){
200 201 if( imgName.length() > 0 ){ if( imgName.length() > 0 ){
201 202 for( int i = 0; i < (int)backgrounds.size(); i++ ){ for( int i = 0; i < (int)backgrounds.size(); i++ ){
 
... ... int findBackground( std::string imgName ){
207 208 return -1; return -1;
208 209 } }
209 210
211 // Get the index to the specified foreground image, or -1 if failure.
210 212 int findForeground( std::string imgName ){ int findForeground( std::string imgName ){
211 213 if( imgName.length() > 0 ){ if( imgName.length() > 0 ){
212 214 for( int i = 0; i < (int)foregrounds.size(); i++ ){ for( int i = 0; i < (int)foregrounds.size(); i++ ){
 
... ... int findForeground( std::string imgName ){
218 220 return -1; return -1;
219 221 } }
220 222
223 // Remove all loaded backgrounds and foregrounds from video memory.
224 // These images are loaded from disk again the next time they are used.
225 void freeImages(){
226 for( auto &img : backgrounds ){
227 fgl::freeTexture( img.imgTexture );
228 }
229 backgrounds = {};
230 for( auto &img : foregrounds ){
231 fgl::freeTexture( img.imgTexture );
232 }
233 foregrounds = {};
234 }
235
221 236 // Global sound volume. // Global sound volume.
222 237 float global_volume = 1.0f; float global_volume = 1.0f;
223 238
 
... ... int main( int argc, char* argv[] ){
1170 1185 // Error. The item does not fit in the player's inventory. // Error. The item does not fit in the player's inventory.
1171 1186 return -2.0; return -2.0;
1172 1187 } }
1188 if( param.length() >= 16
1189 && param.substr( 0, 9 ) == "ANIMATION" ){
1190 // Layer.
1191 bool is_foreground;
1192 if( param.substr( 10, 2 ) == "fg" ){
1193 is_foreground = true;
1194 }else if( param.substr( 10, 2 ) == "bg" ){
1195 is_foreground = false;
1196 }else{
1197 return 0.0;
1198 }
1199 size_t space_at = param.find_first_of( 14, ' ' );
1200 if( space_at == std::string::npos
1201 || space_at == param.length() - 1 ){
1202 return 0.0;
1203 }
1204 // Frames per second.
1205 double f =
1206 world.safeStold( param.substr( 13, space_at - 13 ) );
1207 f = std::min( std::max( f, 0.1 ), 30.0 );
1208 // Directory containing frame sequence.
1209 std::string dir_name = param.substr( space_at + 1 );
1210 std::string dir_check =
1211 data_path + ( is_foreground ? "/fg/" : "/bg/" ) + dir_name;
1212 // TODO: Check directory for files, load files.
1213 // Half of conservative VRAM = 64 MB = 24 frames at 1280x533
1214 // https://stackoverflow.com/questions/8149569/scan-a-directory-to-find-files-in-c
1215 //freeImages();
1216 // Load stuff here.
1217 return 0.0;
1218 }
1173 1219 if( param.length() >= 9 if( param.length() >= 9
1174 1220 && param.substr( 0, 9 ) == "SEQUENCER" ){ && param.substr( 0, 9 ) == "SEQUENCER" ){
1175 1221 BeginSequencer( param.length() > 10 ? param.substr( 10 ) : "" ); BeginSequencer( param.length() > 10 ? param.substr( 10 ) : "" );
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