Commit 56d94ad5 authored by Eli Gottlieb's avatar Eli Gottlieb

Merging branches. Will begin correcting mistakes introduced by merging.

parents 30693e91 cd2d456d
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
<LocalDebuggerCommandArguments Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"C:\Users\Eli\My Programs\test\shapes\p16_shape24.bmp"</LocalDebuggerCommandArguments>
<DebuggerFlavor Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
...@@ -450,6 +450,13 @@ ...@@ -450,6 +450,13 @@
04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; }; 04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; };
04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; }; 04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; };
04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; }; 04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; };
4537737D1207C4CE002F0F45 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */; };
4537737E1207C4CE002F0F45 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 4537737C1207C4CE002F0F45 /* SDL_shape.c */; };
453773821207C518002F0F45 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773811207C518002F0F45 /* SDL_shape.h */; };
453773891207C5A2002F0F45 /* SDL_cocoashape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773871207C5A2002F0F45 /* SDL_cocoashape.h */; };
4537738A1207C5A2002F0F45 /* SDL_cocoashape.m in Sources */ = {isa = PBXBuildFile; fileRef = 453773881207C5A2002F0F45 /* SDL_cocoashape.m */; };
453773921207C6E9002F0F45 /* SDL_x11shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 453773901207C6E9002F0F45 /* SDL_x11shape.c */; };
453773931207C6E9002F0F45 /* SDL_x11shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773911207C6E9002F0F45 /* SDL_x11shape.h */; };
BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; }; BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; };
BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; }; BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; };
BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; }; BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; };
...@@ -825,6 +832,13 @@ ...@@ -825,6 +832,13 @@
0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; };
0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; };
0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; };
4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shape_internals.h; sourceTree = "<group>"; };
4537737C1207C4CE002F0F45 /* SDL_shape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shape.c; sourceTree = "<group>"; };
453773811207C518002F0F45 /* SDL_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_shape.h; path = ../../include/SDL_shape.h; sourceTree = SOURCE_ROOT; };
453773871207C5A2002F0F45 /* SDL_cocoashape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoashape.h; sourceTree = "<group>"; };
453773881207C5A2002F0F45 /* SDL_cocoashape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoashape.m; sourceTree = "<group>"; };
453773901207C6E9002F0F45 /* SDL_x11shape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11shape.c; sourceTree = "<group>"; };
453773911207C6E9002F0F45 /* SDL_x11shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11shape.h; sourceTree = "<group>"; };
B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; }; B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; };
B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; }; B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; };
B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; }; B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; };
...@@ -1043,6 +1057,8 @@ ...@@ -1043,6 +1057,8 @@
00CFA70B106B498A00758660 /* SDL_cocoamouse.m */, 00CFA70B106B498A00758660 /* SDL_cocoamouse.m */,
00CFA70C106B498A00758660 /* SDL_cocoaopengl.h */, 00CFA70C106B498A00758660 /* SDL_cocoaopengl.h */,
00CFA70D106B498A00758660 /* SDL_cocoaopengl.m */, 00CFA70D106B498A00758660 /* SDL_cocoaopengl.m */,
453773871207C5A2002F0F45 /* SDL_cocoashape.h */,
453773881207C5A2002F0F45 /* SDL_cocoashape.m */,
00CFA70E106B498A00758660 /* SDL_cocoavideo.h */, 00CFA70E106B498A00758660 /* SDL_cocoavideo.h */,
00CFA70F106B498A00758660 /* SDL_cocoavideo.m */, 00CFA70F106B498A00758660 /* SDL_cocoavideo.m */,
00CFA710106B498A00758660 /* SDL_cocoawindow.h */, 00CFA710106B498A00758660 /* SDL_cocoawindow.h */,
...@@ -1087,6 +1103,8 @@ ...@@ -1087,6 +1103,8 @@
00CFA72B106B498B00758660 /* SDL_x11opengles.h */, 00CFA72B106B498B00758660 /* SDL_x11opengles.h */,
00CFA72C106B498B00758660 /* SDL_x11render.c */, 00CFA72C106B498B00758660 /* SDL_x11render.c */,
00CFA72D106B498B00758660 /* SDL_x11render.h */, 00CFA72D106B498B00758660 /* SDL_x11render.h */,
453773901207C6E9002F0F45 /* SDL_x11shape.c */,
453773911207C6E9002F0F45 /* SDL_x11shape.h */,
00CFA72E106B498B00758660 /* SDL_x11sym.h */, 00CFA72E106B498B00758660 /* SDL_x11sym.h */,
00CFA72F106B498B00758660 /* SDL_x11video.c */, 00CFA72F106B498B00758660 /* SDL_x11video.c */,
00CFA730106B498B00758660 /* SDL_x11video.h */, 00CFA730106B498B00758660 /* SDL_x11video.h */,
...@@ -1401,6 +1419,8 @@ ...@@ -1401,6 +1419,8 @@
00CFA80E106B49B600758660 /* SDL_renderer_sw.h */, 00CFA80E106B49B600758660 /* SDL_renderer_sw.h */,
00CFA80F106B49B600758660 /* SDL_RLEaccel_c.h */, 00CFA80F106B49B600758660 /* SDL_RLEaccel_c.h */,
00CFA810106B49B600758660 /* SDL_RLEaccel.c */, 00CFA810106B49B600758660 /* SDL_RLEaccel.c */,
4537737C1207C4CE002F0F45 /* SDL_shape.c */,
4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */,
00CFA811106B49B600758660 /* SDL_stretch.c */, 00CFA811106B49B600758660 /* SDL_stretch.c */,
00CFA812106B49B600758660 /* SDL_surface.c */, 00CFA812106B49B600758660 /* SDL_surface.c */,
00CFA813106B49B600758660 /* SDL_sysvideo.h */, 00CFA813106B49B600758660 /* SDL_sysvideo.h */,
...@@ -1452,6 +1472,7 @@ ...@@ -1452,6 +1472,7 @@
00A6EBD91078D569001EEA06 /* SDL_revision.h */, 00A6EBD91078D569001EEA06 /* SDL_revision.h */,
0C5AF5F801191D2B7F000001 /* SDL_rwops.h */, 0C5AF5F801191D2B7F000001 /* SDL_rwops.h */,
00CFA680106B44CE00758660 /* SDL_scancode.h */, 00CFA680106B44CE00758660 /* SDL_scancode.h */,
453773811207C518002F0F45 /* SDL_shape.h */,
00162D3909BD1FA90037C8D0 /* SDL_stdinc.h */, 00162D3909BD1FA90037C8D0 /* SDL_stdinc.h */,
00CFA681106B44CE00758660 /* SDL_surface.h */, 00CFA681106B44CE00758660 /* SDL_surface.h */,
0C5AF5F901191D2B7F000001 /* SDL_syswm.h */, 0C5AF5F901191D2B7F000001 /* SDL_syswm.h */,
...@@ -1743,6 +1764,10 @@ ...@@ -1743,6 +1764,10 @@
00A6EBDA1078D569001EEA06 /* SDL_revision.h in Headers */, 00A6EBDA1078D569001EEA06 /* SDL_revision.h in Headers */,
04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */, 04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */,
006E95B011952992001DE610 /* SDL_rwopsbundlesupport.h in Headers */, 006E95B011952992001DE610 /* SDL_rwopsbundlesupport.h in Headers */,
4537737D1207C4CE002F0F45 /* SDL_shape_internals.h in Headers */,
453773821207C518002F0F45 /* SDL_shape.h in Headers */,
453773891207C5A2002F0F45 /* SDL_cocoashape.h in Headers */,
453773931207C6E9002F0F45 /* SDL_x11shape.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -2202,6 +2227,9 @@ ...@@ -2202,6 +2227,9 @@
04DB838D10FD8C81000519B5 /* SDL_drawrect.c in Sources */, 04DB838D10FD8C81000519B5 /* SDL_drawrect.c in Sources */,
04F2AF661104AC0800D6DDF7 /* SDL_assert.c in Sources */, 04F2AF661104AC0800D6DDF7 /* SDL_assert.c in Sources */,
006E95B111952992001DE610 /* SDL_rwopsbundlesupport.m in Sources */, 006E95B111952992001DE610 /* SDL_rwopsbundlesupport.m in Sources */,
4537737E1207C4CE002F0F45 /* SDL_shape.c in Sources */,
4537738A1207C5A2002F0F45 /* SDL_cocoashape.m in Sources */,
453773921207C6E9002F0F45 /* SDL_x11shape.c in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
#define SDL_REVISION "hg-4516:eb433f0d2ac5"
...@@ -51,10 +51,12 @@ typedef struct { ...@@ -51,10 +51,12 @@ typedef struct {
SDL_ShapeKind kind; SDL_ShapeKind kind;
SDL_ShapeUnion data; SDL_ShapeUnion data;
} SDL_ShapeTree; } SDL_ShapeTree;
typedef void(*SDL_TraversalFunction)(SDL_ShapeTree*,void*);
extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb); extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb);
extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape,SDL_bool invert); extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape);
extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,void(*function)(SDL_ShapeTree*,void*),void* closure); extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure);
extern void SDL_FreeShapeTree(SDL_ShapeTree** shapeTree); extern void SDL_FreeShapeTree(SDL_ShapeTree** shapeTree);
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
......
...@@ -20,14 +20,25 @@ ...@@ -20,14 +20,25 @@
eligottlieb@gmail.com eligottlieb@gmail.com
*/ */
#include "SDL_config.h"
#ifndef _SDL_cocoashape_h
#define _SDL_cocoashape_h
#include "SDL_stdinc.h"
#include "SDL_video.h"
#include "SDL_shape.h"
#include "../SDL_shape_internals.h"
typedef struct { typedef struct {
NSGraphicsContext* context; NSGraphicsContext* context;
SDL_Bool saved; SDL_bool saved;
NSRect* rects; SDL_ShapeTree* shape;
Uint32 count;
} SDL_ShapeData; } SDL_ShapeData;
extern SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window); extern SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window);
extern int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); extern int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode);
extern int Cocoa_ResizeWindowShape(SDL_Window *window); extern int Cocoa_ResizeWindowShape(SDL_Window *window);
#endif
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "SDL_config.h" #include "SDL_config.h"
#include "SDL_cocoavideo.h" #include "SDL_cocoavideo.h"
#include "SDL_cocoashape.h"
#include "SDL_assert.h" #include "SDL_assert.h"
/* Initialization/Query functions */ /* Initialization/Query functions */
......
...@@ -44,7 +44,6 @@ int main(int argc,char** argv) { ...@@ -44,7 +44,6 @@ int main(int argc,char** argv) {
LoadedPicture* pictures; LoadedPicture* pictures;
int i, j; int i, j;
SDL_PixelFormat* format = NULL; SDL_PixelFormat* format = NULL;
Uint32 format_enum;
SDL_Window *window; SDL_Window *window;
SDL_Color black = {0,0,0,0xff}; SDL_Color black = {0,0,0,0xff};
SDL_Event event; SDL_Event event;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment