You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(20) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(9) |
Jun
(16) |
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: Kai-Cheung L. <kc...@us...> - 2006-10-15 03:20:48
|
Hi! I am a computer science student with software maintainence background (experience in mainrtaining mawk, an implementation of awk). I have downloaded the svn tree of this project and I found out that at this stage, the trunk currently does not compile because: - src/Makefile.am has an entry of sys.c which does not exist in src/ - in the last attempt of adding the fullscreen toggle feature, the developer forgot to add fullscreen as a global variable in osystem.h and init it to zero. I have fixed these bugs and the program now compiles smoothly in my Ubuntu Linux box. However I cannot commit these changes because I am currently not a member of this team. Therefore I wish to join the twin-e team in order to commit these changes. If I am accepted, I plan to contribute in these roles: - update the documentation - port (and compile) to Linux platforms - testing I am looking forward to become a member of twin-e. Cheers, Kai-Cheung Leung user_id: 1299295 user_name: kcleung |
|
From: Alexandre F. <ale...@us...> - 2005-10-08 02:08:23
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/src Modified Files: input.c mainSDL.c osystem.h Log Message: Add toggle FullScreen with F12 key. Index: input.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/input.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** input.c 28 Jun 2005 21:55:47 -0000 1.13 --- input.c 8 Oct 2005 02:08:15 -0000 1.14 *************** *** 18,22 **** #include "lba.h" ! #include <SDL/SDL.h> void readKeyboard(void) --- 18,22 ---- #include "lba.h" ! #include "SDL/SDL.h" void readKeyboard(void) *************** *** 197,201 **** case SDLK_F12: { ! fkeys = 12; // F12 break; } --- 197,202 ---- case SDLK_F12: { ! // fkeys = 12; // F12 ! osystem_fullScreen(); break; } Index: mainSDL.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainSDL.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** mainSDL.c 28 Jun 2005 21:55:48 -0000 1.36 --- mainSDL.c 8 Oct 2005 02:08:15 -0000 1.37 *************** *** 566,569 **** --- 566,615 ---- } + void osystem_FlaPCXCrossFade(SDL_Surface *image) + { + int i; + SDL_Surface *backupSurface; + SDL_Surface *newSurface; + SDL_Surface *tempSurface; + Uint32 rmask, gmask, bmask, amask; + + #if SDL_BYTEORDER == SDL_BIG_ENDIAN + rmask = 0xff000000; + gmask = 0x00ff0000; + bmask = 0x0000ff00; + amask = 0x000000ff; + #else + rmask = 0x000000ff; + gmask = 0x0000ff00; + bmask = 0x00ff0000; + amask = 0xff000000; + #endif + + backupSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 480, 32, rmask, gmask, bmask, 0); + newSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, 640, 480, 32, rmask, gmask, bmask, 0); + + SDL_SetColors(sdl_screen, image->format->palette->colors, 0, 256); + + SDL_BlitSurface(sdl_screen, NULL, backupSurface, NULL); + SDL_BlitSurface(tempSurface, NULL, newSurface, NULL); + + for (i = 0; i < 8; i++) + { + SDL_BlitSurface(backupSurface, NULL, surfaceTable[i], NULL); + SDL_SetAlpha(newSurface,SDL_SRCALPHA | SDL_RLEACCEL, i * 32); + SDL_BlitSurface(newSurface, NULL, surfaceTable[i], NULL); + SDL_BlitSurface(surfaceTable[i], NULL, sdl_screen, NULL); + SDL_UpdateRect(sdl_screen, 0, 0, 0, 0); + SDL_Delay(20); + } + + SDL_BlitSurface(newSurface, NULL, sdl_screen, NULL); + SDL_UpdateRect(sdl_screen, 0, 0, 0, 0); + + SDL_FreeSurface(backupSurface); + SDL_FreeSurface(newSurface); + SDL_FreeSurface(tempSurface); + } + void osystem_set320x200Mode( boolean mode ) { *************** *** 598,602 **** --- 644,669 ---- } + void osystem_fullScreen() + { + SDL_FreeSurface(sdl_screen); + sdl_screen = 0; + + fullscreen = 1 - fullscreen; + + if (fullscreen == 0) + { + sdl_screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE); + SDL_SetColors(sdl_screen, palette, 0, 256); + SDL_ShowCursor(1); + } + else + { + sdl_screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE|SDL_FULLSCREEN); + SDL_SetColors(sdl_screen, palette, 0, 256); + SDL_ShowCursor(0); + } + requestBackgroundRedraw = 1; + } #endif Index: osystem.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/osystem.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** osystem.h 18 Nov 2004 23:06:04 -0000 1.17 --- osystem.h 8 Oct 2005 02:08:15 -0000 1.18 *************** *** 17,20 **** --- 17,22 ---- */ + #include "SDL.h" + /* class OSystem *************** *** 29,32 **** --- 31,35 ---- void osystem_delay(int time); void osystem_crossFade(char *buffer, char *palette); + void osystem_FlaPCXCrossFade(SDL_Surface *image); void osystem_fadeBlackToWhite(); void osystem_updateImage(); *************** *** 49,52 **** --- 52,57 ---- void osystem_set320x200Mode(boolean mode); + void osystem_fullScreen(); + ////////////////// |
|
From: Vincent H. <ya...@us...> - 2005-10-02 23:17:21
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31990/src Modified Files: life_binary.c Log Message: Fix signed/unsigned error Index: life_binary.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/life_binary.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** life_binary.c 12 Jun 2005 20:19:29 -0000 1.12 --- life_binary.c 2 Oct 2005 14:22:18 -0000 1.13 *************** *** 199,203 **** case 23: // SET_TRACK { ! lactor->positionInMoveScript =READ_LE_U16(actorScriptPtr); actorScriptPtr += 2; break; --- 199,203 ---- case 23: // SET_TRACK { ! lactor->positionInMoveScript =READ_LE_S16(actorScriptPtr); actorScriptPtr += 2; break; |
|
From: Vincent H. <ya...@us...> - 2005-10-02 22:50:40
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29856/src Modified Files: HQRlib.c flaplayer.c fullRedraw.c mainLoop.c mainMenu.c renderer.c streamReader.c streamReader.h Log Message: Fix bunch of memory corruption Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** renderer.c 28 Jun 2005 21:55:48 -0000 1.24 --- renderer.c 2 Oct 2005 14:13:30 -0000 1.25 *************** *** 176,179 **** --- 176,181 ---- int temp; + assert(frontVideoBufferbis == frontVideoBuffer); + _numOfPoints = READ_LE_U16(costumePtr); costumePtr += 2; *************** *** 330,333 **** --- 332,337 ---- ptr3 = pri2Ptr2 = _partsPtr2 + 18; + assert(frontVideoBufferbis == frontVideoBuffer); + do { *************** *** 387,390 **** --- 391,395 ---- }while (--_numOfPrimitives); } + assert(frontVideoBufferbis == frontVideoBuffer); return (finishRender((unsigned char *) _shadePtr)); *************** *** 762,765 **** --- 767,772 ---- esi += 2; + assert(frontVideoBufferbis == frontVideoBuffer); + if (temp) // if there is polygones { *************** *** 1031,1034 **** --- 1038,1043 ---- renderTabEntryPtr2 = renderTab; + assert(frontVideoBufferbis == frontVideoBuffer); + renderTabSortedPtr = renderTabSorted; for (i = 0; i < _numOfPrimitives; i++) // then we sort the polygones (FIXME: very slow !) *************** *** 1056,1059 **** --- 1065,1070 ---- renderTabEntryPtr2++;*/ + assert(frontVideoBufferbis == frontVideoBuffer); + if (_numOfPrimitives) { *************** *** 1082,1091 **** color = (READ_LE_S32(&lineCoordinatesPtr->data) & 0xFF00) >> 8; ! x1 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->x1); ! y1 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->y1); ! x2 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->x2); ! y2 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->y2); drawLine(x1,y1,x2,y2,color); break; } --- 1093,1106 ---- color = (READ_LE_S32(&lineCoordinatesPtr->data) & 0xFF00) >> 8; ! x1 = READ_LE_S16((unsigned short int*)&lineCoordinatesPtr->x1); ! y1 = READ_LE_S16((unsigned short int*)&lineCoordinatesPtr->y1); ! x2 = READ_LE_S16((unsigned short int*)&lineCoordinatesPtr->x2); ! y2 = READ_LE_S16((unsigned short int*)&lineCoordinatesPtr->y2); + assert(frontVideoBufferbis == frontVideoBuffer); + drawLine(x1,y1,x2,y2,color); + + assert(frontVideoBufferbis == frontVideoBuffer); break; } *************** *** 1111,1116 **** --- 1126,1138 ---- } + assert(frontVideoBufferbis == frontVideoBuffer); + if (ComputePoly_A() != 2) + { + assert(frontVideoBufferbis == frontVideoBuffer); FillVertic_A(FillVertic_AType, color); + } + + assert(frontVideoBufferbis == frontVideoBuffer); break; *************** *** 1170,1174 **** --- 1192,1198 ---- circleParam3-=3; + assert(frontVideoBufferbis == frontVideoBuffer); circle_fill(circleParam4, circleParam5, circleParam3, circleParam1); + assert(frontVideoBufferbis == frontVideoBuffer); /*prepareCircle(circleParam3*/ *************** *** 1224,1229 **** return;*/ ! if(vbottom >= 480) return; out = frontVideoBuffer + 640*vtop; --- 1248,1262 ---- return;*/ ! if(vtop<0) ! { ! return; ! } ! ! if(vbottom >= 479) ! { return; + } + + assert(frontVideoBufferbis == frontVideoBuffer); out = frontVideoBuffer + 640*vtop; *************** *** 1538,1541 **** --- 1571,1576 ---- if(currentXPos>=0 && currentXPos<640) *(out2)=(unsigned char)(((startColor + stopColor)/2)>>8); + + assert(frontVideoBufferbis == frontVideoBuffer); } else *************** *** 1553,1556 **** --- 1588,1593 ---- if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; + + assert(frontVideoBufferbis == frontVideoBuffer); currentColor&=0xFF; startColor+=colorSize; *************** *** 1561,1564 **** --- 1598,1603 ---- if(currentXPos>=0 && currentXPos<640) *(out2+1) = currentColor>>8; + + assert(frontVideoBufferbis == frontVideoBuffer); } else if(hsize==2) *************** *** 1576,1579 **** --- 1615,1620 ---- *(out2) = currentColor>>8; + assert(frontVideoBufferbis == frontVideoBuffer); + out2++; currentXPos++; *************** *** 1587,1590 **** --- 1628,1633 ---- *(out2) = currentColor>>8; + assert(frontVideoBufferbis == frontVideoBuffer); + currentColor&=0xFF; startColor+=colorSize; *************** *** 1596,1599 **** --- 1639,1644 ---- if(currentXPos>=0 && currentXPos<640) *(out2+1) = currentColor>>8; + + assert(frontVideoBufferbis == frontVideoBuffer); } else *************** *** 1613,1616 **** --- 1658,1663 ---- if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; + + assert(frontVideoBufferbis == frontVideoBuffer); out2++; currentXPos++; *************** *** 1628,1631 **** --- 1675,1680 ---- if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; + + assert(frontVideoBufferbis == frontVideoBuffer); currentXPos++; currentColor&=0xFF; *************** *** 1637,1640 **** --- 1686,1690 ---- *(out2+1) = currentColor>>8; + assert(frontVideoBufferbis == frontVideoBuffer); currentXPos++; out2+=2; *************** *** 1648,1651 **** --- 1698,1702 ---- currentLine++; }while(--renderLoop); + assert(frontVideoBufferbis == frontVideoBuffer); break; } *************** *** 1658,1661 **** --- 1709,1714 ---- } }; + + assert(frontVideoBufferbis == frontVideoBuffer); } *************** *** 1707,1764 **** ptr1[1] = pRenderV1[1]; ptr1[2] = pRenderV1[2]; - - if (vbottom < vtop) - return (0); /* ! if (vleft < textWindowLeft) ! { ! if (vright < textWindowLeft) ! return (0); ! // pRenderSub(); ! // printf("3Dcropping...\n"); ! // exit(1); ! // if(vright==textWindowLeft) ! return (2); ! } ! ! if (vright > textWindowRight) ! { ! if (vleft > textWindowRight) ! return (0); ! // pRenderSub2(); ! // printf("3Dcropping...\n"); ! // exit(1); ! // if(vleft==textWindowRight) ! return (2); ! } ! ! if (vtop < textWindowTop) ! { ! if (vbottom < textWindowTop) ! return (0); ! // pRenderSub3(); ! // printf("3Dcropping...\n"); ! // exit(1); ! // if(vbottom==textWindowBottom) ! return (2); ! } ! ! if (vbottom > textWindowBottom) ! { ! if (vtop > textWindowBottom) ! return (0); ! // pRenderSub4(); ! // printf("3Dcropping...\n"); ! // exit(1); ! // if(vtop==textWindowBottom) ! return (2); ! } ! ! if (polyCropped) ! { ! printf("ComputePoly_A-> cropped poly !\n"); ! exit(1); ! }*/ ! ptr1 = pRenderV1; // on retourne au debut de la liste --- 1760,1773 ---- ptr1[1] = pRenderV1[1]; ptr1[2] = pRenderV1[2]; /* ! if(vleft<0) ! return 2; ! if(vright>=640) ! return 2; ! if(vtop<0) ! return 2; ! if(vbottom>=480) ! return 2; ! */ ptr1 = pRenderV1; // on retourne au debut de la liste *************** *** 1837,1841 **** { // *(ptr3)=((temp7&0xFFFF0000)>>16); ! *(ptr3) = (short int) vfloat2; ptr3 += direction; // temp7+=step; --- 1846,1851 ---- { // *(ptr3)=((temp7&0xFFFF0000)>>16); ! if((ptr3-polyTab) < 960) ! *(ptr3) = (short int) vfloat2; ptr3 += direction; // temp7+=step; *************** *** 1891,1895 **** for (i = 0; i < oldVertexX; i++) { ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp += test.temp; --- 1901,1906 ---- for (i = 0; i < oldVertexX; i++) { ! if((ptr3-polyTab2) < 960) ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp += test.temp; *************** *** 1938,1942 **** for (i = 0; i <= oldVertexX; i++) { ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp -= test.temp; --- 1949,1954 ---- for (i = 0; i <= oldVertexX; i++) { ! if((ptr3-polyTab2) < 960) ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp -= test.temp; *************** *** 1999,2003 **** { // *(ptr3)=((temp7&0xFFFF0000)>>16); ! *(ptr3) = (short int) vfloat2; ptr3 += direction; // temp7+=step; --- 2011,2016 ---- { // *(ptr3)=((temp7&0xFFFF0000)>>16); ! if((ptr3-polyTab) < 960) ! *(ptr3) = (short int) vfloat2; ptr3 += direction; // temp7+=step; *************** *** 2053,2057 **** for (i = 0; i < oldVertexX; i++) { ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp += test.temp; --- 2066,2071 ---- for (i = 0; i < oldVertexX; i++) { ! if((ptr3-polyTab2) < 960) ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp += test.temp; *************** *** 2100,2104 **** for (i = 0; i <= oldVertexX; i++) { ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp -= test.temp; --- 2114,2119 ---- for (i = 0; i <= oldVertexX; i++) { ! if((ptr3-polyTab2) < 960) ! *(ptr3) = reste.temp; ptr3 += direction; reste.temp -= test.temp; *************** *** 2192,2195 **** --- 2207,2211 ---- } + assert(frontVideoBufferbis == frontVideoBuffer); out = frontVideoBuffer + screenLockupTable[b] + a; Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** fullRedraw.c 28 Jun 2005 21:55:47 -0000 1.60 --- fullRedraw.c 2 Oct 2005 14:13:30 -0000 1.61 *************** *** 60,63 **** --- 60,65 ---- int spriteHeight; + assert(frontVideoBufferbis == frontVideoBuffer); + temp1 = fullRedrawVar1; temp2 = fullRedrawVar2; *************** *** 1832,1835 **** --- 1834,1839 ---- ptr = brickMaskTable[spriteNum]; + assert(ptr); + left = x + *(ptr + 2); top = y + *(ptr + 3); Index: mainLoop.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainLoop.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** mainLoop.c 28 Jun 2005 21:55:47 -0000 1.52 --- mainLoop.c 2 Oct 2005 14:13:30 -0000 1.53 *************** *** 470,473 **** --- 470,475 ---- // 2nd boucle de process des acteurs + assert(frontVideoBufferbis == frontVideoBuffer); + for (i = 0; i < numActorInRoom; i++) { *************** *** 587,590 **** --- 589,594 ---- #endif + assert(frontVideoBufferbis == frontVideoBuffer); + if ( !disableScreenRecenter) { Index: streamReader.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/streamReader.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** streamReader.h 4 May 2005 08:18:40 -0000 1.5 --- streamReader.h 2 Oct 2005 14:13:30 -0000 1.6 *************** *** 56,60 **** typedef struct streamReader streamReader; ! boolean streamReader_open(streamReader* pThis, const int8* fileName); void streamReader_close(streamReader* pThis); void streamReader_feedBuffer(streamReader* pThis); --- 56,60 ---- typedef struct streamReader streamReader; ! boolean streamReader_open(streamReader* pThis, const int8* fileName, int fatal); void streamReader_close(streamReader* pThis); void streamReader_feedBuffer(streamReader* pThis); Index: flaplayer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/flaplayer.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** flaplayer.c 21 Jul 2004 19:40:51 -0000 1.19 --- flaplayer.c 2 Oct 2005 14:13:30 -0000 1.20 *************** *** 168,172 **** int i; ! streamReader_open(&fla_streamReader, (const int8*)file); workVideoBufferCopy=workVideoBuffer; --- 168,172 ---- int i; ! streamReader_open(&fla_streamReader, (const int8*)file,0); workVideoBufferCopy=workVideoBuffer; Index: streamReader.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/streamReader.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** streamReader.c 4 May 2005 20:26:21 -0000 1.5 --- streamReader.c 2 Oct 2005 14:13:30 -0000 1.6 *************** *** 102,106 **** #endif ! boolean streamReader_open(streamReader* pThis, const int8* fileName) { #ifndef DREAMCAST --- 102,106 ---- #endif ! boolean streamReader_open(streamReader* pThis, const int8* fileName, int fatal) { #ifndef DREAMCAST *************** *** 122,125 **** --- 122,130 ---- else { + if(fatal) + { + printf("FATAL: Can't find %s\n", fileName); + exit(-1); + } return false; } Index: mainMenu.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainMenu.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mainMenu.c 18 Jun 2005 16:55:17 -0000 1.20 --- mainMenu.c 2 Oct 2005 14:13:30 -0000 1.21 *************** *** 404,409 **** else { ! blitRectangle(left, top, right, bottom, (char *) workVideoBuffer, left, top, ! (char *) frontVideoBuffer); right2 = right; drawBoxInsideTrans(left, top, right2, bottom, 4); --- 404,408 ---- else { ! blitRectangle(left, top, right, bottom, (char *) workVideoBuffer, left, top,(char *)frontVideoBuffer); right2 = right; drawBoxInsideTrans(left, top, right2, bottom, 4); *************** *** 638,679 **** void blitRectangle(int left, int top, int right, int bottom, char *source, int leftDest, int topDest, char *dest) { ! int largeur; ! int hauteur; ! char *s; ! char *d; ! int interligne; ! int temp3; ! int i; ! int j; ! assert(left >= 0); ! assert(right < 640); ! assert(top >= 0); ! assert(bottom < 480); ! s = screenLockupTable[top] + source + left; ! d = screenLockupTable[topDest] + dest + leftDest; ! largeur = right - left + 1; ! hauteur = bottom - top + 1; ! interligne = largeurEcran - largeur; ! temp3 = left; ! left >>= 2; ! temp3 &= 3; ! for(j = 0; j < hauteur; j++) { ! for (i = 0; i < largeur; i++) { ! *(d++) = *(s++); } ! d += interligne; ! s += interligne; } } --- 637,678 ---- void blitRectangle(int left, int top, int right, int bottom, char *source, int leftDest, int topDest, char *dest) { ! int largeur; ! int hauteur; ! char *s; ! char *d; ! int interligne; ! int temp3; ! int i; ! int j; ! assert(left >= 0); ! assert(right < 640); ! assert(top >= 0); ! assert(bottom < 480); ! s = screenLockupTable[top] + source + left; ! d = screenLockupTable[topDest] + dest + leftDest; ! largeur = right - left + 1; ! hauteur = bottom - top + 1; ! interligne = largeurEcran - largeur; ! temp3 = left; ! left >>= 2; ! temp3 &= 3; ! for(j = 0; j < hauteur; j++) { ! for (i = 0; i < largeur; i++) { ! *(d++) = *(s++); } ! d += interligne; ! s += interligne; } } Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** HQRlib.c 28 Jun 2005 21:55:47 -0000 1.12 --- HQRlib.c 2 Oct 2005 14:13:30 -0000 1.13 *************** *** 305,309 **** unsigned short int mode; ! if(!streamReader_open( &fileReader, (int8*) resourceName )) return 0; --- 305,309 ---- unsigned short int mode; ! if(!streamReader_open( &fileReader, (int8*) resourceName, 1)) return 0; *************** *** 442,446 **** Size_HQR(hqrPtr->fileName, arg_4); ! if(!streamReader_open( &fileReader, (int8*) hqrPtr->fileName )) return 0; --- 442,446 ---- Size_HQR(hqrPtr->fileName, arg_4); ! if(!streamReader_open( &fileReader, (int8*) hqrPtr->fileName, 1 )) return 0; *************** *** 590,594 **** unsigned char *temp; ! if(!streamReader_open( &fileReader, (int8*)fileName )) return(-1); --- 590,594 ---- unsigned char *temp; ! if(!streamReader_open( &fileReader, (int8*)fileName, 1 )) return(-1); *************** *** 647,651 **** unsigned int offToData; ! if(!streamReader_open( &fileReader, (int8*)fileName )) { return 0; --- 647,651 ---- unsigned int offToData; ! if(!streamReader_open( &fileReader, (int8*)fileName, 1 )) { return 0; |
|
From: Vincent H. <ya...@us...> - 2005-10-02 22:50:40
|
Update of /cvsroot/twin-e/twin-e/win32/visual 7.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29856/win32/visual 7.1 Modified Files: twin-e.vcproj Log Message: Fix bunch of memory corruption Index: twin-e.vcproj =================================================================== RCS file: /cvsroot/twin-e/twin-e/win32/visual 7.1/twin-e.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** twin-e.vcproj 26 Jun 2005 18:51:57 -0000 1.1 --- twin-e.vcproj 2 Oct 2005 14:13:30 -0000 1.2 *************** *** 2,14 **** <VisualStudioProject ProjectType="Visual C++" ! Version="7.10" Name="twin-e" ProjectGUID="{6275F3F1-F764-45C8-8E74-AE098B8A8FD5}" RootNamespace="twine" ! Keyword="ManagedCProj"> <Platforms> <Platform ! Name="Win32"/> </Platforms> <Configurations> <Configuration --- 2,18 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="twin-e" ProjectGUID="{6275F3F1-F764-45C8-8E74-AE098B8A8FD5}" RootNamespace="twine" ! Keyword="ManagedCProj" ! > <Platforms> <Platform ! Name="Win32" ! /> </Platforms> + <ToolFiles> + </ToolFiles> <Configurations> <Configuration *************** *** 18,62 **** ConfigurationType="1" CharacterSet="2" ! ManagedExtensions="FALSE"> <Tool Name="VCCLCompilerTool" Optimization="0" ! PreprocessorDefinitions="WIN32;_DEBUG;GAME_DEBUG" ! MinimalRebuild="FALSE" BasicRuntimeChecks="0" RuntimeLibrary="3" WarningLevel="3" ! DebugInformationFormat="4"/> <Tool ! Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" ! AdditionalDependencies="SDL.lib SDLmain.lib SDL_ttf.lib freetype2110MT_D.lib SDL_mixer.lib" OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="2" ! GenerateDebugInformation="TRUE" AssemblyDebug="1" SubSystem="1" ! EntryPointSymbol=""/> ! <Tool ! Name="VCMIDLTool"/> ! <Tool ! Name="VCPostBuildEventTool"/> <Tool ! Name="VCPreBuildEventTool"/> <Tool ! Name="VCPreLinkEventTool"/> <Tool ! Name="VCResourceCompilerTool"/> <Tool ! Name="VCWebServiceProxyGeneratorTool"/> <Tool ! Name="VCXMLDataGeneratorTool"/> <Tool ! Name="VCWebDeploymentTool"/> <Tool ! Name="VCManagedWrapperGeneratorTool"/> <Tool ! Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration --- 22,95 ---- ConfigurationType="1" CharacterSet="2" ! ManagedExtensions="0" ! > ! <Tool ! Name="VCPreBuildEventTool" ! /> ! <Tool ! Name="VCCustomBuildTool" ! /> ! <Tool ! Name="VCXMLDataGeneratorTool" ! /> ! <Tool ! Name="VCWebServiceProxyGeneratorTool" ! /> ! <Tool ! Name="VCMIDLTool" ! /> <Tool Name="VCCLCompilerTool" Optimization="0" ! PreprocessorDefinitions="WIN32;_DEBUG" ! MinimalRebuild="false" BasicRuntimeChecks="0" RuntimeLibrary="3" WarningLevel="3" ! DebugInformationFormat="4" ! /> <Tool ! Name="VCManagedResourceCompilerTool" ! /> ! <Tool ! Name="VCResourceCompilerTool" ! /> ! <Tool ! Name="VCPreLinkEventTool" ! /> <Tool Name="VCLinkerTool" ! AdditionalDependencies="SDL.lib SDLmain.lib SDL_mixer.lib" OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="2" ! GenerateDebugInformation="true" AssemblyDebug="1" SubSystem="1" ! EntryPointSymbol="" ! /> <Tool ! Name="VCALinkTool" ! /> <Tool ! Name="VCManifestTool" ! /> <Tool ! Name="VCXDCMakeTool" ! /> <Tool ! Name="VCBscMakeTool" ! /> <Tool ! Name="VCFxCopTool" ! /> <Tool ! Name="VCAppVerifierTool" ! /> <Tool ! Name="VCWebDeploymentTool" ! /> <Tool ! Name="VCPostBuildEventTool" ! /> </Configuration> <Configuration *************** *** 66,79 **** ConfigurationType="1" CharacterSet="2" ! ManagedExtensions="FALSE"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG" ! MinimalRebuild="FALSE" RuntimeLibrary="2" WarningLevel="3" ! DebugInformationFormat="3"/> <Tool ! Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" --- 99,136 ---- ConfigurationType="1" CharacterSet="2" ! ManagedExtensions="0" ! > ! <Tool ! Name="VCPreBuildEventTool" ! /> ! <Tool ! Name="VCCustomBuildTool" ! /> ! <Tool ! Name="VCXMLDataGeneratorTool" ! /> ! <Tool ! Name="VCWebServiceProxyGeneratorTool" ! /> ! <Tool ! Name="VCMIDLTool" ! /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG" ! MinimalRebuild="false" RuntimeLibrary="2" WarningLevel="3" ! DebugInformationFormat="3" ! /> <Tool ! Name="VCManagedResourceCompilerTool" ! /> ! <Tool ! Name="VCResourceCompilerTool" ! /> ! <Tool ! Name="VCPreLinkEventTool" ! /> <Tool Name="VCLinkerTool" *************** *** 81,106 **** OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="1" ! GenerateDebugInformation="TRUE" ! SubSystem="1"/> ! <Tool ! Name="VCMIDLTool"/> ! <Tool ! Name="VCPostBuildEventTool"/> <Tool ! Name="VCPreBuildEventTool"/> <Tool ! Name="VCPreLinkEventTool"/> <Tool ! Name="VCResourceCompilerTool"/> <Tool ! Name="VCWebServiceProxyGeneratorTool"/> <Tool ! Name="VCXMLDataGeneratorTool"/> <Tool ! Name="VCWebDeploymentTool"/> <Tool ! Name="VCManagedWrapperGeneratorTool"/> <Tool ! Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> --- 138,168 ---- OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="1" ! GenerateDebugInformation="true" ! SubSystem="1" ! /> <Tool ! Name="VCALinkTool" ! /> <Tool ! Name="VCManifestTool" ! /> <Tool ! Name="VCXDCMakeTool" ! /> <Tool ! Name="VCBscMakeTool" ! /> <Tool ! Name="VCFxCopTool" ! /> <Tool ! Name="VCAppVerifierTool" ! /> <Tool ! Name="VCWebDeploymentTool" ! /> <Tool ! Name="VCPostBuildEventTool" ! /> </Configuration> </Configurations> *************** *** 111,294 **** Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" ! UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File ! RelativePath="..\..\src\actors.c"> </File> <File ! RelativePath="..\..\src\actorScript.c"> </File> <File ! RelativePath="..\..\src\angle.c"> </File> <File ! RelativePath="..\..\src\angleTable.c"> </File> <File ! RelativePath="..\..\src\anim.c"> </File> <File ! RelativePath="..\..\src\animAction.c"> </File> <File ! RelativePath="..\..\src\body.c"> </File> <File ! RelativePath="..\..\src\cdrom.c"> </File> <File ! RelativePath="..\..\src\comportementMenu.c"> </File> <File ! RelativePath="..\..\src\costume.c"> </File> <File ! RelativePath="..\..\src\cube.c"> </File> <File ! RelativePath="..\..\src\debug.c"> </File> <File ! RelativePath="..\..\src\decomp.c"> </File> <File ! RelativePath="..\..\src\expand.c"> </File> <File ! RelativePath="..\..\src\extra.c"> </File> <File ! RelativePath="..\..\src\fichePerso.c"> </File> <File ! RelativePath="..\..\src\file.c"> </File> <File ! RelativePath="..\..\src\fireEffect.c"> </File> <File ! RelativePath="..\..\src\flaplayer.c"> </File> <File ! RelativePath="..\..\src\font.c"> </File> <File ! RelativePath="..\..\src\fullRedraw.c"> </File> <File ! RelativePath="..\..\src\global.c"> </File> <File ! RelativePath="..\..\src\grid.c"> </File> <File ! RelativePath="..\..\src\HQMGlobal.c"> </File> <File ! RelativePath="..\..\src\HQMLib.c"> </File> <File ! RelativePath="..\..\src\hqr.c"> </File> <File ! RelativePath="..\..\src\HQRlib.c"> </File> <File ! RelativePath="..\..\src\images.c"> </File> <File ! RelativePath="..\..\src\init.c"> </File> <File ! RelativePath="..\..\src\input.c"> </File> <File ! RelativePath="..\..\src\inventory.c"> </File> <File ! RelativePath="..\..\src\life_ascii.c"> </File> <File ! RelativePath="..\..\src\life_binary.c"> </File> <File ! RelativePath="..\..\src\life_common.c"> </File> <File ! RelativePath="..\..\src\main.c"> </File> <File ! RelativePath="..\..\src\mainLoop.c"> </File> <File ! RelativePath="..\..\src\mainMenu.c"> </File> <File ! RelativePath="..\..\src\mainSDL.c"> </File> <File ! RelativePath="..\..\src\mainSDLGL.c"> </File> <File ! RelativePath="..\..\src\memHandler.c"> </File> <File ! RelativePath="..\..\src\memory.c"> </File> <File ! RelativePath="..\..\src\moveActor.c"> </File> <File ! RelativePath="..\..\src\music.c"> </File> <File ! RelativePath="..\..\src\object.c"> </File> <File ! RelativePath="..\..\src\overlay.c"> </File> <File ! RelativePath="..\..\src\renderer.c"> </File> <File ! RelativePath="..\..\src\room.c"> </File> <File ! RelativePath="..\..\src\samples.c"> </File> <File ! RelativePath="..\..\src\save.c"> </File> <File ! RelativePath="..\..\src\shadow.c"> </File> <File ! RelativePath="..\..\src\streamReader.c"> </File> <File ! RelativePath="..\..\src\sys.c"> </File> <File ! RelativePath="..\..\src\text.c"> </File> <File ! RelativePath="..\..\src\threadCode.c"> </File> <File ! RelativePath="..\..\src\time.c"> </File> <File ! RelativePath="..\..\src\timer.c"> </File> <File ! RelativePath="..\..\src\vars.c"> </File> <File ! RelativePath="..\..\src\video.c"> </File> <File ! RelativePath="..\..\src\vox.c"> </File> <File ! RelativePath="..\..\src\zones.c"> </File> </Filter> --- 173,417 ---- Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" ! UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" ! > <File ! RelativePath="..\..\src\actors.c" ! > </File> <File ! RelativePath="..\..\src\actorScript.c" ! > </File> <File ! RelativePath="..\..\src\angle.c" ! > </File> <File ! RelativePath="..\..\src\angleTable.c" ! > </File> <File ! RelativePath="..\..\src\anim.c" ! > </File> <File ! RelativePath="..\..\src\animAction.c" ! > </File> <File ! RelativePath="..\..\src\body.c" ! > </File> <File ! RelativePath="..\..\src\cdrom.c" ! > </File> <File ! RelativePath="..\..\src\comportementMenu.c" ! > </File> <File ! RelativePath="..\..\src\costume.c" ! > </File> <File ! RelativePath="..\..\src\cube.c" ! > </File> <File ! RelativePath="..\..\src\debug.c" ! > </File> <File ! RelativePath="..\..\src\decomp.c" ! > </File> <File ! RelativePath="..\..\src\expand.c" ! > </File> <File ! RelativePath="..\..\src\extra.c" ! > </File> <File ! RelativePath="..\..\src\fichePerso.c" ! > </File> <File ! RelativePath="..\..\src\file.c" ! > </File> <File ! RelativePath="..\..\src\fireEffect.c" ! > </File> <File ! RelativePath="..\..\src\flaplayer.c" ! > </File> <File ! RelativePath="..\..\src\font.c" ! > </File> <File ! RelativePath="..\..\src\fullRedraw.c" ! > </File> <File ! RelativePath="..\..\src\global.c" ! > </File> <File ! RelativePath="..\..\src\grid.c" ! > </File> <File ! RelativePath="..\..\src\HQMGlobal.c" ! > </File> <File ! RelativePath="..\..\src\HQMLib.c" ! > </File> <File ! RelativePath="..\..\src\hqr.c" ! > </File> <File ! RelativePath="..\..\src\HQRlib.c" ! > </File> <File ! RelativePath="..\..\src\images.c" ! > </File> <File ! RelativePath="..\..\src\init.c" ! > </File> <File ! RelativePath="..\..\src\input.c" ! > </File> <File ! RelativePath="..\..\src\inventory.c" ! > </File> <File ! RelativePath="..\..\src\life_ascii.c" ! > </File> <File ! RelativePath="..\..\src\life_binary.c" ! > </File> <File ! RelativePath="..\..\src\life_common.c" ! > </File> <File ! RelativePath="..\..\src\main.c" ! > </File> <File ! RelativePath="..\..\src\mainLoop.c" ! > </File> <File ! RelativePath="..\..\src\mainMenu.c" ! > </File> <File ! RelativePath="..\..\src\mainSDL.c" ! > </File> <File ! RelativePath="..\..\src\mainSDLGL.c" ! > </File> <File ! RelativePath="..\..\src\memHandler.c" ! > </File> <File ! RelativePath="..\..\src\memory.c" ! > </File> <File ! RelativePath="..\..\src\moveActor.c" ! > </File> <File ! RelativePath="..\..\src\music.c" ! > </File> <File ! RelativePath="..\..\src\object.c" ! > </File> <File ! RelativePath="..\..\src\overlay.c" ! > </File> <File ! RelativePath="..\..\src\renderer.c" ! > </File> <File ! RelativePath="..\..\src\room.c" ! > </File> <File ! RelativePath="..\..\src\samples.c" ! > </File> <File ! RelativePath="..\..\src\save.c" ! > </File> <File ! RelativePath="..\..\src\shadow.c" ! > </File> <File ! RelativePath="..\..\src\streamReader.c" ! > </File> <File ! RelativePath="..\..\src\sys.c" ! > </File> <File ! RelativePath="..\..\src\text.c" ! > </File> <File ! RelativePath="..\..\src\threadCode.c" ! > </File> <File ! RelativePath="..\..\src\time.c" ! > </File> <File ! RelativePath="..\..\src\timer.c" ! > </File> <File ! RelativePath="..\..\src\vars.c" ! > </File> <File ! RelativePath="..\..\src\video.c" ! > </File> <File ! RelativePath="..\..\src\vox.c" ! > </File> <File ! RelativePath="..\..\src\zones.c" ! > </File> </Filter> *************** *** 296,353 **** Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" ! UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File ! RelativePath="..\..\src\angle.h"> </File> <File ! RelativePath="..\..\src\angleTable.h"> </File> <File ! RelativePath="..\..\src\costume.h"> </File> <File ! RelativePath="..\..\src\debug.h"> </File> <File ! RelativePath="..\..\src\decomp.h"> </File> <File ! RelativePath="..\..\src\extraData.h"> </File> <File ! RelativePath="..\..\src\global.h"> </File> <File ! RelativePath="..\..\src\HQMLib.h"> </File> <File ! RelativePath="..\..\src\HQRlib.h"> </File> <File ! RelativePath="..\..\src\lba.h"> </File> <File ! RelativePath="..\..\src\life_common.h"> </File> <File ! RelativePath="..\..\src\osystem.h"> </File> <File ! RelativePath="..\..\src\overlay.h"> </File> <File ! RelativePath="..\..\src\samples.h"> </File> <File ! RelativePath="..\..\src\streamReader.h"> </File> <File ! RelativePath="..\..\src\type.h"> </File> <File ! RelativePath="..\..\src\vars.h"> </File> <File ! RelativePath="..\..\src\zones.h"> </File> </Filter> --- 419,495 ---- Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" ! UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" ! > <File ! RelativePath="..\..\src\angle.h" ! > </File> <File ! RelativePath="..\..\src\angleTable.h" ! > </File> <File ! RelativePath="..\..\src\costume.h" ! > </File> <File ! RelativePath="..\..\src\debug.h" ! > </File> <File ! RelativePath="..\..\src\decomp.h" ! > </File> <File ! RelativePath="..\..\src\extraData.h" ! > </File> <File ! RelativePath="..\..\src\global.h" ! > </File> <File ! RelativePath="..\..\src\HQMLib.h" ! > </File> <File ! RelativePath="..\..\src\HQRlib.h" ! > </File> <File ! RelativePath="..\..\src\lba.h" ! > </File> <File ! RelativePath="..\..\src\life_common.h" ! > </File> <File ! RelativePath="..\..\src\osystem.h" ! > </File> <File ! RelativePath="..\..\src\overlay.h" ! > </File> <File ! RelativePath="..\..\src\samples.h" ! > </File> <File ! RelativePath="..\..\src\streamReader.h" ! > </File> <File ! RelativePath="..\..\src\type.h" ! > </File> <File ! RelativePath="..\..\src\vars.h" ! > </File> <File ! RelativePath="..\..\src\zones.h" ! > </File> </Filter> *************** *** 355,359 **** Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" ! UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> </Filter> </Files> --- 497,502 ---- Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" ! UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" ! > </Filter> </Files> |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:55:58
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24552/src Modified Files: HQRlib.c actors.c cdrom.c costume.c cube.c fullRedraw.c input.c mainLoop.c mainSDL.c music.c renderer.c samples.c threadCode.c time.c vars.h Log Message: More Macosx port fixes Index: time.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/time.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** time.c 23 Apr 2005 19:40:28 -0000 1.10 --- time.c 28 Jun 2005 21:55:48 -0000 1.11 *************** *** 20,24 **** #ifdef PCLIKE ! #include "SDL.h" #endif //PCLIKE --- 20,24 ---- #ifdef PCLIKE ! #include "SDL/SDL.h" #endif //PCLIKE Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** renderer.c 26 Jun 2005 21:56:49 -0000 1.23 --- renderer.c 28 Jun 2005 21:55:48 -0000 1.24 *************** *** 29,32 **** --- 29,36 ---- short int costumeHeader; + #ifdef MACOSX + // return 0; + #endif + tab1 = &angleTable[0]; tab2 = &angleTable[256]; *************** *** 37,43 **** _angleZ = angleZ; - #ifdef MACOSX - return 0; - #endif /* * Those 4 vars are used to know the size of the rendered model. They are resetted to their --- 41,44 ---- *************** *** 70,76 **** renderTabEntryPtr = renderTab; // we restart at the beginning of the renderTable ! costumeHeader = *(short int *) costumePtr; ! ptr = costumePtr + 16 + *(short int *) (costumePtr + 14); // we jump after the header if (costumeHeader & 2) // if animated --- 71,77 ---- renderTabEntryPtr = renderTab; // we restart at the beginning of the renderTable ! costumeHeader = READ_LE_U16(costumePtr); ! ptr = costumePtr + 16 + READ_LE_U16(costumePtr + 14); // we jump after the header if (costumeHeader & 2) // if animated *************** *** 175,179 **** int temp; ! _numOfPoints = *(short int *) costumePtr; costumePtr += 2; _pointsPtr = costumePtr; --- 176,180 ---- int temp; ! _numOfPoints = READ_LE_U16(costumePtr); costumePtr += 2; _pointsPtr = costumePtr; *************** *** 181,185 **** costumePtr += _numOfPoints * 6; ! _numOfParts = *(short int *) costumePtr; costumePtr += 2; _partsPtr = _partsPtr2 = costumePtr; --- 182,186 ---- costumePtr += _numOfPoints * 6; ! _numOfParts = READ_LE_U16(costumePtr); costumePtr += 2; _partsPtr = _partsPtr2 = costumePtr; *************** *** 200,209 **** do { ! if (ptEntryPtr->flag == 0) { loadPart(ptEntryPtr->rotateX, ptEntryPtr->rotateY, ptEntryPtr->rotateZ, ptEntryPtr); // rotation } else ! if (ptEntryPtr->flag == 1) { TranslateGroupe(ptEntryPtr->rotateX, ptEntryPtr->rotateY, ptEntryPtr->rotateZ, ptEntryPtr); // translation --- 201,211 ---- do { ! int boneType = READ_LE_U16(((unsigned char*)ptEntryPtr)+8); ! if (boneType == 0) { loadPart(ptEntryPtr->rotateX, ptEntryPtr->rotateY, ptEntryPtr->rotateZ, ptEntryPtr); // rotation } else ! if (boneType == 1) { TranslateGroupe(ptEntryPtr->rotateX, ptEntryPtr->rotateY, ptEntryPtr->rotateZ, ptEntryPtr); // translation *************** *** 311,315 **** _shadePtr = (int *) _partsPtr; ! temp = *(short int *) _shadePtr; _shadePtr = (int *) (((unsigned char *) _shadePtr) + 2); --- 313,317 ---- _shadePtr = (int *) _partsPtr; ! temp = READ_LE_U16(_shadePtr); _shadePtr = (int *) (((unsigned char *) _shadePtr) + 2); *************** *** 330,334 **** do { ! temp = *(short int *) ptr3; if (temp) { --- 332,336 ---- do { ! temp = READ_LE_U16(ptr3); if (temp) { *************** *** 357,363 **** colPtr = (short int *) _shadePtr; ! col1 = *(colPtr++); ! col2 = *(colPtr++); ! col3 = *(colPtr++); eax = _shadeMatrix[0] * col1 + _shadeMatrix[1] * col2 + _shadeMatrix[2] * col3; --- 359,365 ---- colPtr = (short int *) _shadePtr; ! col1 = READ_LE_S16(colPtr++); ! col2 = READ_LE_S16(colPtr++); ! col3 = READ_LE_S16(colPtr++); eax = _shadeMatrix[0] * col1 + _shadeMatrix[1] * col2 + _shadeMatrix[2] * col3; *************** *** 371,379 **** eax >>= 14; ptr6 = (unsigned char *) _shadePtr; ! eax /= *(unsigned short int *) (ptr6 + 6); edi = (unsigned short int) eax; } ! *(short int *) _currentShadeDestination = edi; _currentShadeDestination += 2; _shadePtr += 2; --- 373,381 ---- eax >>= 14; ptr6 = (unsigned char *) _shadePtr; ! eax /= READ_LE_U16(ptr6 + 6); edi = (unsigned short int) eax; } ! WRITE_LE_U16(_currentShadeDestination,edi); _currentShadeDestination += 2; _shadePtr += 2; *************** *** 389,393 **** } ! void loadPart(int edx, int ecx, int ebx, pointEntry * ptr) { int *ebp; --- 391,395 ---- } ! void loadPart(int edx, int ecx, int ebx, unsigned char * ptr) { int *ebp; *************** *** 396,402 **** // int* ptr1; ! int rs1v1 = ptr->data1; ! ! int rs1v2 = ptr->data2; _angleX = ebx; --- 398,403 ---- // int* ptr1; ! int rs1v1 = READ_LE_S16(ptr); ! int rs1v2 = READ_LE_S16(ptr+2); _angleX = ebx; *************** *** 410,414 **** } ! var = ptr->param; if (var == -1) // si c'est le premier point --- 411,415 ---- } ! var = READ_LE_U16(ptr+6); if (var == -1) // si c'est le premier point *************** *** 422,430 **** else { ebp = (int *) ((unsigned char *) _matrixTable + var); ! destX = _projectedPointTable[ptr->data3 / 6].x; ! destY = _projectedPointTable[ptr->data3 / 6].y; ! destZ = _projectedPointTable[ptr->data3 / 6].z; } --- 423,432 ---- else { + int pointIdx = (READ_LE_U16(ptr+4))/6; ebp = (int *) ((unsigned char *) _matrixTable + var); ! destX = _projectedPointTable[pointIdx].x; ! destY = _projectedPointTable[pointIdx].y; ! destZ = _projectedPointTable[pointIdx].z; } *************** *** 1003,1008 **** { unsigned char color = *(esi+1); ! short int center = *(short int*)(esi+6); ! short int size = *(short int*)(esi+4); osystem_addSphere( _flattenPointTable[center/6].x, _flattenPointTable[center/6].y, _flattenPointTable[center/6].z, size, color); --- 1005,1010 ---- { unsigned char color = *(esi+1); ! short int center = READ_LE_U16(esi+6); ! short int size = READ_LE_U16(esi+4); osystem_addSphere( _flattenPointTable[center/6].x, _flattenPointTable[center/6].y, _flattenPointTable[center/6].z, size, color); *************** *** 1064,1079 **** esi = renderTabEntryPtr2->dataPtr; renderV19 += 8; switch (type) { case 0: // draw a line { #ifndef PCLIKE break; #endif lineCoordinatesPtr = (lineCoordinates *) esi; ! color = (lineCoordinatesPtr->data & 0xFF00) >> 8; ! drawLine(lineCoordinatesPtr->x1,lineCoordinatesPtr->y1,lineCoordinatesPtr->x2,lineCoordinatesPtr->y2,color); break; } case 1: // draw a polygon { --- 1066,1094 ---- esi = renderTabEntryPtr2->dataPtr; renderV19 += 8; + switch (type) { case 0: // draw a line { + unsigned int x1; + unsigned int y1; + unsigned int x2; + unsigned int y2; + #ifndef PCLIKE break; #endif lineCoordinatesPtr = (lineCoordinates *) esi; ! color = (READ_LE_S32(&lineCoordinatesPtr->data) & 0xFF00) >> 8; ! ! x1 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->x1); ! y1 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->y1); ! x2 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->x2); ! y2 = READ_LE_U16((unsigned short int*)&lineCoordinatesPtr->y2); ! ! drawLine(x1,y1,x2,y2,color); break; } + #ifndef MACOSX case 1: // draw a polygon { *************** *** 1101,1104 **** --- 1116,1120 ---- break; } + #endif case 2: // draw a circle { Index: actors.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/actors.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** actors.c 21 Nov 2004 00:12:12 -0000 1.16 --- actors.c 28 Jun 2005 21:55:47 -0000 1.17 *************** *** 133,142 **** ptr = (short int *) (spriteActorData + imageNumber * 16 + 4); ! lactor->boudingBox.X.bottomLeft = *(ptr++); ! lactor->boudingBox.X.topRight = *(ptr++); ! lactor->boudingBox.Y.bottomLeft = *(ptr++); ! lactor->boudingBox.Y.topRight = *(ptr++); ! lactor->boudingBox.Z.bottomLeft = *(ptr++); ! lactor->boudingBox.Z.topRight = *(ptr++); } } --- 133,142 ---- ptr = (short int *) (spriteActorData + imageNumber * 16 + 4); ! lactor->boudingBox.X.bottomLeft = READ_LE_S16(ptr++); ! lactor->boudingBox.X.topRight = READ_LE_S16(ptr++); ! lactor->boudingBox.Y.bottomLeft = READ_LE_S16(ptr++); ! lactor->boudingBox.Y.topRight = READ_LE_S16(ptr++); ! lactor->boudingBox.Z.bottomLeft = READ_LE_S16(ptr++); ! lactor->boudingBox.Z.topRight = READ_LE_S16(ptr++); } } Index: input.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/input.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** input.c 22 Apr 2005 10:44:02 -0000 1.12 --- input.c 28 Jun 2005 21:55:47 -0000 1.13 *************** *** 18,22 **** #include "lba.h" ! #include <SDL.h> void readKeyboard(void) --- 18,22 ---- #include "lba.h" ! #include <SDL/SDL.h> void readKeyboard(void) Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** fullRedraw.c 26 Jun 2005 21:56:32 -0000 1.59 --- fullRedraw.c 28 Jun 2005 21:55:47 -0000 1.60 *************** *** 1203,1207 **** unsigned char *zbufferSub1(int var) { ! return (currentBll + *(unsigned int *) (currentBll + 4 * var)); } --- 1203,1207 ---- unsigned char *zbufferSub1(int var) { ! return (currentBll + READ_LE_U32(currentBll + 4 * var)); } Index: costume.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/costume.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** costume.c 18 Nov 2004 23:05:47 -0000 1.19 --- costume.c 28 Jun 2005 21:55:47 -0000 1.20 *************** *** 113,122 **** ptr++; ! var1 = *(ptr++); ! var2 = *(ptr++); ! lactor->boudingBox.Y.bottomLeft = *(ptr++); ! lactor->boudingBox.Y.topRight = *(ptr++); ! var3 = *(ptr++); ! var4 = *ptr; if (lactor->staticFlagsBF.bIsUsingMiniZv) --- 113,122 ---- ptr++; ! var1 = READ_LE_S16(ptr++); ! var2 = READ_LE_S16(ptr++); ! lactor->boudingBox.Y.bottomLeft = READ_LE_S16(ptr++); ! lactor->boudingBox.Y.topRight = READ_LE_S16(ptr++); ! var3 = READ_LE_S16(ptr++); ! var4 = READ_LE_S16(ptr); if (lactor->staticFlagsBF.bIsUsingMiniZv) Index: mainLoop.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainLoop.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** mainLoop.c 12 Jun 2005 20:19:29 -0000 1.51 --- mainLoop.c 28 Jun 2005 21:55:47 -0000 1.52 *************** *** 2287,2291 **** ptr2 = (char *) currentBll; ! ptr2 += *(int *) (ptr2 + temp0 * 4 - 4); ptr2 += 3; --- 2287,2291 ---- ptr2 = (char *) currentBll; ! ptr2 += READ_LE_U32(ptr2 + temp0 * 4 - 4); ptr2 += 3; *************** *** 2387,2391 **** ptr2 = (char *) currentBll; ! ptr2 += *(int *) (ptr2 + temp0 * 4 - 4); ptr2 += 3; --- 2387,2391 ---- ptr2 = (char *) currentBll; ! ptr2 += READ_LE_U32(ptr2 + temp0 * 4 - 4); ptr2 += 3; Index: cdrom.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/cdrom.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** cdrom.c 21 Jul 2004 19:40:50 -0000 1.11 --- cdrom.c 28 Jun 2005 21:55:47 -0000 1.12 *************** *** 20,24 **** #ifdef PCLIKE ! #include "SDL.h" #endif --- 20,24 ---- #ifdef PCLIKE ! #include "SDL/SDL.h" #endif Index: music.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/music.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** music.c 26 Jun 2005 18:51:57 -0000 1.15 --- music.c 28 Jun 2005 21:55:48 -0000 1.16 *************** *** 21,25 **** #ifdef PCLIKE //#include <SDL_mixer.h> ! #include "SDL.h" #endif //PCLIKE --- 21,25 ---- #ifdef PCLIKE //#include <SDL_mixer.h> ! #include "SDL/SDL.h" #endif //PCLIKE Index: cube.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/cube.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cube.c 26 Jun 2005 18:51:57 -0000 1.6 --- cube.c 28 Jun 2005 21:55:47 -0000 1.7 *************** *** 179,183 **** for(i=0;i<64;i++) { ! addCubeEntry(currentGrid + *(unsigned short int *) (currentGrid + 2 * (i + ptr2)), bufCube + ptr1); ptr1 += 50; } --- 179,183 ---- for(i=0;i<64;i++) { ! addCubeEntry(currentGrid + READ_LE_U16(currentGrid + 2 * (i + ptr2)), bufCube + ptr1); ptr1 += 50; } Index: threadCode.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/threadCode.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** threadCode.c 21 Jul 2004 19:40:51 -0000 1.13 --- threadCode.c 28 Jun 2005 21:55:48 -0000 1.14 *************** *** 18,23 **** #include "lba.h" ! #include "SDL.h" ! #include "SDL_thread.h" /* extern volatile int lba_time; --- 18,23 ---- #include "lba.h" ! #include "SDL/SDL.h" ! #include "SDL/SDL_thread.h" /* extern volatile int lba_time; Index: vars.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/vars.h,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** vars.h 26 Jun 2005 18:51:57 -0000 1.47 --- vars.h 28 Jun 2005 21:55:48 -0000 1.48 *************** *** 207,211 **** extern unsigned char *_partsPtr2; ! void loadPart(int edx, int ecx, int ebx, pointEntry * ptr); int AffObjetIso(int X, int Y, int Z, int angleX, int angleY, int angleZ, unsigned char *costumePtr); void SetLightVector(int a, int b, int c); --- 207,211 ---- extern unsigned char *_partsPtr2; ! void loadPart(int edx, int ecx, int ebx, unsigned char * ptr); int AffObjetIso(int X, int Y, int Z, int angleX, int angleY, int angleZ, unsigned char *costumePtr); void SetLightVector(int a, int b, int c); Index: samples.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/samples.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** samples.c 26 Jun 2005 18:51:57 -0000 1.7 --- samples.c 28 Jun 2005 21:55:48 -0000 1.8 *************** *** 20,24 **** #ifdef PCLIKE ! #include <SDL_mixer.h> #endif --- 20,24 ---- #ifdef PCLIKE ! //#include <SDL_mixer.h> #endif *************** *** 34,38 **** void playSample(int sampleNum, int freq, int repeat, int x, int y) { ! char filename[256]; Mix_Chunk * sample; FILE* fhandle; --- 34,38 ---- void playSample(int sampleNum, int freq, int repeat, int x, int y) { ! /* char filename[256]; Mix_Chunk * sample; FILE* fhandle; *************** *** 46,55 **** } ! Mix_PlayChannel(0,sample,repeat-1); } void playSampleFla(int sampleNum, int freq, int repeat, int x, int y) { ! char filename[256]; Mix_Chunk * sample; --- 46,55 ---- } ! Mix_PlayChannel(0,sample,repeat-1);*/ } void playSampleFla(int sampleNum, int freq, int repeat, int x, int y) { ! /* char filename[256]; Mix_Chunk * sample; *************** *** 58,61 **** --- 58,62 ---- sample=Mix_LoadWAV(filename); Mix_PlayChannel(0,sample,repeat-1); + */ } *************** *** 72,80 **** #define midiFileName "Midi_mi_win" ! Mix_Music * sample = NULL; void playMidi(int musicNum) { ! char filename[256]; FILE* fhandle; --- 73,81 ---- #define midiFileName "Midi_mi_win" ! //Mix_Music * sample = NULL; void playMidi(int musicNum) { ! /* char filename[256]; FILE* fhandle; *************** *** 118,120 **** --- 119,122 ---- } Mix_PlayMusic(sample,0); + */ } Index: mainSDL.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainSDL.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** mainSDL.c 26 Jun 2005 18:51:57 -0000 1.35 --- mainSDL.c 28 Jun 2005 21:55:48 -0000 1.36 *************** *** 19,29 **** void studioTick(void); - #define USE_SDL_MIXER true - #define USE_OPENAL false #define playSounds true ! #include "SDL.h" ! #include "SDL_thread.h" #include "lba.h" --- 19,27 ---- void studioTick(void); #define playSounds true ! #include "SDL/SDL.h" ! #include "SDL/SDL_thread.h" #include "lba.h" Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** HQRlib.c 26 Jun 2005 18:51:57 -0000 1.11 --- HQRlib.c 28 Jun 2005 21:55:47 -0000 1.12 *************** *** 403,410 **** unsigned char *HQR_Get(hqr_entry * hqrPtr, short int arg_4) { ! int headerSize; ! int offToData; ! int dataSize; ! int compressedSize; short int mode; --- 403,410 ---- unsigned char *HQR_Get(hqr_entry * hqrPtr, short int arg_4) { ! unsigned int headerSize; ! unsigned int offToData; ! unsigned int dataSize; ! unsigned int compressedSize; short int mode; *************** *** 446,449 **** --- 446,450 ---- streamReader_get( &fileReader, &headerSize, 4 ); + headerSize = convertDWFromLE(headerSize); if( arg_4 >= headerSize / 4 ) *************** *** 455,463 **** --- 456,468 ---- streamReader_seek( &fileReader, arg_4 * 4 ); streamReader_get( &fileReader, &offToData, 4 ); + offToData = convertDWFromLE(offToData); streamReader_seek( &fileReader, offToData ); streamReader_get( &fileReader, &dataSize, 4) ; + dataSize = convertDWFromLE(dataSize); streamReader_get( &fileReader, &compressedSize, 4) ; + compressedSize = convertDWFromLE(compressedSize); streamReader_get( &fileReader, &mode, 2) ; + mode = convertWFromLE(mode); dataSize2 = dataSize; |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:55:57
|
Update of /cvsroot/twin-e/twin-e/twin-e.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24552/twin-e.xcode Added Files: project.pbxproj Log Message: More Macosx port fixes --- NEW FILE: project.pbxproj --- // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 39; objects = { 080E96DDFE201D6D7F000001 = { children = ( F5A47A9D01A0482F01D3D55B, F5A47A9E01A0483001D3D55B, ); isa = PBXGroup; name = Classes; refType = 4; sourceTree = "<group>"; }; 089C165CFE840E0CC02AAC07 = { children = ( [...1708 lines suppressed...] lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; refType = 2; sourceTree = SOURCE_ROOT; }; F5A47AA101A0483001D3D55B = { fileRef = F5A47A9D01A0482F01D3D55B; isa = PBXBuildFile; settings = { }; }; F5A47AA301A0483001D3D55B = { fileRef = F5A47A9E01A0483001D3D55B; isa = PBXBuildFile; settings = { }; }; }; rootObject = 29B97313FDCFA39411CA2CEA; } |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:55:56
|
Update of /cvsroot/twin-e/twin-e In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24552 Added Files: SDLMain.h SDLMain.m Log Message: More Macosx port fixes --- NEW FILE: SDLMain.m --- /* SDLMain.m - main entry point for our Cocoa-ized SDL app Initial Version: Darrell Walisser <dwa...@pu...> Non-NIB-Code & other changes: Max Horn <ma...@qu...> Feel free to customize this file to suit your needs */ #import "SDL.h" #import "SDLMain.h" #import <sys/param.h> /* for MAXPATHLEN */ #import <unistd.h> /* Use this flag to determine whether we use SDLMain.nib or not */ #define SDL_USE_NIB_FILE 1 static int gArgc; static char **gArgv; static BOOL gFinderLaunch; #if SDL_USE_NIB_FILE /* A helper category for NSString */ @interface NSString (ReplaceSubString) - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; @end #else /* An internal Apple class used to setup Apple menus */ @interface NSAppleMenuController:NSObject {} - (void)controlMenu:(NSMenu *)aMenu; @end #endif @interface SDLApplication : NSApplication @end @implementation SDLApplication /* Invoked from the Quit menu item */ - (void)terminate:(id)sender { /* Post a SDL_QUIT event */ SDL_Event event; event.type = SDL_QUIT; SDL_PushEvent(&event); } @end /* The main class of the application, the application's delegate */ @implementation SDLMain - (IBAction)prefsMenu:(id)sender { printf ("prefs menu\n"); } - (IBAction)newGame:(id)sender { printf ("new game\n"); NSRunAlertPanel (@"Get ready to blow up some... stuff!", @"Click OK to begin total carnage. Click Cancel to prevent total carnage.", @"OK", @"Cancel", nil); } - (IBAction)openGame:(id)sender { NSString *path = nil; NSOpenPanel *openPanel = [ NSOpenPanel openPanel ]; if ( [ openPanel runModalForDirectory:nil file:@"SavedGame" types:nil ] ) { path = [ [ openPanel filenames ] objectAtIndex:0 ]; } printf ("open game: %s\n", [ path cString ]); } - (IBAction)saveGame:(id)sender { NSString *path = nil; NSSavePanel *savePanel = [ NSSavePanel savePanel ]; if ( [ savePanel runModalForDirectory:nil file:@"SaveGameFile" ] ) { path = [ savePanel filename ]; } printf ("save game: %s\n", [ path cString ]); } - (IBAction)saveGameAs:(id)sender { printf ("save game as\n"); } - (IBAction)help:(id)sender { NSRunAlertPanel (@"Oh help, where have ye gone?", @"Sorry, there is no help available.\n\nThis message brought to you by We Don't Document, Inc.\n\n", @"Rats", @"Good, I never read it anyway", nil); } /* Set the working directory to the .app's parent directory */ - (void) setupWorkingDirectory:(BOOL)shouldChdir { char parentdir[MAXPATHLEN]; char *c; strncpy ( parentdir, gArgv[0], sizeof(parentdir) ); c = (char*) parentdir; while (*c != '\0') /* go to end */ c++; while (*c != '/') /* back up to parent */ c--; *c++ = '\0'; /* cut off last part (binary name) */ if (shouldChdir) { assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ assert ( chdir ("../../../") == 0 ); /* chdir to the .app's parent */ } } #if SDL_USE_NIB_FILE /* Fix menu to contain the real app name instead of "SDL App" */ - (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName { NSRange aRange; NSEnumerator *enumerator; NSMenuItem *menuItem; aRange = [[aMenu title] rangeOfString:@"SDL App"]; if (aRange.length != 0) [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; enumerator = [[aMenu itemArray] objectEnumerator]; while ((menuItem = [enumerator nextObject])) { aRange = [[menuItem title] rangeOfString:@"SDL App"]; if (aRange.length != 0) [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; if ([menuItem hasSubmenu]) [self fixMenu:[menuItem submenu] withAppName:appName]; } [ aMenu sizeToFit ]; } #else void setupAppleMenu(void) { /* warning: this code is very odd */ NSAppleMenuController *appleMenuController; NSMenu *appleMenu; NSMenuItem *appleMenuItem; appleMenuController = [[NSAppleMenuController alloc] init]; appleMenu = [[NSMenu alloc] initWithTitle:@""]; appleMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; [appleMenuItem setSubmenu:appleMenu]; /* yes, we do need to add it and then remove it -- if you don't add it, it doesn't get displayed if you don't remove it, you have an extra, titleless item in the menubar when you remove it, it appears to stick around very, very odd */ [[NSApp mainMenu] addItem:appleMenuItem]; [appleMenuController controlMenu:appleMenu]; [[NSApp mainMenu] removeItem:appleMenuItem]; [appleMenu release]; [appleMenuItem release]; } /* Create a window menu */ void setupWindowMenu(void) { NSMenu *windowMenu; NSMenuItem *windowMenuItem; NSMenuItem *menuItem; windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; /* "Minimize" item */ menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; [windowMenu addItem:menuItem]; [menuItem release]; /* Put menu into the menubar */ windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; [windowMenuItem setSubmenu:windowMenu]; [[NSApp mainMenu] addItem:windowMenuItem]; /* Tell the application object that this is now the window menu */ [NSApp setWindowsMenu:windowMenu]; /* Finally give up our references to the objects */ [windowMenu release]; [windowMenuItem release]; } /* Replacement for NSApplicationMain */ void CustomApplicationMain (argc, argv) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; SDLMain *sdlMain; /* Ensure the application object is initialised */ [SDLApplication sharedApplication]; /* Set up the menubar */ [NSApp setMainMenu:[[NSMenu alloc] init]]; setupAppleMenu(); setupWindowMenu(); /* Create SDLMain and make it the app delegate */ sdlMain = [[SDLMain alloc] init]; [NSApp setDelegate:sdlMain]; /* Start the main event loop */ [NSApp run]; [sdlMain release]; [pool release]; } #endif /* Called when the internal event loop has just started running */ - (void) applicationDidFinishLaunching: (NSNotification *) note { int status; /* Set the working directory to the .app's parent directory */ [self setupWorkingDirectory:gFinderLaunch]; #if SDL_USE_NIB_FILE /* Set the main menu to contain the real app name instead of "SDL App" */ [self fixMenu:[NSApp mainMenu] withAppName:[[NSProcessInfo processInfo] processName]]; #endif /* Hand off to main application code */ status = SDL_main (gArgc, gArgv); /* We're done, thank you for playing */ exit(status); } @end @implementation NSString (ReplaceSubString) - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString { unsigned int bufferSize; unsigned int selfLen = [self length]; unsigned int aStringLen = [aString length]; unichar *buffer; NSRange localRange; NSString *result; bufferSize = selfLen + aStringLen - aRange.length; buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar)); /* Get first part into buffer */ localRange.location = 0; localRange.length = aRange.location; [self getCharacters:buffer range:localRange]; /* Get middle part into buffer */ localRange.location = 0; localRange.length = aStringLen; [aString getCharacters:(buffer+aRange.location) range:localRange]; /* Get last part into buffer */ localRange.location = aRange.location + aRange.length; localRange.length = selfLen - localRange.location; [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; /* Build output string */ result = [NSString stringWithCharacters:buffer length:bufferSize]; NSDeallocateMemoryPages(buffer, bufferSize); return result; } @end #ifdef main # undef main #endif /* Main entry point to executable - should *not* be SDL_main! */ int main (int argc, char **argv) { /* Copy the arguments into a global variable */ int i; /* This is passed if we are launched by double-clicking */ if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { gArgc = 1; gFinderLaunch = YES; } else { gArgc = argc; gFinderLaunch = NO; } gArgv = (char**) malloc (sizeof(*gArgv) * (gArgc+1)); assert (gArgv != NULL); for (i = 0; i < gArgc; i++) gArgv[i] = argv[i]; gArgv[i] = NULL; #if SDL_USE_NIB_FILE [SDLApplication poseAsClass:[NSApplication class]]; NSApplicationMain (argc, argv); #else CustomApplicationMain (argc, argv); #endif return 0; } --- NEW FILE: SDLMain.h --- /* SDLMain.m - main entry point for our Cocoa-ized SDL app Initial Version: Darrell Walisser <dwa...@pu...> Non-NIB-Code & other changes: Max Horn <ma...@qu...> Feel free to customize this file to suit your needs */ #import <Cocoa/Cocoa.h> @interface SDLMain : NSObject { } - (IBAction)prefsMenu:(id)sender; - (IBAction)newGame:(id)sender; - (IBAction)openGame:(id)sender; - (IBAction)saveGame:(id)sender; - (IBAction)saveGameAs:(id)sender; - (IBAction)help:(id)sender; @end |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:55:56
|
Update of /cvsroot/twin-e/twin-e/SDLMain.nib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24552/SDLMain.nib Added Files: classes.nib info.nib objects.nib Log Message: More Macosx port fixes --- NEW FILE: info.nib --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IBDocumentLocation</key> <string>62 117 356 240 0 0 1152 848 </string> <key>IBEditorPositions</key> <dict> <key>29</key> <string>62 362 195 44 0 0 1152 848 </string> </dict> <key>IBFramework Version</key> <string>291.0</string> <key>IBOpenObjects</key> <array> <integer>29</integer> </array> <key>IBSystem Version</key> <string>6L60</string> </dict> </plist> --- NEW FILE: objects.nib --- (This appears to be a binary file; contents omitted.) --- NEW FILE: classes.nib --- { IBClasses = ( {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ACTIONS = { help = id; newGame = id; openGame = id; prefsMenu = id; saveGame = id; saveGameAs = id; }; CLASS = SDLMain; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; } |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:54:40
|
Update of /cvsroot/twin-e/twin-e/SDLMain.nib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23762/SDLMain.nib Log Message: Directory /cvsroot/twin-e/twin-e/SDLMain.nib added to the repository |
|
From: Vincent H. <ya...@us...> - 2005-06-28 21:53:40
|
Update of /cvsroot/twin-e/twin-e/twin-e.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23045/twin-e.xcode Log Message: Directory /cvsroot/twin-e/twin-e/twin-e.xcode added to the repository |
|
From: Vincent H. <ya...@us...> - 2005-06-26 21:56:59
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1638/src Modified Files: fullRedraw.c renderer.c Log Message: various fix Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** renderer.c 26 Jun 2005 18:51:57 -0000 1.22 --- renderer.c 26 Jun 2005 21:56:49 -0000 1.23 *************** *** 704,708 **** width = - width; ! drawLine(x-width/2,currentLine + y, x+width/2, currentLine+y, color); } } --- 704,708 ---- width = - width; ! drawLine(x-width,currentLine + y, x+width, currentLine+y, color); } } *************** *** 1138,1141 **** --- 1138,1143 ---- } + circleParam3+=3; + if(circleParam4 + circleParam3 > renderRight) renderRight = circleParam4 + circleParam3; *************** *** 1150,1153 **** --- 1152,1157 ---- renderTop = circleParam5 - circleParam3; + circleParam3-=3; + circle_fill(circleParam4, circleParam5, circleParam3, circleParam1); /*prepareCircle(circleParam3*/ *************** *** 1204,1207 **** --- 1208,1214 ---- return;*/ + if(vbottom >= 480) + return; + out = frontVideoBuffer + 640*vtop; *************** *** 1238,1241 **** --- 1245,1249 ---- for(j = start; j < hsize+start; j++) { + assert(out+j < frontVideoBuffer + 640*480); if(j>=0 && j<640) out[j] = color; *************** *** 1282,1285 **** --- 1290,1294 ---- if(j>=0 && j<640) { + assert(out+j < frontVideoBuffer + 640*480); out[j] = start&0xFF; } *************** *** 1317,1320 **** --- 1326,1330 ---- if(j>=0&&j<640) { + assert(out+j < frontVideoBuffer + 640*480); out[j] = color; } *************** *** 1359,1362 **** --- 1369,1373 ---- if(ax ^ bh) { + assert(out2 < frontVideoBuffer + 640*480); out2++; } *************** *** 1364,1367 **** --- 1375,1379 ---- for (j = 0; j < hsize; j++) { + assert(out2 < frontVideoBuffer + 640*480); *(out2) = (unsigned char)color; out2+=2; *************** *** 1405,1408 **** --- 1417,1421 ---- if (hsize == 0) { + assert(out2 < frontVideoBuffer + 640*480); if(start>=0 && start <640) *out2 = ((startColor + stopColor) / 2)>>8; // moyenne des 2 couleurs *************** *** 1412,1418 **** --- 1425,1433 ---- if (hsize == 1) { + assert(out2 + 1< frontVideoBuffer + 640*480); if(start>=-1 && start <640-1) *(out2 + 1) = stopColor>>8; + assert(out2 < frontVideoBuffer + 640*480); if(start>=0 && start <640) *(out2) = startColor>>8; *************** *** 1420,1427 **** --- 1435,1447 ---- else if (hsize == 2) { + assert(out2 + 2< frontVideoBuffer + 640*480); if(start>=-2 && start<640-2) *(out2 + 2) = stopColor>>8; + + assert(out2 + 1< frontVideoBuffer + 640*480); if(start>=-1 && start<640-1) *(out2 + 1) = ((startColor + stopColor) / 2)>>8; + + assert(out2 < frontVideoBuffer + 640*480); if(start>=0 && start<640) *(out2) = startColor>>8; *************** *** 1436,1439 **** --- 1456,1460 ---- { hsize/=2; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2)=startColor>>8; *************** *** 1449,1452 **** --- 1470,1474 ---- do { + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2)=startColor>>8; *************** *** 1455,1458 **** --- 1477,1481 ---- startColor+=colorSize; + assert(out2 + 1< frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2+1)=startColor>>8; *************** *** 1496,1499 **** --- 1519,1523 ---- if(hsize==0) { + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2)=(unsigned char)(((startColor + stopColor)/2)>>8); *************** *** 1510,1513 **** --- 1534,1538 ---- currentColor&=0xFF; currentColor+=startColor; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; *************** *** 1517,1520 **** --- 1542,1546 ---- currentColor +=startColor; currentXPos++; + assert(out2+1 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2+1) = currentColor>>8; *************** *** 1530,1533 **** --- 1556,1560 ---- currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; *************** *** 1540,1543 **** --- 1567,1571 ---- currentColor+=startColor; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; *************** *** 1549,1552 **** --- 1577,1581 ---- currentXPos++; + assert(out2 +1< frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2+1) = currentColor>>8; *************** *** 1565,1568 **** --- 1594,1598 ---- currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; *************** *** 1579,1582 **** --- 1609,1613 ---- currentColor&=0xFF; currentColor+=startColor; + assert(out2 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2) = currentColor>>8; *************** *** 1586,1589 **** --- 1617,1621 ---- currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; + assert(out2+1 < frontVideoBuffer + 640*480); if(currentXPos>=0 && currentXPos<640) *(out2+1) = currentColor>>8; Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** fullRedraw.c 26 Jun 2005 18:51:57 -0000 1.58 --- fullRedraw.c 26 Jun 2005 21:56:32 -0000 1.59 *************** *** 369,372 **** --- 369,384 ---- #endif + if(renderLeft<0) + renderLeft = 0; + + if(renderTop<0) + renderTop = 0; + + if(renderRight >= 640) + renderRight = 639; + + if(renderBottom >= 480) + renderBottom = 479; + SetClip(renderLeft, renderTop, renderRight,renderBottom); *************** *** 605,608 **** --- 617,632 ---- AffObjetIso(drawList[arg_1E].X - cameraX, drawList[arg_1E].Y - cameraZ, drawList[arg_1E].Z - cameraY, 0, 0, 0, flagModelPtr); + if(renderLeft<0) + renderLeft = 0; + + if(renderTop<0) + renderTop = 0; + + if(renderRight >= 640) + renderRight = 639; + + if(renderBottom >= 480) + renderBottom = 479; + SetClip(renderLeft, renderTop, renderRight,renderBottom); *************** *** 844,847 **** --- 868,883 ---- AffObjetIso(0,0,0,0,overlay3dObect,0,pObject); + if(renderLeft<0) + renderLeft = 0; + + if(renderTop<0) + renderTop = 0; + + if(renderRight >= 640) + renderRight = 639; + + if(renderBottom >= 480) + renderBottom = 479; + DrawCadre(10,10,69,69); AddPhysBox(10,10,69,69); |
|
From: Vincent H. <ya...@us...> - 2005-06-26 18:52:10
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv754/src Modified Files: HQRlib.c animAction.c cube.c fullRedraw.c images.c mainSDL.c moveActor.c music.c renderer.c room.c samples.c vars.h Log Message: Buggy clipped poly Sound (wrong pitch) Midi music (deactivated, cause problems) One major script bug fixed Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** renderer.c 12 Jun 2005 20:19:29 -0000 1.21 --- renderer.c 26 Jun 2005 18:51:57 -0000 1.22 *************** *** 18,21 **** --- 18,22 ---- #include "lba.h" + #include "math.h" #ifdef GAME_DEBUG *************** *** 679,682 **** --- 680,711 ---- typedef struct computedVertex computedVertex; + void circle_fill(int x,int y, int radius, byte color) + { + int currentLine; + + radius+=1; + + for(currentLine = -radius; currentLine <= radius; currentLine++) + { + double width; + + if(abs(currentLine) != radius) + { + width = sin(acos((float)currentLine/(float)radius)); + } + else + { + width = 0; + } + + width *= radius; + + if(width < 0) + width = - width; + + drawLine(x-width/2,currentLine + y, x+width/2, currentLine+y, color); + } + } + int finishRender(unsigned char *esi) { *************** *** 970,974 **** if (temp) // pour les cercles (2) { ! // numOfPrimitives+=temp; do { --- 999,1003 ---- if (temp) // pour les cercles (2) { ! _numOfPrimitives+=temp; do { *************** *** 979,983 **** --- 1008,1023 ---- osystem_addSphere( _flattenPointTable[center/6].x, _flattenPointTable[center/6].y, _flattenPointTable[center/6].z, size, color); + *(unsigned char*)edi = color; + WRITE_LE_S16(edi+1, _flattenPointTable[center/6].x); + WRITE_LE_S16(edi+3, _flattenPointTable[center/6].y); + WRITE_LE_S16(edi+5, size); + + renderTabEntryPtr->depth = _flattenPointTable[center/6].z; + renderTabEntryPtr->renderType = 2; + renderTabEntryPtr->dataPtr = edi; + renderTabEntryPtr++; + esi += 8; + edi += 7; }while (--temp); } *************** *** 1066,1077 **** // char circleColor; - /* int circleParam1; int circleParam2; int circleParam3; eax = *(int*) esi; ! circleParam1 = eax & 0xFF; circleParam2 = (eax & 0xFFFF00) >> 8; esi += 4; --- 1106,1123 ---- // char circleColor; int circleParam1; int circleParam2; int circleParam3; + int circleParam4; + int circleParam5; eax = *(int*) esi; ! circleParam1 = *(unsigned char*)esi; ! circleParam4 = READ_LE_S16(esi+1); ! circleParam5 = READ_LE_S16(esi+3); ! circleParam3 = READ_LE_S16(esi+5); ! ! /* circleParam1 = eax & 0xFF; circleParam2 = (eax & 0xFFFF00) >> 8; esi += 4; *************** *** 1081,1085 **** esi += 4; circleParam5 = *(short int*)esi; ! esi += 2; if(!isUsingOrhoProjection) --- 1127,1131 ---- esi += 4; circleParam5 = *(short int*)esi; ! esi += 2; */ if(!isUsingOrhoProjection) *************** *** 1102,1108 **** if(circleParam5 - circleParam3 < renderTop) ! renderTop = circileParam5 - circleParam3; ! prepareCircle(circleParam3*/ } --- 1148,1155 ---- if(circleParam5 - circleParam3 < renderTop) ! renderTop = circleParam5 - circleParam3; ! circle_fill(circleParam4, circleParam5, circleParam3, circleParam1); ! /*prepareCircle(circleParam3*/ } *************** *** 1137,1140 **** --- 1184,1188 ---- int color; int j; + int currentLine; // char borrow; *************** *** 1145,1149 **** float varf4; ! if (vtop <= 0 || vbottom <= 0) return; if (vleft <= 0 || vright <= 0) --- 1193,1197 ---- float varf4; ! /* if (vtop <= 0 || vbottom <= 0) return; if (vleft <= 0 || vright <= 0) *************** *** 1154,1160 **** // return; if (vtop >= 480 || vbottom >= 480) ! return; ! out = frontVideoBuffer + screenLockupTable[vtop]; ptr1 = &polyTab[vtop]; --- 1202,1208 ---- // return; if (vtop >= 480 || vbottom >= 480) ! return;*/ ! out = frontVideoBuffer + 640*vtop; ptr1 = &polyTab[vtop]; *************** *** 1172,1227 **** case 0: // flat polygon { do { ! stop = ptr1[480]; ! start = ptr1[0]; ! ptr1++; ! hsize = stop - start; ! if (hsize >= 0) ! { ! hsize++; ! out2 = start + out; ! for (j = 0; j < hsize; j++) { ! *(out2++) = color; } } out += 640; }while(--vsize); break; } case 1: // copper { do { ! start = ptr1[0]; ! stop = ptr1[480]; ! ! ptr1++; ! hsize = stop - start; ! ! if(hsize>=0) { ! unsigned short int mask = 0x43DB; ! unsigned short int dx; ! ! dx = (unsigned char)color; ! dx |= 0x300; ! hsize++; ! out2 = start + out; ! for(j = 0; j< hsize; j++) { ! start += mask; ! start = (start &0xFF00) | ((start&0xFF) & (unsigned char)(dx>>8)) ; ! start = (start &0xFF00) | ((start&0xFF) + (dx&0xFF)); ! *(out2++) = start&0xFF; ! mask = (mask << 2) | (mask >> 14); ! mask++; } } out += 640; }while(--vsize); break; --- 1220,1295 ---- case 0: // flat polygon { + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) ! { ! stop = ptr1[480]; ! start = ptr1[0]; ! ptr1++; ! hsize = stop - start; ! if (hsize >= 0) { ! hsize++; ! out2 = start + out; ! ! for(j = start; j < hsize+start; j++) ! { ! if(j>=0 && j<640) ! out[j] = color; ! } } } out += 640; + currentLine++; }while(--vsize); break; + } case 1: // copper { + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) { ! start = ptr1[0]; ! stop = ptr1[480]; ! ptr1++; ! hsize = stop - start; ! ! if(hsize>=0) { ! unsigned short int mask = 0x43DB; ! unsigned short int dx; ! int startCopy; ! ! dx = (unsigned char)color; ! dx |= 0x300; ! ! hsize++; ! out2 = start + out; ! startCopy = start; ! ! for(j = startCopy; j< hsize+startCopy; j++) ! { ! start += mask; ! start = (start &0xFF00) | ((start&0xFF) & (unsigned char)(dx>>8)) ; ! start = (start &0xFF00) | ((start&0xFF) + (dx&0xFF)); ! if(j>=0 && j<640) ! { ! out[j] = start&0xFF; ! } ! mask = (mask << 2) | (mask >> 14); ! mask++; ! } } + } out += 640; + currentLine++; }while(--vsize); break; *************** *** 1229,1251 **** case 2: // bopper ? (1 pixel sur 2) // pas implementé comme à l'origine // BUGGYYYY ! { do { ! start = ptr1[0]; ! stop = ptr1[480]; ! ptr1++; ! hsize = stop - start; ! ! if(hsize >= 0) { ! hsize++; ! out2 = start + out; ! for (j = 0; j < hsize; j++) { ! if((int)out2&1) ! *(out2) = color; ! out2++; } } out += 640; }while(--vsize); break; --- 1297,1330 ---- case 2: // bopper ? (1 pixel sur 2) // pas implementé comme à l'origine // BUGGYYYY ! { + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) { ! start = ptr1[0]; ! stop = ptr1[480]; ! ptr1++; ! hsize = stop - start; ! ! if(hsize >= 0) { ! hsize++; ! out2 = start + out; ! for (j = start; j < hsize+start; j++) ! { ! if((start+(vtop%1))&1) ! { ! if(j>=0&&j<640) ! { ! out[j] = color; ! } ! } ! out2++; ! } } + } out += 640; + currentLine++; }while(--vsize); break; *************** *** 1256,1292 **** unsigned char bh=0; do { ! start = ptr1[0]; ! stop = ptr1[480]; ! ptr1++; ! hsize = stop - start; ! ! if(hsize >= 0) { ! hsize++; ! out2 = start + out; ! ! hsize/=2; ! if(hsize>1) { ! unsigned short int ax; ! bh ^= 1; ! ax = (unsigned short int)(int) out2; ! ax &= 1; ! if(ax ^ bh) { ! out2++; ! } ! for (j = 0; j < hsize; j++) ! { ! *(out2) = (unsigned char)color; ! out2+=2; } } } out+=640; ! }while(--vsize); break; --- 1335,1376 ---- unsigned char bh=0; + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) { ! start = ptr1[0]; ! stop = ptr1[480]; ! ptr1++; ! hsize = stop - start; ! ! if(hsize >= 0) { ! hsize++; ! out2 = start + out; ! ! hsize/=2; ! if(hsize>1) { ! unsigned short int ax; ! bh ^= 1; ! ax = (unsigned short int)(int) out2; ! ax &= 1; ! if(ax ^ bh) ! { ! out2++; ! } ! for (j = 0; j < hsize; j++) ! { ! *(out2) = (unsigned char)color; ! out2+=2; ! } } } + } out+=640; ! currentLine++; }while(--vsize); break; *************** *** 1295,1363 **** { renderLoop = vsize; do { ! unsigned short int startColor = ptr2[0]; ! unsigned short int stopColor = ptr2[480]; ! short int colorSize = stopColor - startColor; ! stop = ptr1[480]; // stop ! start = ptr1[0]; // start ! ptr1++; ! out2 = start + out; ! hsize = stop - start; ! varf2 = ptr2[480]; ! varf3 = ptr2[0]; ! ptr2++; ! varf4 = (float)((int)varf2 - (int)varf3); ! if (hsize == 0) ! { ! *out2 = ((startColor + stopColor) / 2)>>8; // moyenne des 2 couleurs ! } ! else if (hsize > 0) ! { ! if (hsize == 1) ! { ! *(out2 + 1) = stopColor>>8; ! *(out2) = startColor>>8; ! } ! else if (hsize == 2) { ! *(out2 + 2) = stopColor>>8; ! *(out2 + 1) = ((startColor + stopColor) / 2)>>8; ! *(out2) = startColor>>8; } ! else { ! colorSize /= hsize; ! hsize++; ! if(hsize%2) { ! hsize/=2; ! *(out2++)=startColor>>8; ! startColor+=colorSize; } else { ! hsize/=2; ! } ! do ! { ! *(out2)=startColor>>8; ! startColor+=colorSize; ! *(out2+1)=startColor>>8; ! out2+=2; ! startColor+=colorSize; ! }while(--hsize); } } out += 640; }while (--renderLoop); --- 1379,1470 ---- { renderLoop = vsize; + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) ! { ! unsigned short int startColor = ptr2[0]; ! unsigned short int stopColor = ptr2[480]; ! short int colorSize = stopColor - startColor; ! stop = ptr1[480]; // stop ! start = ptr1[0]; // start ! ptr1++; ! out2 = start + out; ! hsize = stop - start; ! varf2 = ptr2[480]; ! varf3 = ptr2[0]; ! ptr2++; ! varf4 = (float)((int)varf2 - (int)varf3); ! if (hsize == 0) { ! if(start>=0 && start <640) ! *out2 = ((startColor + stopColor) / 2)>>8; // moyenne des 2 couleurs } ! else if (hsize > 0) { ! if (hsize == 1) ! { ! if(start>=-1 && start <640-1) ! *(out2 + 1) = stopColor>>8; ! if(start>=0 && start <640) ! *(out2) = startColor>>8; ! } ! else if (hsize == 2) { ! if(start>=-2 && start<640-2) ! *(out2 + 2) = stopColor>>8; ! if(start>=-1 && start<640-1) ! *(out2 + 1) = ((startColor + stopColor) / 2)>>8; ! if(start>=0 && start<640) ! *(out2) = startColor>>8; } else { ! int currentXPos = start; ! colorSize /= hsize; ! hsize++; ! if(hsize%2) ! { ! hsize/=2; ! if(currentXPos>=0 && currentXPos<640) ! *(out2)=startColor>>8; ! out2++; ! currentXPos++; ! startColor+=colorSize; ! } ! else ! { ! hsize/=2; ! } ! ! do ! { ! if(currentXPos>=0 && currentXPos<640) ! *(out2)=startColor>>8; ! ! currentXPos++; ! startColor+=colorSize; ! ! if(currentXPos>=0 && currentXPos<640) ! *(out2+1)=startColor>>8; ! ! currentXPos++; ! out2+=2; ! startColor+=colorSize; ! }while(--hsize); ! } } } out += 640; + currentLine++; }while (--renderLoop); *************** *** 1368,1468 **** renderLoop = vsize; do { ! stop = ptr1[480]; // stop ! start = ptr1[0]; // start ! ptr1++; ! hsize = stop - start; ! ! if(hsize>=0) { ! unsigned short int startColor = ptr2[0]; ! unsigned short int stopColor = ptr2[480]; ! ! out2 = start + out; ! ptr2++; ! if(hsize==0) ! { ! *(out2)=(unsigned char)(((startColor + stopColor)/2)>>8); ! } ! else { ! short int colorSize = stopColor - startColor; ! if(hsize==1) ! { ! unsigned short int currentColor = startColor; ! hsize++; ! hsize/=2; ! currentColor&=0xFF; ! currentColor+=startColor; ! *(out2) = currentColor>>8; ! currentColor&=0xFF; ! startColor+=colorSize; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! *(out2+1) = currentColor>>8; ! } ! else if(hsize==2) ! { ! unsigned short int currentColor = startColor; ! hsize++; ! hsize/=2; ! ! currentColor&=0xFF; ! colorSize/=2; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! *(out2++) = currentColor>>8; ! startColor+=colorSize; ! currentColor&=0xFF; ! currentColor+=startColor; ! *(out2) = currentColor>>8; ! currentColor&=0xFF; ! startColor+=colorSize; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! *(out2+1) = currentColor>>8; } else { ! unsigned short int currentColor = startColor; ! colorSize/=hsize; ! hsize++; ! ! ! if(hsize%2) { hsize/=2; currentColor&=0xFF; currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; ! *(out2++) = currentColor>>8; } ! else { hsize/=2; ! } - do - { currentColor&=0xFF; currentColor+=startColor; ! *(out2) = currentColor>>8; currentColor&=0xFF; startColor+=colorSize; currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; - *(out2+1) = currentColor>>8; ! out2+=2; ! startColor+=colorSize; ! }while(--hsize); } } ! } out += 640; }while(--renderLoop); break; --- 1475,1602 ---- renderLoop = vsize; + currentLine = vtop; do { ! if(currentLine >=0 && currentLine <480) { ! stop = ptr1[480]; // stop ! start = ptr1[0]; // start ! ptr1++; ! hsize = stop - start; ! if(hsize>=0) { ! unsigned short int startColor = ptr2[0]; ! unsigned short int stopColor = ptr2[480]; ! int currentXPos = start; ! out2 = start + out; ! ptr2++; ! if(hsize==0) ! { ! if(currentXPos>=0 && currentXPos<640) ! *(out2)=(unsigned char)(((startColor + stopColor)/2)>>8); } else { ! short int colorSize = stopColor - startColor; ! if(hsize==1) { + unsigned short int currentColor = startColor; + hsize++; hsize/=2; + + currentColor&=0xFF; + currentColor+=startColor; + if(currentXPos>=0 && currentXPos<640) + *(out2) = currentColor>>8; currentColor&=0xFF; + startColor+=colorSize; currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; ! currentXPos++; ! if(currentXPos>=0 && currentXPos<640) ! *(out2+1) = currentColor>>8; } ! else if(hsize==2) { + unsigned short int currentColor = startColor; + hsize++; hsize/=2; ! ! currentColor&=0xFF; ! colorSize/=2; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! if(currentXPos>=0 && currentXPos<640) ! *(out2) = currentColor>>8; ! ! out2++; ! currentXPos++; ! startColor+=colorSize; currentColor&=0xFF; currentColor+=startColor; ! ! if(currentXPos>=0 && currentXPos<640) ! *(out2) = currentColor>>8; ! currentColor&=0xFF; startColor+=colorSize; currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); currentColor +=startColor; ! currentXPos++; ! if(currentXPos>=0 && currentXPos<640) ! *(out2+1) = currentColor>>8; ! } ! else ! { ! unsigned short int currentColor = startColor; ! colorSize/=hsize; ! hsize++; ! ! ! if(hsize%2) ! { ! hsize/=2; ! currentColor&=0xFF; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! if(currentXPos>=0 && currentXPos<640) ! *(out2) = currentColor>>8; ! out2++; ! currentXPos++; ! } ! else ! { ! hsize/=2; ! } ! ! do ! { ! currentColor&=0xFF; ! currentColor+=startColor; ! if(currentXPos>=0 && currentXPos<640) ! *(out2) = currentColor>>8; ! currentXPos++; ! currentColor&=0xFF; ! startColor+=colorSize; ! currentColor = ((currentColor & (0xFF00)) | ((((currentColor & 0xFF) << (hsize & 0xFF))) & 0xFF)); ! currentColor +=startColor; ! if(currentXPos>=0 && currentXPos<640) ! *(out2+1) = currentColor>>8; ! ! currentXPos++; ! out2+=2; ! startColor+=colorSize; ! }while(--hsize); ! } } } ! } out += 640; + currentLine++; }while(--renderLoop); break; *************** *** 1528,1532 **** if (vbottom < vtop) return (0); ! if (vleft < textWindowLeft) { --- 1662,1666 ---- if (vbottom < vtop) return (0); ! /* if (vleft < textWindowLeft) { *************** *** 1577,1581 **** printf("ComputePoly_A-> cropped poly !\n"); exit(1); ! } ptr1 = pRenderV1; // on retourne au debut de la liste --- 1711,1715 ---- printf("ComputePoly_A-> cropped poly !\n"); exit(1); ! }*/ ptr1 = pRenderV1; // on retourne au debut de la liste Index: moveActor.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/moveActor.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** moveActor.c 31 Dec 2004 15:16:29 -0000 1.34 --- moveActor.c 26 Jun 2005 18:51:57 -0000 1.35 *************** *** 305,309 **** beta = READ_LE_S16(scriptPtr); ! scriptPtr += 2; lactor->angle = beta; --- 305,309 ---- beta = READ_LE_S16(scriptPtr); ! lactor->positionInMoveScript += 2; lactor->angle = beta; *************** *** 383,387 **** break; case 29: ! printf("skipping actor move opcode 29 (playSound)\n"); lactor->positionInMoveScript += 2; break; --- 383,387 ---- break; case 29: ! HQ_3D_MixSample(READ_LE_S16(scriptPtr), 0x1000, 0, lactor->X, lactor->Z, lactor->Y); lactor->positionInMoveScript += 2; break; Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** fullRedraw.c 12 Jun 2005 20:19:29 -0000 1.57 --- fullRedraw.c 26 Jun 2005 18:51:57 -0000 1.58 *************** *** 19,22 **** --- 19,25 ---- #include "lba.h" + extern unsigned char* brickTable[]; + extern unsigned char* brickMaskTable[]; + #ifdef GAME_DEBUG actor* pCurrentActorRender; *************** *** 248,258 **** if (projectedPositionX > -50 && projectedPositionX < 680 && projectedPositionY > -30 && projectedPositionY < 580) { drawList[a12].field_0 = extraList[counter2].X - cameraX + extraList[counter2].Y - cameraY; drawList[a12].field_2 = counter; a12++; ! ! // to not show shadows for stars and explode clouds ! int extraType = extraList[counter2].field_0 & 0x7FFF; // 0 - damage star | 1 - explode cloud ! if (shadowMode == 2 && (extraList[counter2].field_0 & 0x8000) && (extraType!=0) && (extraType!=1)) // cast shadow { --- 251,263 ---- if (projectedPositionX > -50 && projectedPositionX < 680 && projectedPositionY > -30 && projectedPositionY < 580) { + int extraType; + drawList[a12].field_0 = extraList[counter2].X - cameraX + extraList[counter2].Y - cameraY; drawList[a12].field_2 = counter; a12++; ! ! // to not show shadows for stars and explode clouds ! extraType = extraList[counter2].field_0 & 0x7FFF; // 0 - damage star | 1 - explode cloud ! if (shadowMode == 2 && (extraList[counter2].field_0 & 0x8000) && (extraType!=0) && (extraType!=1)) // cast shadow { *************** *** 330,334 **** unsigned int flags; int actorNumber; ! //int positionInDebugBox = 0; do --- 335,341 ---- unsigned int flags; int actorNumber; ! #ifdef GAME_DEBUG ! int positionInDebugBox = 0; ! #endif do *************** *** 1016,1020 **** currentDirtyBoxList[i].bottom = var_4; ! assert(currentDirtyBoxList[i].bottom < 480); return; } --- 1023,1028 ---- currentDirtyBoxList[i].bottom = var_4; ! if(currentDirtyBoxList[i].bottom >= 480) ! currentDirtyBoxList[i].bottom = 479; return; } *************** *** 1028,1032 **** currentDirtyBoxList[i].bottom = arg_C; ! assert(currentDirtyBoxList[i].bottom < 480); numOfRedrawBox++; --- 1036,1041 ---- currentDirtyBoxList[i].bottom = arg_C; ! if(currentDirtyBoxList[i].bottom >= 480) ! currentDirtyBoxList[i].bottom = 479; numOfRedrawBox++; *************** *** 1133,1137 **** #else // draw the background brick ! AffGraph(bx-1, zbufferVar1, zbufferVar2, bufferBrick); #endif --- 1142,1146 ---- #else // draw the background brick ! AffGraph(bx-1, zbufferVar1, zbufferVar2, brickTable); #endif *************** *** 1355,1359 **** assert( textWindowBottom <= 479 ); ! ptr = localBufferBrick + READ_LE_U32(localBufferBrick + num * 4); left = var1 + *(ptr + 2); --- 1364,1375 ---- assert( textWindowBottom <= 479 ); ! if(localBufferBrick != brickTable) ! { ! ptr = localBufferBrick + READ_LE_U32(localBufferBrick + num * 4); ! } ! else ! { ! ptr = brickTable[num]; ! } left = var1 + *(ptr + 2); *************** *** 1776,1780 **** assert( textWindowBottom <= 479 ); ! ptr = localBufferBrick + *(unsigned int *) (localBufferBrick + spriteNum * 4); left = x + *(ptr + 2); --- 1792,1798 ---- assert( textWindowBottom <= 479 ); ! //ptr = localBufferBrick + *(unsigned int *) (localBufferBrick + spriteNum * 4); ! ! ptr = brickMaskTable[spriteNum]; left = x + *(ptr + 2); Index: animAction.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/animAction.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** animAction.c 1 May 2005 15:35:01 -0000 1.12 --- animAction.c 26 Jun 2005 18:51:57 -0000 1.13 *************** *** 304,319 **** case 10: { ebx = edi; - #ifdef GAME_DEBUG - printf("Skipping GereAnimAction opcode 10 (sound)\n"); - #endif break; } case 11: { ebx = edi; - #ifdef GAME_DEBUG - printf("Skipping GereAnimAction opcode 11 (sound)\n"); - #endif break; } --- 304,317 ---- case 10: { + temp = *(ebx++); + ebx = edi; break; } case 11: { + temp = *(ebx++); + ebx = edi; break; } *************** *** 332,337 **** case 13: { ! if(*ebx == lactor->animPosition) ! { int throwX; int throwY; --- 330,335 ---- case 13: { ! if(*ebx == lactor->animPosition) ! { int throwX; int throwY; *************** *** 350,359 **** int strength; ! distanceX = READ_LE_S16(edi); distanceY = READ_LE_S16(edi+2); distanceZ = READ_LE_S16(edi+4); ! Rotate(distanceX, distanceZ, lactor->angle); throwX = destX + lactor->X; --- 348,357 ---- int strength; ! distanceX = READ_LE_S16(edi); distanceY = READ_LE_S16(edi+2); distanceZ = READ_LE_S16(edi+4); ! Rotate(distanceX, distanceZ, lactor->angle); throwX = destX + lactor->X; *************** *** 370,379 **** strength = *(edi+14); ! ThrowExtra(actorNum, throwX, throwY, throwZ, spriteIdx, param1, param2, param3, param4, strength); ! } ! ebx = eax; break; } ! case 14: { if(*ebx == lactor->animPosition) --- 368,377 ---- strength = *(edi+14); ! ThrowExtra(actorNum, throwX, throwY, throwZ, spriteIdx, param1, param2, param3, param4, strength); ! } ! ebx = eax; break; } ! case 14: { if(*ebx == lactor->animPosition) Index: room.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/room.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** room.c 22 Jun 2005 21:55:08 -0000 1.33 --- room.c 26 Jun 2005 18:51:57 -0000 1.34 *************** *** 19,22 **** --- 19,29 ---- #include "lba.h" + #define NUM_MAX_BRICKS 9000 + + unsigned char* brickTable[NUM_MAX_BRICKS]; + unsigned char* brickMaskTable[NUM_MAX_BRICKS]; + unsigned int brickSizeTable[NUM_MAX_BRICKS]; + unsigned char brickUsageTable[NUM_MAX_BRICKS]; + void ChangeCube(void) { *************** *** 1099,1107 **** unsigned int finalSize = 0; ! printf("GridSize=%d\n", gridSize); ! ! bufferPtr = workVideoBuffer + 153800; ! ! RazMem(bufferPtr, 20000); ptrToBllBits = currentGrid + (gridSize - 32); --- 1106,1112 ---- unsigned int finalSize = 0; ! memset(brickTable, 0, sizeof(brickTable)); ! memset(brickSizeTable, 0, sizeof(brickSizeTable)); ! memset(brickUsageTable, 0, sizeof(brickUsageTable)); ptrToBllBits = currentGrid + (gridSize - 32); *************** *** 1140,1144 **** lastBrick = brickIdx; ! WRITE_LE_U16(bufferPtr + brickIdx*2,1); } bllDataPtr += 4; --- 1145,1149 ---- lastBrick = brickIdx; ! brickUsageTable[brickIdx] = 1; } bllDataPtr += 4; *************** *** 1153,1198 **** for(i=firstBrick;i<=lastBrick;i++) { ! if(READ_LE_U16(currentPositionInBuffer)) // was brick noted as used ? ! { ! numUsedBricks++; ! } ! ! currentPositionInBuffer+=2; } ! ! printf("Need to load %d bricks\n", numUsedBricks); ! ! currentPositionInBuffer = bufferPtr + firstBrick * 2; ! ! destinationBrickPtr = bufferBrick + (numUsedBricks+1)*4; ! ! localBufferBrick = bufferBrick; ! ! WRITE_LE_U32(localBufferBrick, (numUsedBricks+1)*4); ! localBufferBrick+=4; ! ! ptrTempDecompression = (firstBrick * 4 + workVideoBuffer); ! ! currentBrickIdx = 0; ! for(i=firstBrick;i<=lastBrick;i++) { ! if(READ_LE_U16(currentPositionInBuffer)) ! { ! WRITE_LE_U16(currentPositionInBuffer, currentBrickIdx); ! ! Load_HQR("LBA_BRK.HQR", destinationBrickPtr, i); ! brickSize = Size_HQR("LBA_BRK.HQR",i); ! ! finalSize += brickSize; ! destinationBrickPtr += brickSize; ! WRITE_LE_U32(localBufferBrick,brickSize); ! localBufferBrick+=4; ! } ! ! ptrTempDecompression+=4; ! currentPositionInBuffer+=2; } ! currentBllEntryIdx = 0; for(i=1;i<256;i++) --- 1158,1177 ---- for(i=firstBrick;i<=lastBrick;i++) { ! if(brickUsageTable[i]) // was brick noted as used ? ! { ! numUsedBricks++; ! } } ! for(i=firstBrick;i<=lastBrick;i++) { ! if(brickUsageTable[i]) ! { ! brickSizeTable[i] = Size_HQR("LBA_BRK.HQR",i); ! brickTable[i] = (unsigned char*)malloc(brickSizeTable[i]); ! Load_HQR("LBA_BRK.HQR", brickTable[i], i); ! } } ! /* currentBllEntryIdx = 0; for(i=1;i<256;i++) *************** *** 1226,1233 **** } currentBllEntryIdx += 4; ! } ! ! return (finalSize); } /* --- 1205,1211 ---- } currentBllEntryIdx += 4; ! }*/ + return (0); } /* *************** *** 1455,1458 **** --- 1433,1453 ---- } */ + + int CreateMaskGph() + { + int i; + + for(i=0;i<NUM_MAX_BRICKS;i++) + { + if(brickUsageTable[i]) + { + brickMaskTable[i] = (unsigned char*)malloc(brickSizeTable[i]); + + CalcGraphMsk(i, brickTable[i], brickMaskTable[i]); + } + } + } + + void RazMem(unsigned char *ptr, int size) { Index: music.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/music.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** music.c 21 Apr 2005 21:29:54 -0000 1.14 --- music.c 26 Jun 2005 18:51:57 -0000 1.15 *************** *** 59,65 **** currentlyPlayingCDTrack = -1; ! if(cdrom!=NULL) if(CD_INDRIVE(SDL_CDStatus(cdrom))) SDL_CDPlayTracks(cdrom, trackNumber, 0, 1, 0); unfreezeTime(); --- 59,71 ---- currentlyPlayingCDTrack = -1; ! if(cdrom!=NULL) ! { if(CD_INDRIVE(SDL_CDStatus(cdrom))) SDL_CDPlayTracks(cdrom, trackNumber, 0, 1, 0); + } + else + { + playMidi(trackNumber); + } unfreezeTime(); Index: cube.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/cube.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cube.c 22 Jun 2005 21:55:08 -0000 1.5 --- cube.c 26 Jun 2005 18:51:57 -0000 1.6 *************** *** 51,63 **** brickDataSize = loadBrk(gridSize); ! if (!brickDataSize) ! return (0); ! HQM_Alloc(brickDataSize, &bufferBrick2); ! size = CreateMaskGph((unsigned int *) bufferBrick, (unsigned int *) bufferBrick2); ! HQM_Shrink_Last(bufferBrick2, size); numberOfBll = (READ_LE_U32(currentBll)) >> 2; --- 51,65 ---- brickDataSize = loadBrk(gridSize); ! /* if (!brickDataSize) ! return (0);*/ ! //HQM_Alloc(brickDataSize, &bufferBrick2); ! //size = CreateMaskGph((unsigned int *) bufferBrick, (unsigned int *) bufferBrick2); ! CreateMaskGph(); ! ! //HQM_Shrink_Last(bufferBrick2, size); numberOfBll = (READ_LE_U32(currentBll)) >> 2; *************** *** 232,236 **** }while (--temp1); } ! int CreateMaskGph(unsigned int *buffer1, unsigned int *destBuffer) { --- 234,238 ---- }while (--temp1); } ! /* int CreateMaskGph(unsigned int *buffer1, unsigned int *destBuffer) { *************** *** 262,268 **** return (startOffset); } // build the masks for the bricks ! int CalcGraphMsk(int var, unsigned int *buffer, unsigned int *ptr) { unsigned int *ptrSave = ptr; --- 264,272 ---- return (startOffset); } + */ + // build the masks for the bricks ! int CalcGraphMsk(int var, unsigned char *buffer, unsigned char *ptr) { unsigned int *ptrSave = ptr; *************** *** 273,280 **** int ebx; ! buffer = (unsigned int *) (READ_LE_U32(buffer + var) + (unsigned char *) buffer); ! ebx = READ_LE_U32( buffer++ ); // on ecrit le flag de la brique ! WRITE_LE_U32( ptr++, ebx ); bh = (ebx & 0x0000FF00) >> 8; --- 277,286 ---- int ebx; ! //buffer = (unsigned int *) (READ_LE_U32(buffer + var) + (unsigned char *) buffer); ! ebx = READ_LE_U32( buffer ); // on ecrit le flag de la brique ! buffer+=4; ! WRITE_LE_U32( ptr, ebx ); ! ptr+=4; bh = (ebx & 0x0000FF00) >> 8; Index: vars.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/vars.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** vars.h 24 Jun 2005 22:48:54 -0000 1.46 --- vars.h 26 Jun 2005 18:51:57 -0000 1.47 *************** *** 23,27 **** --- 23,31 ---- #ifdef PCLIKE + #ifdef WIN32 + #include <SDL.h> + #else #include <SDL/SDL.h> + #endif #endif //PCLIKE *************** *** 1298,1304 **** void HQM_Shrink_Last(unsigned char *bufferBrick2, int size); ! int CalcGraphMsk(int var, unsigned int *ptr1, unsigned int *ptr2); ! int CreateMaskGph(unsigned int *buffer1, unsigned int *buffer2); void RazMem(unsigned char *ptr, int size); --- 1302,1308 ---- void HQM_Shrink_Last(unsigned char *bufferBrick2, int size); ! int CalcGraphMsk(int var, unsigned char *ptr1, unsigned char *ptr2); ! int CreateMaskGph(void); void RazMem(unsigned char *ptr, int size); *************** *** 1519,1522 **** --- 1523,1528 ---- void processTextLine(void); + void CopyMaskLBA(int spriteNum, int x, int y, byte * localBufferBrick, byte * buffer); + //}; #endif Index: images.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/images.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** images.c 18 Jun 2005 16:55:17 -0000 1.14 --- images.c 26 Jun 2005 18:51:57 -0000 1.15 *************** *** 196,209 **** int i; - int *colorDest = (int *) palDest; - - #if 0 - for (i = 0; i < 256; i++) - { - *(colorDest++) = (*(int *) palSource); // little optimisation trick - palSource += 3; - } - #else - #ifdef MACOSX for (i = 0; i < 256; i++) { --- 196,199 ---- *************** *** 214,224 **** palSource+=3; } - #else - for (i = 0; i < 256*3; i++) - { - *(palDest++) = *(palSource++); // little optimisation trick - } - #endif - #endif - } --- 204,206 ---- Index: samples.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/samples.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** samples.c 21 Apr 2005 21:29:54 -0000 1.6 --- samples.c 26 Jun 2005 18:51:57 -0000 1.7 *************** *** 20,24 **** #ifdef PCLIKE ! //#include <SDL_mixer.h> #endif --- 20,24 ---- #ifdef PCLIKE ! #include <SDL_mixer.h> #endif *************** *** 29,53 **** #ifdef PCLIKE ! //sampleStructData sampleTable[16]; #endif void playSample(int sampleNum, int freq, int repeat, int x, int y) { ! /* char filename[256]; - sprintf(filename,"samples/samples%03d.voc",sampleNum+1); ! Mix_Chunk * sample=Mix_LoadWAV(filename); ! Mix_PlayChannel(0,sample,repeat-1);*/ } void playSampleFla(int sampleNum, int freq, int repeat, int x, int y) { ! /* char filename[256]; sprintf(filename,"fla/flasamp/flasamp%02d.voc",sampleNum+1); ! Mix_Chunk * sample=Mix_LoadWAV(filename); ! Mix_PlayChannel(0,sample,repeat-1);*/ } --- 29,61 ---- #ifdef PCLIKE ! struct sampleStructData sampleTable[16]; #endif void playSample(int sampleNum, int freq, int repeat, int x, int y) { ! char filename[256]; ! Mix_Chunk * sample; ! FILE* fhandle; ! sample=Mix_LoadWAV_RW(SDL_RWFromMem(HQR_Get(HQR_Samples,sampleNum), Size_HQR("SAMPLES.HQR", sampleNum)),0); ! ! if(sample == NULL) ! { ! printf("Mix_LoadWAV(\"%s\"): %s\n", filename, Mix_GetError()); ! } ! ! Mix_PlayChannel(0,sample,repeat-1); } void playSampleFla(int sampleNum, int freq, int repeat, int x, int y) { ! char filename[256]; ! Mix_Chunk * sample; sprintf(filename,"fla/flasamp/flasamp%02d.voc",sampleNum+1); ! sample=Mix_LoadWAV(filename); ! Mix_PlayChannel(0,sample,repeat-1); } *************** *** 62,72 **** } void playMidi(int musicNum) { ! /*char filename[256]; ! sprintf(filename,"midi_mi_win/midi_mi_win%02d.mid",musicNum+1); ! Mix_Music * sample=Mix_LoadMUS(filename); ! Mix_PlayMusic(sample,0);*/ } --- 70,120 ---- } + #define midiFileName "Midi_mi_win" + + Mix_Music * sample = NULL; + void playMidi(int musicNum) { ! char filename[256]; ! FILE* fhandle; ! if(sample != NULL) ! { ! Mix_FreeMusic(sample); ! } ! // if(musicNum == 9) ! return; ! ! sprintf(filename,"%s/%s%02d.midi",midiFileName,midiFileName,musicNum); ! ! fhandle = fopen(filename,"rb"); ! ! if(!fhandle) ! { ! char sourceName[256]; ! char* temp; ! unsigned int midiSize; ! ! mkdir(midiFileName); ! fhandle = fopen(filename,"wb+"); ! ! sprintf(sourceName, "%s.hqr", midiFileName); ! ! midiSize = Size_HQR(sourceName, musicNum); ! temp = (char*)malloc(midiSize); ! ! Load_HQR(sourceName, temp, musicNum); ! fwrite(temp, midiSize,1, fhandle); ! fclose(fhandle); ! free(temp); ! } ! ! sample=Mix_LoadMUS(filename); ! ! if(sample == NULL) ! { ! printf("Mix_LoadMUS(\"%s\"): %s\n", filename, Mix_GetError()); ! } ! Mix_PlayMusic(sample,0); } Index: mainSDL.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainSDL.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mainSDL.c 4 May 2005 09:08:10 -0000 1.34 --- mainSDL.c 26 Jun 2005 18:51:57 -0000 1.35 *************** *** 19,26 **** --- 19,35 ---- void studioTick(void); + #define USE_SDL_MIXER true + #define USE_OPENAL false + + #define playSounds true + #include "SDL.h" #include "SDL_thread.h" #include "lba.h" + #ifdef USE_SDL_MIXER + #include "SDL_Mixer.h" + #endif + #ifdef GAME_DEBUG #include <SDL_ttf.h> *************** *** 174,259 **** { /* int rendersolid = 0; ! int renderstyle = 0; int rendertype = 0; */ ! //int ptsize = 11; ! unsigned char *keyboard; ! int size; ! int i; ! Uint32 rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN ! rmask = 0xff000000; ! gmask = 0x00ff0000; ! bmask = 0x0000ff00; ! amask = 0x000000ff; #else ! rmask = 0x000000ff; ! gmask = 0x0000ff00; ! bmask = 0x00ff0000; ! amask = 0xff000000; #endif ! if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { ! fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); ! exit(1); } ! atexit(SDL_Quit); #ifdef GAME_DEBUG ! if (TTF_Init() < 0) { ! fprintf(stderr, "Couldn't initialize TTF: %s\n", SDL_GetError()); ! exit(1); } ! atexit(TTF_Quit); ! font = TTF_OpenFont("verdana.ttf", ptsize); ! if (font == NULL) { ! fprintf(stderr, "Couldn't load %d pt font from %s: %s\n", ptsize, "verdana.ttf", ! SDL_GetError()); ! exit(2); } ! TTF_SetFontStyle(font, renderstyle); #endif ! SDL_WM_SetCaption("Little Big Adventure: TwinEngine", "LBA"); ! // SDL_ShowCursor (SDL_DISABLE); ! // SDL_EnableUNICODE (SDL_ENABLE); // not much used in fact ! SDL_PumpEvents(); ! keyboard = SDL_GetKeyState(&size); ! keyboard[SDLK_RETURN] = 0; ! sdl_screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE/*|SDL_FULLSCREEN*/); ! if (sdl_screen == NULL) { ! fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n", SDL_GetError()); ! exit(1); } ! for (i = 0; i < 16; i++) { ! surfaceTable[i] = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 480, 32, rmask, gmask, bmask, 0); } ! osystem_mouseLeft = 0; ! osystem_mouseRight = 0; ! return 0; } --- 183,317 ---- { /* int rendersolid = 0; ! int rendertype = 0; */ ! #ifdef GAME_DEBUG ! int renderstyle = 0; ! int ptsize = 11; ! #endif ! unsigned char *keyboard; ! int size; ! int i; ! Uint32 rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN ! rmask = 0xff000000; ! gmask = 0x00ff0000; ! bmask = 0x0000ff00; ! amask = 0x000000ff; #else ! rmask = 0x000000ff; ! gmask = 0x0000ff00; ! bmask = 0x00ff0000; ! amask = 0xff000000; #endif ! if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { ! fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); ! exit(1); } ! { ! SDL_version compile_version, *link_version; ! SDL_VERSION(&compile_version); ! printf("compiled with SDL version: %d.%d.%d\n", ! compile_version.major, ! compile_version.minor, ! compile_version.patch); ! link_version=SDL_Linked_Version(); ! printf("running with SDL version: %d.%d.%d\n", ! link_version->major, ! link_version->minor, ! link_version->patch); ! } ! ! atexit(SDL_Quit); #ifdef GAME_DEBUG ! if (TTF_Init() < 0) { ! fprintf(stderr, "Couldn't initialize TTF: %s\n", SDL_GetError()); ! exit(1); } ! atexit(TTF_Quit); ! font = TTF_OpenFont("verdana.ttf", ptsize); ! if (font == NULL) { ! fprintf(stderr, "Couldn't load %d pt font from %s: %s\n", ptsize, "verdana.ttf", SDL_GetError()); ! exit(2); } ! TTF_SetFontStyle(font, renderstyle); #endif ! if(playSounds) ! { ! #ifdef USE_SDL_MIXER ! SDL_version compile_version, *link_version; ! MIX_VERSION(&compile_version); ! printf("compiled with SDL_mixer version: %d.%d.%d\n", ! compile_version.major, ! compile_version.minor, ! compile_version.patch); ! link_version=Mix_Linked_Version(); ! printf("running with SDL_mixer version: %d.%d.%d\n", ! link_version->major, ! link_version->minor, ! link_version->patch); ! // start SDL with audio support ! if(SDL_Init(SDL_INIT_AUDIO)==-1) ! { ! printf("SDL_Init: %s\n", SDL_GetError()); ! exit(1); ! } ! // open 44.1KHz, signed 16bit, system byte order, ! // stereo audio, using 1024 byte chunks ! if(Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024)==-1) ! { ! printf("Mix_OpenAudio: %s\n", Mix_GetError()); ! exit(2); ! } ! Mix_AllocateChannels(16); ! #endif ! } ! SDL_WM_SetCaption("Little Big Adventure: TwinEngine", "LBA"); ! // SDL_ShowCursor (SDL_DISABLE); ! // SDL_EnableUNICODE (SDL_ENABLE); // not much used in fact ! SDL_PumpEvents(); ! keyboard = SDL_GetKeyState(&size); ! ! keyboard[SDLK_RETURN] = 0; ! ! sdl_screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE/*|SDL_FULLSCREEN*/); ! ! if (sdl_screen == NULL) { ! fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n", SDL_GetError()); ! exit(1); } ! for (i = 0; i < 16; i++) { ! surfaceTable[i] = SDL_CreateRGBSurface(SDL_SWSURFACE, 640, 480, 32, rmask, gmask, bmask, 0); } ! osystem_mouseLeft = 0; ! osystem_mouseRight = 0; ! return 0; } Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** HQRlib.c 18 Jun 2005 16:55:16 -0000 1.10 --- HQRlib.c 26 Jun 2005 18:51:57 -0000 1.11 *************** *** 342,346 **** streamReader_get( &fileReader, compressedDataPtr, compressedSize); - printf("DataSize: %d", dataSize); HQR_Expand(dataSize, (unsigned char*)ptr, compressedDataPtr); --- 342,345 ---- |
|
From: Vincent H. <ya...@us...> - 2005-06-26 18:52:10
|
Update of /cvsroot/twin-e/twin-e/win32/visual 7.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv754/win32/visual 7.1 Added Files: twin-e.vcproj Log Message: Buggy clipped poly Sound (wrong pitch) Midi music (deactivated, cause problems) One major script bug fixed --- NEW FILE: twin-e.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="twin-e" ProjectGUID="{6275F3F1-F764-45C8-8E74-AE098B8A8FD5}" RootNamespace="twine" Keyword="ManagedCProj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" CharacterSet="2" ManagedExtensions="FALSE"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;GAME_DEBUG" MinimalRebuild="FALSE" BasicRuntimeChecks="0" RuntimeLibrary="3" WarningLevel="3" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="SDL.lib SDLmain.lib SDL_ttf.lib freetype2110MT_D.lib SDL_mixer.lib" OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="2" GenerateDebugInformation="TRUE" AssemblyDebug="1" SubSystem="1" EntryPointSymbol=""/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" CharacterSet="2" ManagedExtensions="FALSE"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG" MinimalRebuild="FALSE" RuntimeLibrary="2" WarningLevel="3" DebugInformationFormat="3"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="SDL.lib SDLmain.lib SDL_mixer.lib" OutputFile="$(OutDir)\$(ProjectName).exe" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File RelativePath="..\..\src\actors.c"> </File> <File RelativePath="..\..\src\actorScript.c"> </File> <File RelativePath="..\..\src\angle.c"> </File> <File RelativePath="..\..\src\angleTable.c"> </File> <File RelativePath="..\..\src\anim.c"> </File> <File RelativePath="..\..\src\animAction.c"> </File> <File RelativePath="..\..\src\body.c"> </File> <File RelativePath="..\..\src\cdrom.c"> </File> <File RelativePath="..\..\src\comportementMenu.c"> </File> <File RelativePath="..\..\src\costume.c"> </File> <File RelativePath="..\..\src\cube.c"> </File> <File RelativePath="..\..\src\debug.c"> </File> <File RelativePath="..\..\src\decomp.c"> </File> <File RelativePath="..\..\src\expand.c"> </File> <File RelativePath="..\..\src\extra.c"> </File> <File RelativePath="..\..\src\fichePerso.c"> </File> <File RelativePath="..\..\src\file.c"> </File> <File RelativePath="..\..\src\fireEffect.c"> </File> <File RelativePath="..\..\src\flaplayer.c"> </File> <File RelativePath="..\..\src\font.c"> </File> <File RelativePath="..\..\src\fullRedraw.c"> </File> <File RelativePath="..\..\src\global.c"> </File> <File RelativePath="..\..\src\grid.c"> </File> <File RelativePath="..\..\src\HQMGlobal.c"> </File> <File RelativePath="..\..\src\HQMLib.c"> </File> <File RelativePath="..\..\src\hqr.c"> </File> <File RelativePath="..\..\src\HQRlib.c"> </File> <File RelativePath="..\..\src\images.c"> </File> <File RelativePath="..\..\src\init.c"> </File> <File RelativePath="..\..\src\input.c"> </File> <File RelativePath="..\..\src\inventory.c"> </File> <File RelativePath="..\..\src\life_ascii.c"> </File> <File RelativePath="..\..\src\life_binary.c"> </File> <File RelativePath="..\..\src\life_common.c"> </File> <File RelativePath="..\..\src\main.c"> </File> <File RelativePath="..\..\src\mainLoop.c"> </File> <File RelativePath="..\..\src\mainMenu.c"> </File> <File RelativePath="..\..\src\mainSDL.c"> </File> <File RelativePath="..\..\src\mainSDLGL.c"> </File> <File RelativePath="..\..\src\memHandler.c"> </File> <File RelativePath="..\..\src\memory.c"> </File> <File RelativePath="..\..\src\moveActor.c"> </File> <File RelativePath="..\..\src\music.c"> </File> <File RelativePath="..\..\src\object.c"> </File> <File RelativePath="..\..\src\overlay.c"> </File> <File RelativePath="..\..\src\renderer.c"> </File> <File RelativePath="..\..\src\room.c"> </File> <File RelativePath="..\..\src\samples.c"> </File> <File RelativePath="..\..\src\save.c"> </File> <File RelativePath="..\..\src\shadow.c"> </File> <File RelativePath="..\..\src\streamReader.c"> </File> <File RelativePath="..\..\src\sys.c"> </File> <File RelativePath="..\..\src\text.c"> </File> <File RelativePath="..\..\src\threadCode.c"> </File> <File RelativePath="..\..\src\time.c"> </File> <File RelativePath="..\..\src\timer.c"> </File> <File RelativePath="..\..\src\vars.c"> </File> <File RelativePath="..\..\src\video.c"> </File> <File RelativePath="..\..\src\vox.c"> </File> <File RelativePath="..\..\src\zones.c"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File RelativePath="..\..\src\angle.h"> </File> <File RelativePath="..\..\src\angleTable.h"> </File> <File RelativePath="..\..\src\costume.h"> </File> <File RelativePath="..\..\src\debug.h"> </File> <File RelativePath="..\..\src\decomp.h"> </File> <File RelativePath="..\..\src\extraData.h"> </File> <File RelativePath="..\..\src\global.h"> </File> <File RelativePath="..\..\src\HQMLib.h"> </File> <File RelativePath="..\..\src\HQRlib.h"> </File> <File RelativePath="..\..\src\lba.h"> </File> <File RelativePath="..\..\src\life_common.h"> </File> <File RelativePath="..\..\src\osystem.h"> </File> <File RelativePath="..\..\src\overlay.h"> </File> <File RelativePath="..\..\src\samples.h"> </File> <File RelativePath="..\..\src\streamReader.h"> </File> <File RelativePath="..\..\src\type.h"> </File> <File RelativePath="..\..\src\vars.h"> </File> <File RelativePath="..\..\src\zones.h"> </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> |
|
From: Vincent H. <ya...@us...> - 2005-06-25 16:59:41
|
Update of /cvsroot/twin-e/twin-e/win32/visual 7.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23079/visual 7.1 Log Message: Directory /cvsroot/twin-e/twin-e/win32/visual 7.1 added to the repository |
|
From: Vincent H. <ya...@us...> - 2005-06-25 16:59:20
|
Update of /cvsroot/twin-e/twin-e/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22954/win32 Log Message: Directory /cvsroot/twin-e/twin-e/win32 added to the repository |
|
From: Vincent H. <ya...@us...> - 2005-06-24 22:49:04
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14524/src Modified Files: vars.h Log Message: broke everything to get brick loading a bit cleaner Index: vars.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/vars.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** vars.h 12 Jun 2005 20:19:29 -0000 1.45 --- vars.h 24 Jun 2005 22:48:54 -0000 1.46 *************** *** 23,27 **** #ifdef PCLIKE ! #include "SDL.h" #endif //PCLIKE --- 23,27 ---- #ifdef PCLIKE ! #include <SDL/SDL.h> #endif //PCLIKE |
|
From: Vincent H. <ya...@us...> - 2005-06-22 21:55:23
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7314 Modified Files: cube.c room.c Log Message: Bit more of cross platform issues. PC version probably brocken Index: room.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/room.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** room.c 18 Jun 2005 16:55:18 -0000 1.32 --- room.c 22 Jun 2005 21:55:08 -0000 1.33 *************** *** 1092,1095 **** --- 1092,1101 ---- unsigned int numUsedBricks; unsigned int currentBllEntryIdx = 0; + unsigned char* destinationBrickPtr; + unsigned char* localBufferBrick; + unsigned char* ptrTempDecompression; + unsigned int currentBrickIdx; + unsigned int brickSize; + unsigned int finalSize = 0; printf("GridSize=%d\n", gridSize); *************** *** 1143,1147 **** // compute the number of bricks to load ! currentPositionInBuffer = bufferPtr + firstBrick*2; numUsedBricks = 0; for(i=firstBrick;i<=lastBrick;i++) --- 1149,1153 ---- // compute the number of bricks to load ! currentPositionInBuffer = bufferPtr + firstBrick * 2; numUsedBricks = 0; for(i=firstBrick;i<=lastBrick;i++) *************** *** 1156,1159 **** --- 1162,1232 ---- printf("Need to load %d bricks\n", numUsedBricks); + + currentPositionInBuffer = bufferPtr + firstBrick * 2; + + destinationBrickPtr = bufferBrick + (numUsedBricks+1)*4; + + localBufferBrick = bufferBrick; + + WRITE_LE_U32(localBufferBrick, (numUsedBricks+1)*4); + localBufferBrick+=4; + + ptrTempDecompression = (firstBrick * 4 + workVideoBuffer); + + currentBrickIdx = 0; + + for(i=firstBrick;i<=lastBrick;i++) + { + if(READ_LE_U16(currentPositionInBuffer)) + { + WRITE_LE_U16(currentPositionInBuffer, currentBrickIdx); + + Load_HQR("LBA_BRK.HQR", destinationBrickPtr, i); + brickSize = Size_HQR("LBA_BRK.HQR",i); + + finalSize += brickSize; + destinationBrickPtr += brickSize; + WRITE_LE_U32(localBufferBrick,brickSize); + localBufferBrick+=4; + } + + ptrTempDecompression+=4; + currentPositionInBuffer+=2; + } + + currentBllEntryIdx = 0; + for(i=1;i<256;i++) + { + unsigned char currentBitByte = *(ptrToBllBits + (i/8)); + unsigned char currentBitMask = 1 << (7-(i&7)); + + if(currentBitByte & currentBitMask) + { + unsigned int currentBllOffset = READ_LE_U32(currentBll + currentBllEntryIdx); + unsigned char* currentBllPtr = currentBll + currentBllOffset; + + unsigned int bllSizeX = currentBllPtr[0]; + unsigned int bllSizeY = currentBllPtr[1]; + unsigned int bllSizeZ = currentBllPtr[2]; + + unsigned int bllSize = bllSizeX * bllSizeY * bllSizeZ; + + unsigned char* bllDataPtr = currentBllPtr + 5; + + for(j=0;j<bllSize;j++) + { + unsigned int brickIdx = READ_LE_U16(bllDataPtr); + + if(brickIdx) + { + WRITE_LE_U16(bllDataPtr, READ_LE_U16(bufferPtr + brickIdx * 2 - 2)); + } + bllDataPtr += 4; + } + } + currentBllEntryIdx += 4; + } + + return (finalSize); } Index: cube.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/cube.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** cube.c 12 Jun 2005 20:19:29 -0000 1.4 --- cube.c 22 Jun 2005 21:55:08 -0000 1.5 *************** *** 242,248 **** unsigned int firstBrickOffset; ! firstBrickOffset = *buffer1; destPtr = (unsigned char *) ((unsigned char*)destBuffer + firstBrickOffset); ! numOfBricks = (*buffer1) >> 2; *(destBuffer++) = startOffset = *buffer1; --- 242,248 ---- unsigned int firstBrickOffset; ! firstBrickOffset = READ_LE_U32(buffer1); destPtr = (unsigned char *) ((unsigned char*)destBuffer + firstBrickOffset); ! numOfBricks = READ_LE_U32(buffer1) >> 2; *(destBuffer++) = startOffset = *buffer1; |
|
From: Vincent H. <ya...@us...> - 2005-06-18 16:55:32
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25040 Modified Files: HQRlib.c images.c mainMenu.c room.c type.h Log Message: resync Index: room.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/room.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** room.c 12 Jun 2005 20:19:29 -0000 1.31 --- room.c 18 Jun 2005 16:55:18 -0000 1.32 *************** *** 1080,1331 **** Ptr_HQM_Memory = temp; } ! /* int loadBrk(int gridSize) { ! int firstBrick; ! int lastBrick; ! int currentBrick; ! ! // int tempSize2; ! int counter; ! int counter2; ! int counter3; ! int counter6; ! int counter7; ! int offset; ! int offset2; ! ! unsigned char *endOfGridPtr; ! unsigned char *endOfGridPtr2; ! unsigned char *endOfGridPtr3; ! unsigned char *outPtr; ! unsigned short int *outPtr2; ! unsigned short int *outPtr3; ! unsigned short int *outPtr4; ! unsigned char *destPtr; ! unsigned char *compressedPtr; ! unsigned int *ptrUnk; ! ! byte temp; ! byte temp2; ! int temp3; ! int temp4; ! unsigned char *ptr1; ! unsigned char *ptr2; ! int val1; ! int val2; ! int val3; ! unsigned short int val4; ! int finalSize; ! unsigned int *localBufferBrick; ! ! FILE *file; ! int headerSize; ! int dataSize; ! int compressedSize; ! ! short int mode; ! ! firstBrick = 60000; ! lastBrick = 0; ! counter = 1; ! ! outPtr = workVideoBuffer + 153800; ! outPtr2 = (unsigned short int *) outPtr; ! ! RazMem(outPtr, 20000); ! offset = 4; ! endOfGridPtr2 = endOfGridPtr = currentGrid + (gridSize - 32); ! do { ! temp = *(endOfGridPtr2 + (counter >> 3)); ! temp2 = 7 - (counter & 7); ! ! temp3 = 1 << temp2; ! ! if (temp & temp3) { ! temp4 = *(int *) (currentBll + offset - 4); ! ptr1 = currentBll + temp4; ! ! val1 = *ptr1; ! val2 = *(ptr1 + 1); ! ! val2 *= val1; ! ! val3 = *(char *) (ptr1 + 2); ! ! val3 *= val2; ! ! ptr2 = ptr1 + 5; ! ! counter2 = 0; ! while (counter2++ < val3) { ! val4 = READ_LE_U16( ptr2 ); ! if (val4 != 0) { ! val4--; ! if (val4 <= firstBrick) ! firstBrick = val4; ! if (val4 > lastBrick) ! lastBrick = val4; ! WRITE_LE_U16(outPtr2 + val4) = 1; } ! ! ptr2 += 4; ! } ! ! } ! ! offset += 4; ! } ! while (++counter < 256); ! ! outPtr3 = outPtr2 + firstBrick; ! ! currentBrick = firstBrick; ! ! counter3 = 0; ! ! while (currentBrick <= lastBrick) ! { ! if (READ_LE_U16(outPtr3) != 0) ! counter3++; ! outPtr3++; ! currentBrick++; ! } ! ! printf("Need to load %d bricks\n", counter3); ! ! file = OpenRead("lba_brk.hqr"); ! ! if (!file) ! return (0); ! ! Read(file, (char *) &headerSize, 4); ! ! fseek(file, 0, 0); ! ! Read(file, (char *) workVideoBuffer, headerSize); ! ! counter3 *= 4; ! counter3 += 4; ! ! finalSize = counter3; // car on doit au moins avoir 1 ptr par brique ! ! headerSize = headerSize >> 2; ! ! outPtr4 = outPtr2 + firstBrick; ! ! localBufferBrick = (unsigned int *) bufferBrick; ! ! destPtr = bufferBrick + counter3; ! ! *(int *) localBufferBrick = counter3; ! ! localBufferBrick++; ! ! currentBrick = firstBrick; ! ! ptrUnk = (unsigned int *) (firstBrick * 4 + workVideoBuffer); ! ! counter6 = 0; ! ! while (currentBrick <= lastBrick) ! { ! if (*outPtr4) ! { ! counter6++; ! *outPtr4 = counter6; ! fseek(file, *ptrUnk, 0); ! ! Read(file, (char *) &dataSize, 4); ! Read(file, (char *) &compressedSize, 4); ! ! Read(file, (char *) &mode, 2); ! ! if (mode == 0) ! { ! Read(file, (char *) destPtr, dataSize); ! } ! else if (mode == 1) ! { ! compressedPtr = dataSize + destPtr - compressedSize + 500; ! Read(file, (char *) compressedPtr, compressedSize); ! Expand(dataSize, destPtr, compressedPtr); } - finalSize += dataSize; - destPtr += dataSize; - *localBufferBrick = finalSize; - localBufferBrick++; } ! ! outPtr4++; ! ptrUnk++; ! currentBrick++; } ! ! counter6 = 1; ! ! offset2 = 4; ! ! endOfGridPtr3 = endOfGridPtr = currentGrid + (gridSize - 32); ! ! do { ! temp = *(endOfGridPtr3 + (counter6 >> 3)); ! temp2 = 7 - (counter6 & 7); ! ! temp3 = 1 << temp2; ! ! if (temp & temp3) ! { ! temp4 = *(int *) (currentBll + offset2 - 4); ! ptr1 = currentBll + temp4; ! ! val1 = *ptr1; ! val2 = *(ptr1 + 1); ! ! val2 *= val1; ! ! val3 = *(char *) (ptr1 + 2); ! ! val3 *= val2; ! ! ptr2 = ptr1 + 5; ! ! counter7 = 0; ! ! while (counter7++ < val3) ! { ! val4 = *(unsigned short int *) ptr2; ! if (val4 != 0) ! { ! *(unsigned short int *) ptr2 = *(unsigned short int *) (outPtr + val4 * 2 - 2); ! ! } ! ptr2 += 4; ! } ! ! } ! ! offset2 += 4; } ! while (++counter6 < 256); ! ! Close(file); ! ! return (finalSize); ! } */ ! int loadBrk(int gridSize) { int firstBrick; --- 1080,1163 ---- Ptr_HQM_Memory = temp; } ! int loadBrk(int gridSize) { ! unsigned int firstBrick = 60000; // should be MAX_UINT ! unsigned int lastBrick = 0; // should be MIN_UINT ! unsigned char* bufferPtr; ! unsigned char* currentPositionInBuffer; ! unsigned char* ptrToBllBits; ! unsigned int i; ! unsigned int j; ! unsigned int numUsedBricks; ! unsigned int currentBllEntryIdx = 0; ! ! printf("GridSize=%d\n", gridSize); ! bufferPtr = workVideoBuffer + 153800; ! RazMem(bufferPtr, 20000); ! ptrToBllBits = currentGrid + (gridSize - 32); ! ! // build up a map of all used bricks in the room ! for(i=1;i<256;i++) { ! unsigned char currentBitByte = *(ptrToBllBits + (i/8)); ! unsigned char currentBitMask = 1 << (7-(i&7)); ! ! if(currentBitByte & currentBitMask) { ! unsigned int currentBllOffset = READ_LE_U32(currentBll + currentBllEntryIdx); ! unsigned char* currentBllPtr = currentBll + currentBllOffset; ! unsigned int bllSizeX = currentBllPtr[0]; ! unsigned int bllSizeY = currentBllPtr[1]; ! unsigned int bllSizeZ = currentBllPtr[2]; ! ! unsigned int bllSize = bllSizeX * bllSizeY * bllSizeZ; ! ! unsigned char* bllDataPtr = currentBllPtr + 5; ! ! for(j=0;j<bllSize;j++) { ! unsigned int brickIdx = READ_LE_U16(bllDataPtr); ! ! if(brickIdx) { ! brickIdx--; ! if (brickIdx <= firstBrick) ! firstBrick = brickIdx; ! if (brickIdx > lastBrick) ! lastBrick = brickIdx; ! WRITE_LE_U16(bufferPtr + brickIdx*2,1); } ! bllDataPtr += 4; } } ! currentBllEntryIdx += 4; } ! ! // compute the number of bricks to load ! currentPositionInBuffer = bufferPtr + firstBrick*2; ! numUsedBricks = 0; ! for(i=firstBrick;i<=lastBrick;i++) { ! if(READ_LE_U16(currentPositionInBuffer)) // was brick noted as used ? ! { ! numUsedBricks++; ! } ! ! currentPositionInBuffer+=2; } ! ! printf("Need to load %d bricks\n", numUsedBricks); ! } ! /* ! loadBrk(int gridSize) { int firstBrick; *************** *** 1372,1375 **** --- 1204,1209 ---- // short int mode; + printf("GridSize=%d\n", gridSize); + firstBrick = 60000; lastBrick = 0; *************** *** 1455,1540 **** outPtr4 = (outPtr2 + firstBrick*2); - #ifdef DREAMCAST - //DC special - { - int handler; - char name[256]; - - sprintf(name,"brick%d", currentRoom ); - - handler = debug_open( name, SNASM_O_RDONLY | SNASM_O_BINARY ); - - if(handler==-1) - { // brick not dumped yet, need to build - localBufferBrick = bufferBrick; - - destPtr = bufferBrick + counter3; - - WRITE_LE_U32(localBufferBrick,counter3); - - localBufferBrick+=4; - - currentBrick = firstBrick; - - ptrUnk = (firstBrick * 4 + workVideoBuffer); - - counter6 = 0; - - while (currentBrick <= lastBrick) - { - if (READ_LE_U16(outPtr4)) - { - counter6++; - WRITE_LE_U16(outPtr4, counter6); - - Load_HQR("LBA_BRK.HQR",destPtr,currentBrick); - dataSize = Size_HQR("LBA_BRK.HQR",currentBrick); - - finalSize += dataSize; - destPtr += dataSize; - WRITE_LE_U32(localBufferBrick,finalSize); - localBufferBrick+=4; - } - - outPtr4+=2; - ptrUnk+=4; - currentBrick++; - } - - handler = debug_open( name, SNASM_O_CREAT | SNASM_O_BINARY | SNASM_O_WRONLY ); - - debug_write( handler, (char*)&outPtr4, 4 ); - debug_write( handler, (char*)&finalSize, 4 ); - debug_write( handler, (char*)bufferBrick, 361472 ); - debug_write( handler, (char*)workVideoBuffer + 153800, 307700 - 153800 ); - - } - else - { - localBufferBrick = bufferBrick; - - destPtr = bufferBrick + counter3; - - WRITE_LE_U32(localBufferBrick,counter3); - - localBufferBrick+=4; - - currentBrick = firstBrick; - - ptrUnk = (firstBrick * 4 + workVideoBuffer); - - counter6 = 0; - - debug_read( handler, (char*)&outPtr4, 4 ); - debug_read( handler, (char*)&finalSize, 4 ); - debug_read( handler, (char*)bufferBrick, 361472 ); - debug_read( handler, (char*)workVideoBuffer + 153800, 307700 - 153800 ); - } - - debug_close( handler ); - } - - #else - localBufferBrick = bufferBrick; --- 1289,1292 ---- *************** *** 1582,1586 **** osystem_finishBricks(); #endif - #endif counter6 = 1; --- 1334,1337 ---- *************** *** 1630,1634 **** return (finalSize); } ! void RazMem(unsigned char *ptr, int size) { --- 1381,1385 ---- return (finalSize); } ! */ void RazMem(unsigned char *ptr, int size) { Index: images.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/images.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** images.c 12 Jun 2005 20:19:29 -0000 1.13 --- images.c 18 Jun 2005 16:55:17 -0000 1.14 *************** *** 205,208 **** --- 205,218 ---- } #else + #ifdef MACOSX + for (i = 0; i < 256; i++) + { + palDest[0] = palSource[0]; + palDest[1] = palSource[1]; + palDest[2] = palSource[2]; + palDest+=4; + palSource+=3; + } + #else for (i = 0; i < 256*3; i++) { *************** *** 210,213 **** --- 220,224 ---- } #endif + #endif } Index: type.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/type.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** type.h 12 Jun 2005 20:19:29 -0000 1.9 --- type.h 18 Jun 2005 16:55:18 -0000 1.10 *************** *** 87,91 **** FORCEINLINE uint16 READ_LE_U16(void *ptr) { ! #ifdef MACOSX return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; #else --- 87,91 ---- FORCEINLINE uint16 READ_LE_U16(void *ptr) { ! #ifdef MACOSX2 return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; #else *************** *** 96,100 **** FORCEINLINE int16 READ_LE_S16(void *ptr) { ! #ifdef MACOSX return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; #else --- 96,100 ---- FORCEINLINE int16 READ_LE_S16(void *ptr) { ! #ifdef MACOSX2 return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; #else *************** *** 105,109 **** FORCEINLINE uint32 READ_LE_U32(void *ptr) { ! #ifdef MACOSX return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; #else --- 105,109 ---- FORCEINLINE uint32 READ_LE_U32(void *ptr) { ! #ifdef MACOSX2 return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; #else *************** *** 114,118 **** FORCEINLINE int32 READ_LE_S32(void *ptr) { ! #ifdef MACOSX return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; #else --- 114,118 ---- FORCEINLINE int32 READ_LE_S32(void *ptr) { ! #ifdef MACOSX2 return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; #else Index: mainMenu.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainMenu.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mainMenu.c 12 Jun 2005 20:19:29 -0000 1.19 --- mainMenu.c 18 Jun 2005 16:55:17 -0000 1.20 *************** *** 173,176 **** --- 173,186 ---- int chooseSave(int param) { + FILE* fHandle; + + fHandle = fopen("SAVE.LBA","rb"); + if(!fHandle) + { + return 0; + } + + fclose(fHandle); + /* var_14 = 1; var_0C = 50; Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** HQRlib.c 12 Jun 2005 20:19:28 -0000 1.9 --- HQRlib.c 18 Jun 2005 16:55:16 -0000 1.10 *************** *** 342,345 **** --- 342,346 ---- streamReader_get( &fileReader, compressedDataPtr, compressedSize); + printf("DataSize: %d", dataSize); HQR_Expand(dataSize, (unsigned char*)ptr, compressedDataPtr); *************** *** 638,644 **** int Size_HQR(char *fileName, int index) { ! int headerSize; ! int dataSize; ! int offToData; if(!streamReader_open( &fileReader, (int8*)fileName )) --- 639,645 ---- int Size_HQR(char *fileName, int index) { ! unsigned int headerSize; ! unsigned int dataSize; ! unsigned int offToData; if(!streamReader_open( &fileReader, (int8*)fileName )) *************** *** 648,651 **** --- 649,653 ---- streamReader_get( &fileReader, &headerSize, 4 ); + headerSize = convertDWFromLE(headerSize); if(index >= headerSize /4 ) *************** *** 657,662 **** --- 659,666 ---- streamReader_seek( &fileReader, index * 4 ); streamReader_get( &fileReader, &offToData, 4 ); + offToData = convertDWFromLE(offToData); streamReader_seek( &fileReader, offToData ); streamReader_get( &fileReader, &dataSize, 4); + dataSize = convertDWFromLE(dataSize); streamReader_close( &fileReader ); |
|
From: Vincent H. <ya...@us...> - 2005-06-12 20:19:55
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17454/src Modified Files: HQRlib.c cube.c font.c fullRedraw.c images.c lba.h life_binary.c mainLoop.c mainMenu.c renderer.c room.c text.c type.h vars.h Log Message: Early port to macosx, nothing much functional Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** renderer.c 4 May 2005 09:08:10 -0000 1.20 --- renderer.c 12 Jun 2005 20:19:29 -0000 1.21 *************** *** 36,39 **** --- 36,42 ---- _angleZ = angleZ; + #ifdef MACOSX + return 0; + #endif /* * Those 4 vars are used to know the size of the rendered model. They are resetted to their Index: lba.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/lba.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** lba.h 4 May 2005 20:26:21 -0000 1.25 --- lba.h 12 Jun 2005 20:19:29 -0000 1.26 *************** *** 41,45 **** --- 41,49 ---- #ifdef PCLIKE + #ifdef MACOSX + #include<malloc/malloc.h> + #else #include<malloc.h> + #endif #ifdef USE_GL #include <windows.h> // Header File For Windows *************** *** 100,103 **** --- 104,115 ---- #endif + #ifdef MACOSX + #define convertDWFromLE(x) ((x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24)) + #define convertWFromLE(x) (((x>>8)&0xFF)|((x<<8)&0xFF00)) + #else + #define convertDWFromLE(x) (x) + #define convertWFromLE(x) (x) + #endif + struct mouseStatusStruct { Index: font.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/font.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** font.c 21 Nov 2004 00:07:30 -0000 1.9 --- font.c 12 Jun 2005 20:19:29 -0000 1.10 *************** *** 49,53 **** int tempY; ! data = fntFont + *((short int *) (fntFont + caractere * 4)); sizeX = *(data++); --- 49,53 ---- int tempY; ! data = fntFont + convertWFromLE(*((short int *) (fntFont + caractere * 4))); sizeX = *(data++); *************** *** 132,136 **** else { ! stringLenght = *(fntFont + *((short int *) (fntFont + character * 4))); // get the length of the character drawCharacter(X, Y, character); // draw the character on screen X += interCharSpace; // add the length of the space between 2 characters --- 132,136 ---- else { ! stringLenght = *(fntFont + convertWFromLE(*((short int *) (fntFont + character * 4)))); // get the length of the character drawCharacter(X, Y, character); // draw the character on screen X += interCharSpace; // add the length of the space between 2 characters *************** *** 139,140 **** --- 139,141 ---- }while (1); } + Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** fullRedraw.c 4 May 2005 09:08:09 -0000 1.56 --- fullRedraw.c 12 Jun 2005 20:19:29 -0000 1.57 *************** *** 1669,1673 **** if (currentZbufferData->x + currentZbufferData->y > Y + X) { ! CopyMask(currentZbufferData->spriteNum,(j * 24) - 24,currentZbufferData->drawY, bufferBrick2,workVideoBuffer); } } --- 1669,1673 ---- if (currentZbufferData->x + currentZbufferData->y > Y + X) { ! CopyMaskLBA(currentZbufferData->spriteNum,(j * 24) - 24,currentZbufferData->drawY, bufferBrick2,workVideoBuffer); } } *************** *** 1697,1706 **** if ((currentZbufferData->x == X) && (currentZbufferData->y == Y)) { ! CopyMask(currentZbufferData->spriteNum, (j * 24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } if ((currentZbufferData->x > X) || (currentZbufferData->y > Y)) { ! CopyMask(currentZbufferData->spriteNum, (j * 24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } } --- 1697,1706 ---- if ((currentZbufferData->x == X) && (currentZbufferData->y == Y)) { ! CopyMaskLBA(currentZbufferData->spriteNum, (j * 24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } if ((currentZbufferData->x > X) || (currentZbufferData->y > Y)) { ! CopyMaskLBA(currentZbufferData->spriteNum, (j * 24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } } *************** *** 1740,1744 **** // if((currentZbufferData->x == Z) && (currentZbufferData->y == X)) { ! CopyMask(currentZbufferData->spriteNum, (CopyBlockPhysLeft*24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } } --- 1740,1744 ---- // if((currentZbufferData->x == Z) && (currentZbufferData->y == X)) { ! CopyMaskLBA(currentZbufferData->spriteNum, (CopyBlockPhysLeft*24) - 24, currentZbufferData->drawY, bufferBrick2, workVideoBuffer); } } *************** *** 1751,1755 **** } */ ! void CopyMask(int spriteNum, int x, int y, byte * localBufferBrick, byte * buffer) { unsigned char *ptr; --- 1751,1755 ---- } */ ! void CopyMaskLBA(int spriteNum, int x, int y, byte * localBufferBrick, byte * buffer) { unsigned char *ptr; *************** *** 1872,1876 **** /* ! void CopyMask(int spriteNum, int x, int y, byte * localBufferBrick, byte * buffer) { unsigned char *ptr; --- 1872,1876 ---- /* ! void CopyMaskLBA(int spriteNum, int x, int y, byte * localBufferBrick, byte * buffer) { unsigned char *ptr; Index: room.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/room.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** room.c 4 May 2005 20:26:21 -0000 1.30 --- room.c 12 Jun 2005 20:19:29 -0000 1.31 *************** *** 1178,1182 **** lastBrick = val4; ! *(outPtr2 + val4) = 1; } --- 1178,1182 ---- lastBrick = val4; ! WRITE_LE_U16(outPtr2 + val4) = 1; } *************** *** 1198,1202 **** while (currentBrick <= lastBrick) { ! if (*outPtr3 != 0) counter3++; outPtr3++; --- 1198,1202 ---- while (currentBrick <= lastBrick) { ! if (READ_LE_U16(outPtr3) != 0) counter3++; outPtr3++; *************** *** 1394,1398 **** if (temp & temp3) { ! temp4 = *(int *) (currentBll + offset - 4); ptr1 = currentBll + temp4; --- 1394,1398 ---- if (temp & temp3) { ! temp4 = READ_LE_U32(currentBll + offset - 4); ptr1 = currentBll + temp4; Index: mainLoop.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainLoop.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** mainLoop.c 4 May 2005 09:08:10 -0000 1.50 --- mainLoop.c 12 Jun 2005 20:19:29 -0000 1.51 *************** *** 906,910 **** } ! void SetClip(int left, int top, int right, int bottom) { if (left < 0) --- 906,910 ---- } ! void SetClipLBA(int left, int top, int right, int bottom) { if (left < 0) Index: life_binary.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/life_binary.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** life_binary.c 4 May 2005 09:08:10 -0000 1.11 --- life_binary.c 12 Jun 2005 20:19:29 -0000 1.12 *************** *** 32,35 **** --- 32,39 ---- int temp; + #ifdef MACOSX + return; + #endif + lactor = &actors[actorNumber]; Index: cube.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/cube.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cube.c 21 Jul 2004 19:40:50 -0000 1.3 --- cube.c 12 Jun 2005 20:19:29 -0000 1.4 *************** *** 61,65 **** HQM_Shrink_Last(bufferBrick2, size); ! numberOfBll = (*(unsigned int *) (currentBll)) >> 2; createCube(); --- 61,65 ---- HQM_Shrink_Last(bufferBrick2, size); ! numberOfBll = (READ_LE_U32(currentBll)) >> 2; createCube(); Index: vars.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/vars.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** vars.h 23 Apr 2005 19:40:28 -0000 1.44 --- vars.h 12 Jun 2005 20:19:29 -0000 1.45 *************** *** 1184,1188 **** int GetRealAngle(timeStruct * arg_0); ! void SetClip(int left, int top, int right, int bottom); //void TranslateGroupeS2(short int eax, short int ebx, short int ecx); --- 1184,1189 ---- int GetRealAngle(timeStruct * arg_0); ! void SetClipLBA(int left, int top, int right, int bottom); ! #define SetClip SetClipLBA //void TranslateGroupeS2(short int eax, short int ebx, short int ecx); *************** *** 1390,1394 **** void drawLine(int a, int b, int c, int d, int e); ! void Line(int a, int b, int c, int d, int e); void CoulDial(int a, int b, int c); --- 1391,1396 ---- void drawLine(int a, int b, int c, int d, int e); ! void LineLBA(int a, int b, int c, int d, int e); ! #define Line LineLBA void CoulDial(int a, int b, int c); Index: images.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/images.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** images.c 21 Jul 2004 19:40:51 -0000 1.12 --- images.c 12 Jun 2005 20:19:29 -0000 1.13 *************** *** 198,202 **** int *colorDest = (int *) palDest; ! #ifdef PCLIKE for (i = 0; i < 256; i++) { --- 198,202 ---- int *colorDest = (int *) palDest; ! #if 0 for (i = 0; i < 256; i++) { Index: type.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/type.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** type.h 4 May 2005 09:08:10 -0000 1.8 --- type.h 12 Jun 2005 20:19:29 -0000 1.9 *************** *** 84,108 **** #define READ_LE_BYTE(ptr) (*(ptr)) - //#define READ_LE_SHORT(ptr) ((*(ptr))+(256*(*((ptr)+1)))) - //#define READ_LE_LONG(ptr) ((*(ptr))+(256*(*((ptr)+1)))+(256*256*(*((ptr)+2)))+(256*256*256*(*((ptr)+3)))) FORCEINLINE uint16 READ_LE_U16(void *ptr) { return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; } FORCEINLINE int16 READ_LE_S16(void *ptr) { return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; } FORCEINLINE uint32 READ_LE_U32(void *ptr) { return (((byte*)ptr)[3]<<24)|(((byte*)ptr)[2]<<16)|(((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; } FORCEINLINE int32 READ_LE_S32(void *ptr) { return (((byte*)ptr)[3]<<24)|(((byte*)ptr)[2]<<16)|(((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; } --- 84,122 ---- #define READ_LE_BYTE(ptr) (*(ptr)) FORCEINLINE uint16 READ_LE_U16(void *ptr) { + #ifdef MACOSX + return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; + #else return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; + #endif } FORCEINLINE int16 READ_LE_S16(void *ptr) { + #ifdef MACOSX + return (((byte*)ptr)[0]<<8)|((byte*)ptr)[1]; + #else return (((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; + #endif } FORCEINLINE uint32 READ_LE_U32(void *ptr) { + #ifdef MACOSX + return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; + #else return (((byte*)ptr)[3]<<24)|(((byte*)ptr)[2]<<16)|(((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; + #endif } FORCEINLINE int32 READ_LE_S32(void *ptr) { + #ifdef MACOSX + return (((byte*)ptr)[0]<<24)|(((byte*)ptr)[1]<<16)|(((byte*)ptr)[2]<<8)|((byte*)ptr)[3]; + #else return (((byte*)ptr)[3]<<24)|(((byte*)ptr)[2]<<16)|(((byte*)ptr)[1]<<8)|((byte*)ptr)[0]; + #endif } Index: mainMenu.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainMenu.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mainMenu.c 22 Apr 2005 10:45:57 -0000 1.18 --- mainMenu.c 12 Jun 2005 20:19:29 -0000 1.19 *************** *** 741,745 **** } ! void Line(int a, int b, int c, int d, int e) { drawLine(a, b, c, d, e); --- 741,745 ---- } ! void LineLBA(int a, int b, int c, int d, int e) { drawLine(a, b, c, d, e); *************** *** 959,963 **** { stringLenght += interCharSpace; // espace inter lettre ! stringLenght += *(fntFont + *((short int *) (fntFont + caractere * 4))); } } --- 959,963 ---- { stringLenght += interCharSpace; // espace inter lettre ! stringLenght += *(fntFont + convertWFromLE(*((short int *) (fntFont + caractere * 4)))); } } Index: text.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/text.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** text.c 4 May 2005 09:08:10 -0000 1.15 --- text.c 12 Jun 2005 20:19:29 -0000 1.16 *************** *** 482,486 **** byte *temp; ! temp = pFont + *((short int *) (pFont + character * 4)); *pLetterWidth = *(temp); *pLetterHeight = *(temp + 1); --- 482,486 ---- byte *temp; ! temp = pFont + convertWFromLE(*((short int *) (pFont + character * 4))); *pLetterWidth = *(temp); *pLetterHeight = *(temp + 1); *************** *** 980,984 **** temp2 = 0; ! temp2 = *(localOrderBuf); localOrderBuf++; if (temp2 == index) --- 980,984 ---- temp2 = 0; ! temp2 = convertWFromLE(*(localOrderBuf)); localOrderBuf++; if (temp2 == index) *************** *** 1005,1010 **** ex: ! ptrCurrentEntry = localTextBuf[temp]; // entrée courante ! ptrNextEntry = localTextBuf[temp + 1]; // entrée d'apres currentTextPtr = (bufText + ptrCurrentEntry); --- 1005,1010 ---- ex: ! ptrCurrentEntry = convertWFromLE(localTextBuf[temp]); // entrée courante ! ptrNextEntry = convertWFromLE(localTextBuf[temp + 1]); // entrée d'apres currentTextPtr = (bufText + ptrCurrentEntry); Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HQRlib.c 4 May 2005 20:26:21 -0000 1.8 --- HQRlib.c 12 Jun 2005 20:19:28 -0000 1.9 *************** *** 299,307 **** int Load_HQR(char *resourceName, unsigned char* ptr, int imageNumber) { ! int headerSize; ! int offToImage; ! int dataSize; ! int compressedSize; ! short int mode; if(!streamReader_open( &fileReader, (int8*) resourceName )) --- 299,307 ---- int Load_HQR(char *resourceName, unsigned char* ptr, int imageNumber) { ! unsigned int headerSize; ! unsigned int offToImage; ! unsigned int dataSize; ! unsigned int compressedSize; ! unsigned short int mode; if(!streamReader_open( &fileReader, (int8*) resourceName )) *************** *** 309,312 **** --- 309,313 ---- streamReader_get( &fileReader, &headerSize, 4 ); + headerSize = convertDWFromLE(headerSize); if(imageNumber >= headerSize /4) *************** *** 318,326 **** --- 319,331 ---- streamReader_seek( &fileReader, imageNumber * 4 ); streamReader_get( &fileReader, &offToImage, 4 ); + offToImage = convertDWFromLE(offToImage); streamReader_seek( &fileReader, offToImage ); streamReader_get( &fileReader, &dataSize , 4 ); + dataSize = convertDWFromLE(dataSize); streamReader_get( &fileReader, &compressedSize , 4 ); + compressedSize = convertDWFromLE(compressedSize); streamReader_get( &fileReader, &mode , 2 ); + mode = convertWFromLE(mode); if( mode <= 0 ) *************** *** 368,431 **** unsigned char *LoadMalloc_HQR(char *fileName, short int imageNumber) { - #ifndef DREAMCAST - FILE *resourceFile; - int headerSize; - int offToImage; - int dataSize; - int compressedSize; - short int mode; - unsigned char *ptr; - - resourceFile = HQR_File_OpenRead(fileName); - - if (!resourceFile) - return (0); - - HQR_File_Read(resourceFile, (char *) &headerSize, 4); - - if (imageNumber >= headerSize / 4) - { - HQR_File_Close(resourceFile); - return (0); - } - - fseek(resourceFile, imageNumber * 4, SEEK_SET); - HQR_File_Read(resourceFile, (char *) &offToImage, 4); - - fseek(resourceFile, offToImage, SEEK_SET); - HQR_File_Read(resourceFile, (char *) &dataSize, 4); - HQR_File_Read(resourceFile, (char *) &compressedSize, 4); - HQR_File_Read(resourceFile, (char *) &mode, 2); - - ptr = (unsigned char *) Malloc(dataSize + 500); - if (mode <= 0) // uncompressed Image - { - HQR_File_Read(resourceFile, (char *) ptr, dataSize); - } - else - { - if (mode == 1) // compressed Image - { - HQR_File_Read(resourceFile, (char *) (ptr + dataSize - compressedSize + 500), compressedSize); - HQR_Expand(dataSize, ptr, (ptr + dataSize - compressedSize + 500)); - } - else - { - MemFree(ptr); - HQR_File_Close(resourceFile); - return (0); - } - } - - HQR_File_Close(resourceFile); - - return (ptr); - #else - //DC unsigned char* ptr; HQRM_Load(fileName,imageNumber, &ptr); return (ptr); - #endif } --- 373,380 ---- *************** *** 629,637 **** int HQRM_Load(char *fileName, short int arg_4, unsigned char ** ptr) // recheck { ! int headerSize; ! int offToData; ! int dataSize; ! int compressedSize; ! short int mode; unsigned char *temp; --- 578,586 ---- int HQRM_Load(char *fileName, short int arg_4, unsigned char ** ptr) // recheck { ! unsigned int headerSize; ! unsigned int offToData; ! unsigned int dataSize; ! unsigned int compressedSize; ! unsigned short int mode; unsigned char *temp; *************** *** 640,643 **** --- 589,593 ---- streamReader_get( &fileReader, &headerSize, 4); + headerSize = convertDWFromLE(headerSize); if(arg_4 >= headerSize /4) *************** *** 649,657 **** --- 599,611 ---- streamReader_seek( &fileReader, arg_4 * 4 ); streamReader_get( &fileReader, &offToData, 4 ); + offToData = convertDWFromLE(offToData); streamReader_seek( &fileReader, offToData ); streamReader_get( &fileReader, &dataSize, 4 ); + dataSize = convertDWFromLE(dataSize); streamReader_get( &fileReader, &compressedSize, 4 ); + compressedSize = convertDWFromLE(compressedSize); streamReader_get( &fileReader, &mode , 2 ); + mode = convertWFromLE(mode); (*ptr) = (unsigned char*)Malloc(dataSize); |
|
From: Vincent H. <ya...@us...> - 2005-06-12 20:19:37
|
Update of /cvsroot/twin-e/twin-e In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17454 Modified Files: Makefile.in Log Message: Early port to macosx, nothing much functional Index: Makefile.in =================================================================== RCS file: /cvsroot/twin-e/twin-e/Makefile.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.in 18 Apr 2005 08:46:59 -0000 1.1 --- Makefile.in 12 Jun 2005 20:19:28 -0000 1.2 *************** *** 1,6 **** ! # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation --- 1,6 ---- ! # Makefile.in generated by automake 1.6.3 from Makefile.am. # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation *************** *** 14,21 **** --- 14,37 ---- @SET_MAKE@ + SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + + bindir = @bindir@ + sbindir = @sbindir@ + libexecdir = @libexecdir@ + datadir = @datadir@ + sysconfdir = @sysconfdir@ + sharedstatedir = @sharedstatedir@ + localstatedir = @localstatedir@ + libdir = @libdir@ + infodir = @infodir@ + mandir = @mandir@ + includedir = @includedir@ + oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ *************** *** 23,33 **** top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) ! transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : --- 39,57 ---- top_builddir = . + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ + AUTOMAKE = @AUTOMAKE@ + AUTOHEADER = @AUTOHEADER@ + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c + INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) ! transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : *************** *** 36,85 **** PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ! ACLOCAL = @ACLOCAL@ ! AMDEP_FALSE = @AMDEP_FALSE@ ! AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ - AUTOCONF = @AUTOCONF@ - AUTOHEADER = @AUTOHEADER@ - AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ - CCDEPMODE = @CCDEPMODE@ - CFLAGS = @CFLAGS@ CPP = @CPP@ - CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ - CXXCPP = @CXXCPP@ - CXXDEPMODE = @CXXDEPMODE@ - CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATAPATH = @DATAPATH@ - DEFS = @DEFS@ DEPDIR = @DEPDIR@ - ECHO_C = @ECHO_C@ - ECHO_N = @ECHO_N@ - ECHO_T = @ECHO_T@ - EGREP = @EGREP@ EMPTY_FILE = @EMPTY_FILE@ - EXEEXT = @EXEEXT@ - INSTALL_DATA = @INSTALL_DATA@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ - LDFLAGS = @LDFLAGS@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ - LTLIBOBJS = @LTLIBOBJS@ - MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ - OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ - PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - PACKAGE_NAME = @PACKAGE_NAME@ - PACKAGE_STRING = @PACKAGE_STRING@ - PACKAGE_TARNAME = @PACKAGE_TARNAME@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ PROFILE = @PROFILE@ RM = @RM@ --- 60,81 ---- PRE_UNINSTALL = : POST_UNINSTALL = : + host_alias = @host_alias@ host_triplet = @host@ ! ! EXEEXT = @EXEEXT@ ! OBJEXT = @OBJEXT@ ! PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DATAPATH = @DATAPATH@ DEPDIR = @DEPDIR@ EMPTY_FILE = @EMPTY_FILE@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ MKDIR = @MKDIR@ PACKAGE = @PACKAGE@ PROFILE = @PROFILE@ RM = @RM@ *************** *** 87,137 **** SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ - SET_MAKE = @SET_MAKE@ - SHELL = @SHELL@ STRIP = @STRIP@ USE_PCH = @USE_PCH@ VERSION = @VERSION@ WARNINGS = @WARNINGS@ - ac_ct_CC = @ac_ct_CC@ - ac_ct_CXX = @ac_ct_CXX@ - ac_ct_STRIP = @ac_ct_STRIP@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ - am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ - bindir = @bindir@ - build = @build@ - build_alias = @build_alias@ - build_cpu = @build_cpu@ - build_os = @build_os@ - build_vendor = @build_vendor@ - datadir = @datadir@ - exec_prefix = @exec_prefix@ - host = @host@ - host_alias = @host_alias@ - host_cpu = @host_cpu@ - host_os = @host_os@ - host_vendor = @host_vendor@ - includedir = @includedir@ - infodir = @infodir@ install_sh = @install_sh@ - libdir = @libdir@ - libexecdir = @libexecdir@ - localstatedir = @localstatedir@ - mandir = @mandir@ - oldincludedir = @oldincludedir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - sysconfdir = @sysconfdir@ - target = @target@ - target_alias = @target_alias@ - target_cpu = @target_cpu@ - target_os = @target_os@ - target_vendor = @target_vendor@ SUBDIRS = src subdir = . --- 83,94 ---- *************** *** 142,154 **** DIST_SOURCES = ! RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ! ps-recursive install-info-recursive uninstall-info-recursive \ ! all-recursive install-data-recursive install-exec-recursive \ ! installdirs-recursive install-recursive uninstall-recursive \ ! check-recursive installcheck-recursive ! DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ ! COPYING ChangeLog INSTALL Makefile.am NEWS acinclude.m4 \ ! aclocal.m4 config.guess config.sub configure configure.ac \ ! depcomp install-sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: all-recursive --- 99,110 ---- DIST_SOURCES = ! RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ ! uninstall-info-recursive all-recursive install-data-recursive \ ! install-exec-recursive installdirs-recursive install-recursive \ ! uninstall-recursive check-recursive installcheck-recursive ! DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ ! Makefile.in NEWS acinclude.m4 aclocal.m4 config.guess \ ! config.sub configure configure.ac depcomp install-sh missing \ ! mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: all-recursive *************** *** 227,241 **** test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done - ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done ETAGS = etags ETAGSFLAGS = - CTAGS = ctags - CTAGSFLAGS = - tags: TAGS --- 183,190 ---- *************** *** 253,265 **** tags=; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - else \ - include_option=--include; \ - fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ ! test -f $$subdir/TAGS && \ ! tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ --- 202,208 ---- tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ ! test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ *************** *** 274,292 **** $$tags $$unique - ctags: CTAGS - CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ --- 217,220 ---- *************** *** 295,299 **** distclean-tags: ! -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) --- 223,227 ---- distclean-tags: ! -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) *************** *** 307,311 **** GZIP_ENV = --best - distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print --- 235,238 ---- *************** *** 313,323 **** $(am__remove_distdir) mkdir $(distdir) ! @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ! topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ! list='$(DISTFILES)'; for file in $$list; do \ ! case $$file in \ ! $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ! $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ! esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ --- 240,244 ---- $(am__remove_distdir) mkdir $(distdir) ! @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ *************** *** 372,382 **** GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) ! mkdir $(distdir)/_build ! mkdir $(distdir)/_inst chmod a-w $(distdir) ! dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ! && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ! && cd $(distdir)/_build \ ! && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ --- 293,302 ---- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) ! mkdir $(distdir)/=build ! mkdir $(distdir)/=inst chmod a-w $(distdir) ! dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ ! && cd $(distdir)/=build \ ! && ../configure --srcdir=.. --prefix=$$dc_install_base \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ *************** *** 386,400 **** && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ! distuninstallcheck \ ! && chmod -R a-w "$$dc_install_base" \ ! && ({ \ ! (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ! && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ! distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ! } || { rm -rf "$$dc_destdir"; exit 1; }) \ ! && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ --- 306,313 ---- && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ! && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ ! || { echo "ERROR: files left after uninstall:" ; \ ! find $$dc_install_base -type f -print ; \ ! exit 1; } >&2 ) \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ *************** *** 403,422 **** @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' - distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 distcleancheck: distclean ! @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi ! @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ! || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 --- 316,326 ---- @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distcleancheck: distclean ! if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi ! test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ! || { echo "ERROR: files left after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 *************** *** 438,442 **** install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install --- 342,346 ---- install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install *************** *** 446,450 **** distclean-generic: ! -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: --- 350,354 ---- distclean-generic: ! -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: *************** *** 457,461 **** distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags --- 361,364 ---- *************** *** 480,485 **** maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -rf $(top_srcdir)/autom4te.cache ! -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic --- 383,387 ---- maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) ! -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic *************** *** 488,508 **** mostlyclean-am: mostlyclean-generic - pdf: pdf-recursive - - pdf-am: - - ps: ps-recursive - - ps-am: - uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive ! .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ ! clean-generic clean-recursive ctags ctags-recursive dist \ ! dist-all dist-gzip distcheck distclean distclean-generic \ ! distclean-recursive distclean-tags distcleancheck distdir \ ! distuninstallcheck dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-data install-data-am \ install-data-recursive install-exec install-exec-am \ --- 390,401 ---- mostlyclean-am: mostlyclean-generic uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive ! .PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ ! clean-generic clean-recursive dist dist-all dist-gzip distcheck \ ! distclean distclean-generic distclean-recursive distclean-tags \ ! distcleancheck distdir dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-data install-data-am \ install-data-recursive install-exec install-exec-am \ *************** *** 512,517 **** installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ ! mostlyclean-generic mostlyclean-recursive pdf pdf-am \ ! pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive --- 405,409 ---- installdirs-am installdirs-recursive maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ ! mostlyclean-generic mostlyclean-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive |
|
From: Vincent H. <ya...@us...> - 2005-05-04 20:26:29
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7548 Modified Files: HQRlib.c lba.h room.c streamReader.c Log Message: Fix defines for PS2/DREAMCAST Index: room.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/room.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** room.c 17 Apr 2005 18:38:32 -0000 1.29 --- room.c 4 May 2005 20:26:21 -0000 1.30 *************** *** 1455,1459 **** outPtr4 = (outPtr2 + firstBrick*2); ! #ifndef PCLIKE //DC special { --- 1455,1459 ---- outPtr4 = (outPtr2 + firstBrick*2); ! #ifdef DREAMCAST //DC special { Index: lba.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/lba.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** lba.h 4 May 2005 08:23:53 -0000 1.24 --- lba.h 4 May 2005 20:26:21 -0000 1.25 *************** *** 40,47 **** #endif - #ifdef _EE - #define PCLIKE - #endif - #ifdef PCLIKE #include<malloc.h> --- 40,43 ---- *************** *** 55,58 **** --- 51,55 ---- #ifndef PCLIKE + #ifdef DREAMCAST #include <shinobi.h> /* Shinobi system routines. */ #include <kamui2.h> /* Kamui2 low-level graphics HAL. */ *************** *** 62,65 **** --- 59,63 ---- #define PRELOAD_ALL #define USE_GL + #endif #endif Index: streamReader.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/streamReader.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** streamReader.c 4 May 2005 07:57:42 -0000 1.4 --- streamReader.c 4 May 2005 20:26:21 -0000 1.5 *************** *** 104,108 **** boolean streamReader_open(streamReader* pThis, const int8* fileName) { ! #ifdef PCLIKE #ifdef USE_IFOPEN pThis->fileHandle = ifopen((const char*)fileName,"rb"); --- 104,108 ---- boolean streamReader_open(streamReader* pThis, const int8* fileName) { ! #ifndef DREAMCAST #ifdef USE_IFOPEN pThis->fileHandle = ifopen((const char*)fileName,"rb"); *************** *** 128,132 **** void streamReader_feedBuffer(streamReader* pThis) { ! #ifdef PCLIKE fread(pThis->buffer, BUFFER_SIZE, 1, pThis->fileHandle); #else --- 128,132 ---- void streamReader_feedBuffer(streamReader* pThis) { ! #ifndef DREAMCAST fread(pThis->buffer, BUFFER_SIZE, 1, pThis->fileHandle); #else *************** *** 204,208 **** } */ ! #ifdef PCLIKE fseek(pThis->fileHandle, sectorToSeek * 2048, SEEK_SET ); #else --- 204,208 ---- } */ ! #ifndef DREAMCAST fseek(pThis->fileHandle, sectorToSeek * 2048, SEEK_SET ); #else *************** *** 219,223 **** if(pThis->fileHandle) { ! #ifdef PCLIKE fclose( pThis->fileHandle ); #else --- 219,223 ---- if(pThis->fileHandle) { ! #ifndef DREAMCAST fclose( pThis->fileHandle ); #else Index: HQRlib.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/HQRlib.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** HQRlib.c 4 May 2005 07:57:42 -0000 1.7 --- HQRlib.c 4 May 2005 20:26:21 -0000 1.8 *************** *** 22,26 **** #include "streamReader.h" ! #ifndef PCLIKE #include <shinobi.h> #endif --- 22,26 ---- #include "streamReader.h" ! #ifdef DREAMCAST #include <shinobi.h> #endif *************** *** 38,42 **** int HQR_File_checkIfFileExist(char *fileName) { ! #ifdef PCLIKE FILE *fileHandle; --- 38,42 ---- int HQR_File_checkIfFileExist(char *fileName) { ! #ifndef DREAMCAST FILE *fileHandle; *************** *** 69,73 **** #endif ! #ifdef PCLIKE FILE* HQR_File_OpenRead(char *fileName) { --- 69,73 ---- #endif ! #ifndef DREAMCAST FILE* HQR_File_OpenRead(char *fileName) { *************** *** 109,113 **** #endif ! #ifdef PCLIKE int HQR_File_Read(FILE * resourceFile, char *ptr, int length) { --- 109,113 ---- #endif ! #ifndef DREAMCAST int HQR_File_Read(FILE * resourceFile, char *ptr, int length) { *************** *** 146,150 **** #endif ! #ifdef PCLIKE void HQR_File_Close(FILE * resourceFile) { --- 146,150 ---- #endif ! #ifndef DREAMCAST void HQR_File_Close(FILE * resourceFile) { *************** *** 197,201 **** long int getFileSize(char* resourceName) { ! #ifdef PCLIKE FILE* fHandle; int size; --- 197,201 ---- long int getFileSize(char* resourceName) { ! #ifndef DREAMCAST FILE* fHandle; int size; *************** *** 218,222 **** void fileRead(char* resourceName, long int size, unsigned char* buffer) { ! #ifdef PCLIKE FILE* fHandle; fHandle = fopen(resourceName, "rb"); --- 218,222 ---- void fileRead(char* resourceName, long int size, unsigned char* buffer) { ! #ifndef DREAMCAST FILE* fHandle; fHandle = fopen(resourceName, "rb"); *************** *** 349,353 **** int HQR_GetNumEntry(char* fileName) { ! #ifdef PCLIKE FILE *resourceFile = NULL; #else --- 349,353 ---- int HQR_GetNumEntry(char* fileName) { ! #ifndef DREAMCAST FILE *resourceFile = NULL; #else *************** *** 368,372 **** unsigned char *LoadMalloc_HQR(char *fileName, short int imageNumber) { ! #ifdef PCLIKE FILE *resourceFile; int headerSize; --- 368,372 ---- unsigned char *LoadMalloc_HQR(char *fileName, short int imageNumber) { ! #ifndef DREAMCAST FILE *resourceFile; int headerSize; |
|
From: Vincent H. <ya...@us...> - 2005-05-04 09:08:24
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22525 Modified Files: extra.c fullRedraw.c grid.c inventory.c life_binary.c mainLoop.c mainSDL.c mainSDLGL.c memHandler.c renderer.c text.c timer.c type.h Log Message: fix all ps2 warning Index: renderer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/renderer.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** renderer.c 21 Apr 2005 21:29:54 -0000 1.19 --- renderer.c 4 May 2005 09:08:10 -0000 1.20 *************** *** 1270,1274 **** unsigned short int ax; bh ^= 1; ! ax = (unsigned short int) out2; ax &= 1; if(ax ^ bh) --- 1270,1274 ---- unsigned short int ax; bh ^= 1; ! ax = (unsigned short int)(int) out2; ax &= 1; if(ax ^ bh) Index: memHandler.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/memHandler.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** memHandler.c 2 Nov 2004 16:07:38 -0000 1.3 --- memHandler.c 4 May 2005 09:08:10 -0000 1.4 *************** *** 95,97 **** } ! #endif \ No newline at end of file --- 95,98 ---- } ! #endif ! Index: inventory.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/inventory.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inventory.c 21 Jul 2004 19:40:51 -0000 1.3 --- inventory.c 4 May 2005 09:08:10 -0000 1.4 *************** *** 98,102 **** currentSelectedObjectInInventory--; ! if(currentSelectedObjectInInventory< 0) currentSelectedObjectInInventory = 27; --- 98,102 ---- currentSelectedObjectInInventory--; ! if(currentSelectedObjectInInventory < 0) currentSelectedObjectInInventory = 27; *************** *** 110,114 **** currentSelectedObjectInInventory-=4; ! if(currentSelectedObjectInInventory< 0) currentSelectedObjectInInventory += 28; --- 110,114 ---- currentSelectedObjectInInventory-=4; ! if(currentSelectedObjectInInventory < 0) currentSelectedObjectInInventory += 28; *************** *** 134,138 **** SecondInitDialWindow(); ! if(vars[currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { OpenDialNoWindow(currentSelectedObjectInInventory + 100); --- 134,138 ---- SecondInitDialWindow(); ! if(vars[(unsigned char)currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { OpenDialNoWindow(currentSelectedObjectInInventory + 100); *************** *** 160,164 **** else { ! if(vars[currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { SecondInitDialWindow(); --- 160,164 ---- else { ! if(vars[(unsigned char)currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { SecondInitDialWindow(); *************** *** 172,176 **** DrawOneInventory(currentSelectedObjectInInventory); ! if((mainLoopVar5 & 2) && vars[currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { mainLoopVar9 = currentSelectedObjectInInventory; --- 172,176 ---- DrawOneInventory(currentSelectedObjectInInventory); ! if((mainLoopVar5 & 2) && vars[(unsigned char)currentSelectedObjectInInventory] == 1 && !vars[70] && currentSelectedObjectInInventory<=27) { mainLoopVar9 = currentSelectedObjectInInventory; *************** *** 277,279 **** Line(bottom, right, bottom, left, param); Line(top, right, top, left, param); ! } \ No newline at end of file --- 277,279 ---- Line(bottom, right, bottom, left, param); Line(top, right, top, left, param); ! } Index: timer.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/timer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** timer.c 21 Jul 2004 19:40:51 -0000 1.3 --- timer.c 4 May 2005 09:08:10 -0000 1.4 *************** *** 21,23 **** /*void startThreadTimer(LBA_engine* engine) { ! }*/ \ No newline at end of file --- 21,24 ---- /*void startThreadTimer(LBA_engine* engine) { ! }*/ ! Index: fullRedraw.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/fullRedraw.c,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** fullRedraw.c 23 Apr 2005 19:53:42 -0000 1.55 --- fullRedraw.c 4 May 2005 09:08:09 -0000 1.56 *************** *** 330,334 **** unsigned int flags; int actorNumber; ! int positionInDebugBox = 0; do --- 330,334 ---- unsigned int flags; int actorNumber; ! //int positionInDebugBox = 0; do Index: mainSDLGL.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainSDLGL.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mainSDLGL.c 21 Jul 2004 19:40:51 -0000 1.2 --- mainSDLGL.c 4 May 2005 09:08:10 -0000 1.3 *************** *** 795,797 **** ! #endif \ No newline at end of file --- 795,798 ---- ! #endif ! Index: mainLoop.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainLoop.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** mainLoop.c 23 Apr 2005 19:51:52 -0000 1.49 --- mainLoop.c 4 May 2005 09:08:10 -0000 1.50 *************** *** 2491,2495 **** void HitObj(int actorAttacking, int actorAttacked, int param, int angle) { ! actor* pActorAttacking = &actors[actorAttacking]; actor* pActorAttacked = &actors[actorAttacked]; --- 2491,2495 ---- void HitObj(int actorAttacking, int actorAttacked, int param, int angle) { ! // actor* pActorAttacking = &actors[actorAttacking]; actor* pActorAttacked = &actors[actorAttacked]; Index: life_binary.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/life_binary.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** life_binary.c 23 Apr 2005 19:43:23 -0000 1.10 --- life_binary.c 4 May 2005 09:08:10 -0000 1.11 *************** *** 666,670 **** case 61: { ! char temp1; char temp2; --- 666,670 ---- case 61: { ! unsigned char temp1; char temp2; *************** *** 677,681 **** case 62: // LM_SUB_LIFE_POINT_OBJ { ! char localActorNumber; char subLife; --- 677,681 ---- case 62: // LM_SUB_LIFE_POINT_OBJ { ! unsigned char localActorNumber; char subLife; *************** *** 686,695 **** if (actors[localActorNumber].life < 0) ! actors[localActorNumber].life = 0; } case 63: //LM_HIT_OBJ { ! char tempActorNumber; char temp; --- 686,695 ---- if (actors[localActorNumber].life < 0) ! actors[localActorNumber].life = 0; } case 63: //LM_HIT_OBJ { ! unsigned char tempActorNumber; char temp; *************** *** 960,964 **** case 91: //LM_ASK_CHOICE_OBJ { ! char currentTalkingActor; short int choiceNumber; --- 960,964 ---- case 91: //LM_ASK_CHOICE_OBJ { ! unsigned char currentTalkingActor; short int choiceNumber; Index: text.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/text.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** text.c 22 Apr 2005 10:47:19 -0000 1.14 --- text.c 4 May 2005 09:08:10 -0000 1.15 *************** *** 50,54 **** void printTextFullScreen(int textIndex) { ! int isVoxSet; int temp2; int temp3 = 0; --- 50,54 ---- void printTextFullScreen(int textIndex) { ! int isVoxSet = 0; int temp2; int temp3 = 0; Index: extra.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/extra.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** extra.c 23 Apr 2005 19:48:05 -0000 1.12 --- extra.c 4 May 2005 09:08:09 -0000 1.13 *************** *** 314,322 **** int i; ! int currentExtraX; ! int currentExtraZ; ! int currentExtraY; ! int currentExtraSpeedX; ! int currentExtraSpeedZ; int var_40; --- 314,322 ---- int i; ! int currentExtraX = 0; ! int currentExtraZ = 0; ! int currentExtraY = 0; ! int currentExtraSpeedX = 0; ! int currentExtraSpeedZ = 0; int var_40; *************** *** 772,777 **** void ThrowMagicBall(int X, int Z, int Y, int param1, int angle, int param2, int param3) { ! int ballSprite; ! int ballStrength; switch(magicLevel) --- 772,777 ---- void ThrowMagicBall(int X, int Z, int Y, int param1, int angle, int param2, int param3) { ! int ballSprite = -1; ! int ballStrength = 0; switch(magicLevel) Index: type.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/type.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** type.h 4 May 2005 07:57:42 -0000 1.7 --- type.h 4 May 2005 09:08:10 -0000 1.8 *************** *** 25,30 **** --- 25,32 ---- typedef unsigned long uint32; #ifndef __linux__ + #ifndef _TAMTYPES_H_ typedef unsigned int uint; #endif + #endif typedef signed char int8; typedef signed short int16; Index: mainSDL.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/mainSDL.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mainSDL.c 4 May 2005 07:57:42 -0000 1.33 --- mainSDL.c 4 May 2005 09:08:10 -0000 1.34 *************** *** 98,104 **** --- 98,106 ---- //int frames=0; /* Number of frames displayed */ + #ifndef _EE long int t_start,t_left; long unsigned int t_end; long int q=0; /* Dummy */ + #endif while(!breakmainLoop) // To be able to quit the game ;) *************** *** 171,179 **** // object used for the SDL port { ! int rendersolid = 0; int renderstyle = 0; ! int rendertype = 0; ! int ptsize = 11; unsigned char *keyboard; int size; --- 173,181 ---- // object used for the SDL port { ! /* int rendersolid = 0; int renderstyle = 0; ! int rendertype = 0; */ ! //int ptsize = 11; unsigned char *keyboard; int size; Index: grid.c =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/grid.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** grid.c 21 Jul 2004 19:40:51 -0000 1.2 --- grid.c 4 May 2005 09:08:10 -0000 1.3 *************** *** 15,17 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ \ No newline at end of file --- 15,18 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ ! |
|
From: Vincent H. <ya...@us...> - 2005-05-04 08:48:55
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16782 Modified Files: Makefile.ps2 Log Message: fix ps2 makefile Index: Makefile.ps2 =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/Makefile.ps2,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.ps2 4 May 2005 07:57:42 -0000 1.1 --- Makefile.ps2 4 May 2005 08:48:46 -0000 1.2 *************** *** 62,66 **** zones.o \ ! EE_LIBS += -ldebug -lsdl -lsdlmain -lm EE_CXXFLAGS += -fno-exceptions -fno-rtti --- 62,66 ---- zones.o \ ! EE_LIBS += -ldebug -lsdl -lsdlmain -lm -lgskit -ldmakit -lpad -lmouse -lkbd EE_CXXFLAGS += -fno-exceptions -fno-rtti *************** *** 70,74 **** EE_INCS += -I$(PS2SDK)/common/include -I$(PS2SDK)/ee/include -I$(PS2SDK)/ports/include -I$(PS2SDK)/ports/include/SDL ! EE_LDFLAGS += -L$(PS2SDK)/ee/lib -L$(PS2SDK)/ports/lib all: $(EE_BIN) --- 70,74 ---- EE_INCS += -I$(PS2SDK)/common/include -I$(PS2SDK)/ee/include -I$(PS2SDK)/ports/include -I$(PS2SDK)/ports/include/SDL ! EE_LDFLAGS += -L$(PS2SDK)/ee/lib -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib all: $(EE_BIN) |
|
From: Vincent H. <ya...@us...> - 2005-05-04 08:24:02
|
Update of /cvsroot/twin-e/twin-e/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11208 Modified Files: lba.h Log Message: compile Index: lba.h =================================================================== RCS file: /cvsroot/twin-e/twin-e/src/lba.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** lba.h 4 May 2005 08:13:53 -0000 1.23 --- lba.h 4 May 2005 08:23:53 -0000 1.24 *************** *** 40,43 **** --- 40,47 ---- #endif + #ifdef _EE + #define PCLIKE + #endif + #ifdef PCLIKE #include<malloc.h> *************** *** 51,55 **** #ifndef PCLIKE - #ifndef _EE #include <shinobi.h> /* Shinobi system routines. */ #include <kamui2.h> /* Kamui2 low-level graphics HAL. */ --- 55,58 ---- *************** *** 57,61 **** #include <usrsnasm.h> /* LibCross I/O routines. */ #include <sg_syCbl.h> /* NTSC/RGB/VGA Cable check interface. */ - #endif #define PRELOAD_ALL #define USE_GL --- 60,63 ---- |