diff --git a/.DS_Store b/.DS_Store index a784fbe5..a7fc0cdd 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Grafx2.xcodeproj/project.pbxproj b/Grafx2.xcodeproj/project.pbxproj index 46269790..5c883090 100644 --- a/Grafx2.xcodeproj/project.pbxproj +++ b/Grafx2.xcodeproj/project.pbxproj @@ -24,7 +24,6 @@ F5B19B960EA4BE3E003F4BA4 /* linux.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B7E0EA4BE3E003F4BA4 /* linux.c */; }; F5B19B970EA4BE3E003F4BA4 /* loadsave.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B7F0EA4BE3E003F4BA4 /* loadsave.c */; }; F5B19B980EA4BE3E003F4BA4 /* moteur.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B800EA4BE3E003F4BA4 /* moteur.c */; }; - F5B19B990EA4BE3E003F4BA4 /* op_asm.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B810EA4BE3E003F4BA4 /* op_asm.c */; }; F5B19B9A0EA4BE3E003F4BA4 /* op_c.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B820EA4BE3E003F4BA4 /* op_c.c */; }; F5B19B9B0EA4BE3E003F4BA4 /* operatio.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B830EA4BE3E003F4BA4 /* operatio.c */; }; F5B19B9C0EA4BE3E003F4BA4 /* pages.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B19B840EA4BE3E003F4BA4 /* pages.c */; }; @@ -39,8 +38,8 @@ F5B19BE10EA4C65A003F4BA4 /* gfx2.cfg in Resources */ = {isa = PBXBuildFile; fileRef = F5B19BDF0EA4C65A003F4BA4 /* gfx2.cfg */; }; F5B19BE20EA4C65A003F4BA4 /* gfx2.dat in Resources */ = {isa = PBXBuildFile; fileRef = F5B19BE00EA4C65A003F4BA4 /* gfx2.dat */; }; F5B19C1D0EA4D71C003F4BA4 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5B19C1C0EA4D71C003F4BA4 /* CoreFoundation.framework */; }; - F5B19C360EA4DB69003F4BA4 /* gfx2.ini in Resources */ = {isa = PBXBuildFile; fileRef = F5B19C350EA4DB69003F4BA4 /* gfx2.ini */; }; F5B19C3D0EA4DC91003F4BA4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F5B19C3B0EA4DC91003F4BA4 /* InfoPlist.strings */; }; + F5B1EE850EAD0F4E00B087B5 /* gfx2.ini in Resources */ = {isa = PBXBuildFile; fileRef = F5B1EE840EAD0F4E00B087B5 /* gfx2.ini */; }; F5DCE2BC0EA5116B0065B0EF /* SDL_image in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = F5DCE2BB0EA5116B0065B0EF /* SDL_image */; }; F5DCE2BE0EA5118E0065B0EF /* SDL in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = F5DCE2BD0EA5118E0065B0EF /* SDL */; }; /* End PBXBuildFile section */ @@ -96,7 +95,6 @@ F5B19B7E0EA4BE3E003F4BA4 /* linux.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = linux.c; sourceTree = ""; }; F5B19B7F0EA4BE3E003F4BA4 /* loadsave.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = loadsave.c; sourceTree = ""; }; F5B19B800EA4BE3E003F4BA4 /* moteur.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = moteur.c; sourceTree = ""; }; - F5B19B810EA4BE3E003F4BA4 /* op_asm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = op_asm.c; sourceTree = ""; }; F5B19B820EA4BE3E003F4BA4 /* op_c.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = op_c.c; sourceTree = ""; }; F5B19B830EA4BE3E003F4BA4 /* operatio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = operatio.c; sourceTree = ""; }; F5B19B840EA4BE3E003F4BA4 /* pages.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pages.c; sourceTree = ""; }; @@ -111,8 +109,8 @@ F5B19BDF0EA4C65A003F4BA4 /* gfx2.cfg */ = {isa = PBXFileReference; lastKnownFileType = file; path = gfx2.cfg; sourceTree = ""; }; F5B19BE00EA4C65A003F4BA4 /* gfx2.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = gfx2.dat; sourceTree = ""; }; F5B19C1C0EA4D71C003F4BA4 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = SYSTEM_DEVELOPER_DIR; }; - F5B19C350EA4DB69003F4BA4 /* gfx2.ini */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gfx2.ini; sourceTree = ""; }; F5B19C3C0EA4DC91003F4BA4 /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + F5B1EE840EAD0F4E00B087B5 /* gfx2.ini */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = gfx2.ini; path = dat/gfx2.ini; sourceTree = ""; }; F5DCE2BB0EA5116B0065B0EF /* SDL_image */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = SDL_image; path = /Library/Frameworks/SDL_image.framework/Versions/A/SDL_image; sourceTree = ""; }; F5DCE2BD0EA5118E0065B0EF /* SDL */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = SDL; path = /Library/Frameworks/SDL.framework/Versions/A/SDL; sourceTree = ""; }; /* End PBXFileReference section */ @@ -169,11 +167,11 @@ 29B97314FDCFA39411CA2CEA /* Grafx2 */ = { isa = PBXGroup; children = ( + F5B1EE840EAD0F4E00B087B5 /* gfx2.ini */, F5AD4B1E0EA8CCF0009CCAC4 /* version.c */, F5DCE2BD0EA5118E0065B0EF /* SDL */, F5DCE2BB0EA5116B0065B0EF /* SDL_image */, F5B19C3B0EA4DC91003F4BA4 /* InfoPlist.strings */, - F5B19C350EA4DB69003F4BA4 /* gfx2.ini */, F5B19C1C0EA4D71C003F4BA4 /* CoreFoundation.framework */, F5B19BDF0EA4C65A003F4BA4 /* gfx2.cfg */, F5B19BE00EA4C65A003F4BA4 /* gfx2.dat */, @@ -189,7 +187,6 @@ F5B19B7E0EA4BE3E003F4BA4 /* linux.c */, F5B19B7F0EA4BE3E003F4BA4 /* loadsave.c */, F5B19B800EA4BE3E003F4BA4 /* moteur.c */, - F5B19B810EA4BE3E003F4BA4 /* op_asm.c */, F5B19B820EA4BE3E003F4BA4 /* op_c.c */, F5B19B830EA4BE3E003F4BA4 /* operatio.c */, F5B19B840EA4BE3E003F4BA4 /* pages.c */, @@ -284,8 +281,8 @@ F5B19B740EA4BDF5003F4BA4 /* 8pxfont.png in Resources */, F5B19BE10EA4C65A003F4BA4 /* gfx2.cfg in Resources */, F5B19BE20EA4C65A003F4BA4 /* gfx2.dat in Resources */, - F5B19C360EA4DB69003F4BA4 /* gfx2.ini in Resources */, F5B19C3D0EA4DC91003F4BA4 /* InfoPlist.strings in Resources */, + F5B1EE850EAD0F4E00B087B5 /* gfx2.ini in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -309,7 +306,6 @@ F5B19B960EA4BE3E003F4BA4 /* linux.c in Sources */, F5B19B970EA4BE3E003F4BA4 /* loadsave.c in Sources */, F5B19B980EA4BE3E003F4BA4 /* moteur.c in Sources */, - F5B19B990EA4BE3E003F4BA4 /* op_asm.c in Sources */, F5B19B9A0EA4BE3E003F4BA4 /* op_c.c in Sources */, F5B19B9B0EA4BE3E003F4BA4 /* operatio.c in Sources */, F5B19B9C0EA4BE3E003F4BA4 /* pages.c in Sources */, diff --git a/Grafx2.xcodeproj/xx.pbxuser b/Grafx2.xcodeproj/xx.pbxuser index 59317586..817d9547 100644 --- a/Grafx2.xcodeproj/xx.pbxuser +++ b/Grafx2.xcodeproj/xx.pbxuser @@ -165,14 +165,26 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 245943553; - PBXWorkspaceStateSaveDate = 245943553; + PBXPerProjectTemplateStateSaveDate = 246222473; + PBXWorkspaceStateSaveDate = 246222473; }; perUserProjectItems = { F5B19C160EA4D6E8003F4BA4 = F5B19C160EA4D6E8003F4BA4 /* PBXTextBookmark */; F5B1D1770EA5FE2100AB8D0F = F5B1D1770EA5FE2100AB8D0F /* PBXTextBookmark */; F5B1D1790EA5FE2100AB8D0F = F5B1D1790EA5FE2100AB8D0F /* PBXTextBookmark */; F5B1D1B70EA602BA00AB8D0F = F5B1D1B70EA602BA00AB8D0F /* PBXTextBookmark */; + F5B1EE860EAD0F5800B087B5 /* PBXTextBookmark */ = F5B1EE860EAD0F5800B087B5 /* PBXTextBookmark */; + F5B1EEA40EAD15CD00B087B5 /* PBXTextBookmark */ = F5B1EEA40EAD15CD00B087B5 /* PBXTextBookmark */; + F5B1EEA80EAD15CD00B087B5 /* PBXTextBookmark */ = F5B1EEA80EAD15CD00B087B5 /* PBXTextBookmark */; + F5B1EEA90EAD15CD00B087B5 /* PBXTextBookmark */ = F5B1EEA90EAD15CD00B087B5 /* PBXTextBookmark */; + F5B1EEAA0EAD15CD00B087B5 /* PBXTextBookmark */ = F5B1EEAA0EAD15CD00B087B5 /* PBXTextBookmark */; + F5B1EEAB0EAD15CD00B087B5 /* PBXTextBookmark */ = F5B1EEAB0EAD15CD00B087B5 /* PBXTextBookmark */; + F5B1EEB10EAD173300B087B5 /* PBXTextBookmark */ = F5B1EEB10EAD173300B087B5 /* PBXTextBookmark */; + F5B1EEB20EAD173300B087B5 /* PBXTextBookmark */ = F5B1EEB20EAD173300B087B5 /* PBXTextBookmark */; + F5B1EEB90EAD1BCA00B087B5 /* PBXTextBookmark */ = F5B1EEB90EAD1BCA00B087B5 /* PBXTextBookmark */; + F5B1EEBA0EAD1BCA00B087B5 /* PBXTextBookmark */ = F5B1EEBA0EAD1BCA00B087B5 /* PBXTextBookmark */; + F5B4C0610EA9FFBF007063E8 = F5B4C0610EA9FFBF007063E8 /* PBXBookmark */; + F5B4C0620EA9FFBF007063E8 = F5B4C0620EA9FFBF007063E8 /* PBXTextBookmark */; }; sourceControlManager = F5B19B690EA4BD79003F4BA4 /* Source Control */; userBuildSettings = { @@ -252,6 +264,13 @@ sepNavWindowFrame = "{{15, 76}, {906, 665}}"; }; }; + F5B19B780EA4BE3E003F4BA4 /* divers.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1636, 16435}}"; + sepNavSelRange = "{24200, 0}"; + sepNavVisRect = "{{0, 0}, {686, 59}}"; + }; + }; F5B19B7B0EA4BE3E003F4BA4 /* graph.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1620, 116128}}"; @@ -284,9 +303,9 @@ }; F5B19B850EA4BE3E003F4BA4 /* palette.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1268, 35967}}"; - sepNavSelRange = "{44692, 0}"; - sepNavVisRect = "{{0, 21479}, {867, 536}}"; + sepNavIntBoundsRect = "{{0, 0}, {1268, 36746}}"; + sepNavSelRange = "{74708, 0}"; + sepNavVisRect = "{{0, 0}, {0, 0}}"; sepNavWindowFrame = "{{15, 76}, {906, 665}}"; }; }; @@ -353,6 +372,118 @@ vrLen = 227; vrLoc = 0; }; + F5B1EE860EAD0F5800B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 123; + vrLoc = 0; + }; + F5B1EEA40EAD15CD00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 865"; + rLen = 0; + rLoc = 24202; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B1EEA80EAD15CD00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 865"; + rLen = 0; + rLoc = 24200; + rType = 0; + vrLen = 123; + vrLoc = 0; + }; + F5B1EEA90EAD15CD00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + comments = "error: parse error at end of input"; + fRef = F5B19B850EA4BE3E003F4BA4 /* palette.c */; + rLen = 1; + rLoc = 1937; + rType = 1; + }; + F5B1EEAA0EAD15CD00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 865"; + rLen = 0; + rLoc = 24200; + rType = 0; + vrLen = 123; + vrLoc = 0; + }; + F5B1EEAB0EAD15CD00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B850EA4BE3E003F4BA4 /* palette.c */; + name = "palette.c: 1939"; + rLen = 0; + rLoc = 74893; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B1EEB10EAD173300B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 866"; + rLen = 0; + rLoc = 24260; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B1EEB20EAD173300B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B850EA4BE3E003F4BA4 /* palette.c */; + name = "palette.c: 1939"; + rLen = 0; + rLoc = 74893; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B1EEB90EAD1BCA00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 866"; + rLen = 0; + rLoc = 24223; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B1EEBA0EAD1BCA00B087B5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B850EA4BE3E003F4BA4 /* palette.c */; + name = "palette.c: 1934"; + rLen = 0; + rLoc = 74708; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5B4C0610EA9FFBF007063E8 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + }; + F5B4C0620EA9FFBF007063E8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = F5B19B780EA4BE3E003F4BA4 /* divers.c */; + name = "divers.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 123; + vrLoc = 0; + }; F5DCE2700EA50EDC0065B0EF /* SDL_image.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; diff --git a/Grafx2.xcodeproj/xx.perspective b/Grafx2.xcodeproj/xx.perspective index 11d0c3ea..58f9b512 100644 --- a/Grafx2.xcodeproj/xx.perspective +++ b/Grafx2.xcodeproj/xx.perspective @@ -262,8 +262,9 @@ PBXSmartGroupTreeModuleOutlineStateExpansionKey - 29B97314FDCFA39411CA2CEA 1C37FBAC04509CD000000102 + F5B1EEA20EAD15CD00B087B5 + F5B1EEA30EAD15CD00B087B5 PBXSmartGroupTreeModuleOutlineStateSelectionKey @@ -307,7 +308,7 @@ PBXProjectModuleGUID F5B19BA70EA4BF24003F4BA4 PBXProjectModuleLabel - + divers.c PBXSplitModuleInNavigatorKey Split0 @@ -315,11 +316,16 @@ PBXProjectModuleGUID F5B19BA80EA4BF24003F4BA4 PBXProjectModuleLabel - + divers.c + _historyCapacity + 0 + bookmark + F5B1EEB90EAD1BCA00B087B5 history F5B19C160EA4D6E8003F4BA4 F5B1D1770EA5FE2100AB8D0F + F5B1EE860EAD0F5800B087B5 prevStack @@ -420,11 +426,11 @@ TableOfContents - F5AD4B120EA8C9D5009CCAC4 + F5B1EEA50EAD15CD00B087B5 1CA23ED40692098700951B8B - F5AD4B130EA8C9D5009CCAC4 + F5B1EEA60EAD15CD00B087B5 F5B19BA70EA4BF24003F4BA4 - F5AD4B140EA8C9D5009CCAC4 + F5B1EEA70EAD15CD00B087B5 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -484,9 +490,7 @@ PBXSmartGroupTreeModuleOutlineStateKey_v7 PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - + PBXSmartGroupTreeModuleOutlineStateSelectionKey @@ -494,7 +498,7 @@ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 140}, {251, 580}} + {{0, 0}, {251, 180}} PBXTopSmartGroupGIDs @@ -504,14 +508,14 @@ GeometryConfiguration Frame - {{0, 0}, {268, 598}} + {{0, 0}, {268, 198}} GroupTreeTableConfiguration MainColumn 251 RubberWindowFrame - 23 92 1000 639 0 0 1024 746 + 22 503 975 239 0 0 1024 746 Module PBXSmartGroupTreeModule @@ -527,7 +531,7 @@ PBXProjectModuleGUID F5B19BA70EA4BF24003F4BA4 PBXProjectModuleLabel - + palette.c PBXSplitModuleInNavigatorKey Split0 @@ -535,16 +539,23 @@ PBXProjectModuleGUID F5B19BA80EA4BF24003F4BA4 PBXProjectModuleLabel - + palette.c + _historyCapacity + 0 + bookmark + F5B1EEBA0EAD1BCA00B087B5 history F5B19C160EA4D6E8003F4BA4 F5B1D1770EA5FE2100AB8D0F + F5B1EEA80EAD15CD00B087B5 + F5B1EEA90EAD15CD00B087B5 prevStack F5B1D1790EA5FE2100AB8D0F F5B1D1B70EA602BA00AB8D0F + F5B1EEAA0EAD15CD00B087B5 SplitCount @@ -558,25 +569,25 @@ GeometryConfiguration Frame - {{0, 0}, {727, 91}} + {{0, 0}, {702, 0}} RubberWindowFrame - 23 92 1000 639 0 0 1024 746 + 22 503 975 239 0 0 1024 746 Module PBXNavigatorGroup Proportion - 91pt + 0pt Proportion - 502pt + 193pt Tabs ContentConfiguration PBXBuildLogShowsTranscriptDefaultKey - {{0, 372}, {727, 103}} + {{0, 166}, {702, 0}} PBXProjectModuleGUID XCMainBuildResultsModuleGUID PBXProjectModuleLabel @@ -589,9 +600,9 @@ GeometryConfiguration Frame - {{10, 27}, {727, 475}} + {{10, 27}, {702, 166}} RubberWindowFrame - 23 92 1000 639 0 0 1024 746 + 22 503 975 239 0 0 1024 746 Module PBXBuildResultsModule @@ -653,7 +664,7 @@ Proportion - 727pt + 702pt Name @@ -671,14 +682,14 @@ TableOfContents - F5AD4B200EA8CCF4009CCAC4 + F5B1EEAC0EAD15CD00B087B5 1CA23EE50692099D00951B8B - F5AD4B210EA8CCF4009CCAC4 + F5B1EEAD0EAD15CD00B087B5 F5B19BA70EA4BF24003F4BA4 - F5AD4B220EA8CCF4009CCAC4 + F5B1EEAE0EAD15CD00B087B5 XCMainBuildResultsModuleGUID 1CA23EE80692099D00951B8B - F5AD4B230EA8CCF4009CCAC4 + F5B1EEAF0EAD15CD00B087B5 ToolbarConfiguration xcode.toolbar.config.buildAndRun @@ -850,7 +861,7 @@ /Users/xx/Grafx2/Grafx2.xcodeproj WindowString - 23 92 1000 639 0 0 1024 746 + 22 503 975 239 0 0 1024 746 WindowTools diff --git a/divers.c b/divers.c index 016e6c57..3a786057 100644 --- a/divers.c +++ b/divers.c @@ -85,7 +85,8 @@ void Set_palette(T_Palette Palette) PaletteSDL[i].g=(Palette[i].V<<2) + (Palette[i].V>>4); PaletteSDL[i].b=(Palette[i].B<<2) + (Palette[i].B>>4); } - SDL_SetPalette(Ecran_SDL,SDL_PHYSPAL|SDL_LOGPAL,PaletteSDL,0,256); + //SDL_PHYSPAL| + SDL_SetPalette(Ecran_SDL,SDL_LOGPAL,PaletteSDL,0,256); } void Attendre_fin_de_click(void) @@ -333,10 +334,8 @@ void Get_input(void) Afficher_curseur(); } - // Vidage de toute mise à jour qui serait encore en attente. - Flush_update(); - //SDL_Flip(Ecran_SDL); - + // Vidage de toute mise à jour qui serait encore en attente. + Flush_update(); } @@ -795,7 +794,7 @@ void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu) comp.r=Rouge << 2; comp.g=Vert << 2; comp.b=Bleu << 2; - SDL_SetColors(Ecran_SDL,&comp,Couleur,1); + SDL_SetPalette(Ecran_SDL, SDL_LOGPAL, &comp, Couleur, 1); } void Scroll_picture(short Decalage_X,short Decalage_Y) diff --git a/palette.c b/palette.c index 33b90b92..c1e95a76 100644 --- a/palette.c +++ b/palette.c @@ -218,16 +218,14 @@ void Swap(int X_Swap,short Debut_Bloc_1,short Debut_Bloc_2,short Taille_du_bloc, dword Tempo; byte Table_de_conversion[256]; - struct Composantes * Palette_temporaire; - dword * Utilisation_temporaire; + struct Composantes Palette_temporaire[256]; + dword Utilisation_temporaire[256]; // On fait une copie de la palette - Palette_temporaire=(struct Composantes *)malloc(sizeof(T_Palette)); - memcpy(Palette_temporaire,Palette,sizeof(T_Palette)); + memcpy(Palette_temporaire, Palette, sizeof(T_Palette)); // On fait une copie de la table d'utilisation des couleurs - Utilisation_temporaire=(dword *)malloc(sizeof(dword)*256); - memcpy(Utilisation_temporaire,Utilisation_couleur,sizeof(dword)*256); + memcpy(Utilisation_temporaire, Utilisation_couleur, sizeof(dword) * 256); // On commence à initialiser la table de conversion à un état où elle ne // fera aucune conversion. @@ -312,9 +310,6 @@ void Swap(int X_Swap,short Debut_Bloc_1,short Debut_Bloc_2,short Taille_du_bloc, } } - free(Utilisation_temporaire); - free(Palette_temporaire); - // Maintenant, tous ces calculs doivent êtres pris en compte dans la // palette, l'image et à l'écran. Set_palette(Palette); @@ -797,7 +792,7 @@ void Bouton_Palette(void) Fenetre_Definir_bouton_saisie(263,39,3); // 23 Fenetre_Definir_bouton_normal(96,32,29,14,"HSV" ,1,1,SDLK_n); // 24 - Fenetre_Definir_bouton_normal(96,47,29,14,"Sort" ,1,1,SDLK_o); // 25 + Fenetre_Definir_bouton_normal(96,47,29,14,"Srt" ,1,1,SDLK_o); // 25 // Affichage du facteur de réduction de la palette Num2str(Reduce_Nb_couleurs,Chaine,3); Print_dans_fenetre(265,41,Chaine,CM_Noir,CM_Clair); @@ -978,6 +973,7 @@ void Bouton_Palette(void) Il_faut_remapper=1; Afficher_curseur(); + break; case 3 : // Jauge verte Effacer_curseur(); diff --git a/readline.c b/readline.c index 61aa7d75..7ea57030 100644 --- a/readline.c +++ b/readline.c @@ -43,6 +43,8 @@ #define COULEUR_TEXTE_CURSEUR CM_Noir #define COULEUR_FOND_CURSEUR CM_Fonce +extern int Update_necessaire; + // Suppresion d'un caractère à une certaine POSITION dans une CHAINE. void Supprimer_caractere(char * Chaine, byte Position) { @@ -157,6 +159,7 @@ byte Readline(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte Type Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3)); #ifdef __macosx__ + Update_necessaire = 1; Flush_update(); #endif @@ -300,9 +303,12 @@ affichage: UpdateRect(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y), Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3)); } // Fin du "switch(Touche_lue)" + #ifdef __macosx__ + Update_necessaire = 1; Flush_update(); #endif + } // Fin du "while" // Effacement de la chaîne diff --git a/sdlscreen.c b/sdlscreen.c index 18a97d32..bf229eb1 100644 --- a/sdlscreen.c +++ b/sdlscreen.c @@ -507,14 +507,14 @@ short Max_Y=10000; void Flush_update(void) { - #if (METHODE_UPDATE == METHODE_UPDATE_PLEINE_PAGE) +#if (METHODE_UPDATE == METHODE_UPDATE_PLEINE_PAGE) // Mise à jour de la totalité de l'écran if (Update_necessaire) { SDL_UpdateRect(Ecran_SDL, 0, 0, 0, 0); Update_necessaire=0; } - #endif +#endif #if (METHODE_UPDATE == METHODE_UPDATE_PAR_CUMUL) if (Min_X>=Max_X || Min_Y>=Max_Y) {