int RedoCheatsCallB(char *name, uint32 a, uint8 v, int s) { //bbit edited: this commented out line was changed to the below for the new fceud
| 109 | |
| 110 | //int RedoCheatsCallB(char *name, uint32 a, uint8 v, int s) { //bbit edited: this commented out line was changed to the below for the new fceud |
| 111 | int RedoCheatsCallB(const char *name, uint32 a, uint8 v, int c, int s, int type, void* data) |
| 112 | { |
| 113 | char str[256] = { 0 }; |
| 114 | GetCheatStr(str, a, v, c); |
| 115 | |
| 116 | LVITEM lvi = { 0 }; |
| 117 | lvi.mask = LVIF_TEXT; |
| 118 | lvi.iItem = data ? *((int*)data) : GGLISTSIZE; |
| 119 | lvi.pszText = str; |
| 120 | |
| 121 | if (data) |
| 122 | SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEM, 0, (LPARAM)&lvi); |
| 123 | else |
| 124 | lvi.iItem = SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_INSERTITEM, 0, (LPARAM)&lvi); |
| 125 | lvi.iSubItem = 1; |
| 126 | lvi.pszText = (LPSTR)name; |
| 127 | SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEM, 0, (LPARAM)&lvi); |
| 128 | |
| 129 | lvi.mask = LVIF_STATE; |
| 130 | lvi.stateMask = LVIS_STATEIMAGEMASK; |
| 131 | lvi.state = INDEXTOSTATEIMAGEMASK(s ? 2 : 1); |
| 132 | SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEMSTATE, lvi.iItem, (LPARAM)&lvi); |
| 133 | |
| 134 | |
| 135 | return 1; |
| 136 | } |
| 137 | |
| 138 | void RedoCheatsLB(HWND hwndDlg) |
| 139 | { |
no test coverage detected