• Welcome to Valhalla Legends Archive.
 
Menu

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.

Show posts Menu

Messages - sixb0nes

#1
Hello. I've come across a rather interesting problem involving float to int conversions. If I have a float, say, 98.85, and I assign an int to this float times 100...

float myfloat = 98.85;
int myint = myfloat * 100;

myint becomes 9884, which is not what I want. Is there anyway to do this float->int conversion without losing precision and without making myint a float? I've figured a rather hack-like workaround by simply adding one to myint, but I would much rather a solution which did not involve this step.
Thanks.
#2
Advanced Programming / Re: Argh, game scripting
October 12, 2005, 10:47 PM
LUA or Squirrel (http://www.squirrel-lang.org/) ftw
#3
Take a quick look at:
http://unixforge.org/~sixb0nes/PatchEngine.cpp  and
http://unixforge.org/~sixb0nes/PatchEngine.h

This is a class I wrote which patches a group of addresses. New patches can be declared by simply declaring new instances of CPatchEngine, like:

CPatchEngine Patch_NoOpponent(0x45481D,"\xEB",1);
CPatchEngine Patch_Foo(0x454F00,"\xFF",1);
etc

The pointers of new CPatchEngine classes are stored in a static vector which is a member of CPatchEngine.

In my DllMain, I call CPatchEngine::PatchAll() to iterate through this vector and call each instances' PatchInstance() method.

My current problem is that the patches must be declared inside a function, and not in global scope. Why is this?

Edit: Just more info, when declaring CPatchEngine's globally, and then calling PatchAll(), my log file will report 0 patches. =/ This isn't the case when declaring in a function.

That's all there is.
#4
General Discussion / Re: Internet Explorer woes
April 21, 2005, 12:08 AM
Hey guys, thanks for the feedback. It appears that when I performed the system restore, it forced IE to use proxy settings I had used months before. Needless to say, the proxy I was using is now defunct, and hence why I couldn't connect. MSN Messenger, obviously, uses IE settings to connect. And there you have it.
#5
General Discussion / Internet Explorer woes
April 20, 2005, 06:41 PM
Sorry, I didn't know where else to post this, so I'll post it here.

Recently, after performing a system restore on my PC, Internet Explorer 6 simply refuses to load any web pages, but I can use Opera and Firefox just fine though. Also, trillian doesn't even connect into my MSN account anymore. I've tried resetting the internet explorer settings to default to no avail. If anyone can help that would be really groovy.

By the way, I am using Windows XP, no service packs.

Thanks.
#7
Yoni's Math Forum / Re: Simple number puzzle
January 17, 2005, 05:51 AM
The digits appear in the order you would speak them out. Example

First digit is 5
The next line would be 15 'one five'
The next would be 1115 'one one, one five'
3115 - 'three one, one five' and so forth. A similar question appeared on the google aptitude test, which is where I got the idea from.
#8
Yoni's Math Forum / Simple number puzzle
January 15, 2005, 07:48 AM
Find the next series of digits:

5
15
1115
3115
132115
1113122115
_____________
#9
Check out Phrack's great article on userland rootkits. It explains pretty much what you're asking for.
http://www.phrack.org/phrack/62/p62-0x0c_Win32_Portable_Userland_Rootkit.txt
#10
How would you make it so whenever you delete a folder/file, either by the context menu or pressing delete, it deletes the file straight away, without first sending it to the recycle bin? I think it was a registry tweak, but I lost it when I re-installed xp a while ago. Thanks.