If you want, I can make an example program to show how to copy the GUI Stack. Smile
souvik1997 wrote:
If you want, I can make an example program to show how to copy the GUI Stack. Smile


It isn't just copying, it is a matter of editing the appvar before I need to use it(for example, when a guy learns a spell, it adds that spell to the appvar stack in the appropriate place.
Then you would need to pop elements off the stack, add whatever you want, then add the stuff you popped off the stack.
souvik1997 wrote:
Then you would need to pop elements off the stack, add whatever you want, then add the stuff you popped off the stack.


Yeah well, if it was just that simple, it renders in the battle, but it would be updated outside of it, which means I would have to do the whole thing there, and then it wouldn't be faster, and I am trying to get it to speed up.
Those look great, keep up the good work!
KermMartian wrote:
Those look great, keep up the good work!


Thanks, and also, could I get some thoughts from you about the GUI stack stuff I am wanting to do?
I _think_ you could manipulate the entries in the GUI stack to insert something with C3, but I have never done that before. :/
souvik1997 wrote:
I _think_ you could manipulate the entries in the GUI stack to insert an something with C3, but I have never done that before. :/


I thought about that as well, and turned it into a program that I could access and look at, but it was corrupted (well as far as the calculator can tell that is) so I can't really just raw edit it like I had originally hoped.
As I said before, you will have to edit it by analyzing the hex data in the appvar.
souvik1997 wrote:
As I said before, you will have to edit it by analyzing the hex data in the appvar.


I know, but before I could do that, I would need to have an understanding of what is what.
Sonlen wrote:
souvik1997 wrote:
As I said before, you will have to edit it by analyzing the hex data in the appvar.


I know, but before I could do that, I would need to have an understanding of what is what.
Items are stored in low-to-high memory, each starting with a two-byte little-endian size word, a one-byte type byte, and then one or more data bytes.

http://dcs.cemetech.net/index.php?title=GUI_API

Edit: Answering your series of incomplete sentences:
Quote:
[20:42:17] <@saxjax> (C) [Sonlen] Kerm, a non ASM based way to edit FFME?
[20:42:28] <@saxjax> (C) [Sonlen] err...
[20:42:38] <@saxjax> (C) [Sonlen] for gui7 FFME


http://dcs.cemetech.net/index.php?title=Third-Party_BASIC_Libraries

Especially Edit1Byte, EditWord, BinRead, BinWrite, etc etc etc.
KermMartian wrote:
Sonlen wrote:
souvik1997 wrote:
As I said before, you will have to edit it by analyzing the hex data in the appvar.


I know, but before I could do that, I would need to have an understanding of what is what.
Items are stored in low-to-high memory, each starting with a two-byte little-endian size word, a one-byte type byte, and then one or more data bytes.

http://dcs.cemetech.net/index.php?title=GUI_API

Edit: Answering your series of incomplete sentences:
Quote:
[20:42:17] <@saxjax> (C) [Sonlen] Kerm, a non ASM based way to edit FFME?
[20:42:28] <@saxjax> (C) [Sonlen] err...
[20:42:38] <@saxjax> (C) [Sonlen] for gui7 FFME


http://dcs.cemetech.net/index.php?title=Third-Party_BASIC_Libraries

Especially Edit1Byte, EditWord, BinRead, BinWrite, etc etc etc.


I wouldn't understand what I was looking at if I just used the Read methods, I would get a string, but how would I know what I need to edit so I can add as I need?
Why exactly are you trying to edit the GUI stack directly in the first place? That strikes me as a pretty bad idea in terms of stability and especially in terms of making extra work for yourself.
KermMartian wrote:
Why exactly are you trying to edit the GUI stack directly in the first place? That strikes me as a pretty bad idea in terms of stability and especially in terms of making extra work for yourself.


To save speed in making and rendering during the battles, it currently takes a couple seconds for it to run through a couple of the routines for the windows in battles and render. Though also there is the magic menu, in which can have a stack with a max of 17 elements, and a minimum of 5, and that routine itself takes longer then anything else.
Are you saying that PushGUIStack takes a long time? If so, then pushing your own data into the stack in BASIC is going to take much, much longer anyway, besides being complex and potentially buggy.
KermMartian wrote:
Are you saying that PushGUIStack takes a long time? If so, then pushing your own data into the stack in BASIC is going to take much, much longer anyway, besides being complex and potentially buggy.


Not the pushing itself, it is the for loop inside of it that determines how many items it has, I have an :If Ans :sum(7,4....) so that it can control how many items are in the stack and display only what is known.
Why not just increment some variable every time you PushGUIStack...? Wouldn't that be easier?
KermMartian wrote:
Why not just increment some variable every time you PushGUIStack...? Wouldn't that be easier?


I thought of that, but that slowed it down even more because I had to use a repeat/inString loop for the String that I had all the types of magic stored to, which also corresponded to a list where 0 is not learned and 0> is learned and the number is the level. It would only add magic to the display stack if it is learned, so I had:

Code:
:If {L1}(X)
:sum(7,4....)


so that it only displays the learned magic.

I hope that will help you understand this a bit more.
Bump

Sonlen wrote:
KermMartian wrote:
Why not just increment some variable every time you PushGUIStack...? Wouldn't that be easier?


I thought of that, but that slowed it down even more because I had to use a repeat/inString loop for the String that I had all the types of magic stored to, which also corresponded to a list where 0 is not learned and 0> is learned and the number is the level. It would only add magic to the display stack if it is learned, so I had:

Code:
:If {L1}(X)
:sum(7,4....)


so that it only displays the learned magic.

I hope that will help you understand this a bit more.
You could do:

Code:

If L1(X)
Then
C+1->C
sum(7,4,...)
End

Then, when you want to pop stuff off the stack, do sum(8,C).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3 ... 39, 40, 41, 42  Next
» View previous topic :: View next topic  
Page 40 of 42
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement