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.


Messages - Levak

Pages: 1 ... 3 4 [5] 6 7 ... 68
61
Good adriweb :)

And a subset of the NavNet API is now available in Ndless and the Ndless SDK r893!
Documentation is available on hackspire, and samples in Ndless and Ndless SDK.

I don't know if its the right place to talk of this, but you cut the "TI-Nspire specific" part in two with Navnet using a h3 instead of h4.
Now the Graphic API appears part of Navnet :D

62
Calculator C / Re: [Ndless] Tunnel
« on: August 30, 2013, 07:49:45 am »
Here we go

63
Calculator C / Re: [Ndless] Tunnel
« on: August 30, 2013, 04:57:29 am »
I can't see anywhere in your topic theses includes
Code: [Select]
#include "utils.c"     
#include "graphics3.c" 
#include "math.h"       
#include "nCOMMON.h"   
#include "touchpad.c"   

But the problem is not here.
You said you put a switch/case but you didn't, at least where you pointed it (arround setPixel).

Look at this :
Code: [Select]
void sprite1(void *buffer, int *data, int x, int y, int width, int height){
    int i, j;
    for(i = 0; i < height; i++){
        for(j = 0; j < width; j++){
            if(x+j < 320 && x+j > 0 && y+i < 240 && y+i > 0){
                if(has_colors)   
                    setPixel(x+j, y+i, data[i*width+j], buffer);
                else
                    setPixelBuf(buffer, x+j, y+i, data[i*width+j]);
            }
        }
    }
}

You're asking, for each damn pixel if the screen has colors.
I will do the same, when you'll write an essay, for each letter you put on your paper, if you want a new sheet.

Look at this now :
Code: [Select]
void sprite1(void *buffer, int *data, int x, int y, int width, int height){
    int i, j;
    switch (has_colors)
    {
      case 1:
          for(i = 0; i < height; i++){
              for(j = 0; j < width; j++){
                  if(x+j < 320 && x+j > 0 && y+i < 240 && y+i > 0)
                      setPixel(x+j, y+i, data[i*width+j], buffer);
              }
          }
          break;
      default:
          for(i = 0; i < height; i++){
              for(j = 0; j < width; j++){
                  if(x+j < 320 && x+j > 0 && y+i < 240 && y+i > 0)
                      setPixelBuf(buffer, x+j, y+i, data[i*width+j]);
             }
         }
     }
}

There is still a condition that is being asked for each damn pixel that can be put outside of the loops and translated in a mathematical way.

Code: [Select]
void sprite1(void *buffer, int *data, int x, int y, int width, int height){

    if(x > SCREEN_WIDTH || y > SCREEN_HEIGHT || x+w < 0 || y+h < 0)
        return;

    if(x < 0)
    {
        w += x;
        x = 0;
    }

    if(y < 0)
    {
        h += y;
        y = 0;
    }

    if(x + w > SCREEN_WIDTH)
        w = SCREEN_WIDTH - x;
    if(y + h > SCREEN_HEIGHT)
        h = SCREEN_HEIGHT - y;

    if(w <= 0 || h <= 0)
        return;

    int i, j;
    switch (has_colors)
    {
      case 1:
          for(i = 0; i < height; i++){
              for(j = 0; j < width; j++)
                  setPixel(x+j, y+i, data[i*width+j], buffer);
          }
          break;
      default:
          for(i = 0; i < height; i++){
              for(j = 0; j < width; j++)
                  setPixelBuf(buffer, x+j, y+i, data[i*width+j]);
         }
     }
}

Untested, but should be fine.

64
Calculator C / Re: [Ndless] Tunnel
« on: August 29, 2013, 07:07:44 am »
*BUMP*
Could one of you help make this faster? What exactly should I do instead of my if statement?
Without the last source updated source code ? Does anything has changed since the last one ?

65
TI-Nspire / Re: nLaunch: Now for CX!
« on: August 28, 2013, 09:38:21 am »
I don't have a my documents folder but I have  a documents folder should I place it inside the documents folder
"My Documents" is the name by default of the "public root directory". So, depending on you language, yes, it's the most top accessible folder.

Quote
Also what is(IIRC)
IIRC

66
Calculator C / Re: [Ndless] Tunnel
« on: August 28, 2013, 07:12:57 am »
I suggest you this reading while you're getting your math class ;)

67
TI-Nspire / Re: nLaunch: Now for CX!
« on: August 28, 2013, 02:25:56 am »
so i am not sure what the read me is saying to put it in the root directory. Is the root directory just inside the document folder? Just a btw: i am using the ti-nspire computer link software
For an end-user, like you, the root directory is below/inside "My Documents".
If one day you want to investigate Ndless developpement, the "root" directory will be "/" and "My Documents" will be /documents/.

Thus, you need to make a directory name "nlaunch" (IIRC) inside "My Document", same level as "MyLib".

68
Calculator C / Re: [Ndless] Tunnel
« on: August 28, 2013, 02:08:33 am »
Have you made a conditional branch/jump or something smarter ?
Remember that using an if inside a setPixel is most likely time cretical. You may want to use faster designs like function pointers.

69
hoffa, do you have a sample program showing this?
Yeah, attached. Sorry for the late reply, have been insanely busy.
May you attach the source as well ? (or a link since it looks like it's Mode7)
Thanks.

70
Calculator C / Re: [Ndless] Tunnel
« on: August 27, 2013, 02:27:22 am »
There are two files attached to this post. One in CX, and one is non-CX(though the gray should work just fine on CX).
Why are you giving separate builds ? You should checkout has_color (or similar others) in order to make only one build compatible with all models.

Quote
Compiled with ndless-v3.1-beta-r825-sdk. I think that's a newer version. Wink
If your using specific functionalities, you should always use assert_ndless_rev(rev) according to the revision the feature you're using appeared in.
This guarantee your code doesn't crash if the user doesn't have the proper Ndless version.
I see you're using nspire-ld-bflt, your minimal Ndless version is at least r806 according to http://hackspire.unsads.com/wiki/index.php/Ndless_features_and_limitations#bFLT_loader


(installing Ndless takes 5 hours because my battery is always depleted due to not using my calc often, and Ndless requires to charge it completely before being sent)
Completely charged ? No.
Also, its not Ndless that requires this, but the operating system because Ndless installation is using OS upgrade routines in order to exploit. The OS itself requires that the battery is sufficiently charged in order to support the time to upgrade being offline. Since Ndless is a 12Ko upgrade it won't last really long.

71
Lua / Re: Executing a program using mathEval() function?
« on: August 23, 2013, 04:51:32 am »
Only functions (not programs) can be executed through math.eval().
Indeed, programs affect the global environnement and do not return a value.

In order to modify the global environnement, please use var.store/recall/list

72
Are you enabling interrutps through TCT_Local_Control_Interrupts() and why ?
If not, consider it as a bug, and you may call ExtendeD.

If you're enabling interrupts for a custom IRQ handler, you may use a specific mask (I don't rememeber what bit filed it was).

73
General Calculator Help / Re: Panicking, Can't Install OS
« on: August 22, 2013, 01:29:04 am »
You may buy an arduino uno, it includes a TX and RX input and serial listerner.
This may be a better investment if you like hardware hacking.

Demo:
https://tiplanet.org/forum/gallery/image_page.php?album_id=4&image_id=186

74
General Calculator Help / Re: Panicking, Can't Install OS
« on: August 21, 2013, 03:58:01 am »

How exactly did you fix it? I have the same problem and no matter what I do the calculator wont stop showing the "unable to install a version older than the current" message but I'm trying to install 3.2.3.1233
Then you have 3.2.4.
This OS has a boot2 upgrade that has an anti-downgrade minimal version set to 3.2.4.

http://ti-pla.net/a17810

75
Other Calculators / Re: Have you seen BSOD on nspire before?
« on: August 21, 2013, 03:56:48 am »
Very interesting. You can see it's a prototype (TI-Nspire color), so this is just for easy debugging. I wonder if other dev OS's contain it too.
The routines are still in the current OSes, but need some CMP to jump in the right place, maybe waiting to be in dev mode.

Pages: 1 ... 3 4 [5] 6 7 ... 68