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 - Han

Pages: 1 2 [3] 4 5
31
HP Calculators / Re: Graph 3D beta update
« on: January 09, 2014, 09:51:19 am »
Also how do we rotate in this version? I tried the arrow keys and they no longer let me rotate. I can zoom in/out with + and -, though.

EDIT: Nevermind, it seems that Symb and Help rotates, although it seems to behave weirdly

Ensure radian mode is on. It seems my attempt to account for various angle modes did not work properly.

The rotation bug was due to me setting all the angles to rotx! There's a new version up (same version number, different date) that fixes this among a few other issues.

32
HP Calculators / Re: Graph 3D beta update
« on: January 07, 2014, 10:41:15 pm »
The direction keys rotate; it may be that your grid size is so large the rotation gets super slowed down. Imagine the default axes set up such that negative x points behind your screen, and positive x points towards you, the user. Negative y points left, and positive y points right. Positive z is up, and negative z is down. The left/right arrows rotate around the z-axis, up down rotate around the y-axis, and symb/help rotate around the x axis.

33
HP Calculators / Re: Is 1▶a instead of a := 1 bad practice? (HP Prime)
« on: January 07, 2014, 09:33:11 pm »
I mean number of keystrokes. [Shift][EEX] vs [-][.] if you already have alpha-lower-case-shift locked (press [Alpha][Alpha][Shift][Alpha])

34
HP Calculators / Re: How to save things ?
« on: January 07, 2014, 09:15:56 pm »
Yup, removing EXPORT before variables makes the variable "super global". I don't know how to say it, but there are three types of variables on the HP Prime:

-Local: Declared at the start of a function, only useable in that function and cleared from memory once returning from the function
-Global: Declared with EXPORT at the start of the program, useable through the entire program. The variable is deleted once quitting the program.
-External: Declared without the EXPORT command, still at the start of the program. This type remains intact once exiting the program and can be used anywhere.

In TI and Casio BASIC, however, we can edit variables as we wish, so people can fake highscores and cheat in long RPGs. Even if only the source HP PPL program has access to a declared variable, can that variable still be edited with an on-calc editor or something? Also another question: When using ON+SYMB or pressing the RESET button, are variables cleared? If so, then is there a way to ensure that variables are reset-proof? Else, this might be a problem for role-playing/adventure games like Legend of Zelda or Final Fantasy. Since the HP Prime isn't that stable, we sometimes have to reset it to bring back normal behavior, and it would suck to have to backup our progress on a computer every two hour or so...

This is incorrect. LOCAL is restricted to inside a BEGIN END; pair. EXPORT makes global variables accessible system-wide. Removing EXPORT creates a variable "global" only to the source file. Programs from a different source file cannot see/use these variables, nor can the user. Whether EXPORT'ed or not, both global types remain and retain their values after programs complete their execution until next compile-by-exiting-the-editor event. An ON-SYMB does not clear global variables (not their existence nor their contents).

http://www.hpmuseum.org/forum/thread-215.html

While a non-EXPORT'ed global variable cannot be directly edited by the user from the command line, there is nothing to prevent the user from manually editing the source to "cheat" in games provided they know how to make the modification.

35
HP Calculators / Re: Graph 3D beta update
« on: January 07, 2014, 09:11:08 pm »
It is slower because I am using a different rendering method. The previous version uses TRIANGLE, which did z-clipping and perspective projection within the command. However, it did not allow alpha blending. So I ended up having to do my own projection calculations as well as render with FILLPOLY (for the alpha blending) which is much slower.

36
HP Calculators / Re: Is 1▶a instead of a := 1 bad practice? (HP Prime)
« on: January 07, 2014, 09:09:20 pm »
I am pretty sure the ▶ symbol was implemented to help the TI folks transition to the HP Prime. The := syntax was implemented (again I am guessing) so that it would be easy to program on a PC and transfer to the calculator. So if you program on the calculator, either is fine. They even use the same keystrokes (if you have alpha locked for the := notation). On a PC, it would be very impractical to use ▶ unless you have a special setup.

37
HP Calculators / Re: Graph 3D beta update
« on: January 07, 2014, 02:01:15 pm »
As far as I know, apps have become quite stable since the update.

38
HP Calculators / Re: Graph 3D beta update
« on: January 06, 2014, 07:42:58 pm »

39
HP Calculators / Re: How to save things ?
« on: January 06, 2014, 07:42:02 pm »
Just remove the "EXPORT" declaration and leave everything as is. The variable will retain its contents, but only the programs within the source file in which the variable was declared will have access to it.

40
HP Prime / Re: [WIP] Trailblazer Prime
« on: January 03, 2014, 10:03:51 pm »
You may be able to improve the speed by a large amount by switching to MAKELIST or MAKEMAT commands rather than appending elements to an existing list, etc.

41
HP Calculators / Re: Graph 3D beta update
« on: January 02, 2014, 02:17:51 am »
A sneak peak of what's to come.


42
HP Calculators / Re: HP Tribute video in the works
« on: December 31, 2013, 01:28:58 am »
Here are some screenshots to an upcoming update of the 3D grapher. More info here:

http://www.hpmuseum.org/forum/thread-95-post-1700.html#pid1700


43
HP Calculators / Re: A clock
« on: December 25, 2013, 12:32:08 am »
Oh nice, I didn't know it was possible to detect in which mode the calc is set. In TI-BASIC, we sometimes have to force mode changes because we absolutely have no other choice.

Actually, you can create a similar workaround on the TI. In place of HAngle, you can simply test SIN(PI)==0 to determine whether you are in degree mode or radian mode. If the boolean is true, then you are in radian mode. Otherwise, you are in degree mode.

44
Code: [Select]
export VSCROLL()
begin
  local i;
  dimgrob_p(G1,320,240);
  blit_p(G1,G0);
  for i from 239 downto 0 step 1 do
    blit_p(G0,0,0,G1,0,240-i,320,240);
    blit_p(G0,0,i,G1,0,0,320,240-i);
  end;
end;

This scrolls the current screen pretty fast. Modifying it for horizontal scrolling is also pretty fast.

Code: [Select]
export HSCROLL()
begin
  local i;
  dimgrob_p(G1,320,240);
  blit_p(G1,G0);
  for i from 319 downto 0 step 1 do
    blit_p(G0,0,0,G1,320-i,0,320,240);
    blit_p(G0,i,0,G1,0,0,320-i,240);
  end;
end;


45
I'm not sure about speed, but one approach is to just double the width of G1 so that it contains two copies of what you want to scroll. So if you have a 320x240 image, and the far right edge is created so that it is seamless with the far left ledge if we were to lay a duplicate copy side-by-side, then a simple loop using BLIT_P(G0,0,0,320,240,G1,i,0,320+i,240); would scroll horizontally (requires G1 to be 640x240). In fact, you can create a much larger G1, and use BLIT_P to copy the appropriate 320x240 window into G0. So G0 is used to scroll the window within G1. Or did you already try this and it was too slow?

Pages: 1 2 [3] 4 5