mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-10-13 10:11:22 -04:00
Support for sprites was added to libiff.
Support for SPR# and SPR2 was added to iff2html. *NOTE: The default exporter used is the PNG one, since web browsers don't like targa. However, since there is a bug in my PNG exporter, I would recommend that you use the targa exporter for a precise representation of the loaded sprite frame(s). Feel free to fix the PNG exporter, btw :)
This commit is contained in:
parent
02dff475c8
commit
6c85920535
16 changed files with 1150 additions and 84 deletions
|
@ -16,7 +16,7 @@ void SetType(HWND hDlg, int type){
|
|||
}
|
||||
|
||||
INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
|
||||
switch (message){
|
||||
switch (message){
|
||||
case WM_INITDIALOG: {
|
||||
CenterDialog(hDlg);
|
||||
|
||||
|
@ -43,15 +43,15 @@ INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
|
|||
|
||||
//Create the tooltips
|
||||
HWND FARInfo = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_NOPREFIX | TTS_BALLOON | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hDlg, NULL, hInst, NULL),
|
||||
DBPFInfo = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_NOPREFIX | TTS_BALLOON | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hDlg, NULL, hInst, NULL);
|
||||
WS_POPUP | TTS_NOPREFIX | 0x40 | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hDlg, NULL, hInst, NULL),
|
||||
DBPFInfo = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
|
||||
WS_POPUP | TTS_NOPREFIX | 0x40 | TTS_ALWAYSTIP,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
hDlg, NULL, hInst, NULL);
|
||||
|
||||
TOOLINFO tinfo = {
|
||||
sizeof(TOOLINFO), //cbSize
|
||||
|
@ -67,9 +67,9 @@ INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
|
|||
L"FAR version 1a is found in The Sims 1.\r\n\r\n"
|
||||
L"Version 1b appears to be a mistake, in which it was intended to take on the version number 2.\r\n\r\n"
|
||||
L"1b and 3 are both found exclusively in The Sims Online.";
|
||||
SendMessage(FARInfo, TTM_SETMAXTIPWIDTH, 2000, 200);
|
||||
SendMessage(FARInfo, TTM_SETTITLE, TTI_INFO_LARGE, (LPARAM) L"FAR version");
|
||||
SendMessage(FARInfo, TTM_ADDTOOL, 0, (LPARAM) &tinfo);
|
||||
SendMessage(FARInfo, (WM_USER + 24), 2000, 200);
|
||||
SendMessage(FARInfo, (WM_USER + 32), TTI_INFO_LARGE, (LPARAM) L"FAR version");
|
||||
SendMessage(FARInfo, TTM_ADDTOOL, 0, (LPARAM) &tinfo);
|
||||
SendMessage(FARInfo, TTM_SETDELAYTIME, TTDT_AUTOPOP, 12000);
|
||||
tinfo.uId = (UINT_PTR) GetDlgItem(hDlg, IDC_NA_DBPFINFO);
|
||||
tinfo.lpszText = (wchar_t*)
|
||||
|
@ -78,21 +78,21 @@ INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
|
|||
L"DBPF 1.0;i7.0 is found in The Sims Online and SimCity 4.\r\n\r\n"
|
||||
L"1.0;i7.0 and 1.1;i7.1 are found in The Sims 2.\r\n\r\n"
|
||||
L"2.0;i3.0 is found in Spore.";
|
||||
SendMessage(DBPFInfo, TTM_SETMAXTIPWIDTH, 2000, 200);
|
||||
SendMessage(DBPFInfo, TTM_SETTITLE, TTI_INFO_LARGE, (LPARAM) L"DBPF version");
|
||||
SendMessage(DBPFInfo, TTM_ADDTOOL, 0, (LPARAM) &tinfo);
|
||||
SendMessage(DBPFInfo, (WM_USER + 24), 2000, 200);
|
||||
SendMessage(DBPFInfo, (WM_USER + 32), TTI_INFO_LARGE, (LPARAM) L"DBPF version");
|
||||
SendMessage(DBPFInfo, TTM_ADDTOOL, 0, (LPARAM) &tinfo);
|
||||
SendMessage(DBPFInfo, TTM_SETDELAYTIME, TTDT_AUTOPOP, 20000);
|
||||
|
||||
SetType(hDlg, TYPE_FAR);
|
||||
} return TRUE;
|
||||
case WM_CTLCOLORSTATIC:
|
||||
if((HWND) lParam == GetDlgItem(hDlg, IDC_NA_TYPETEXT)){
|
||||
SetBkColor((HDC) wParam, GetSysColor(COLOR_WINDOW));
|
||||
return (INT_PTR) GetSysColorBrush(COLOR_WINDOW);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam)){
|
||||
if((HWND) lParam == GetDlgItem(hDlg, IDC_NA_TYPETEXT)){
|
||||
SetBkColor((HDC) wParam, GetSysColor(COLOR_WINDOW));
|
||||
return (INT_PTR) GetSysColorBrush(COLOR_WINDOW);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam)){
|
||||
case IDC_NA_TYPE:
|
||||
if(HIWORD(wParam) == CBN_SELCHANGE)
|
||||
SetType(hDlg, SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0));
|
||||
|
@ -110,7 +110,7 @@ INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){
|
|||
EndDialog(hDlg, 0);
|
||||
} break;
|
||||
case WM_CLOSE:
|
||||
EndDialog(hDlg, 0);
|
||||
EndDialog(hDlg, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ bool Close(){
|
|||
|
||||
Archive::IsOpen = false;
|
||||
|
||||
SetWindowText(hWnd, L"FARDive");
|
||||
SendMessage(statusbar, SB_SETTEXT, 0, (LPARAM) L"");
|
||||
SetWindowText(hWnd, L"FARDive");
|
||||
SendMessage(statusbar, SB_SETTEXT, 0, (LPARAM) L"");
|
||||
|
||||
MENUITEMINFO mii;
|
||||
mii.cbSize = sizeof(MENUITEMINFO);
|
||||
|
@ -86,7 +86,7 @@ bool PopulateEntries(){
|
|||
item.mask = LVIF_TEXT;
|
||||
item.iItem = 0;
|
||||
item.pszText = (LPTSTR) L"Test";
|
||||
SendMessage(hList, LVM_SETITEMCOUNT, EntryCount, LVSICF_NOSCROLL);
|
||||
SendMessage(hList, LVM_SETITEMCOUNT, EntryCount, 0x00000002);
|
||||
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM) &item);
|
||||
|
||||
wchar_t buffer[17];
|
||||
|
@ -162,7 +162,7 @@ bool SetWorkspace(){
|
|||
|
||||
RECT ClientRect;
|
||||
GetClientRect(hWnd, &ClientRect);
|
||||
hList = CreateWindowEx(WS_EX_CLIENTEDGE | LVS_EX_DOUBLEBUFFER | WS_EX_COMPOSITED, WC_LISTVIEW, NULL, LVS_LIST | LVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE,
|
||||
hList = CreateWindowEx(WS_EX_CLIENTEDGE | 0x00010000 | WS_EX_COMPOSITED, WC_LISTVIEW, NULL, LVS_LIST | LVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE,
|
||||
5, 5, 192, ClientRect.bottom-statusbarheight-10, hWnd, NULL, NULL, NULL);
|
||||
SetWindowTheme(hList, L"Explorer", NULL);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#define IFF2HTML
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
@ -58,6 +59,9 @@ int main(int argc, char *argv[]){
|
|||
unsigned chunk = 0;
|
||||
IFFFile * IFFFileInfo;
|
||||
IFFChunkNode * ChunkNode;
|
||||
IFF_TREETABLENODE *currentNode; /* for iterating through BHAVs */
|
||||
char *dummyValue;
|
||||
char *resourceDir;
|
||||
|
||||
if(argc == 1 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){
|
||||
printf("Usage: iff2html [-f] infile (outfile)\n"
|
||||
|
@ -94,7 +98,17 @@ int main(int argc, char *argv[]){
|
|||
/****
|
||||
** Open the file and read in entire contents to memory
|
||||
*/
|
||||
|
||||
|
||||
resourceDir = (char *)malloc(sizeof(char) * 255);
|
||||
dummyValue = (char *)malloc(sizeof(char) * 255);
|
||||
strcpy(resourceDir+2, InFile);
|
||||
*strchr(resourceDir+2, (int)'.') = '\0';
|
||||
resourceDir[0] = '.';
|
||||
resourceDir[1] = '/';
|
||||
CreateDirectory(resourceDir, NULL);
|
||||
printf(resourceDir);
|
||||
fflush(stdout);
|
||||
|
||||
hFile = CreateFile(InFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
hFile = fopen(InFile, "rb");
|
||||
if(hFile == NULL){
|
||||
|
@ -119,6 +133,9 @@ int main(int argc, char *argv[]){
|
|||
return -1;
|
||||
}
|
||||
fclose(hFile);
|
||||
|
||||
|
||||
|
||||
|
||||
/****
|
||||
** Load header information
|
||||
|
@ -129,7 +146,7 @@ int main(int argc, char *argv[]){
|
|||
printf("%sMemory for this file could not be allocated.", "iff2html: error: ");
|
||||
return -1;
|
||||
}
|
||||
if(!iff_read_header(IFFFileInfo, IFFData, FileSize)){
|
||||
if(!iff_read_header(IFFFileInfo, IFFData, FileSize, InFile)){
|
||||
printf("%sNot a valid IFF file.", "iff2html: error: ");
|
||||
return -1;
|
||||
}
|
||||
|
@ -150,7 +167,7 @@ int main(int argc, char *argv[]){
|
|||
free(IFFData);
|
||||
|
||||
for(chunk = 1, ChunkNode = IFFFileInfo->FirstChunk; ChunkNode; ChunkNode = ChunkNode->NextChunk, chunk++)
|
||||
iff_parse_chunk(&ChunkNode->Chunk, ChunkNode->Chunk.Data);
|
||||
iff_parse_chunk(&ChunkNode->Chunk, ChunkNode->Chunk.Data, IFFFileInfo);
|
||||
|
||||
|
||||
/****
|
||||
|
@ -286,8 +303,8 @@ int main(int argc, char *argv[]){
|
|||
!strcmp(ChunkNode->Chunk.Type, "FAMs") ||
|
||||
!strcmp(ChunkNode->Chunk.Type, "TTAs") ){
|
||||
|
||||
IFF_STR * StringData = (IFF_STR*) ChunkNode->Chunk.FormattedData;
|
||||
|
||||
IFF_STR * StringData = (IFF_STR*) ChunkNode->Chunk.FormattedData;
|
||||
|
||||
/****
|
||||
** STR# parsing
|
||||
*/
|
||||
|
@ -352,11 +369,11 @@ int main(int argc, char *argv[]){
|
|||
fprintf(hFile, "</table>\n");
|
||||
}
|
||||
}
|
||||
else if (!strcmp(ChunkNode->Chunk.Type, "BHAV") )
|
||||
{
|
||||
IFF_TREETABLE * TreeTableData = (IFF_TREETABLE*) ChunkNode->Chunk.FormattedData;
|
||||
|
||||
fprintf(hFile, "<table>\n");
|
||||
else if (!strcmp(ChunkNode->Chunk.Type, "BHAV") )
|
||||
{
|
||||
IFF_TREETABLE * TreeTableData = (IFF_TREETABLE*) ChunkNode->Chunk.FormattedData;
|
||||
|
||||
fprintf(hFile, "<table>\n");
|
||||
fprintf(hFile, "<tr><td>Stream Version:</td><td>");
|
||||
switch(TreeTableData->StreamVersion){
|
||||
case 0x8000: fprintf(hFile, "<tt>0x8000</tt> (0)"); break;
|
||||
|
@ -366,58 +383,100 @@ int main(int argc, char *argv[]){
|
|||
default: fprintf(hFile, "Unrecognized"); break;
|
||||
}
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Tree Version:</td><td>");
|
||||
|
||||
fprintf(hFile, "<tr><td>Tree Version:</td><td>");
|
||||
fprintf(hFile, "<tt>%-#10X</tt> (%u)", TreeTableData->TreeVersion, TreeTableData->TreeVersion);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Tree Type:</td><td>");
|
||||
|
||||
fprintf(hFile, "<tr><td>Tree Type:</td><td>");
|
||||
fprintf(hFile, "<tt>%-#4X</tt> (%u)", TreeTableData->Type, TreeTableData->Type);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Parameters:</td><td>");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Parameters:</td><td>");
|
||||
fprintf(hFile, "<tt>%u</tt>", TreeTableData->NumParams);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Local Variables:</td><td>");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Local Variables:</td><td>");
|
||||
fprintf(hFile, "<tt>%u</tt>", TreeTableData->NumLocals);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Tree Nodes:</td><td>");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Tree Nodes:</td><td>");
|
||||
fprintf(hFile, "<tt>%u</tt>", (TreeTableData->NodesEnd - TreeTableData->NodesBegin));
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
|
||||
fprintf(hFile, "</table>\n");
|
||||
if(TreeTableData->StreamVersion >= 0x8000 && TreeTableData->StreamVersion <= 0x8003)
|
||||
{
|
||||
{
|
||||
fprintf(hFile, "<br />\n");
|
||||
fprintf(hFile, "<table class=\"center\">\n");
|
||||
fprintf(hFile, "<tr><th>Node ID</th><th>Primitive #</th><th>Transition True</th><th>Transition False</th><th>Parameter 0</th><th>Parameter 1</th><th>Parameter 2</th><th>Parameter 3</th></tr>\n");
|
||||
|
||||
IFF_TREETABLENODE *currentNode;
|
||||
for (currentNode = TreeTableData->NodesBegin; currentNode != TreeTableData->NodesEnd; currentNode++)
|
||||
{
|
||||
fprintf(hFile, "<tr><td>%d</td>\n", (currentNode-TreeTableData->NodesBegin));
|
||||
{
|
||||
fprintf(hFile, "<tr><td>%d</td>\n", (currentNode-TreeTableData->NodesBegin));
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->PrimitiveNumber, currentNode->PrimitiveNumber);
|
||||
if (currentNode->TransitionTrue < 253)
|
||||
fprintf(hFile, "<td>%d (%-#4X)</td>\n", currentNode->TransitionTrue, currentNode->TransitionTrue);
|
||||
else
|
||||
fprintf(hFile, "<td>%s</td>\n", currentNode->TransitionTrue == 253 ? "error" : currentNode->TransitionTrue == 254 ? "true" : "false");
|
||||
|
||||
|
||||
if (currentNode->TransitionFalse < 253)
|
||||
fprintf(hFile, "<td>%d (%-#4X)</td>\n", currentNode->TransitionFalse, currentNode->TransitionFalse);
|
||||
else
|
||||
fprintf(hFile, "<td>%s</td>\n", currentNode->TransitionFalse == 253 ? "error" : currentNode->TransitionFalse == 254 ? "true" : "false");
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param0, currentNode->Parameters.Param0);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param1, currentNode->Parameters.Param1);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param2, currentNode->Parameters.Param2);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param3, currentNode->Parameters.Param3);
|
||||
if (currentNode->TransitionTrue < 253)
|
||||
fprintf(hFile, "<td>%d (%-#4X)</td>\n", currentNode->TransitionTrue, currentNode->TransitionTrue);
|
||||
else
|
||||
fprintf(hFile, "<td>%s</td>\n", currentNode->TransitionTrue == 253 ? "error" : currentNode->TransitionTrue == 254 ? "true" : "false");
|
||||
|
||||
|
||||
if (currentNode->TransitionFalse < 253)
|
||||
fprintf(hFile, "<td>%d (%-#4X)</td>\n", currentNode->TransitionFalse, currentNode->TransitionFalse);
|
||||
else
|
||||
fprintf(hFile, "<td>%s</td>\n", currentNode->TransitionFalse == 253 ? "error" : currentNode->TransitionFalse == 254 ? "true" : "false");
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param0, currentNode->Parameters.Param0);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param1, currentNode->Parameters.Param1);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param2, currentNode->Parameters.Param2);
|
||||
fprintf(hFile, "<td>%d (%-#6X)</td>\n", currentNode->Parameters.Param3, currentNode->Parameters.Param3);
|
||||
}
|
||||
|
||||
fprintf(hFile, "</table>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!strcmp(ChunkNode->Chunk.Type, "SPR#") || !strcmp(ChunkNode->Chunk.Type, "SPR2"))
|
||||
{
|
||||
IFFSprite * Sprite = (IFFSprite*) ChunkNode->Chunk.FormattedData;
|
||||
|
||||
fprintf(hFile, "<table>\n");
|
||||
fprintf(hFile, "<tr><td>Sprite Version:</td><td>");
|
||||
fprintf(hFile, "<tt>%-#6X</tt>", Sprite->Version);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Sprite Type:</td><td>");
|
||||
fprintf(hFile, "<tt>%s</tt>", ChunkNode->Chunk.Type);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "<tr><td>Number of Frames:</td><td>");
|
||||
fprintf(hFile, "<tt>%u</tt>", Sprite->FrameCount);
|
||||
fprintf(hFile, "</td></tr>\n");
|
||||
|
||||
fprintf(hFile, "</table>\n");
|
||||
if(Sprite->Version >= 500 && Sprite->Version <= 1001)
|
||||
{
|
||||
fprintf(hFile, "<br />\n");
|
||||
fprintf(hFile, "<table class=\"center\">\n");
|
||||
fprintf(hFile, "<tr><th>Image</th><th>X Location</th><th>Y Location</th><th>Width</th><th>Height</th><th>Flag</th><th>Palette ID</th><th>Transparent Pixel</th></tr>\n");
|
||||
|
||||
for (i = 0; i < Sprite->FrameCount; i++)
|
||||
{
|
||||
fprintf(hFile, "<tr><td><img src=\"%s\" /></td>\n", Sprite->Frames[i]->filePath);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->XLocation);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->YLocation);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->Width);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->Height);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->Flag);
|
||||
fprintf(hFile, "<td>%d</td>\n", Sprite->Frames[i]->PaletteID);
|
||||
fprintf(hFile, "<td style=\"background-color:rgb(%d, %d, %d);\"></td>\n", Sprite->Frames[i]->TransparentPixel.R, Sprite->Frames[i]->TransparentPixel.G, Sprite->Frames[i]->TransparentPixel.B);
|
||||
}
|
||||
|
||||
fprintf(hFile, "</table>\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(hFile, "The contents of this chunk could not be parsed.\n");
|
||||
}
|
||||
|
||||
fprintf(hFile, "</div>\n\n");
|
||||
}
|
||||
|
|
46
Tools/iff2html/paramparse.cpp
Normal file
46
Tools/iff2html/paramparse.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
int dummy = 0;
|
||||
char *someString = &dummy;
|
||||
|
||||
someString += '(';
|
||||
int currentParamIdx = 0;
|
||||
unsigned short currentParam;
|
||||
unsigned short param0;
|
||||
do
|
||||
{
|
||||
currentParam = *(¶m0 + currentParamIdx);
|
||||
if (currentParamIdx > 0)
|
||||
someString += ' ';
|
||||
|
||||
// Now, we iterate through the nibbles, starting at the high nibble and working our way down
|
||||
int shiftingAmountForCurrentNibble = 12;
|
||||
do
|
||||
{
|
||||
char nibbleType = 0;
|
||||
int currentNibble = (currentParam >> shiftingAmountForCurrentNibble) & 0xF;
|
||||
if (currentNibble > 9)
|
||||
{
|
||||
if (currentNibble > 15) //((currentNibble - 10) > 5)
|
||||
nibbleType = 120;
|
||||
else
|
||||
nibbleType = currentNibble + 55;
|
||||
}
|
||||
else
|
||||
nibbleType = currentNibble + 48;
|
||||
|
||||
char *unk = &nibbleType;
|
||||
char oldVal;
|
||||
do
|
||||
{
|
||||
oldVal = *unk;
|
||||
}
|
||||
while (*unk)
|
||||
|
||||
|
||||
bool outOfBounds = shiftingAmountForCurrentNibble - 4 < 0;
|
||||
shiftingAmountForCurrentNibble -= 4;
|
||||
}
|
||||
while (!outOfBounds);
|
||||
|
||||
}
|
||||
while (currentParamIdx < 4);
|
||||
someString += ')';
|
Loading…
Add table
Add a link
Reference in a new issue