CLEO-Redux
CLEO-Redux copied to clipboard
add command GET_PLATFORM
They were originally derived from new commands made by AlexB for the Android cleo library. As far as I know, the ioscleo library will add them in the next version, they help to detect script cross-platform compatibility. At first I thought I would update the CLEO library to add them. I'm updating too little, I wish CLEO Redux added them? Maybe? Also is it possible for cleo redux to be cross platform?
I posted in the wrong place last night. . . .
Command uses default ID 0DD5
For Pc we use 0
enum Platform
None = 0 (PC = 0)
Android = 1
PSP = 2
IOS = 3
end
for ios @squ1dd13
CLEO Redux only runs on PC. There are no plans on adding support for other platforms. Thus I don't see any value in the proposed command.
CLEO Redux only runs on PC. There are no plans on adding support for other platforms. Thus I don't see any value in the proposed command.
I originally wanted to add it to CLEO2.0 or CLEO4. But I have no other updates. It would be nice if cleo redux could add them. Because, for PC, it always returns 0. It has no effect on its own for a specific platform. Only when the cleo script is cross-platform. Also, I see @MatiDragon-YT doing cross platform scripting.
The GET_PLATFORM command I do not consider that it is extremely important to add it, since a simple alternative can be made, creating a constant enumeration and a variable in this way:
const
eFor_PC = 0
eFor_Android = 1
end
int $Compiler = eFor_PC
if $Compiler == eFor_PC
then [...]
else [...] // for Android
end
As I did in DYOS, here for example https://github.com/MatiDragon-YT/DYOS/blob/main/src/ControlesDelMenu.txt But just because this can be done, does not make including this command silly. In fact, it takes us now the step of having to write all this and also of always having to edit the {$CLEO} directive in SB.
It just makes the code simpler. AlexB's example script does exactly that.
see this comment https://github.com/cleolibrary/CLEO-Redux/issues/67#issuecomment-1141415705