Author Topic: Mirage OS usage  (Read 13228 times)

0 Members and 1 Guest are viewing this topic.

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #15 on: July 02, 2012, 03:08:34 pm »
^r needs to be included if you are using 16-bit integers (0 to 65535) for your score.

OK . is this right ?

Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS
.later...
S->{GDB1HS+10}
sub(SORTD,GDB1HS,11)
.assume SORTD is a subroutine. # of items is 11.

So first 11 items are sent to GDBHS , then the users score is sent to the list and the list is sorted ?
« Last Edit: July 02, 2012, 03:10:59 pm by danny90444 »
Schrodinger's cat walks into a bar... and doesn't.

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #16 on: July 02, 2012, 03:10:21 pm »
Assume that the SORTD subroutine sorts data in descending order.
I also want to correct something:

Code: [Select]
Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS
.later...
S->{GDB1HS+10}
sub(SORTD,GDB1HS,11)
.assume SORTD is a subroutine. # of items is 11.
But then, a r is missing after the S->{GDB1HS+10}
Moreover, no need to make a routine if it is only used once. What I suspect is that you wrote sub(SORTD,GDB1HS,11) to say "you must sort it" without giving the proper code :P

I personally do it the other way round in MisterOops!
I check how many scores the current score beats, shift them, then insert the new highscore :)

Where does that "r" need to be ?
Schrodinger's cat walks into a bar... and doesn't.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Mirage OS usage
« Reply #17 on: July 02, 2012, 03:49:35 pm »
Right behind the S->{GDB1HS+10}
It would be S->{GDB1HS+10}r
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #18 on: July 02, 2012, 04:04:25 pm »
Assume that the SORTD subroutine sorts data in descending order.
I also want to correct something:

Code: [Select]
Data(100^r,90^r,80^r,70^r,60^r,50^r,40^r,30^r,20^r,10^r,0^r)->GDB1HS
.later...
S->{GDB1HS+10}
sub(SORTD,GDB1HS,11)
.assume SORTD is a subroutine. # of items is 11.
But then, a r is missing after the S->{GDB1HS+10}
Moreover, no need to make a routine if it is only used once. What I suspect is that you wrote sub(SORTD,GDB1HS,11) to say "you must sort it" without giving the proper code :P

I personally do it the other way round in MisterOops!
I check how many scores the current score beats, shift them, then insert the new highscore :)

So could i use "SORTD("  to sort the list ?
Schrodinger's cat walks into a bar... and doesn't.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Mirage OS usage
« Reply #19 on: July 02, 2012, 08:57:03 pm »
Right behind the S->{GDB1HS+10}
It would be S->{GDB1HS+10}r
It would be S->{GDB1HS+20}r actually. Thank you for correcting me.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Mirage OS usage
« Reply #20 on: July 03, 2012, 11:06:12 am »
Also, here is a sorting routine.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #21 on: July 03, 2012, 11:10:11 am »
Thanks, could you help me with display? Like how to display the highscores from the list ?
Schrodinger's cat walks into a bar... and doesn't.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Mirage OS usage
« Reply #22 on: July 03, 2012, 11:35:38 am »
Thanks, could you help me with display? Like how to display the highscores from the list ?
Note, that what I will write will not be optimised at all so you understand everything.



To display the first score, you would do
  Text(0,0,{GDB1HS}r►Dec)

To display the second one, you would do
  Text(0,6,{GDB1HS+2}r►Dec)
Why (0,6) ? because there is already the first score in (0,0).
Why GDB1HS+2 ? because the first score takes 2 bytes, located at GDB1HS and GDB1HS+1, so the second one is at GDB1HS+2

So, to display the third one, you would do
  Text(0,12,{GDB1HS+4}r►Dec)

etc...

To display the Ith score, you would do
  Text(0,I*6,{I*2+GDB1HS}r►Dec)



Now, to display them all, just put that in a For loop like this
  For(I,0,10)
  Text(0,I*6,{I*2+GDB1HS}r►Dec)
  End

Hope that helps :)
« Last Edit: July 03, 2012, 11:36:22 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #23 on: July 03, 2012, 12:01:41 pm »
Thanks, could you help me with display? Like how to display the highscores from the list ?
Note, that what I will write will not be optimised at all so you understand everything.



To display the first score, you would do
  Text(0,0,{GDB1HS}r►Dec)

To display the second one, you would do
  Text(0,6,{GDB1HS+2}r►Dec)
Why (0,6) ? because there is already the first score in (0,0).
Why GDB1HS+2 ? because the first score takes 2 bytes, located at GDB1HS and GDB1HS+1, so the second one is at GDB1HS+2

So, to display the third one, you would do
  Text(0,12,{GDB1HS+4}r►Dec)

etc...

To display the Ith score, you would do
  Text(0,I*6,{I*2+GDB1HS}r►Dec)



Now, to display them all, just put that in a For loop like this
  For(I,0,10)
  Text(0,I*6,{I*2+GDB1HS}r►Dec)
  End

Hope that helps :)

Thanks
Schrodinger's cat walks into a bar... and doesn't.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Mirage OS usage
« Reply #24 on: July 04, 2012, 02:52:30 pm »
What's up with the topic title *.*  :hyper:
I'm not a nerd but I pretend:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Mirage OS usage
« Reply #25 on: July 04, 2012, 04:54:41 pm »
What's up with the topic title *.*  :hyper:
* parserp is confused

Offline danny90444

  • LV3 Member (Next: 100)
  • ***
  • Posts: 41
  • Rating: +0/-0
  • Physics :)
    • View Profile
    • facebook
Re: Mirage OS usage
« Reply #26 on: July 04, 2012, 08:21:16 pm »
What's up with the topic title *.*  :hyper:
* parserp is confused

If you read the first page I was asking about how to use write back.
Schrodinger's cat walks into a bar... and doesn't.