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.
196
Issues Help Desk / Re: Help a noobie.
« on: March 05, 2009, 02:20:11 pm »
...because you have to work carefully with the functions that've already been implemented?
You'll have to wait at least a year before there's something that you can work with without modifying the code and without prior knowledge of C++.
You'll have to wait at least a year before there's something that you can work with without modifying the code and without prior knowledge of C++.
197
Proposals / Re: Difficult!!!
« on: March 03, 2009, 11:51:15 am »
Again, blame IsmAvatar for not allowing Enigma to have its own syntax highlighting or toolbar buttons.
198
Issues Help Desk / Re: Grid Bug
« on: March 03, 2009, 11:48:55 am »
I have the same problem, but this is IsmAvatar's fault, not Enigma's.
200
General ENIGMA / Re: XOR DOES NOT WORK
« on: February 28, 2009, 06:18:07 am »XOR is extremely cool.Of course, I mean... it spells "rox" backwards, so how can it not rock?
201
Off-Topic / Re: Just saying hi
« on: February 27, 2009, 12:37:34 pm »By which, you mean "rigged".Fix'd.GIMPAgreed.MSPaintYes, just yes.
Seriously, drawing anything besides a low-colour pixellated smiley-face in MS paint is like visiting /b/ on 4chan. (i.e. complete mental breakdown imminent)
202
Off-Topic / Re: Just saying hi
« on: February 26, 2009, 12:23:43 pm »GIMPAgreed.
MSPaintNo, just no.
203
Off-Topic / Re: Just saying hi
« on: February 24, 2009, 12:39:58 pm »Is there a plan to add a sprite editor in Enigma, by the way?That's ISMAvatar's responsibility (the maintainer of LateralGM), not the responsibility of the Enigma development team.
204
Off-Topic / Re: Just saying hi
« on: February 22, 2009, 10:28:53 am »(did the fact I joined the forum make Josh feel all fuzzy?)Why not ask him?
Oh, by the way, you still have a while to wait before enigma is pretty much usable.
205
Tips, Tutorials, Examples / Re: How to Play Sounds
« on: February 22, 2009, 09:33:29 am »
http://www.gamedev.net/reference/articles/article2053.asp <-- *Will* allow you to play multiple sounds
There you go. Another silly Win32 API thing, but it should work.
EDIT: Ahaha, needs a lib.
If you've scrolled down to here, rejoice! You've scrolled to the right place!
Find "CompileEGMF.exe" in your enigma folder, rename it (so that it's all backed up and you can't hold me responsible if anything goes wrong), then paste the files from this zip into the folder:
http://dl.getdropbox.com/u/518733/thing.zip
Hey presto! You now have a version of CompileEGMF that will compile your C++ multimedia code!
There you go. Another silly Win32 API thing, but it should work.
EDIT: Ahaha, needs a lib.
If you've scrolled down to here, rejoice! You've scrolled to the right place!
Find "CompileEGMF.exe" in your enigma folder, rename it (so that it's all backed up and you can't hold me responsible if anything goes wrong), then paste the files from this zip into the folder:
http://dl.getdropbox.com/u/518733/thing.zip
Hey presto! You now have a version of CompileEGMF that will compile your C++ multimedia code!
206
Off-Topic / Re: How not to comment code.
« on: February 21, 2009, 08:04:24 am »207
Off-Topic / Re: These numbers took 1.3 gigs of RAM to generate
« on: February 20, 2009, 12:23:37 pm »
Excuse me for being unappreciative, but what was the whole point (not theoretically, but practically) in that huge calculation?
Also, you could run it on a computer with only 256MB of RAM, it'd just write it to disk instead (pagefile laaaaag imminent, of course) and therefore be slower.
Also, you could run it on a computer with only 256MB of RAM, it'd just write it to disk instead (pagefile laaaaag imminent, of course) and therefore be slower.
208
Off-Topic / Re: How not to comment code.
« on: February 20, 2009, 12:20:13 pm »
Well, you were half-right...
Code: [Select]
variable = 3; //Set maximum iterations for short pathfinding algorithm to 3.
209
Issues Help Desk / Re: Help a noobie.
« on: February 17, 2009, 07:59:03 pm »
Yeah. Sure.
Nothing except....
POSTING ASM!
(Haha, made you flinch!)
Nothing except....
POSTING ASM!
(Haha, made you flinch!)
210
Off-Topic / Re: How not to comment code.
« on: February 13, 2009, 01:47:22 pm »I wouldn't tell someone to comment every line of assembly with something like "move this number into this register" or "call this function," that'd be stupid I agree. It's more to keep a running commentary next to everything you're doing, something like:When I'm reverse-engineering stuff, I usually comment like this:Code: [Select]; Function to add the first two parameters
Brains are not CPUs. They need help, no matter how good at debugging you think you are.
add: push ebp ; create stack frame
mov ebp, esp
mov eax, [ebp + 8] ; get the first argument
mov ecx, [ebp + 12] ; second argument
add eax, ecx ; sum in eax to return
pop ebp ; restore stack frame
ret
(Using same code)
Code: [Select]
add: push ebp ; add(arg1,arg2)
mov ebp, esp ; {
mov eax, [ebp + 8] ;
mov ecx, [ebp + 12] ; return arg1+arg2;
add eax, ecx ;
pop ebp ; }
ret
The comments aren't well placed (the "ret" is on the last line, yet I've put the "return" in the middle of the function, in the middle of the 3 calculation instructions - it'll still execute code similar to that comment). I only try to make sure that the code is readable for me at 04:00 AM.Also, Josh, for support of large numbers in your modulus function, this might work (instead of a-=(int)a;)...
Code: [Select]
double temp;
asm("FLD %%st\n\
FISTPQ %2\n\
FILDQ %2\n\
FSUBRP %%st,%%st(1)\n"
:"=&t"(x)
:"f"(x),"m"(temp));
For the commenting bit:Code: [Select]
fld st
fistp qword [temp] ; temp = (QWORD)floor(x);
fild qword [temp]
fsubp st, st1 ; x -= temp;
If you want to be more standards-compliant, you could always do "x-=(long long signed int)x;", but that will produce around 3x more useless opcodes.