Fix to be build with gcc-2.95
OK landry@
This commit is contained in:
parent
5033142f41
commit
01a3602c96
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.16 2011/04/18 11:58:45 sebastia Exp $
|
||||
# $OpenBSD: Makefile,v 1.17 2011/06/27 06:34:55 sebastia Exp $
|
||||
|
||||
COMMENT= GNUstep example applications
|
||||
|
||||
DISTNAME= gnustep-examples-1.3.0
|
||||
REVISION= 4
|
||||
REVISION = 5
|
||||
|
||||
CATEGORIES= misc
|
||||
|
||||
|
@ -1,7 +1,74 @@
|
||||
$OpenBSD: patch-gui_MyGL_AppController_m,v 1.2 2010/06/07 06:52:46 ajacoutot Exp $
|
||||
$OpenBSD: patch-gui_MyGL_AppController_m,v 1.3 2011/06/27 06:34:55 sebastia Exp $
|
||||
|
||||
fix for gcc-2.95
|
||||
|
||||
--- gui/MyGL/AppController.m.orig Thu Apr 15 01:01:19 2010
|
||||
+++ gui/MyGL/AppController.m Thu Jun 3 09:44:46 2010
|
||||
@@ -410,7 +410,7 @@ static void Normalize (Vector *v)
|
||||
+++ gui/MyGL/AppController.m Sat Jun 25 13:28:26 2011
|
||||
@@ -3,7 +3,9 @@
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <AppKit/NSOpenGLView.h>
|
||||
#include "AppController.h"
|
||||
+#define id gl_id
|
||||
#include <GL/gl.h>
|
||||
+#undef id
|
||||
#include <GL/glu.h>
|
||||
#include <GNUstepBase/GSXML.h>
|
||||
|
||||
@@ -76,11 +78,11 @@ static void Normalize (Vector *v)
|
||||
int t;
|
||||
Vector light;
|
||||
Vector vv;
|
||||
+ float xx;
|
||||
light.X = 1.0f + rtx;
|
||||
light.Y = 1.0f + rty;
|
||||
light.Z = 1.0f + rtz;;
|
||||
Normalize(&light);
|
||||
- float xx;
|
||||
|
||||
for(t = 0; t < pcount; t++)
|
||||
{
|
||||
@@ -181,10 +183,11 @@ static void Normalize (Vector *v)
|
||||
if (trackMeshVertices)
|
||||
{
|
||||
NSArray *ar;
|
||||
+ NSArray *parray;
|
||||
str = [[str stringByTrimmingSpaces]
|
||||
stringByReplacingString:@"\t"
|
||||
withString:@""];
|
||||
- NSArray *parray = [str componentsSeparatedByString:@"\n"];
|
||||
+ parray = [str componentsSeparatedByString:@"\n"];
|
||||
mesh->vcount = [parray count];
|
||||
mesh->vertices = malloc(sizeof(Vector) * mesh->vcount);
|
||||
|
||||
@@ -207,10 +210,11 @@ static void Normalize (Vector *v)
|
||||
else if (trackNormalVertices)
|
||||
{
|
||||
NSArray *ar;
|
||||
+ NSArray *parray;
|
||||
str = [[str stringByTrimmingSpaces]
|
||||
stringByReplacingString:@"\t"
|
||||
withString:@""];
|
||||
- NSArray *parray = [str componentsSeparatedByString:@"\n"];
|
||||
+ parray = [str componentsSeparatedByString:@"\n"];
|
||||
mesh->nvcount = [parray count];
|
||||
mesh->nvertices = malloc(sizeof(Vector) * mesh->nvcount);
|
||||
|
||||
@@ -360,11 +364,11 @@ static void Normalize (Vector *v)
|
||||
|
||||
- (void) reshape
|
||||
{
|
||||
+ GLfloat ratio;
|
||||
+ NSRect sceneBounds;
|
||||
[super reshape];
|
||||
+ sceneBounds = [self bounds];
|
||||
|
||||
- GLfloat ratio;
|
||||
- NSRect sceneBounds = [self bounds];
|
||||
-
|
||||
ratio = NSWidth(sceneBounds)/ NSHeight(sceneBounds);
|
||||
|
||||
glViewport(0, 0, NSWidth(sceneBounds), NSHeight(sceneBounds));
|
||||
@@ -410,7 +414,7 @@ static void Normalize (Vector *v)
|
||||
|
||||
h = [MySAX new];
|
||||
p = [GSXMLParser parserWithSAXHandler:h
|
||||
|
17
x11/gnustep/examples/patches/patch-gui_MyGL_main_m
Normal file
17
x11/gnustep/examples/patches/patch-gui_MyGL_main_m
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-gui_MyGL_main_m,v 1.1 2011/06/27 06:34:55 sebastia Exp $
|
||||
|
||||
fix startup of MyGL
|
||||
|
||||
--- gui/MyGL/main.m.orig Sat Jun 25 13:10:10 2011
|
||||
+++ gui/MyGL/main.m Sat Jun 25 13:10:39 2011
|
||||
@@ -2,9 +2,5 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
- CREATE_AUTORELEASE_POOL(pool);
|
||||
- [NSApplication sharedApplication];
|
||||
- [NSApp run];
|
||||
- DESTROY(pool);
|
||||
- return 0;
|
||||
+ return NSApplicationMain (argc, argv);
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2011/05/15 13:03:26 sebastia Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2011/06/27 06:37:07 sebastia Exp $
|
||||
|
||||
COMMENT = tetris like puzzle game
|
||||
|
||||
DISTNAME = LapisPuzzle-1.1.0
|
||||
REVISION = 0
|
||||
CATEGORIES = games
|
||||
|
||||
HOMEPAGE = http://gap.nongnu.org/lapispuzzle/
|
||||
|
155
x11/gnustep/lapispuzzle/patches/patch-LapisPuzzleView_m
Normal file
155
x11/gnustep/lapispuzzle/patches/patch-LapisPuzzleView_m
Normal file
@ -0,0 +1,155 @@
|
||||
$OpenBSD: patch-LapisPuzzleView_m,v 1.1 2011/06/27 06:37:07 sebastia Exp $
|
||||
|
||||
fix build with gcc-2.95
|
||||
|
||||
--- LapisPuzzleView.m.orig Wed Jun 22 16:06:16 2011
|
||||
+++ LapisPuzzleView.m Wed Jun 22 16:39:38 2011
|
||||
@@ -249,6 +249,11 @@ static float _grid_height;
|
||||
{
|
||||
NSSize gz = [__owner gridSize];
|
||||
float border = gz.width/6;
|
||||
+ int i;
|
||||
+ NSColor *tcolor;
|
||||
+ NSMutableAttributedString *str;
|
||||
+ NSSize strSize;
|
||||
+
|
||||
[super draw];
|
||||
|
||||
PSsetrgbcolor(0.7,0.7,0.7);
|
||||
@@ -272,7 +277,6 @@ static float _grid_height;
|
||||
PSlineto((_x+_columns) * gz.width, (_y+_rows) * gz.height);
|
||||
PSfill();
|
||||
|
||||
- int i;
|
||||
for (i = 0; i <_rows; i+=2)
|
||||
{
|
||||
PSgsave();
|
||||
@@ -321,10 +325,6 @@ static float _grid_height;
|
||||
|
||||
|
||||
/****/
|
||||
- NSColor *tcolor;
|
||||
- NSMutableAttributedString *str;
|
||||
- NSSize strSize;
|
||||
-
|
||||
PSsetrgbcolor(0,0,0);
|
||||
PSsetalpha(0.8);
|
||||
PSrectfill(_x * gz.width + gz.width/8, _y *gz.height + gz.height/8, gz.width - gz.width/4, gz.height - gz.height/4);
|
||||
@@ -1294,10 +1294,10 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
{
|
||||
if (__currentUnit)
|
||||
{
|
||||
+ NSMutableArray *ar;
|
||||
_lockControl = YES;
|
||||
/* replace timer stone with jewel */
|
||||
|
||||
- NSMutableArray *ar;
|
||||
ar = [NSMutableArray array];
|
||||
en = [_units objectEnumerator];
|
||||
while ((unit = [en nextObject]))
|
||||
@@ -1443,6 +1443,7 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
|
||||
id m1,m2,m3;
|
||||
LPUnitColorType color;
|
||||
+ BOOL merge;
|
||||
|
||||
if (_gameOver)
|
||||
{
|
||||
@@ -1483,7 +1484,6 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
}
|
||||
|
||||
- BOOL merge;
|
||||
do
|
||||
{
|
||||
merge = NO;
|
||||
@@ -1497,6 +1497,7 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
|
||||
if (unit_rows >= 2)
|
||||
{
|
||||
+ NSMutableArray *ar = [NSMutableArray array];
|
||||
color = [unit unitColor];
|
||||
unit_x = [unit X];
|
||||
unit_y = [unit Y];
|
||||
@@ -1529,7 +1530,6 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
|
||||
|
||||
/* check right side */
|
||||
- NSMutableArray *ar = [NSMutableArray array];
|
||||
for (i = 0; i < unit_rows; i++)
|
||||
{
|
||||
m1 = [self getUnitAtX:unit_x + unit_columns
|
||||
@@ -1542,9 +1542,9 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
if ([ar count] == unit_rows)
|
||||
{
|
||||
- merge = YES;
|
||||
id en2, unit2;
|
||||
en2 = [ar objectEnumerator];
|
||||
+ merge = YES;
|
||||
while ((unit2 = [en2 nextObject]))
|
||||
{
|
||||
[_units removeObject:unit2];
|
||||
@@ -1567,9 +1567,9 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
if ([ar count] == unit_rows)
|
||||
{
|
||||
- merge = YES;
|
||||
id en2, unit2;
|
||||
en2 = [ar objectEnumerator];
|
||||
+ merge = YES;
|
||||
while ((unit2 = [en2 nextObject]))
|
||||
{
|
||||
[_units removeObject:unit2];
|
||||
@@ -1593,9 +1593,9 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
if ([ar count] == unit_columns)
|
||||
{
|
||||
- merge = YES;
|
||||
id en2, unit2;
|
||||
en2 = [ar objectEnumerator];
|
||||
+ merge = YES;
|
||||
while ((unit2 = [en2 nextObject]))
|
||||
{
|
||||
[_units removeObject:unit2];
|
||||
@@ -1618,9 +1618,9 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
if ([ar count] == unit_columns)
|
||||
{
|
||||
- merge = YES;
|
||||
id en2, unit2;
|
||||
en2 = [ar objectEnumerator];
|
||||
+ merge = YES;
|
||||
while ((unit2 = [en2 nextObject]))
|
||||
{
|
||||
[_units removeObject:unit2];
|
||||
@@ -1894,6 +1894,9 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
- (void) drawRect:(NSRect)r
|
||||
{
|
||||
int i;
|
||||
+ id en;
|
||||
+ LPUnit *unit;
|
||||
+
|
||||
/*
|
||||
[_background compositeToPoint:NSZeroPoint
|
||||
operation:NSCompositeCopy];
|
||||
@@ -1921,9 +1924,6 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
}
|
||||
PSstroke();
|
||||
|
||||
- id en;
|
||||
- LPUnit *unit;
|
||||
-
|
||||
en = [_blowing objectEnumerator];
|
||||
while ((unit = [en nextObject]))
|
||||
{
|
||||
@@ -1939,8 +1939,8 @@ static LPUnit * _random_unit(id owner, int x, int y, B
|
||||
{
|
||||
int cc,xx,yy;
|
||||
LPUnit* unit;
|
||||
- cc=xx=yy=0;
|
||||
NSMutableSet *set = [NSMutableSet setWithCapacity:70];
|
||||
+ cc=xx=yy=0;
|
||||
|
||||
for (yy = 13; yy >= 0 && cc < 8; yy--)
|
||||
for (xx = 5; xx >= 0; xx--)
|
Loading…
x
Reference in New Issue
Block a user