The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

[TI-84+CE] ICE Compiler

Started by PT_, March 25, 2016, 08:14:17 am

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

DJ Omnimaga

As I suggested on IRC, maybe transparency for foreground color should be independent from the background and vice-versa?

PT_

Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am1) A scaled sprite command that supports transparency at the same time

I already added this function, but I didn't change one bit in the data, so it looks like I didn't add it :trollface:
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am2) The ability to use variables for the sprite index rather than just constants. This would be very handy for magic animations.

Sprites are compiled during compile-time, and also the starting pointer. When I have variables as the sprite index, I also need to include in the program the starting pointers of the sprites. Seems a bit weird, but I could implement it.
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am3) Direct input with the getKey(KEYNUMBER) syntax where it's true or false. This would allow multiple keypresses and also be much more responsive than the standard TI-OS getkey routine.

Yep, nice one. I will try to add that in the next release.
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am4) External variable storage (for highscores).

Also a nice feature in the next release.
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am1) Filled rectangles larger than 255 pixels width are not supported. They will not display at all. Could you increase the limit to 320 pixels?

This seems to work fine for me...

Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am2) The det(21,COLOR)   SetTextFGColor command doesn't support color 255 (white). So using white text under the default xLIBC palette is impossible.

I guess this conflicts with the transparent color, that you don't see it ;) I've added in the commands list that the default color for transparency is 255.
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am3) Either the SetDraw or SwapDraw commands (det(9 and 10) causes a RAM clear.

SwapDraw works fine, but indeed, SetDraw causes a RAM clear, due to a very dumb bug. When ICE scans for all the C functions, starting with det(, it says the first number after det( can be 0-7, so det(8 and det(9 are not allowed :P. This causes ICE to return to the main program, and thus ignoring all the C functions after det(8 or det(9
Quote from: DJ Omnimaga on November 15, 2016, 05:49:24 am4) ICE Compiler freezes after compiling if you try to exit while USB is connected.

Ah, I need to test this carefully, but I don't know why this would happen, as it seems ICE doesn't conflict with USB related stuff.
Quote from: MateoConLechuga on November 15, 2016, 06:45:10 am
Before you do anything else; pointers. For both absolute and variable pointers; please.

Yep, we talked way too much about it, and this is also a feature for the new release ;)
Quote from: DJ Omnimaga on November 15, 2016, 06:55:35 am
Also, I just noticed that for transparent sprites, the ICE documentation lacks any info on how to specify which color you want to be transparent. How do I figure that out?

Ah, according to the C file, the default transparent color for sprites is 0, and it seems Mateo added a function in v3 that can change that. I added that to the commands list.
Quote from: DJ Omnimaga on November 15, 2016, 07:41:42 am
Does it mean that ICE supports several extra arguments that are not documented in the official ICE documentation? I see a transparent text command, except that it is very vague. It seems to me like something that needs to be set to true or false, the way the doc is written.

No. As far as I know I've documented all the included staff. And sorry that the doc is not very clear sometimes; you know, English... :P  :-[
Quote from: DJ Omnimaga on November 15, 2016, 07:41:42 amI guess it's not a big hurry, though, since ICE is still in its infancy and it's an amazing software already. :)

Thanks :)
Quote from: DJ Omnimaga on November 15, 2016, 07:53:28 am
As I suggested on IRC, maybe transparency for foreground color should be independent from the background and vice-versa?

That is something for Mateo, not something for ICE, so you should maybe post this in the C SDK thread ;)

* PT_ hates quotes

DJ Omnimaga

About Suggestion 2, maybe it could be a different set of sprites commands? Also one other time where sprites with a variable INDEX might be necessary is tilemapping, because without them, you basically need to use spaghetti code like this:

If MapTileID=1
Sprite(1,X,Y)
If MapTileID=2
Sprite(1,X,Y)
If MapTileID=3
Sprite(3,X,Y)
If MapTileID=4
Sprite(4,X,Y)
If MapTileID=5
Sprite(5,X,Y)

Which I assume could increase the code size considerably or slow the game down, compared to just Sprite(MapeTileID,X,Y) (this is pseudo code, btw)


As for rectangles, I tried in WabbitEmu and they stop showing up once their width is 255 pixels or greater. I don't remember if this happens with Clipped rectangles or non-clipped ones, though.

PT_

Quote from: DJ Omnimaga on November 15, 2016, 10:54:23 pm
As for rectangles, I tried in WabbitEmu and they stop showing up once their width is 255 pixels or greater. I don't remember if this happens with Clipped rectangles or non-clipped ones, though.

Maybe this is due to the clipping window? You might want to check it out, if the clip windows is somehow 255 or larger, for some reason. I did it with unclipped rectangles, and that worked fine.

DJ Omnimaga

So I tried rectangles again and non-clipped ones work fine.

I didn't check the clipping window, though, for the others. I guess that could be why, but would it be possible to explain this in the command list or at least set it to 320 by default?


Also another suggestion: The ability to use Str1-Str0 or at least store strings of text at pointers. Just like sprites, being limited to a string constant can be a serious problem for games like Final Fantasy and Zelda.

PT_

Yay, time for another update!
I've fixed some bugs, added a little bit auto-optimization, such that if you use only once Input, it won't be in the program data but in the program itself, which saves 10 bytes. This happens too for Pause, which saves either 5 or 6 bytes (if the pause time is constant 6 bytes, otherwise 5). This is rather a small update, the next one would be v2.0 with some very nice features incoming :D
Also, I've changed the type hook, to avoid conflicts with PHASM, ICE now uses the GetKey hook, and not the GetCSC hook, because PHASM already uses that. The most important update is, that I've fixed the closing parenthesis bug. When you use for example "For(A,1,2)" it will generate an error, because of the ")". I've now changed the structure a little bit, and I hope it works now. Maybe there are some more changes, I'm not sure of ;) The Commands list is a bit updated, I've added the default value for colors/clipping. I'm not sure I've already added this in the previous version, but you can now use mean(), which calculates the mean of 2 expressions.

Have fun with it :)

Download:
https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/ICECompiler.zip
https://tiplanet.org/forum/archives_voir.php?id=587211

Source:
https://github.com/PeterTillema/ICE - licensed under GPL v3 :)

DJ Omnimaga

November 17, 2016, 08:01:44 pm #276 Last Edit: November 17, 2016, 08:53:20 pm by DJ Omnimaga
A front-page CW news is awaiting, but not enough free time to write it. It deserves a mention with example screenshots :)

Also good to see ICE open-source for posterity. :)

EDIT @PT_ it seems that Opossum Massage Simulator no longer runs on the new version of ICE on my TI-84+CE (5.2). After the rainbow logo thing, a RAM Clear happens now. You might have introduced some sort of bug or something, but I could be wrong. The source code is available with my game if you want to check out.

And on CEmu ICE just freezes outright during compiling, on ROM 5.2.0.

DJ Omnimaga

I forgot to post this, but with the new version you posted the other day, Opossum Massage SImulator now compiles and run perfectly. I am now on OS 5.2.1, though, so I am unsure if that's why.

Also, if you don't mind, I could continue working on GalagICE if you give me the source. You would be credited of course, though. I still need to write a news about ICE, but I am looking into showing more animated eye-candy.

DJ Omnimaga

November 22, 2016, 07:47:20 am #278 Last Edit: November 22, 2016, 09:38:18 am by DJ Omnimaga
Little suggestion for BLIT command: The ability to copy a portion of the buffer anywhere on the screen or vice-versa, rather than just the same position. Like on the HP Prime, that would be kinda handy, since Axe Parser had a Copy() command that did something similar.

det(75,BUFFER,CopiedX,CopiedY,CopiedWIDTH,CopiedHEIGHT,PastedX,PastedY)


EDIT: ALso @PT_ I found a bug: The < operator doesn't work in ICE. If I do something like "If A<0", then the If block is ignored no matter the result.

EDIT: You now made CW front page (and there's also a Supersonic Ball CE title animation concept there :D) https://codewalr.us/index.php?topic=1727.0

DJ Omnimaga

By the way, what's new in version 1.2.4? With the version I currently have I didn'T have issues but I forgot which one it is.

PT_

Quote from: DJ Omnimaga on November 27, 2016, 05:31:16 am
By the way, what's new in version 1.2.4? With the version I currently have I didn'T have issues but I forgot which one it is.

One important bug has been fixed with nested For loops, that many program will crash. Secondly, this version is made to optimize the output program, by some bytes :trollface: , just compile it yourself, and see if the size is a bit less :P

Download:
https://tiplanet.org/forum/archives_voir.php?id=587211

DJ Omnimaga

Ah I see. I didn't notice any issues with nested For loops but maybe some crashes I got were partially related. :P


PT_

December 03, 2016, 10:24:37 pm #282 Last Edit: December 05, 2016, 05:29:12 am by DJ Omnimaga
New update, ICE v1.5. I've added direct key inputting, so very fast checking if a key is pressed, small For loops, which are independant of a variable, and much faster, and CompilePrgm( which compiles a subprogram. Additionally, the graphics library version 3 is supported. Maybe more, but I can't remember :P

Download ICE Compiler



Edit by p2: fixed ur bb-code.
EDIT 2 by DJ: Fixed broken link


DJ Omnimaga

Direct input, yay! *.*

* DJ Omnimaga should update Opossum soon. This is definitively a great feature for games like Mario. :) Thanks a lot for thr update.


I don't have time to try right now but I'll download it as soon as I have some time off.

Can sub programs be archived?

PT_

Quote from: DJ Omnimaga on December 03, 2016, 11:24:53 pm
Direct input, yay! *.*

* DJ Omnimaga should update Opossum soon. This is definitively a great feature for games like Mario. :) Thanks a lot for thr update.


I don't have time to try right now but I'll download it as soon as I have some time off.

Can sub programs be archived?

Nope, and don't try it either. Will fix it soon

Powered by EzPortal