CLEO-Redux icon indicating copy to clipboard operation
CLEO-Redux copied to clipboard

add command GET_PLATFORM

Open XMDS opened this issue 2 years ago • 5 comments

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?

XMDS avatar May 28 '22 02:05 XMDS

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

XMDS avatar May 28 '22 02:05 XMDS

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.

x87 avatar May 30 '22 18:05 x87

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.

XMDS avatar Jun 01 '22 01:06 XMDS

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.

MatiDragon-YT avatar Jun 02 '22 15:06 MatiDragon-YT

It just makes the code simpler. AlexB's example script does exactly that.

XMDS avatar Jun 02 '22 16:06 XMDS

see this comment https://github.com/cleolibrary/CLEO-Redux/issues/67#issuecomment-1141415705

x87 avatar Dec 17 '22 23:12 x87