Page 10 of 24

Re: ICE Compiler

PostPosted: 01 Nov 2016, 14:35
by Adriweb
That's pretty nice.

Could there be a way to know which function/det(... corresponds to, in reality? maybe by selecting the corresponding line on the menu when the cursor is on a det( ?

Re: ICE Compiler

PostPosted: 01 Nov 2016, 14:43
by Epharius
Nice PT_! It seems to work right now :p
Do all the functions work when you convert your program?

I thought about something : maybe it would be feasible to create equate Tokens, like the Color tokens (BLUE=10, RED=11 etc). Then, SetTextXY would be 19 etc. Maybe a TokenHook could replace for example 2-bytes tokens that don't exist by any C function.... but yea, it should be pretty hard to do :p

Re: ICE Compiler

PostPosted: 01 Nov 2016, 16:50
by grosged
:~o Incredible ! All the C functions now available from TI-Basic !!! =D
Kudos, PT_ :#top#:

Re: ICE Compiler

PostPosted: 02 Nov 2016, 10:07
by PT_
Adriweb wrote:Could there be a way to know which function/det(... corresponds to, in reality? maybe by selecting the corresponding line on the menu when the cursor is on a det( ?

When I read this, I immediately thought that would be nice indeed :) What I prefer, is something like a hook, that when you 'hover' a det( function, that is displays the text in the statusbar, like error-scrolling in BASIC, that it displays the line number. I will think about this later :)
Epharius wrote:Nice PT_! It seems to work right now :p
Do all the functions work when you convert your program?

Nope, I've not implemented all the functions that returns something (GetPixel for example), and the way-too-hard-examples, like TileMap etc :troll:

Epharius wrote:I thought about something : maybe it would be feasible to create equate Tokens, like the Color tokens (BLUE=10, RED=11 etc). Then, SetTextXY would be 19 etc. Maybe a TokenHook could replace for example 2-bytes tokens that don't exist by any C function.... but yea, it should be pretty hard to do :p

That's basically the same as replacing det(SetTextXY) with SetTextXY() :troll:
It's pretty hard to find at lest 80 unused tokens, preferable consecutive (the statistics ones are only 60), so I doubt this will help :(

Re: ICE Compiler

PostPosted: 09 Nov 2016, 00:11
by PT_
It's coming closer and closer...

Image

Re: ICE Compiler

PostPosted: 09 Nov 2016, 22:15
by PT_
I will upload soon a revised version, with some minor bugs fixed, and more examples, to make it more clear what you can do with ICE ;)

This is the famous bounce program:
Image
It should run smooth!

Source:
Code: Select all
[i]BOUNCE
det(0
det(5,0
[maxY]0,8,8,"0000E0E0E0E0000000E0E0E0E0E0E200E0E000E2E2E2E2E2E0E2E2E2E2E2E7E7E2E2E2E7E7E7E7E7E2E7E7E7E7E7E7E700E7E7E7E7E7E7000000E7E7E7E70000"
For(G,0,19
   remainder(rand,312->L1(G
   remainder(rand,232->L1(G+20
   1->L1(G+40
   1->L1(G+60
End
det(2,0
Repeat getKey
   For(G,0,19
      L1(G->H
      L1(G+20->I
      det(42,H,I,8,8
      If H=312 or not(H
         0-L1(G+40->L1(G+40
      End
      If I=232 or not(I
         0-L1(G+60->L1(G+60
      End
      H+L1(G+40->L1(G
      I+L1(G+60->L1(G+20
      det(59,0,L1(G),L1(G+20
   End
   Pause 5
End
det(1


Copy this into SC, download it, and try it yourself! :D

Re: ICE Compiler

PostPosted: 11 Nov 2016, 14:49
by PT_
Image

:)

Re: ICE Compiler

PostPosted: 11 Nov 2016, 16:19
by PT_
I've updated ICE v1.2.1 to v1.2.2 :)

There are now more examples to learn from (5 in total [BOUNCE, FLOODIT, GUESS, PONG, SIERP], more are maybe coming soon ;)), and I've included a post of Mateo where he explains how to convert images to ICE sprite data.

Image Download ICE Compiler

Have fun! :P

Re: ICE Compiler

PostPosted: 13 Nov 2016, 21:44
by Lionel Debroux
Nice progress, as usual :)

Re: ICE Compiler

PostPosted: 15 Nov 2016, 13:17
by Ti64CLi++
Nice PT_
Good chance for suit ;)