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 - Jim Bauwens
Pages: 1 ... 79 80 [81] 82 83 ... 125
1201
« on: October 14, 2011, 03:33:23 am »
function on.paint(gc) if title == 0 then drawHUD() drawLayer1() drawPlayer() drawLayer0() if pause == 1 then gc:setFont("sansserif","r",48) gc:setColorRGB(150,0,0) gc:drawString("Paused",159,106,"middle") end else drawTitle() end timer.start(0.1) end drawPlayer
function drawPlayer() platform.gc():drawImage(playersprite,originx+((playerx-camerax)*16),originy+((playery-cameray)*16)) end
I see that you are using platform.gc(). This is not recommended, because its not the same as the gc passed to on.paint (it is not yet initialized). The solution to this is to pass gc as parameter of the function: function on.paint(gc) ...
drawPlayer(gc)
... end
function drawPlayer(gc) gc:drawImage(playersprite,originx+((playerx-camerax)*16),originy+((playery-cameray)*16)) end
What I also see is that when you copy layer0 into level1 and level2, you use this: for i=1, area do level1[i] = layer0[num][i] --Function that copies the original level data level2[i] = layer1[num][i] --to the two layers for gameplay. Possible point end
I assume layer0[num][ i] is a table? If so, this means that level1[ i] is a reference to it, not a copy. This way, if something happens to layer0 it will effect level1 and opposite. I don't know if this is intentional, but you need to watch out with these things. Also, I suggest you too look at the way Levak's sudoku ( http://tiplanet.org/forum/archives_voir.php?id=3550&play=) handles drawing to the screen. It makes having multiple screens (intro, game, menu) a piece of cake. I don't say you have to copy code directly, but it is a huge help in the long term, as it makes your code more clear and easy to handle.
1202
« on: October 13, 2011, 05:29:22 pm »
Normally, it should work on both the platforms without a problem. There might be issues with color though, so be sure to use setColorRGB.
The only way I can help with 2 is that you give me some bits of code, so I can look into it.
1203
« on: October 13, 2011, 03:50:39 am »
From wikipedia: Ritchie was best known as the creator of the C programming language and a key developer of the Unix operating system, and as co-author of the definitive book on C, The C Programming Language, commonly referred to as K&R (in reference to the authors Kernighan and Ritchie). Ritchie's invention of C and his role in the development of Unix alongside Ken Thompson has placed him as an important pioneer of modern computing. The C language is still widely used today in application and operating system development, and its influence is seen in most modern programming languages. Unix has also been influential, establishing concepts and principles that are now well-established precepts of computing.
He died a few days ago, at age 70. We truly have lost a great man
1204
« on: October 12, 2011, 04:26:14 pm »
Well, Google chrome has one, it just is hidden at most times.
1205
« on: October 12, 2011, 04:22:06 pm »
Or Google Chrome/Chromium.
1206
« on: October 12, 2011, 10:00:20 am »
I took long for me to notice it was back, because it was minimized here :p
1207
« on: October 12, 2011, 08:59:14 am »
Well, then I think you have a hardware issue, and should bring it back. Since you have 3 years warranty, I don't think this will be a problem
1208
« on: October 12, 2011, 03:22:42 am »
Do you mean that the up/down/left/right keys don't work at certain times? Those buttons are actually one button, and trigger the corresponding key press (left, rigth, etc) by determining your finger position using the touchpad. And because of this the touchpad doesn't work in some cases because you have both your fingers touching the touchpad. (it only likes one finger at the time) I don't know if this is the case with you, but its a though at least
1209
« on: October 09, 2011, 02:35:01 pm »
I have encountered this bug before (I actually need to fix my Lua Console to support utf-8 :p), and the solution is to use TI's added string functions, uchar, ubyte and usub. They should work just the same as their original counterparts As for reading memory, its only a few bytes, so not so useful. But nevertheless, quite interesting
1210
« on: October 06, 2011, 12:59:06 pm »
I don't think so, the tool palette is quite limited, so you will have to make your own. I recommend you to check out Levak's Sudoku code, where he implemented a "screen manager". This will be of big help if you want to make your own menu system (and other stuff).
1211
« on: October 06, 2011, 07:09:38 am »
He just seems kind of evil when I inevitably compare him to say, Bill Gates, who is now a full-time charity worker. http://www.savetz.com/ku/ku/apple_donates.htmlMaybe Bill Gates has given more away, but then again he is more rich than Steve Jobs (I think). Apple has also embraced open source long before Microsoft, and accepted Linux (for example). If I would start a company, and billions of people would tell me what to do, I would ignore them. Its still my company, and the decisions are made by me. Edit: sorry for the half post before, I have a keyboard controller that got crazy
1212
« on: October 06, 2011, 05:56:30 am »
Well, have fun with rewriting
1213
« on: October 06, 2011, 01:44:48 am »
As much as I would like to help, I cant, as I don't know asm of any kind. Good luck anyway!
1214
« on: October 06, 2011, 01:41:19 am »
TI-Image is always in 16-bit color format, and on the grayscale calculators it is converted automatically. Oh, and there are 15 shades of grayscale, since you wanted to know.
TI.Image is actually 15 bit color, and one alpha bit. Check out the (outdated) info on Inspired Lua, and the official documentation, they should be clear enough. You can also check out my python converter at http://bwns.be/jim/convert.py. It's pretty easy to understand @homer, I don't understand your question fully, mind explaining a bit more?
1215
« on: October 03, 2011, 07:27:37 am »
Here is the install log when trying to install on a touchpad (in the emulator):
usblink connected Sending file: 3632580 bytes left TI_OS_INSTALL_PRECHECK (5) TI_OS_INSTALL_PRECHECK_OK (0) Sending file: 3568065 bytes left Sending file: 3503550 bytes left IME: non-ALPHA key pressed Sending file: 3439035 bytes left .... Sending file: 19740 bytes left Send complete TI_OS_INSTALL_PRECHECK (5) TI_OS_INSTALL_VERIFYING_IMAGE (10) IMAGE: verifying file "/tmp/__OSEXT__1" IMAGE: OS Extension locale mismatch TI_OS_INSTALL_VERIFYING_RESOURCE (95) Deleting file [/tmp/__OSEXT__1] TI_OS_INSTALL_FAILED TI_OS_INSTALL_IMAGE_INVALID
As you can see it errors on a locale check. If you check os_ext.img, you can see that there is a new field 823 that contains the string "zh_CN". I guess this means that 3.10 adds locale protection. Here are all the fields of os_ext.img (from ZiDian.tco):
bauwens@ZeBauwens:~/jim/imgtest$ python parser.py 804 10 OS_EXT 801 3 70F 801 3 710 80e 2 (0x) 00 01 802 6 3.10.1 825 1 1 823 5 zh_CN 824 6 3.10.0 032 6 (0x) 00 00 00 00 00 00 80f 72 (0x) 2f 0f ab 62 81 ba 38 12 55 6b 52 88 12 d2 f2 82 87 6c dc ff .. 821 4 (0x) 00 47 6f a0 807 3630805 (0x) 50 4b 03 04 0a 00 00 00 00 00 f1 81 f4 3e 00 00 00 00 00 00 .. 029 256 (0x) 84 3a 7d 03 d1 8a c4 c0 bd f8 09 4e a4 63 92 e8 9e bc b2 17 ..
You can also see that there are two 801 fieds (on a normal touchpad image, there is one, with the value 0E, which identifies the product). I wonder what this means.
Pages: 1 ... 79 80 [81] 82 83 ... 125
|