Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Hayleia

#316
Quote from: Phyxie on January 19, 2015, 04:41:08 AM
TI83, TI84, TI84+, TI84+CSE, TI89 Titanium
TI84 ? That doesn't exist, or I missed something ;)
#317
If you have a monochrome z80, you can also play Portal Prelude ;)
http://www.ticalc.org/archives/files/fileinfo/451/45101.html
#318
Yeah, this kind of things make Axe really convenient to use (same for other languages with macros and all). See Topaz and Smash. I only made additions to Topaz but never changed the engine because I hardcoded every offset and it was too annoying to change something everywhere. But I made a SMASHH file for SSBO, full of macros, empty of code, and thanks to this, I was able to change the engine several times without spending too much time :)
(it is just maybe a bit unoptimized this way but on the other hand, it makes me spend even less time understanding what I wrote when I get back to work on it after a long pause).
#319
Yeah, I have no idea when it was introduced but it is really convenient.

You know that °A is the pointer to A, well to declare another pointer, custom named, just declare it with L5+35→°Lolz for example, or [FFFFFFFFFFFFFFFF]→°BlackSprite.
You can then do Pt-On(X,Y,°BlackSprite). And since °A points to A, °Lolz points to Lolz and you can do whatever you want with Lolz, like Lolz++, etc ;)
(just be sure to use safe ram areas when creating new variables :P).
#320
Quote from: CKH4 on January 17, 2015, 03:21:04 PM
Hayleia:
I understand what your saying about it not being really readable. I plan to fix this with comments but for right now I want it to be easy enough for a ti basic programmer to get it (no extreme optimizations).
Well, changing your sprites names to "°ThatSprite" instead of "Pic1" is not something too hard, even for a beginner ;)
Same, you can use custom variable names. Not really needed when those variables are X and Y, but for example, MyX MyY EnemyX EnemyY are more readable than X Y U V.

Quote from: CKH4 on January 17, 2015, 03:21:04 PM
Also why is your username Hayleia? (I only ask because when I read it letter by letter I realized that I hadn't read it correctly before)
Sekrett!! :P
Jk, the reason is so stupid I'll never say it. And you're not the first one to misread it :P
#321
Yeah, I know (and I use FireFox so it doesn't bother me :P) but did you see how long the code was ? I thought it wouldn't be a good idea to post it outside of a spoiler.
Or would it be possible to have scrollable code ? I mean that the "window" with the code would have a max size and would have a scrollbar so we can still see all of it ?
#322
Your code isn't really what I'd call "readable", and I can tell that just at your third line. Yeah, the one with "Pic1". Because that doesn't tell me what's in the sprite. You could have used "→°LolSprite" (but with a descriptive name of course) instead.

I also think I see a lot of repetitions in your code, where you could at least have used a subroutine.

And last but not least, "easily changeable" applies to codes that either are really readable or don't contain any data. And this doesn't apply to yours, it has Text data, it knows the number of "buttons", etc, so when you'll want to change it, you'll have to read it all and not forget anything to change.

Here's what I use in Smash for example. OK, the code isn't exactly what I'd call readable :P
But the rest is readable, all labels and pointers have suggestive names. And it is easily changeable since there is no data in the menu code, all you have to do is change the data, add an entry or remove one, etc.
Don't use it, it lacks something you need to make it run. If you try it this way on your calc, it will most likely crash, except if you are lucky. But you can check in Smash's source code, that's really what I use (well, that's an old version thta changes a bit compared to the latest version but it will most likely be back in a new version).

Screenshot and code (in spoiler to save space):

[spoiler]

Lbl Menu
ClrDraw
0->D
°MainMenu->r1
While 1
0->r4
For({r1->r2})
r2++
!If D-r4
Text(2,56,{r2+11}^^r)
256
Else
232
End
->F
Copy({r2+2}^^r->r3+2,L2,{r3}*{r3+1})
{r2}+({r3}*4)-({r3}*4*F/256)*256+{r2+1}+({r3+1}/2)-({r3+1}/2*F/256) Asm(E5)
{r3}^^r Asm(E5)
F Asm(E5)
L2
Asm(CD7298) .sub(L3)
r2+12->r2
r4++
End
L6+768-108-1
For(108)
{+1->r2} xor 255->{r2}
End
DispGraphClrDraw
WKP()
~1->r2
D*13+r1+1->r3
For(4)
getKey(r2+++1)?{r3+r2+7}->D
End
If getKey(54)
If {r3+4}
Goto ({r3+5}^^r)
Else
0->D
{r3+5}^^r->r1
End
WLP()
ElseIf getKey(48)
If {r1-3}
Goto ({r1-2}^^r)
Else
0->D
{r1-2}^^r->r1
End
WLP()
End
End

/.../

.Menu structure:
.Data(flag if previous, label if previous)
.Lbl CurrentMenu
.[number of buttons]
.Data(flag if previous, label if previous ^^r)
.Data(X (centered),Y (centered),sprite^^r,flag if ok,label if ok^^r,button if down,button if left,button if right,button if up, TxtPtr)
.Data(same for the second button)
.etc
.the "flag if ok/previous" is at 1 if the following label is a real label, and at 0 if it's a pointer to another menu structure to read with the menu routine

Data(1,|LTitleScreen^^r)
[]->°MainMenu
[04]
Data(01,01,°SmashSpr^^r  ,0,°SmashMenu^^r,2,0,1,0,°SmashTxt^^r)
Data(68,02,°OptionsSpr^^r,0,°MainMenu^^r ,2,0,1,1,°OptionsTxt^^r)
Data(37,27,°DataSpr^^r   ,0,°MainMenu^^r ,3,0,2,1,°DataTxt^^r)
Data(47,41,°CreditsSpr^^r,0,°MainMenu^^r ,3,0,3,2,°CreditsTxt^^r)

[]->°SmashSpr
[092B]
[00007FFFFFFFFFFFFF0003FFFFFFFFFFFFFF001F8000000000000E003C0007800000000000F00FC1E6739CE73801C1EFF870E739CE7003820FFC39CE739CE00719CFFF1C9CE739C00E382FFF8E39CE73800C782FFFC6739CE70018FBCFFFE72739CE0039F80FFFF38E739C0031FA2FFFF98000000033FB6FFFF9FFFE700067FAAFFFFCFFFCE00067FA2FFFFCFFF9C00067FA2FFFFCFFF38000CFFA2FFFFE7FE70000CFF80FFFFE7FCE0000CFF9CFFFFE7F9C0000CFFA2FFFFE7F380000CFFA2FFFFE7E700000CFFBEFFFFE7CE00000CFFA2FFFFE79C00000CFFA2FFFFE73800000CFF80FFFFE670000006001E00000CE00000060020000009C0000006001C000003800000033F82FFFF87000000033F82FFFF8E000000039FBCFFFF1C000000018F80FFFE3800000000C7A2FFFC7000000000E3A2FFF8E00000000071BEFFF1C00000000038A2FFE380000000001C22FF8700000000000F02FC1E000000000003C00078000000000001F803F00000000000003FFF8000000000000007FC00000000000]
[]->°OptionsSpr
[0318]
[007E0003FFC007FBE00FE3F01FC3F83F87EC7F87E67F87C67F8186FFC007FFE00FFFE00FFFC13FFFC3FFFF83FF7F87FE7F07FE7F0FFE3E0FFC1E9FF80E1FF007BFE003FFC0007E00]
[]->°DataSpr
[070D]
[0007FFFFFFF000000FFFFFFFFE000018FFFFFFFF00003000FEFEFFC00077FEFEFEFFE000F7E2E08C23E001F000EEF6FDF003F000EE86E1F807F000EEB6EDF80FF000EEB6EDF81FF000F0C731FC3FFFFFFFFFFFFC7FFFFFFFFFFFFC]
[]->°CreditsSpr
[060D]
[FFFFFFFFFFFFFFFFFFFFFFFF7FFFFFEB7FFF7FFFFFEF7FFE3F08860A10FE3F7BBAEB77FE1F7B82EB75FC1F7BBEEB7AF80F7BBEEB7EF80F8BC30B90F007FFFFFFFFC007FFFFFFFF8003FFFFFFFC00]

[]->°SmashTxt
"Start fighting now !"[00]
[]->°OptionsTxt
"Set general preferences."[00]
[]->°DataTxt
"Manage profile data."[00]
[]->°CreditsTxt
"Contributors to this game."[00]

Data(0,°MainMenu^^r)
[]->°SmashMenu
[02]
Data(01,1,°SoloSpr^^r ,1,|LSetSoloMulti^^r,1,0,1,0,°SoloTxt^^r)
Data(23,3,°MultiSpr^^r,1,|LSetSoloMulti^^r,1,0,1,0,°MultiTxt^^r)

[]->°SoloSpr
[0933]
[000007FFFFFFFFFFFF00007FFFFFFFFFFFFE0001FC000078000FFC0007E07E0048001FF8001F80C30048003FF0003E00991C48E07FE0007C009F774BB8FFC000F0008EC1CE0DFF8001E000839CCCE7FF0003C000E19CCCE7FE0007C000399CCCE7FC000F8000F99CCCE7F8000F00009189CC4FF0001F000083C14E0FE0001E0000FE7F7BFFC0003E0000000001FF80003C0000000003FF00007C03FF800007FE00007C020080000FFC000078020080001FF8000078020080003FF00000F8020080007FE00000F802008000FFC00000F802008001FF800000F803FF8003FF000000F802AD8007FE000000F803F8800FFC000000F802AD801FF8000000F803FF803FF0000000FC02AA807FE0000000FC03FF80FFC00000007C02AA81FF800000007E03FF83FF000000007E02AA87FE000000007F03FF8FFC000000003F00001FF8000000003F80003FF0000000001FC0007FE0000000001FC000FFC0000000000FE001FF80000000000FF803FF000000000007FC07FE000000000003FE0FFC000000000001FF9FF8000000000000FFFFF00000000000007FFFE00000000000003FFFC00000000000001FFF8000000000000007FF0000000000000001FE00000000000000007C000000000000]

[]->°MultiSpr
[0933]
[0000000000003E00000000000000007F8000000000000000F3E000000000000001E0F800000000000003C07C00000000000007803E0000000000000F000F0000000000001E00078000000000003C0007C00000000000780003E00000000000F00001F00000000001E00001F00000000003C00000F80000000007800FFEF8000000000F0008027C000000001E0008027C000000003CFFE8027E00000000788028023E00000000F08028023E00000001E08028023E00000003C0802FFE3F0000000780802AB63F0000000F00802FE23F0000001E00FFEAB63F0000003C00AB6FFE3F0000007800FE2AAA3F000000F000AB6FFE3F000001E000FFEAAA7F000003C000AAAFFE7F0000078000FFEAAA7F00000F0000AAAFFEFE00001E0000FFE000FE00003C0000AAA001FE0000780000FFE001FE0000F00000000003FC0001E000003C0E07FC0003DF8F80241B07F8000790988027D10FF8000F1090F3A67F1FF0001E10F0DAE4027FF0003C1264CA6402FFE000781264CA6673FFC000F01264CA6673FF8001E0130CCA6673FF0003FFF30CCE6673FE0007FFF39CC06613FC000FFFF39CE26713F8001FFFFFFFFFFFFFE0003FFFFFFFFFFFFF80007FFFFFFFFFFFFE0000FFFFFFFFFFFFE00000]

[]->°SoloTxt
"Two on the same calc."[00]

[]->°MultiTxt
"Use the link port."[00]

[/spoiler]
#323
Quote from: Cumred_Snektron on January 16, 2015, 06:17:25 PM
You can also set 16 bit elements:

0->{L1 + Index*2}^r
{L1 + Index*2}^r->Var

Note that the index needs to be multiplied by 2 since 16 bit values need 2 elements (an element is ofcourse 8 bits).
This will probably not work exactly the way you want. Remember that Axe does operations from left to right without caring about priorities... ;)

Quote from: CKH4 on January 16, 2015, 06:54:40 PM
I'm trying to make a list of bullet positions but I'm not sure that I want to use a list, maybe just 4 variables to keep the bullet number down.
Using 4 variables would just make the code bigger and unmaintanable. You'll probably copy paste your code to work with 4 variables, and when you'll want to add something, you'll forget to put it in all 4 portions.
Plus, using "lists" would teach you how to use something you need here and you'll need later in all of your projects. Just imagine you don't know about loops and instead of doing a loop you paste your code 16 times in a row. That's ridiculous. Instead of doing that, you learn how to use loops. Well, same here, you should learn how to use "lists".
#324
Nspire results don't really surprise me. I was hesitating between crafti and nKaruga, and I voted nKaruga because I made sprites for it I knew people would vote crafti, even people who never tried crafti and just saw "crafti", clicked to see screenshots and voted.

Anyway, congrats to all the participants :)
#325
Other / Re: New member introductions: Say hello here!
January 10, 2015, 08:31:46 AM
Thanks for the welcome ^^

Quote from: Cumred_Snektron on January 10, 2015, 12:56:31 AM
Asm you say? Does this include axioms? (Ive been having some problems)
This probably fall into the "don't ask me too much" section :P
That's probably not hard but I never tried. Matref can tell you more though, he made some axioms, from his code and also from other people's code.

Quote from: DJ Omnimaga on January 10, 2015, 05:38:10 AM
By the way, was AudaciTI ever finished? I forgot.
Depends :P
It was usable but lacked features to be interesting.
#326
Other / Re: New member introductions: Say hello here!
January 09, 2015, 11:59:37 PM
Hi,

Some people probably already know me from Omnimaga/Cemetech/TIPlanet but I think I still should introduce myself.
I am a big Nintendo fan and made Pokemon Topaz in 2011, now working on Super Smash Bros. Open when I have time.

I know Axe, Asm (enough to make AudaciTI but don't ask me too much), C and Java.

Running on Windows 8.1 (because 7 didn't want to work properly with drivers) and Lubuntu on both my main laptops.

I have 9 graphing calcs : 83+, 84+SE, 76.fr, CX CAS, Prizm, 84+CSE, Nspire Proto, 83+.fr USB, 92+.
#327
Quote from: Cumred_Snektron on January 09, 2015, 06:35:11 AM
Quote from: Hayleia on January 09, 2015, 05:34:49 AM
You can read the Commands.html file included in the zip with Axe. You'll see that you need to use ▶Dec.
▶Char *
Oops, sorry, I read a bit too fast and assumed we were talking about numbers since that's most usually what you want to display when you don't want to display strings.

Quote from: DJ Omnimaga on January 09, 2015, 03:51:41 PM
An Hayleia draws near! *.*
Lol, I should probably introduce myself by the way, for those who don't know me.
#328
Quote from: CKH4 on January 09, 2015, 02:44:01 AM
How do you display a variable as the characters instead of the gibberish?
You can read the Commands.html file included in the zip with Axe. You'll see that you need to use ▶Dec.
Powered by EzPortal