Author Topic: Routines  (Read 313245 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: Routines
« Reply #180 on: March 26, 2010, 11:00:54 pm »
Oh, I see.
Very nice routine, keep it up!
Also, when I made Pic2Hex, I had to reverse the bits, did you?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Routines
« Reply #181 on: March 26, 2010, 11:01:48 pm »
* DJ Omnimaga pokes sircmpwn for a Tilesheet2hex prog :D

SirCmpwn

  • Guest
Re: Routines
« Reply #182 on: March 26, 2010, 11:02:20 pm »
* SirCmpwn is kinda busy with work stuff but promises to make one later

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Routines
« Reply #183 on: March 26, 2010, 11:08:13 pm »
it's ok ^^

_player1537

  • Guest
Re: Routines
« Reply #184 on: March 27, 2010, 10:34:34 am »
there were a couple of bugs in the displaying program that I had to fix, I updated my earlier post to have them.  it still takes input through D but gets rid of the need for C, also now displaying the sprites in different spots works, before it only worked in the top left corner.
« Last Edit: March 27, 2010, 10:34:50 am by _player1537 »

SirCmpwn

  • Guest
Re: Routines
« Reply #185 on: March 27, 2010, 11:52:45 am »
By request, I have made a program that will convert a sprite sheet (a picture full of tiles) to hex so you can move your existing tile maps over to Axe.  If you have any questions, feel free to let me know.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Routines
« Reply #186 on: March 27, 2010, 12:44:10 pm »
Very nice! :D

(First download, BTW.)

Now, work on the program writeback to custom AppVar! >:D
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: Routines
« Reply #187 on: March 27, 2010, 12:52:16 pm »
Grr, fine.  I'm starting on that now.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Routines
« Reply #188 on: March 27, 2010, 01:03:05 pm »
Hooray! :D

Thank you, sir, for succumbing to my planyour kindness.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Routines
« Reply #189 on: March 27, 2010, 01:29:21 pm »
By request, I have made a program that will convert a sprite sheet (a picture full of tiles) to hex so you can move your existing tile maps over to Axe.  If you have any questions, feel free to let me know.
oh wow thank you! That goes on my calc as soon as I use it :)

For others: this program is meant to make it much easier to grab tiles hex data than with pic2hex. With pic2hex, your entire pic is converted into one straight string of hex code. For example if you have a pic where the top left 8x8 corner is turned black and the rest is plain white, with pic2hex, the first 8 rows of pixels, meaning 96x8, would look like this:

FF00000000000000FF00000000000000FF00000000000000FF00000000000000
FF00000000000000FF00000000000000FF00000000000000FF00000000000000

Good luck separating each tiles/sprites from each others.

Now with tile2hex, it will be like this:

FFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

All tiles separate! Easier to split the data!
« Last Edit: March 27, 2010, 01:33:59 pm by DJ Omnimaga »

SirCmpwn

  • Guest
Re: Routines
« Reply #190 on: March 27, 2010, 05:18:43 pm »
Actually, it seperates the sprites so it is easier, like:
[FFFFFFFF->Pic1
[00000000

Plus, it only does the sprites you need, so if you have a small sprite sheet that doesn't take up the whole screen, you can just get the ones you need to save memory.

SirCmpwn

  • Guest
Re: Routines
« Reply #191 on: March 27, 2010, 07:39:47 pm »
By demand request:
Save/Load AppVars
To save:
Asm(E7EFF1423803EFC64F2AEC86EF6A4EEB2323
Inputs:
Ans is the string representing the name of the AppVar (see below for more information).  It must be 8 characters or padded with zeros, and should have a [15 at the beginning.  A should be the length of the AppVar.
Outputs:
Ans is the pointer to the data.

To load:
Asm(E7EFF14230052100001803EB2323
Inputs:
Ans is the string to load
Outputs:
Ans is the pointer to the data.

Example:
This is a bit complex, so I thought I would offer an example implementation:

Saving:
:[15->Str1   ; AppVar Identifier
:"TESTSAVE   ; Name
:2->A   ; Length
:Str1:Asm(E7EFF1423803EFC64F2AEC86EF6A4EEB2323)->A   ; Create the variable
:5->{A}      ; Load the data into it
:6->{A+1}

The above code creates an AppVar called TESTSAVE and loads the data 5, 6 into it.
However, if you want to create an AppVar with a name less than 8 characters, you have to do this:
:[15->Str1   ; AppVar Identifier
:"TEST      ; Name
:[00000000   ; Add zeros to make 8 characters total
:2->A   ; Length
:Str1:Asm(E7EFF1423803EFC64F2AEC86EF6A4EEB2323)->A   ; Create the variable
:5->{A}      ; Load the data into it
:6->{A+1}

I added 4 bytes of zeros after the name, so that it would make the correct length.

Loading:
:[15->Str1   ; AppVar Identifier
:"TESTSAVE   ; Name
:Str1:Asm(E7EFF14230052100001803EB2323)->A
:{A}->B
:{A+1}->C

The above code loads the AppVar TESTSAVE into B and C.

This is a bit complex, let me know if you have questions!

_player1537

  • Guest
Re: Routines
« Reply #192 on: March 27, 2010, 07:44:32 pm »
if you wouldn't mind, could I see the source code I want to see how close I was to the routine.  I'm going to test it in a bit

SirCmpwn

  • Guest
Re: Routines
« Reply #193 on: March 27, 2010, 07:47:44 pm »
Sure, its attached.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Routines
« Reply #194 on: March 27, 2010, 09:01:41 pm »
This routine is full of EPIC and WIN.
Now, to see if hexadecimal can be stored in it...
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm