MCPcopy Create free account
hub / github.com/TASEmulators/fceux / GetEditHexData

Function GetEditHexData

src/drivers/win/debugger.cpp:862–892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862int *GetEditHexData(HWND hwndDlg, int id){
863 static int data[31];
864 char str[60];
865 int i,j, k;
866
867 GetDlgItemText(hwndDlg,id,str,60);
868 memset(data,0,31*sizeof(int));
869 j=0;
870 for(i = 0;i < 60;i++){
871 if(str[i] == 0)break;
872 if((str[i] >= '0') && (str[i] <= '9'))j++;
873 if((str[i] >= 'A') && (str[i] <= 'F'))j++;
874 if((str[i] >= 'a') && (str[i] <= 'f'))j++;
875 }
876
877 j=j&1;
878 for(i = 0;i < 60;i++){
879 if(str[i] == 0)break;
880 k = -1;
881 if((str[i] >= '0') && (str[i] <= '9'))k=str[i]-'0';
882 if((str[i] >= 'A') && (str[i] <= 'F'))k=(str[i]-'A')+10;
883 if((str[i] >= 'a') && (str[i] <= 'f'))k=(str[i]-'a')+10;
884 if(k != -1){
885 if(j&1)data[j>>1] |= k;
886 else data[j>>1] |= k<<4;
887 j++;
888 }
889 }
890 data[j>>1]=-1;
891 return data;
892}
893
894void UpdateRegs(HWND hwndDlg) {
895 if (DebuggerWasUpdated) {

Callers 1

PatcherCallBFunction · 0.85

Calls 1

GetDlgItemTextFunction · 0.85

Tested by

no test coverage detected