![]() |
Forum Index : Microcontroller and PC projects : SplitScreen library for CMM2
Author | Message | ||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hello, I have just written small SplitScreen library for CMM2. It can be used for splitting the screen into different areas, where can be then either printed text into or shown image, drawn anything. I have made it mainly for me, but maybe somebody can use it also... It's very simple, but can: * count of areas is limited just by free memory (for every area is just needed control string with 22 bytes) * in control string is remembered cursor position, so you can switch the areas freely * support for scrolling, different fonts, colors * TAB/CHR$(8) and LF/CHR$(10) is supported in outputted text * just 5 SUBs/FUNCTIONs, so it leaves many slots for main program free * example program is included What can't: * not taken care of overlapping areas * text in areas not stored, just cursor position Enjoy! ![]() ![]() ![]() ![]() Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
Fantastic - I was just planning the same sort of thing for an adventure converted from a 'choose your own adventure' book. Nice work. Geoff |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5090 |
Wauw Jiri, That is marvelous. Especially your second screenshot. Looking at this fond memories of the early adventure games (test supported with graphics). This is from a Speccie I guess. Now it is time to port the old games to CMM2... PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
This is a lovely piece of work, Jiri :) I agree, Volhout, it looks like it should be an early graphic adventure game. That pic isn't from The Hobbit is it? If not then it should be. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Thanks Geoff, Volhout and Mick! I'm preparing some improvements, this library is really planned for some text adventures, but can be also used for many more things (play with turtle commands for example ![]() The biggest picture is converted from C64, name is midear, but I don't know where is coming from - I used it to test my graphics conversion routines... Gorilla is from Atari ST and astronaut from ZX Spectrum. Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
https://csdb.dk/release/?id=93530 Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Thanks Tom! Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi, version v0.05: * corrected really, really, really stupid bug (TAB=CHR$(9) and not CHR$(8) ![]() * fixed buggy calculation for scrolling * added input function FUNCTION input.SPLIT(cs$, allowedChars$, maxLen%) AS STRING * updated demo program, so you can see input.SPLIT in action'allows to input string in any split area, use any charaters from allowedChar$ (or any, if this string is empty) 'you can delete last character with BACKSPACE, finish the input with ENTER or RETURN (this will be not part of the returned string) 'with maxLen% you can limit length of the input, if it's <=0 or >255 then the limit will be 255 characters Limitation of input function is, when already part of the input string is scrolled away and you are in left upper corner of area where input happens, you can't delete any more characters with backspace... Enjoy! Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |