3rd triangle you deleted one of the points should be:
as for the sizing, its tricky as the z will define your block size, but if you set it to -9.2 it should be the same size as the original.Code:{0.5,0.5,0,0,0},
{1,1,1,-1,0},
{0,1,-1,-1,0},
Printable View
3rd triangle you deleted one of the points should be:
as for the sizing, its tricky as the z will define your block size, but if you set it to -9.2 it should be the same size as the original.Code:{0.5,0.5,0,0,0},
{1,1,1,-1,0},
{0,1,-1,-1,0},
Ahh, and I also deleted one out of the fourth block too. As for the Z, changing it to -9.5 only make the images smaller. I'll need to figure out some kind of algorithm to change the z based on the size of the image.
yeah i was eyeballing it, i'll see if I can work one out, if you beat me would you mind posting it?
hmm.. In 3d mode, does the x,y position change to the center of the screen instead of the upper left corner like in 2d?
yeah, the coordinate system is completely different then 2d. I'm trying to find some good resources on the conversion.
I'm having problems compiling the luaplayer 0.20 source.
It compiles without errors (or even warnings) but the eboot just crashes my psp.
if i could get it to compile, it would be a walk in the park to add ortho support.
Compiling LUA Player should be n the C/C++ help thread.
eyece - I got it to compile fine. You may not be compiling correctly... First, make sure you have all the libraries needed installed. When i tried my first time, i needed to install freetype, lualib,lua, and mikmod (mikmodlib wouldnt install i think, so i installed libmikmod). Than, you need to:
If your getting ready for release, do make release10 or make release15Code:make clean-all
make
i think im going to have to reinstall cygwin, is the size of the elf/pbp 1,234KB when you guys compile it?
eyece - Depends. My mod of luaplayer is like 1,389 kb or somethin...
BTW - why do you want to compile lua player ;)
KleptoOne wanted to draw stuff in 2D, ortho would be the best option, but its not supported yet. i was going to add it.
You are adding it to Cools' mod or SG57's Cools' mod, right?
btw whats ortho?
http://www.youresam.com/tutorials/layout.PNGZitat:
Zitat von KleptoOne
The coordinate system isn't all that different, nor hard to adjust to... Just an inverted Y axis. Plus, if you just scale your entire scene -1 on the y axis, youll have the same coordinate system as your used to.
emerica - Short for orthogonal-projection. Mainly used to incorporate 2D into your program. This will draw your shape in a space that will not move when your 3D scene is rotated. This is perfect when implementing a display system into your game that displays health, ammo, etc.
If you want, ill post a quick PSPGL example of how to start/stop an orthogonal projection. Theres GU equivalent functions, but youd have to search for em' ;)
thanks for the clarification, i don't care if you do that or not right now, because i know no 3-D yet anyway.
I've seen it before, but i'm not sure how to do it; how can i get the filesize of something and return it as a string?
I haven't tested it, but this bit of code should set up fileInfo as a table with a file list for the specified directory. fileInfo[number].filename to get the filename, fileInfo[number].filesize to get the file size. Alternately, if you already know the exact filename that you are looking for, you can can set up your loop to scan the files array to look only for that filename, and then get the filesize for that file only:Code:files = System.listDirectory(directory name)
fileInfo = {}
count = 1
for i = 3, table.getn(files)
if files[i].directory == false then
fileInfo[count] = {filename = files[i].name, filesize = files[i].size}
count = count +1
end
end
with either, I think that the file size that will be returned will be a number value, but you can use tostring to convert it to a string if you really need toCode:for i = 3, table.getn(files)
if files[i].name == "filename" then filesize = files[i].size
end
So basically if i get the directory listed in a table, and search the table for blah[blah].size, it should return the value?
Yeah, basically. There might be an even easier way, but if so I haven't found it yet.
You've got the general method correct, but if you wanna get rid of the offset for the . and .. directories, just add table.remove(files,1) table.remove(files,1) so that it gets rid of them and do it without the offset and count crap.
im making a personal lua flasher (key word = PERSONAL), and i want to incorporate extra checks before and after i flash the file. for example, lets say i try to flash an .rco and the filesize was supposed to be 242 kb, but the custom one being flashed is only 200 kb. i want the script to refuse to flash the file.
i'm sure this is pretty simple, but ive never had to do this before.
Read the post just above for the method of getting file size and then once youve got that make a function like
if filesize(rco) then
-- flash file
else
-- error
end
ok thanks, didnt read the posts above.
EDIT: also, the filesize will be in bytes, right?
-= Double Post =-
one more question - how would you check the free space of flash0?
thanks for the help.
EDIT2: aahhh, another question - make that 2. first of all, with the new flash luaplayer, i get errors of iounassign, ioassign, etc, even in SG57's example. however, SG57's example worked, regardless. How can i fix these errors? i dont want luaplayer to be having errors as i'm flashing...
2nd question - luaplayer gives me the error that on line 91, it cannot find 'ms0:/wavebackup/', no script file found. Here is the line of code:
this line of code is after i re-assign flash0. i tried replacing "ms0:/wavebackup/" with "ms0:/wavebackup/system_plugin_bg.rco.back up" but i still get the same error - luaplayer can't find the script "ms0:/wavebackup/system_plugin_bg.rco.back up".Code:System.writeFile("flash0:/vsh/resource/system_plugin_bg.rco","ms0:/wavebackup/","no")
i would appreciate the answer as well as an explanation as to why luaplayer is looking for a script in this line of code.
Thanks again and sorry for so many questions.
parm - There is no io.Assign or io.Unassign.
There is System.Assign and System.Unassign ;)
As for your writeFile error, the second parameter ('destination file') isnt the destination folder, but the destination file. So...
That s what u want (note, you can change it from dumped_wave.rco to whatever.)Code:System.writeFile("flash0:/vsh/resource/system_plugin_bg.rco","ms0:/wavedump/dumped_wave.rco","no")
thanks, i figured the destination thing out and hit myself on the head.
as for the other part of your post, it isnt what u think is happening. when i exit any app by using the home button, a bunch of huge text pops up saying things like "io.assign p_kl: error_" and i was wondering what was happening in luaplayer. id feel much safer if no errors popped up, ya know what i mean?
parm - That happens on all versions of lua player. Its the deinitialization of various libraries (mikmod mainly). Try it on a different version and youll see the same thing ;)
Does anyone know what the exit code is in Lua player 20 in 16 it was
os.exit()
doesnt work in 20. Whats the 20 exit code
Thanks
try break ?
break from what i understand in c++ and im assumming its the same in lua will just exit the loop. but it might work
you can try System.Quit() or whatever. but i think thats only in the mod one.
There is no exit code. os.exit() just returns the value you give it (ex: os.exit(1)) to the parent process what executed it.
youresam will break work ?
zomg look at your points !
SG57 - thanks for the info, i hadnt seen it before.
Would it be feasible to make curveball in lua for someone of my programming ability ?
3d? maybe. im working on a port of curveball right now, and its not too challenging, but curving is complicated.Zitat:
Zitat von eldiablov
Grimfate - What about Assualt, Space Escape, etc.?
Break just exits the current loop, be it while or for.Zitat:
Zitat von eldiablov
os.exit() is the exit code for Shines luaplayer, but the mods use System.Quit(). Find out what luaplayer your using and that should fix everything.
...........Zitat:
Zitat von xpack
hi can anyone give me an idea to show image in the screen screen like credits while loading the app?
lets say something like a credit and name of the app will stay 3 secs then go to the main app...
thx in advance