Commit Graph

1848 Commits

Author SHA1 Message Date
95c6af3ec7 in 'TextBuilder.buildWithExisting' function, allow the user to pass a floatWindowWidth and floatWindowHeight which may differ from windowWidth and windowHeight parameters. This enables us to draw text only in a specified area. 2025-09-01 00:52:27 +01:00
c95ae5eae3 add functionality to return from NORMAL_SEARCH_MODE back to NORMAL_MODE, saving new search string and new search list 2025-08-31 07:40:31 +01:00
a86befdea8 a bit of refactoring 2025-08-31 06:28:05 +01:00
542da2229c a little additional scaffolding for normal mode 2025-08-31 02:41:37 +01:00
3b6dff3081 begin scaffolding NormalSearchMode (normal mode, except we are searching) 2025-08-31 02:10:57 +01:00
1cf33c9dd7 add todo note that text-window.sml needs to be changed so that it acts as if the screen is 80 chars wide if the screen can fit more than 80 chars, the same way text-builder.sml was changed in previous commits 2025-08-31 01:47:11 +01:00
a9fda7d88b change text building function in text-builder.sml to use the 'startX' and 'startY' fields added to the environment type 2025-08-31 01:38:42 +01:00
648346e5ba fix regression caused by 'TextBuilder.advanceSearchPos' function. We were previously checking if the absIdx is in the search range and advancing based on whether that is true or false, but we should only advance if absIdx is after the search range 2025-08-31 01:33:20 +01:00
5ba82ea7e1 if we can fit at least 80 chars in a single line on the screen, centre all visible text on the screen 2025-08-31 01:15:29 +01:00
7ac676e621 add textLineWidth value to text-constants.sml, which we can use to calculate functionality of centering on screen 2025-08-31 01:00:31 +01:00
83e062eb60 fix visual bug resulting from 'TextBuilder.buildTextStringSearch' function. When we have a search string 'abc' and a file 'abcabc', there are two matches and it should also look like there are two matches, but it did not look like there were two matches prior to this commit. This commit fixes that by advancing the search position before adding to the text accumulator. 2025-08-31 00:05:48 +01:00
659a1d2585 change buildRange length from 777 to 1111 2025-08-30 23:36:14 +01:00
2b3f0405c6 reimplement search-range functionality to scan range from the string from left to right 2025-08-30 23:31:55 +01:00
de46376e4e reimplement search list functionality (when building whole search list, not from range) to start from index 0, to get rid of edge cases resulting from reading the string backwards 2025-08-30 23:05:11 +01:00
148b72835b move buffer to start before creating searchMsg 2025-08-30 18:21:47 +01:00
7497dc7e7a add code for clojure-style persistent vectors 2025-08-30 18:12:47 +01:00
0647589f13 handle edge case in searching: when we look for 'abba' in the text 'abbabba', it looks like we should have two matches, but to be consistent with other programs, we only have one match 2025-08-30 17:16:02 +01:00
113c3e67ab don't show falling frame when dropping 2025-08-30 01:00:37 +01:00
a6d84f093f add falling sprites 2025-08-30 00:55:58 +01:00
a1b88b9d3b add fall sprite for dvd (to be used after a jump) 2025-08-30 00:24:25 +01:00
cc2eb419ab use timing information introduced in MAIN_ATTACKING case so that a second attack is required to add a falling enemy to the player's list 2025-08-29 13:55:46 +01:00
1f726539da record pressedTime when player is performing mainAttack 2025-08-29 12:46:41 +01:00
a58953e90d refactor options to use Time.time to track when key is pressed, instead of using a Real.real value 2025-08-29 12:33:45 +01:00
91bf6854ea add enemy to falling list when they are defeated 2025-08-29 12:01:17 +01:00
a016832233 remove dead code 2025-08-29 10:42:46 +01:00
1d1fed35cf restore working collision detection code to player's attack 2025-08-29 10:14:28 +01:00
22d43dc0c1 figure out reason for the strange player/projectile alignment, and address it (when player is facing left, we want to subtract size of whole projectile so it looks like it starts at the leftmost side; however, when player is facing right, we want to add by the width of the player, so it looks like the projectile starts from the player's rightmost side) 2025-08-29 03:43:10 +01:00
e3972fab81 figure out a good hardcoded alignment value 2025-08-29 03:24:17 +01:00
5915c21145 done adjusting alignment of attack projectile 2025-08-29 02:17:56 +01:00
806ccca6ec improve alignment of attack projectiles further 2025-08-29 02:08:36 +01:00
23bf18acb6 improve vertical alignment of attack projectile 2025-08-29 01:42:36 +01:00
fc540fa8d2 add offset to projectile when player is attacking 2025-08-29 01:29:51 +01:00
aaaa79cdc0 bring over attack projectile frames 2025-08-29 01:00:08 +01:00
25293876ed begin portin attack 2025-08-29 00:16:58 +01:00
c942d01e35 a bit of formatting 2025-08-28 23:47:20 +01:00
f2bbe3b516 remove unused 'drawWidth/drawHeight' arguments 2025-08-28 23:40:11 +01:00
e4df30703b adjust constants a bit 2025-08-28 23:28:38 +01:00
6dee0b89c8 port over jumping sprites/frames 2025-08-28 23:24:56 +01:00
ee5ccf77a0 update/port over right-walking frames 2025-08-28 23:08:30 +01:00
f3cb7b7546 port over left-walking frames/sprites 2025-08-28 23:02:03 +01:00
a2b14b90e3 change standing sprite 2025-08-28 22:46:13 +01:00
9120460392 a tiny bit of refactoring, extracting a function to get frames when walking which encapsulates logic for calculating which walk frame to use 2025-08-28 16:03:49 +01:00
efe921df1f organise dvd attack files a bit, and also mirror them (creating horizontally-flipped versions) 2025-08-28 15:29:05 +01:00
0073509176 minor edits to dvd attack projectiles (making sure that only 2 pixels are in the centre of the mini dvd at most) 2025-08-28 15:09:49 +01:00
4b39da3ace add individual attack projectile frames 2025-08-28 15:04:21 +01:00
cd0d8cfdcb create some attack-projectile frames 2025-08-28 13:58:09 +01:00
e016afd1d2 add attack discs 2025-08-28 13:10:50 +01:00
f877806fb6 add alternate pattern for attack background (only in dsc files though) 2025-08-28 12:30:32 +01:00
2157536179 begin making attack files 2025-08-28 11:38:19 +01:00
ab1c86b3c8 add attack pose 2025-08-28 11:17:34 +01:00