Ticket #8997: Cruise_Cell.patch
File Cruise_Cell.patch, 20.0 KB (added by , 16 years ago) |
---|
-
engines/cruise/cell.cpp
29 29 30 30 namespace Cruise { 31 31 32 cellStructcellHead;32 Cell g_cellHead; 33 33 34 void resetPtr(cellStruct *ptr) {35 ptr->next = NULL;36 ptr->prev = NULL;34 void Cell::reset() { 35 this->next = NULL; 36 this->prev = NULL; 37 37 } 38 38 39 void freeMessageList(cellStruct *objPtr) { 39 // TODO: Delete. 40 void freeMessageList(Cell *objPtr) { 40 41 /* if (objPtr) { 41 42 if (objPtr->next) 42 43 free(objPtr->next); … … 45 46 } */ 46 47 } 47 48 48 cellStruct *addCell(cellStruct *pHead, int16 overlayIdx, int16 objIdx, int16 type, int16 backgroundPlane, int16 scriptOverlay, int16 scriptNumber, int16 scriptType) { 49 void Cell::addCellAfter(Cell* pNext) { 50 if(!pNext) 51 return; 52 pNext->prev = this; 53 pNext->next = next; 54 if(next) 55 next->prev = pNext; 56 next = pNext; 57 } 58 59 Cell *Cell::addCell(int16 overlayIdx, int16 objIdx, int16 type, int16 backgroundPlane, int16 scriptOverlay, int16 scriptNumber, int16 scriptType) { 60 Cell *pHead = this; 49 61 int16 var; 50 62 51 cellStruct*newElement;52 cellStruct*currentHead = pHead;53 cellStruct*currentHead2;54 cellStruct*currentHead3;63 Cell *newElement; 64 Cell *currentHead = pHead; 65 Cell *currentHead2; 66 Cell *currentHead3; 55 67 56 68 if (getSingleObjectParam(overlayIdx, objIdx, 2, &var) < 0) { 57 69 return 0; … … 86 98 87 99 currentHead = currentHead2; 88 100 89 newElement = ( cellStruct *) mallocAndZero(sizeof(cellStruct));101 newElement = (Cell *) mallocAndZero(sizeof(Cell)); 90 102 91 103 if (!newElement) 92 104 return 0; 93 105 94 newElement->next = currentHead3->next; 95 currentHead3->next = newElement; 106 currentHead3->addCellAfter(newElement); 96 107 97 108 newElement->idx = objIdx; 98 109 newElement->type = type; … … 126 137 return newElement; 127 138 } 128 139 129 void createTextObject(cellStruct *pObject,int overlayIdx, int messageIdx, int x, int y, int width, int16 color, int backgroundPlane, int parentOvl, int parentIdx) {130 140 void Cell::createTextObject(int overlayIdx, int messageIdx, int x, int y, int width, int16 color, int backgroundPlane, int parentOvl, int parentIdx) { 141 Cell *pObject = this; 131 142 const char *ax; 132 cellStruct*savePObject = pObject;133 cellStruct*cx;143 Cell *savePObject = pObject; 144 Cell *cx; 134 145 135 cellStruct*pNewElement;136 cellStruct*si = pObject->next;137 cellStruct*var_2;146 Cell *pNewElement; 147 Cell *si = pObject->next; 148 Cell *var_2; 138 149 139 150 while (si) { 140 151 pObject = si; … … 143 154 144 155 var_2 = si; 145 156 146 pNewElement = (cellStruct *) malloc(sizeof(cellStruct)); 147 memset(pNewElement, 0, sizeof(cellStruct)); 157 pNewElement = (Cell *) mallocAndZero(sizeof(Cell)); 148 158 149 pNewElement->next = pObject->next; 150 pObject->next = pNewElement; 159 pObject->addCellAfter(pNewElement); 151 160 152 161 pNewElement->idx = messageIdx; 153 162 pNewElement->type = OBJ_TYPE_MESSAGE; … … 178 187 } 179 188 } 180 189 181 void removeCell(cellStruct *objPtr, int ovlNumber, int objectIdx, int objType, int backgroundPlane) { 182 cellStruct *currentObj = objPtr->next; 183 cellStruct *previous; 190 void Cell::removeCell(int ovlNumber, int objectIdx, int objType, int backgroundPlane) { 191 Cell *objPtr = this; 192 Cell *currentObj = objPtr->next; 193 Cell *previous; 184 194 185 195 while (currentObj) { 186 196 if (((currentObj->overlay == ovlNumber) || (ovlNumber == -1)) && … … 197 207 currentObj = objPtr->next; 198 208 199 209 while (currentObj) { 200 cellStruct*si;210 Cell *si; 201 211 202 212 si = currentObj; 203 213 204 214 if (si->type == -1) { 205 cellStruct*dx;215 Cell *dx; 206 216 previous->next = si->next; 207 217 208 218 dx = si->next; … … 226 236 } 227 237 } 228 238 229 void linkCell(cellStruct *pHead, int ovl, int obj, int type, int ovl2, int obj2) { 239 void Cell::linkCell(int ovl, int obj, int type, int ovl2, int obj2) { 240 Cell *pHead = this; 230 241 while (pHead) { 231 242 if ((pHead->overlay == ovl) || (ovl == -1)) { 232 243 if ((pHead->idx == obj) || (obj == -1)) { … … 241 252 } 242 253 } 243 254 244 void freezeCell(cellStruct * pObject, int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze) { 255 void Cell::freezeCell(int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze) { 256 Cell * pObject = this; 245 257 while (pObject) { 246 258 if ((pObject->overlay == overlayIdx) || (overlayIdx == -1)) { 247 259 if ((pObject->idx == objIdx) || (objIdx == -1)) { … … 259 271 } 260 272 } 261 273 262 void sortCells(int16 ovlIdx, int16 ovjIdx, cellStruct *objPtr) { 263 cellStruct *pl, *pl2, *pl3, *pl4, *plz, *pllast; 264 cellStruct prov; 274 void Cell::sortCells(int16 ovlIdx, int16 ovjIdx) { 275 Cell *objPtr = this; 276 Cell *pl, *pl2, *pl3, *pl4, *plz, *pllast; 277 Cell prov; 265 278 int16 newz, objz, sobjz; 266 279 267 280 pl4 = NULL; … … 334 347 } 335 348 } 336 349 350 void Cell::freeObjectList() { 351 Cell *pListHead = this; 352 int var_2 = 0; 353 Cell *pCurrent = pListHead->next; 354 355 while (pCurrent) { 356 Cell *pNext = pCurrent->next; 357 358 if (pCurrent->freeze == 0) { 359 free(pCurrent->gfxPtr); 360 free(pCurrent); 361 } 362 363 var_2 = 1; 364 365 pCurrent = pNext; 366 } 367 368 if (var_2) { 369 pListHead->reset(); 370 } 371 } 372 337 373 } // End of namespace Cruise -
engines/cruise/cell.h
33 33 34 34 struct gfxEntryStruct; 35 35 36 struct cellStruct { 37 struct cellStruct *next; 38 struct cellStruct *prev; 36 class Cell { 37 public: 38 Cell *next; 39 Cell *prev; 39 40 int16 idx; 40 41 int16 type; 41 42 int16 overlay; … … 60 61 int16 animCounter; 61 62 int16 animLoop; 62 63 gfxEntryStruct *gfxPtr; 64 65 void reset(); 66 Cell *addCell(int16 overlayIdx, int16 objIdx, int16 type, int16 backgroundPlane, int16 scriptOverlay, int16 scriptNumber, int16 scriptType); 67 void createTextObject(int overlayIdx, int messageIdx, int x, int y, int width, int16 color, int backgroundPlane, int parentOvl, int parentIdx); 68 void removeCell(int ovlNumber, int objectIdx, int objType, int backgroundPlane); 69 void freezeCell(int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze); 70 void sortCells(int16 param1, int16 param2); 71 void linkCell(int ovl, int obj, int type, int ovl2, int obj2); 72 void freeObjectList(); 73 /** 74 * Add a new cell immediately after the current cell. Does nothing if pNext is NULL. 75 * @param pNext the cell to add 76 */ 77 void addCellAfter(Cell* pNext); 63 78 }; 64 79 65 extern cellStructcellHead;80 extern Cell g_cellHead; 66 81 67 void resetPtr(cellStruct * ptr);68 cellStruct *addCell(cellStruct *pHead, int16 overlayIdx, int16 objIdx, int16 type, int16 backgroundPlane, int16 scriptOverlay, int16 scriptNumber, int16 scriptType);69 void createTextObject(cellStruct *pObject, int overlayIdx, int messageIdx, int x, int y, int width, int16 color, int backgroundPlane, int parentOvl, int parentIdx);70 void removeCell(cellStruct *objPtr, int ovlNumber, int objectIdx, int objType, int backgroundPlane);71 void freezeCell(cellStruct * pObject, int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze);72 void sortCells(int16 param1, int16 param2, cellStruct *objPtr);73 void linkCell(cellStruct *pHead, int ovl, int obj, int type, int ovl2, int obj2);74 75 76 82 } // End of namespace Cruise 77 83 78 84 #endif -
engines/cruise/cruise_main.cpp
425 425 resetPtr2(&procHead); 426 426 resetPtr2(&relHead); 427 427 428 resetPtr(&cellHead);428 g_cellHead.reset(); 429 429 430 430 resetActorPtr(&actorHead); 431 431 resetBackgroundIncrustList(&backgroundIncrustHead); … … 574 574 int findObject(int mouseX, int mouseY, int *outObjOvl, int *outObjIdx) { 575 575 char objectName[80]; 576 576 577 cellStruct *currentObject =cellHead.prev;577 Cell *currentObject = g_cellHead.prev; 578 578 579 579 while (currentObject) { 580 580 if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded && … … 1195 1195 } 1196 1196 1197 1197 if (currentScriptPtr) { 1198 createTextObject(&cellHead,ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber);1198 g_cellHead.createTextObject(ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber); 1199 1199 } else { 1200 createTextObject(&cellHead,ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, 0, 0);1200 g_cellHead.createTextObject(ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, 0, 0); 1201 1201 } 1202 1202 1203 1203 userWait = 1; … … 1233 1233 autoTrack = true; 1234 1234 userWait = 0; 1235 1235 userEnabled = 0; 1236 freezeCell(&cellHead,ovlIdx, pHeader->id, 5, -1, 0, 9998);1236 g_cellHead.freezeCell(ovlIdx, pHeader->id, 5, -1, 0, 9998); 1237 1237 } 1238 1238 } 1239 1239 } … … 1871 1871 if (autoTrack) { 1872 1872 if (isAnimFinished(narratorOvl, narratorIdx, &actorHead, ATP_MOUSE)) { 1873 1873 if (autoMsg != -1) { 1874 freezeCell(&cellHead,autoOvl, autoMsg, 5, -1, 9998, 0);1874 g_cellHead.freezeCell(autoOvl, autoMsg, 5, -1, 9998, 0); 1875 1875 1876 1876 char* pText = getText(autoMsg, autoOvl); 1877 1877 … … 1886 1886 userEnabled = false; 1887 1887 } 1888 1888 } else if (autoMsg != -1) { 1889 removeCell(&cellHead,autoOvl, autoMsg, 5, masterScreen);1889 g_cellHead.removeCell(autoOvl, autoMsg, 5, masterScreen); 1890 1890 autoMsg = -1; 1891 1891 } 1892 1892 } -
engines/cruise/debugger.cpp
44 44 const char *pObjType; 45 45 objectParamsQuery params; 46 46 47 cellStruct *currentObject =cellHead.prev;47 Cell *currentObject = g_cellHead.prev; 48 48 49 49 while (currentObject) { 50 50 if (currentObject->overlay > 0 && overlayTable[currentObject->overlay].alreadyLoaded && -
engines/cruise/function.cpp
266 266 return (0); 267 267 } 268 268 269 void freeObjectList(cellStruct *pListHead) {270 int var_2 = 0;271 cellStruct *pCurrent = pListHead->next;272 269 273 while (pCurrent) {274 cellStruct *pNext = pCurrent->next;275 276 if (pCurrent->freeze == 0) {277 free(pCurrent->gfxPtr);278 free(pCurrent);279 }280 281 var_2 = 1;282 283 pCurrent = pNext;284 }285 286 if (var_2) {287 resetPtr(pListHead);288 }289 }290 291 270 int16 Op_FreeCell(void) { 292 freeObjectList(&cellHead);271 g_cellHead.freeObjectList(); 293 272 return (0); 294 273 } 295 274 … … 329 308 overlay = currentScriptPtr->overlayNumber; 330 309 } 331 310 332 removeCell(&cellHead,overlay, idx, 5, masterScreen);311 g_cellHead.removeCell(overlay, idx, 5, masterScreen); 333 312 334 313 return (0); 335 314 } … … 724 703 if (!overlayIdx) 725 704 overlayIdx = currentScriptPtr->overlayNumber; 726 705 727 addCell(&cellHead,overlayIdx, objIdx, objType, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber, currentScriptPtr->type);706 g_cellHead.addCell(overlayIdx, objIdx, objType, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber, currentScriptPtr->type); 728 707 729 708 return 0; 730 709 } … … 752 731 ovlNumber = currentScriptPtr->overlayNumber; 753 732 } 754 733 755 removeCell(&cellHead,ovlNumber, objectIdx, objType, masterScreen);734 g_cellHead.removeCell(ovlNumber, objectIdx, objType, masterScreen); 756 735 757 736 return 0; 758 737 } … … 819 798 } 820 799 } 821 800 822 createTextObject(&cellHead,overlayIdx, var_8, var_6, var_4, var_2, color, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber);801 g_cellHead.createTextObject(overlayIdx, var_8, var_6, var_4, var_2, color, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber); 823 802 824 803 return 0; 825 804 } … … 854 833 } 855 834 856 835 int16 Op_AutoCell(void) { 857 cellStruct*pObject;836 Cell *pObject; 858 837 859 838 int signal = popVar(); 860 839 int loop = popVar(); … … 870 849 if (!overlay) 871 850 overlay = currentScriptPtr->overlayNumber; 872 851 873 pObject = addCell(&cellHead,overlay, obj, 4, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber, currentScriptPtr->type);852 pObject = g_cellHead.addCell(overlay, obj, 4, masterScreen, currentScriptPtr->overlayNumber, currentScriptPtr->scriptNumber, currentScriptPtr->type); 874 853 875 854 if (!pObject) 876 855 return 0; … … 1477 1456 overlayIdx = currentScriptPtr->overlayNumber; 1478 1457 } 1479 1458 1480 freezeCell(&cellHead,overlayIdx, objIdx, objType, backgroundPlante, oldFreeze, newFreezz);1459 g_cellHead.freezeCell(overlayIdx, objIdx, objType, backgroundPlante, oldFreeze, newFreezz); 1481 1460 1482 1461 return 0; 1483 1462 } … … 1723 1702 if (!ovl2) 1724 1703 ovl2 = currentScriptPtr->overlayNumber; 1725 1704 1726 linkCell(&cellHead,ovl, obj, type, ovl2, obj2);1705 g_cellHead.linkCell(ovl, obj, type, ovl2, obj2); 1727 1706 1728 1707 return 0; 1729 1708 } -
engines/cruise/function.h
33 33 int32 opcodeType8(void); 34 34 int16 computeZoom(int param); 35 35 int16 subOp23(int param1, int param2); 36 void freeObjectList(cellStruct *pListHead);37 36 int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType); 38 37 39 38 } // End of namespace Cruise -
engines/cruise/mainDraw.cpp
35 35 short int objIdx; 36 36 short int type; 37 37 short int newValue; 38 cellStruct*pCell;38 Cell *pCell; 39 39 }; 40 40 41 41 autoCellStruct autoCellHead; 42 42 43 void addAutoCell(int overlayIdx, int idx, int type, int newVal, cellStruct*pObject) {43 void addAutoCell(int overlayIdx, int idx, int type, int newVal, Cell *pObject) { 44 44 autoCellStruct *pNewEntry; 45 45 46 46 pNewEntry = new autoCellStruct; … … 1052 1052 unsigned char polygonMask[(320*200)/8]; 1053 1053 1054 1054 // draw poly sprite (OLD: mainDrawSub1) 1055 void mainDrawPolygons(int fileIndex, cellStruct*plWork, int X, int scale, int Y, char *destBuffer, char *dataPtr) {1055 void mainDrawPolygons(int fileIndex, Cell *plWork, int X, int scale, int Y, char *destBuffer, char *dataPtr) { 1056 1056 int newX; 1057 1057 int newY; 1058 1058 int newScale; … … 1181 1181 } 1182 1182 } 1183 1183 1184 void drawSprite(int width, int height, cellStruct*currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf) {1184 void drawSprite(int width, int height, Cell *currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf) { 1185 1185 int x = 0; 1186 1186 int y = 0; 1187 1187 1188 cellStruct* plWork = currentObjPtr;1188 Cell* plWork = currentObjPtr; 1189 1189 int workBufferSize = height * (width / 8); 1190 1190 1191 1191 unsigned char* workBuf = (unsigned char*)malloc(workBufferSize); … … 1367 1367 1368 1368 void mainDraw(int16 param) { 1369 1369 uint8 *bgPtr; 1370 cellStruct*currentObjPtr;1370 Cell *currentObjPtr; 1371 1371 int16 currentObjIdx; 1372 1372 int16 objX1 = 0; 1373 1373 int16 objY1 = 0; … … 1389 1389 1390 1390 autoCellHead.next = NULL; 1391 1391 1392 currentObjPtr = cellHead.next;1392 currentObjPtr = g_cellHead.next; 1393 1393 1394 1394 #ifdef _DEBUG 1395 1395 /* polyOutputBuffer = (char*)bgPtr; … … 1531 1531 1532 1532 //-------------------------------------------------- DRAW OBJECTS TYPE 5 (MSG)-----------------------------------------// 1533 1533 1534 currentObjPtr = cellHead.next;1534 currentObjPtr = g_cellHead.next; 1535 1535 1536 1536 while (currentObjPtr) { 1537 1537 if (currentObjPtr->type == OBJ_TYPE_MESSAGE && currentObjPtr->freeze == 0) { -
engines/cruise/mainDraw.h
39 39 void mainDraw(int16 param); 40 40 void flipScreen(void); 41 41 void buildPolyModel(int X, int Y, int scale, char *ptr2, char *destBuffer, char *dataPtr); 42 void drawSprite(int width, int height, cellStruct*currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf);42 void drawSprite(int width, int height, Cell *currentObjPtr, const uint8 *dataIn, int ys, int xs, uint8 *output, const uint8 *dataBuf); 43 43 void flipPoly(int fileId, int16 *dataPtr, int scale, char** newFrame, int X, int Y, int *outX, int *outY, int *outScale); 44 44 void getPolySize(int positionX, int positionY, int scale, int sizeTable[4], unsigned char *dataPtr); 45 45 bool findPoly(char* dataPtr, int x, int y, int zoom, int mouseX, int mouseY); -
engines/cruise/object.cpp
129 129 if (param3 != 5) 130 130 return; 131 131 globalVars[overlayTable[ovlIdx].state + ptr->_stateTableIdx] = param4; 132 sortCells(ovlIdx, objIdx, &cellHead);132 g_cellHead.sortCells(ovlIdx, objIdx); 133 133 break; 134 134 } 135 135 case UNIQUE: … … 148 148 } 149 149 case 2: { // z 150 150 ptr2->Z = param4; 151 sortCells(ovlIdx, objIdx, &cellHead);151 g_cellHead.sortCells(ovlIdx, objIdx); 152 152 break; 153 153 } 154 154 case 3: { … … 192 192 case THEME: 193 193 case MULTIPLE: { 194 194 globalVars[overlayTable[ovlIdx].state + ptr->_stateTableIdx] = newState; 195 sortCells(ovlIdx, objIdx, &cellHead);195 g_cellHead.sortCells(ovlIdx, objIdx); 196 196 break; 197 197 } 198 198 case UNIQUE: … … 212 212 213 213 destEntry->state = newState; 214 214 215 sortCells(ovlIdx, objIdx, &cellHead);215 g_cellHead.sortCells(ovlIdx, objIdx); 216 216 break; 217 217 } 218 218 default: { -
engines/cruise/saveload.cpp
313 313 314 314 static void syncCell(Common::Serializer &s) { 315 315 int chunkCount = 0; 316 cellStruct*t, *p;316 Cell *t, *p; 317 317 uint16 dummyWord = 0; 318 318 319 319 if (s.isSaving()) { 320 320 // Figure out the number of chunks to save 321 t = cellHead.next;321 t = g_cellHead.next; 322 322 while (t) { 323 323 ++chunkCount; 324 324 t = t->next; 325 325 } 326 326 } else { 327 cellHead.next = NULL; // Not in ASM code, but I guess the variable is defaulted in the EXE327 g_cellHead.next = NULL; // Not in ASM code, but I guess the variable is defaulted in the EXE 328 328 } 329 329 s.syncAsSint16LE(chunkCount); 330 330 331 t = s.isSaving() ? cellHead.next : &cellHead;331 t = s.isSaving() ? g_cellHead.next : &g_cellHead; 332 332 for (int i = 0; i < chunkCount; ++i) { 333 p = s.isSaving() ? t : ( cellStruct *)mallocAndZero(sizeof(cellStruct));333 p = s.isSaving() ? t : (Cell *)mallocAndZero(sizeof(Cell)); 334 334 335 335 s.syncAsUint16LE(dummyWord); 336 336 s.syncAsUint16LE(dummyWord); … … 365 365 else { 366 366 p->next = NULL; 367 367 t->next = p; 368 p->prev = cellHead.prev;369 cellHead.prev = p;368 p->prev = g_cellHead.prev; 369 g_cellHead.prev = p; 370 370 t = p; 371 371 } 372 372 } … … 610 610 resetPreload(); 611 611 freeCTP(); 612 612 613 freezeCell(&cellHead,-1, -1, -1, -1, -1, 0);613 g_cellHead.freezeCell(-1, -1, -1, -1, -1, 0); 614 614 // TODO: unfreeze anims 615 615 616 freeObjectList(&cellHead);616 g_cellHead.freeObjectList(); 617 617 removeAnimation(&actorHead, -1, -1, -1); 618 618 619 619 changeScriptParamInList(-1, -1, &procHead, -1, 0); … … 669 669 resetPtr2(&procHead); 670 670 resetPtr2(&relHead); 671 671 672 resetPtr(&cellHead);672 g_cellHead.reset(); 673 673 674 674 resetActorPtr(&actorHead); 675 675 resetBackgroundIncrustList(&backgroundIncrustHead); … … 755 755 char buffer[256]; 756 756 char saveIdentBuffer[6]; 757 757 int lowMemorySave; 758 cellStruct *currentcellHead;758 Cell *currentCellHead; 759 759 760 760 sprintf(buffer, "CR.%d", saveGameIdx); 761 761 … … 859 859 860 860 lastAni[0] = 0; 861 861 862 current cellHead =cellHead.next;862 currentCellHead = g_cellHead.next; 863 863 864 while (current cellHead) {865 if (current cellHead->type == 5) {866 uint8 *ptr = mainProc14(current cellHead->overlay, currentcellHead->idx);864 while (currentCellHead) { 865 if (currentCellHead->type == 5) { 866 uint8 *ptr = mainProc14(currentCellHead->overlay, currentCellHead->idx); 867 867 868 868 ASSERT(0); 869 869 870 870 if (ptr) { 871 871 ASSERT(0); 872 //*(int16*)(current cellHead->datas+0x2E) = getSprite(ptr,*(int16*)(currentcellHead->datas+0xE));872 //*(int16*)(currentCellHead->datas+0x2E) = getSprite(ptr,*(int16*)(currentCellHead->datas+0xE)); 873 873 } else { 874 874 ASSERT(0); 875 //*(int16*)(current cellHead->datas+0x2E) = 0;875 //*(int16*)(currentCellHead->datas+0x2E) = 0; 876 876 } 877 877 } 878 878 879 current cellHead = currentcellHead->next;879 currentCellHead = currentCellHead->next; 880 880 } 881 881 882 882 //TODO: here, restart music