Editing Template:Ps2configrev
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 78: | Line 78: | ||
For this to work it would be needed also to split the original hex value in digits (4 bits, or half a byte). And pass the digits individually to another template containing a "switch" statement that should return 16 posible values in decimal (if 0=0, 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, A=10, B=11, C=12, D=13, E=14, F=15)<br> | For this to work it would be needed also to split the original hex value in digits (4 bits, or half a byte). And pass the digits individually to another template containing a "switch" statement that should return 16 posible values in decimal (if 0=0, 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, A=10, B=11, C=12, D=13, E=14, F=15)<br> | ||
The endianess is something trivial and easy to implement as an additional parameter when calling the template, but i think is better to simplify the usage as most as posible so the candidate template names by now are: <nowiki>{{hex2dec1byte}}, {{hex2dec2bytesLE}}, {{hex2dec2bytesBE}}</nowiki> | The endianess is something trivial and easy to implement as an additional parameter when calling the template, but i think is better to simplify the usage as most as posible so the candidate template names by now are: <nowiki>{{hex2dec1byte}}, {{hex2dec2bytesLE}}, {{hex2dec2bytesBE}}</nowiki> | ||
[[Category:Games]]</noinclude> | [[Category:Games]]</noinclude> |