Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Ok, Im confussed (hex stuff, again!)

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Ok, Im confussed (hex stuff, again!)
#3860
Posted by: IceCreamFlavor 2004-04-17 04:59:40
Im having yet another issue with hex code... =(

Is it possible to retrieve an integer from the following hex code (ie the amount of gold a player has in Diablo II)?

**********Hex Code********** ****Character Equivilant***
[8b][44][24][04][85][c0][74]         ? D $  … ? t
[14][8a][0a][80][f9][2d][74]         ?
[04][7c][f4][eb][05][40][3b]         ? ù - t
[00][8a][45][04][84][c0][74]           | ? ?  @ ;
[74][02][ff][d0][a1][50][34]         ? E  ? ? t
[15][1c][93][47][00][85][c0]         t  ? ? ? P 4
[b8][04][00][00][00][f3][a5]         “ G … ?
[fd][40][00][56][ff][d5][85]         ?  ó ?
[64][d0][40][00][ff][25][68]         ? @ V ? ? …
[eb][0b][a1][e8][ff][40][00]         d ? @ ? % h
[0c][00][00][8d][47][ff][5e]         ?

Do I take the character equivilant of the hex code directly in order to retrieve in-game variables (or in-program variables in other cases)?  If not, how do I get information from the character equivilant\hex code??

Any help will be so helpful it's not even funny!  =)  Thanks
______________________
   /              \
    IceCreamFlavor
   \______________/
______________________

I'll schoot the ground, make you scared!

I will chop your nuts off!
Message2. Re: Ok, Im confussed (hex stuff, again!)
#3870
Posted by: upCASE 2004-04-18 21:35:54
Hi!
Well, I don't really understand what problem you're having.
Is it possible to retrieve an integer from the following hex code
Sure it is. After all it's just a question of how you want to "interpret" what you are seeing. A single digit hex value ranges from 0x0 to 0xF. Speeking in "integers" (or decimal) that make 0 to 16. Normally we deal with two digit hew values (0x00 to 0xFF), because we use this as the representaion of a byte, or 8 bit. So, with 8 bit we can do a maximum value of 255 by setting each bit to 1, meaning 0xFF.
What you see as a character depends on what you define a character to be. The character "2" does absolutely have nothing to do with the "value" 2. "2" is encoded as 0x32 (50 dec) in the ASCII code. If the user inputs a "2", 0x32 will be the corresponding hex value we can work with.
It all depends on how you encode/interpret values...
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,290.00 ·
 
 
¥918.00 ·
 
 
¥890.00 ·
 
 
¥294.00 ·
 
 
¥430.00 ·
 
 
¥1,380.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0