This is a (deceptively) simple and seemingly necessary feature I thought of the other day. An include command, to insert some code into a robot, for code that is shared across many robots.
It works like LOAD_ROBOT except it doesn't erase the code before and after the command is called.
Syntax:
set "setupSprite.txt" "INCLUDE_ROBOT"
set "messageBoxCode.dat" "INCLUDE_BC"
Judging by how other commands seem to be implemented, this is probably somewhere between easy to medium difficulty to implement, depending on how robots are stored. Modify the SAVE_ROBOT function to save two chunks (before and after the import), and the LOAD_ROBOT one to load the new one in place, and glue them together. Sure is easy for me to say, though. But hey, it seems quite feasible and extremely useful, so there it is.
Report ID | 406 | Title | INCLUDE or IMPORT ROBOT |
Product | MegaZeux Feature Requests | Status | Flagged For Future Version (Severity 1 - Low) |
Version | - | Fixed in | - |
Page 1 of 1
Report ID #406: INCLUDE or IMPORT ROBOT
Page 1 of 1
Replies (1 - 5)
#2
Lachesis
Posted 29 December 2011 - 03:47 AM
Seconded. I think this would be very useful.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#4
Lachesis
Posted 29 December 2011 - 06:59 PM
More specifically, the reason I think this would be useful is partly because Codex of Zephyr is built on doing this. Segments of runtime code are pieced together by base level code that runs between them, leaving all sorts of room for nasty errors (not to mention making the robotic code considerably more complicated). For instance, my code would accidentally try to fread nonexistant files into the temporary constructed program and cause MZX to enter busy loop territory. An MZX-based implementation of this would be a whole lot safer and much more understandable from a user's point of view.
I assume this would be implemented similar to LOAD_ROBOT, but instead of replacing the program, it'd append the new program to the end and remember the robot's current line -- otherwise I can picture it being functionally the same.
I assume this would be implemented similar to LOAD_ROBOT, but instead of replacing the program, it'd append the new program to the end and remember the robot's current line -- otherwise I can picture it being functionally the same.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
#6
Lachesis
Posted 22 May 2012 - 01:24 AM
Updating status to: Flagged For Future Version
Updating severity to: 1 - Low
I believe this won't be necessary once programs and robots get separated (ETA after debytecode becomes mainstream) as there will be provisions for changing a robot's program (like LOAD_ROBOT) and potentially a global subroutine library program that all programs can access (eliminating the need for this).
Updating severity to: 1 - Low
I believe this won't be necessary once programs and robots get separated (ETA after debytecode becomes mainstream) as there will be provisions for changing a robot's program (like LOAD_ROBOT) and potentially a global subroutine library program that all programs can access (eliminating the need for this).
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
0 User(s) are reading this issue
0 Guests and 0 Anonymous Users
Powered by IP.Tracker 1.3.2 © 2025 IPS, Inc.