| 1034 | } |
| 1035 | |
| 1036 | DWORD GetItem1(DWORD index) |
| 1037 | { |
| 1038 | SETBITS setBits; |
| 1039 | DWORD distFromBase; |
| 1040 | DWORD groupIndex; |
| 1041 | DWORD dwordIndex; |
| 1042 | DWORD itemIndex; |
| 1043 | DWORD bitGroup; |
| 1044 | |
| 1045 | // If the index is at begin of the group, we just return the start value |
| 1046 | if((index & 0x1FF) == 0) |
| 1047 | return IndexToItem1[INDEX_TO_GROUP(index)]; |
| 1048 | |
| 1049 | // Find the group where the index belongs to |
| 1050 | groupIndex = FindGroup_Items1(index); |
| 1051 | |
| 1052 | // Calculate the base200 dword index (HOTS: 1959FD4) |
| 1053 | distFromBase = index - BaseVals[groupIndex].BaseValue200; |
| 1054 | dwordIndex = groupIndex << 0x04; |
| 1055 | |
| 1056 | // Calculate the dword index including the sub-checkpoint |
| 1057 | if(distFromBase < BaseVals[groupIndex].AddValue100) |
| 1058 | { |
| 1059 | // HOTS: 1959FF1 |
| 1060 | if(distFromBase < BaseVals[groupIndex].AddValue80) |
| 1061 | { |
| 1062 | // HOTS: 0195A000 |
| 1063 | if(distFromBase >= BaseVals[groupIndex].AddValue40) |
| 1064 | { |
| 1065 | // HOTS: 195A007 |
| 1066 | distFromBase = distFromBase - BaseVals[groupIndex].AddValue40; |
| 1067 | dwordIndex += 2; |
| 1068 | } |
| 1069 | } |
| 1070 | else |
| 1071 | { |
| 1072 | // HOTS: 195A00E |
| 1073 | if(distFromBase < BaseVals[groupIndex].AddValueC0) |
| 1074 | { |
| 1075 | // HOTS: 195A01A |
| 1076 | distFromBase = distFromBase - BaseVals[groupIndex].AddValue80; |
| 1077 | dwordIndex += 4; |
| 1078 | } |
| 1079 | else |
| 1080 | { |
| 1081 | // HOTS: 195A01F |
| 1082 | distFromBase = distFromBase - BaseVals[groupIndex].AddValueC0; |
| 1083 | dwordIndex += 6; |
| 1084 | } |
| 1085 | } |
| 1086 | } |
| 1087 | else |
| 1088 | { |
| 1089 | // HOTS: 195A026 |
| 1090 | if(distFromBase < BaseVals[groupIndex].AddValue180) |
| 1091 | { |
| 1092 | // HOTS: 195A037 |
| 1093 | if(distFromBase < BaseVals[groupIndex].AddValue140) |
no test coverage detected