Commit Graph

36 Commits

Author SHA1 Message Date
8cc2adcbf0 formatting 2025-07-30 07:28:37 +01:00
0445595990 when generating collision string, map 'squares' vector to a new vector which treats all visible (non-transparent) colours the same. This allows us to ignore colour differences when generating the collision string, which is good because the colour of a pixel doesn't make a difference to collision detection. 2025-07-30 07:27:55 +01:00
eedaf0450f fix bugs with generating export strings from quad tree (have to add 1 to ex and ey indiscriminately, except if we are not in the canvas width/height dimensions) 2025-07-29 15:55:38 +01:00
7e96203f92 done adding export-collision functionality, including collision message, in functional core. Next: add imperative shell scaffolding 2025-07-13 15:33:32 +01:00
de16e816b4 add scale parameter for collisions, so that we can easily use collisions when object is larger than normal/native 2025-07-13 15:14:19 +01:00
d98b815516 done generating collision string 2025-07-13 15:02:13 +01:00
7cfbd3cdb3 begin creating a string for collision data 2025-07-13 14:35:50 +01:00
7ec1e34bb8 add 'rgb' colour values when creating export string 2025-07-13 14:05:41 +01:00
69494c368e done fixing errors in output from CollosionTrin.toExportString (I forgot to increment 'ey' if 'y' = 'ey') 2025-07-13 14:03:52 +01:00
a60d13c5ef improvements to generated export string (matches more closely to expected result) 2025-07-13 04:03:44 +01:00
0e141174b2 progress fixing bugs in generated export string 2025-07-13 01:40:57 +01:00
31bc8485f3 add function in imperative shell to save export string, and fix errors in generating export string from functional core 2025-07-12 19:34:52 +01:00
dbb1676fbe done coding functionality to create a string suitable for exporting 2025-07-12 19:16:36 +01:00
a97f838a64 finished coding export string, I think/hope 2025-07-12 19:08:36 +01:00
9a748c8e0d done converting coordinates to triangles for exporting (but I still need header and footer for that) 2025-07-12 19:00:24 +01:00
1fb6b43ac3 progress coding function to create an export string 2025-07-12 18:52:30 +01:00
dcf6bc074d fix lexer/parser bugs, add code in file-thread.sml to handle loading/saving of files (but loading is not completely finished yet) 2025-07-12 07:03:09 +01:00
eb0b8d31b2 save grid to custom format 2025-07-12 06:03:59 +01:00
04bb7a18c0 add function to quad tree to turn items into strings (for later saving to file) 2025-07-12 03:38:20 +01:00
7028391298 add functionality to draw in different colours 2025-07-11 16:39:39 +01:00
3fe3aa1d4d finished coding merging functionality 2025-07-08 16:59:21 +01:00
1ae67bb616 address remaining vertical duplicate issue (I was returning 1 from getTopmostY's loop, when I was meant to be returning 0) 2025-07-08 08:00:37 +01:00
0b954f81a1 progress with merging vertically 2025-07-08 07:52:26 +01:00
ee3764b253 code additional merging functions, which merge vertically and horizontally as much as possible 2025-07-08 03:18:57 +01:00
12cfe7a04e rewrite merge functions which query grid instead of quad tree (only partially) 2025-07-08 03:07:24 +01:00
aca7acc232 done writing merge function 2025-07-08 00:42:46 +01:00
9bf5e2e68b write all preparatory merging functions; only need to write top level merge function now. 2025-07-08 00:25:52 +01:00
0464dd1ce3 implement functions to get leftmost and rightmost x coordinates with mergeable items 2025-07-07 23:52:24 +01:00
fb2bc76c10 code search function to query quad tree 2025-07-07 23:08:47 +01:00
ab9e1e23d0 make odd-number-division case more explicit when building quad tree 2025-07-07 22:37:01 +01:00
6b5c0d9ba1 preparation for functorising quad tree 2025-07-07 02:36:29 +01:00
bd97aeceac clean up quad tree code, deleting unused functions and removing intermediate some data structures 2025-07-07 02:18:15 +01:00
9b2f3e90cb amend bug relating to being unable to select on quad tree, related to dividing odd numbers by 2 (because performing integer division on an odd number by 2 results in rounding, which we don't want) 2025-07-07 01:48:15 +01:00
dc2a52bcc8 improve graph lines 2025-07-06 17:50:46 +01:00
bba293d406 fix bug in not properly updating squares vector 2025-07-06 15:52:10 +01:00
2e0549097e begin merging files which were previously in temp-squares directory into main 2025-07-06 14:56:54 +01:00