rpms/abuse/devel abuse.spec, NONE, 1.1 abuse_sdl-0.7.0-debian.patch, NONE, 1.1 abuse_sdl-0.7.0-fixes.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Fri Aug 18 05:27:25 UTC 2006
Author: jwrdegoede
Update of /cvs/extras/rpms/abuse/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7527/devel
Modified Files:
.cvsignore sources
Added Files:
abuse.spec abuse_sdl-0.7.0-debian.patch
abuse_sdl-0.7.0-fixes.patch
Log Message:
auto-import abuse-0.7.0-1 on branch devel from abuse-0.7.0-1.src.rpm
--- NEW FILE abuse.spec ---
Name: abuse
Version: 0.7.0
Release: 1%{?dist}
Summary: The classic Crack-Dot-Com game
Group: Amusements/Games
License: GPL
URL: http://www.labyrinth.net.au/~trandor/abuse/
Source0: http://www.labyrinth.net.au/~trandor/files/abuse_sdl-%{version}.tar.bz2
Patch0: abuse_sdl-0.7.0-debian.patch
Patch1: abuse_sdl-0.7.0-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ImageMagick SDL-devel alsa-lib-devel libGLU-devel
Requires: abuse-data
%description
This is the SDL version of Abuse, the classic Crack-Dot-Com game. It can run in
a window or fullscreen and it has stereo sound with sound panning.
%prep
%setup -q -n abuse_sdl-%{version}
%patch0 -p1 -z .deb
%patch1 -p1 -z .fix
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mv $RPM_BUILD_ROOT%{_datadir}/games/%{name}/%{name}.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
rm -fr $RPM_BUILD_ROOT%{_datadir}/games
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS README TODO
%{_bindir}/%{name}.sdl
%{_mandir}/man6/%{name}-sdl.6.gz
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%changelog
* Wed Aug 16 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.7.0-1
- Initial FE submission
abuse_sdl-0.7.0-debian.patch:
--- NEW FILE abuse_sdl-0.7.0-debian.patch ---
Index: abuse-sdl-0.7.0/src/imlib/include/visobj.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/visobj.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/visobj.hpp 2006-06-21 15:02:31.000000000 +0200
@@ -10,6 +10,7 @@
virtual void draw(image *screen, int x, int y, window_manager *wm, filter *f) = 0;
virtual int width(window_manager *wm) = 0;
virtual int height(window_manager *wm) = 0;
+ virtual ~visual_object() {}
} ;
Index: abuse-sdl-0.7.0/src/imlib/include/status.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/status.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/status.hpp 2006-06-21 15:02:31.000000000 +0200
@@ -11,6 +11,7 @@
virtual void update(int percentage) = 0;
virtual void pop() = 0;
virtual void force_display() { ; }
+ virtual ~status_manager() {}
} ;
Index: abuse-sdl-0.7.0/src/imlib/include/jmalloc.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/jmalloc.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/jmalloc.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -7,14 +7,14 @@
#ifdef MANAGE_MEM
enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE};
extern int alloc_space;
-void *jmalloc(long size, char *what_for);
-void *jrealloc(void *ptr, long size, char *what_for);
+void *jmalloc(int32_t size, char *what_for);
+void *jrealloc(void *ptr, int32_t size, char *what_for);
void jfree(void *ptr);
void mem_report(char *filename);
-void jmalloc_init(long min_size);
+void jmalloc_init(int32_t min_size);
void jmalloc_uninit();
-long j_allocated();
-long j_available();
+int32_t j_allocated();
+int32_t j_available();
extern void free_up_memory();
#else
#define jmalloc(x,y) malloc(x)
Index: abuse-sdl-0.7.0/src/imlib/include/palette.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/palette.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/palette.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -27,7 +27,7 @@
palette(bFILE *fp);
void set(int x, unsigned char red, unsigned char green, unsigned char blue);
void get(int x, unsigned char &red, unsigned char &green, unsigned char &blue);
- long getquad(int x);
+ uint32_t getquad(int x);
unsigned int red(int x) { return pal[x].red; }
unsigned int green(int x) { return pal[x].green; }
unsigned int blue(int x) { return pal[x].blue; }
Index: abuse-sdl-0.7.0/src/imlib/include/timage.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/timage.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/timage.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -27,15 +27,15 @@
// if screen x & y offset already calculated save a mul
// and no clipping, but fast use this
- void put_image_offseted(image *screen, uchar *s_off);
+ void put_image_offseted(image *screen, uint8_t *s_off);
void put_image_filled(image *screen, int x, int y,
- uchar fill_color);
+ uint8_t fill_color);
void put_fade(image *screen, int x, int y,
int frame_on, int total_frames,
color_filter *f, palette *pal);
void put_fade_tint(image *screen, int x, int y,
int frame_on, int total_frames,
- uchar *tint,
+ uint8_t *tint,
color_filter *f, palette *pal);
void put_color(image *screen, int x, int y, int color);
unsigned char *clip_y(image *screen, int x1, int y1, int x2, int y2,
Index: abuse-sdl-0.7.0/src/imlib/include/packet.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/packet.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/packet.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -4,24 +4,24 @@
class packet
{
public :
- uchar *buf;
- long buf_size,ro,wo,rend;
+ uint8_t *buf;
+ int32_t buf_size,ro,wo,rend;
int pre_size;
void make_bigger(int max);
int get_read_position() { return ro; }
void set_read_position(int x) { ro=x; }
- int read(uchar *buffer, int size);
- int write(uchar *buffer, int size);
+ int read(uint8_t *buffer, int size);
+ int write(uint8_t *buffer, int size);
int eop() { return ro>=rend; }
void reset();
packet(int prefix_size=2);
void get_string(char *st, int len);
- int advance(long offset);
+ int advance(int32_t offset);
- void write_long(ulong x); // writes can't fail...
- void write_short(ushort x);
- void write_byte(uchar x);
+ void write_uint32(uint32_t x); // writes can't fail...
+ void write_uint16(uint16_t x);
+ void write_uint8(uint8_t x);
void insert_into(packet &pk);
int size() { return rend-pre_size; }
~packet();
Index: abuse-sdl-0.7.0/src/imlib/include/jwindow.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/jwindow.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/jwindow.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -68,9 +68,8 @@
struct jwindow_properties
{
- uchar moveable,
- hidden;
-
+ uint8_t moveable,
+ hidden;
} ;
Index: abuse-sdl-0.7.0/src/imlib/include/image.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/include/image.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/include/image.hpp 2006-06-21 15:02:35.000000000 +0200
@@ -18,10 +18,10 @@
#define imWRITE_ERROR 7
#define imMAX_ERROR 7
-short current_error();
+int16_t current_error();
void clear_errors();
-void set_error(short x);
-short last_error();
+void set_error(int16_t x);
+int16_t last_error();
void make_block(size_t size);
void image_init();
void image_uninit();
@@ -29,9 +29,9 @@
typedef struct image_color_t
{
- unsigned short r;
- unsigned short g;
- unsigned short b;
+ uint16_t r;
+ uint16_t g;
+ uint16_t b;
} image_color;
class filter;
@@ -40,44 +40,44 @@
class dirty_rect : public linked_node
{
public :
- short dx1,dy1,dx2,dy2;
- dirty_rect(short x1, short y1, short x2, short y2)
+ int16_t dx1,dy1,dx2,dy2;
+ dirty_rect(int16_t x1, int16_t y1, int16_t x2, int16_t y2)
{ dx1=x1; dy1=y1; dx2=x2; dy2=y2;
if (x2<x1 || y2<y1)
printf("add inccorect dirty\n");
}
- virtual short compare(void *n1, short field)
+ virtual int16_t compare(void *n1, int16_t field)
{ return ((dirty_rect *)n1)->dy1>dy1; }
} ;
class image_descriptor
{
- short l,h;
- short clipx1, clipy1, clipx2, clipy2;
+ int16_t l,h;
+ int16_t clipx1, clipy1, clipx2, clipy2;
public :
- unsigned char keep_dirt,
- static_mem; // if this flag is set then don't free memory on exit
+ uint8_t keep_dirt,
+ static_mem; // if this flag is set then don't free memory on exit
linked_list dirties;
void *extended_descriptor; // type depends on current system
[...13914 lines suppressed...]
return 0;
}
-game_object *number_to_object_in_list(long x, object_node *list)
+game_object *number_to_object_in_list(int32_t x, object_node *list)
{
if (!x) return NULL; x--;
while (x && list) { list=list->next; x--; }
@@ -1525,9 +1525,9 @@
}
-long object_list_length(object_node *list)
+int32_t object_list_length(object_node *list)
{
- long x=0;
+ int32_t x=0;
while (list) { list=list->next; x++; }
return x;
@@ -1542,7 +1542,7 @@
int t=figures[Type]->tv;
if (t)
{
- lvars=(long *)jmalloc(t*4,"object vars");
+ lvars=(int32_t *)jmalloc(t*4,"object vars");
memset(lvars,0,t*4);
}
else lvars=NULL;
@@ -1555,7 +1555,7 @@
int game_object::reduced_state()
{
- long x=0;
+ int32_t x=0;
for (int i=0;i<figures[otype]->ts;i++)
{
if (i==state) return x;
@@ -1577,7 +1577,7 @@
game_object *o=current_object;
current_object=(game_object *)this;
- time_marker *prof1;
+ time_marker *prof1=NULL;
if (profiling())
prof1=new time_marker;
@@ -1606,7 +1606,7 @@
int t=figures[new_type]->tv;
if (t)
{
- lvars=(long *)jmalloc(t*4,"object vars");
+ lvars=(int32_t *)jmalloc(t*4,"object vars");
memset(lvars,0,t*4);
}
else lvars=NULL;
@@ -1620,7 +1620,7 @@
void *m=mark_heap(TMP_SPACE);
- time_marker *prof1;
+ time_marker *prof1=NULL;
if (profiling())
prof1=new time_marker;
Index: abuse-sdl-0.7.0/src/include/lcache.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/include/lcache.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/include/lcache.hpp 2006-06-21 15:02:32.000000000 +0200
@@ -5,7 +5,7 @@
#ifdef SCADALISP
#define can_cache_lisp() 0
#else
-#define can_cache_lisp() 1
+#define can_cache_lisp() 0 /* XXX */
#endif
long block_size(Cell *level); // return number of bytes to save this block of code
Index: abuse-sdl-0.7.0/src/include/bus_type.hpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/include/bus_type.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/include/bus_type.hpp 2006-06-21 15:02:33.000000000 +0200
@@ -2,35 +2,35 @@
#define BUS_TYPE_HPP
#ifdef __sgi
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef sun
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef SUN3
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef SUN4
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef __sgi
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef _AIX
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef __sparc__
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#ifdef __arm__
-#define WORD_ALLIGN 1
+#define WORD_ALIGN 1
#endif
#endif // BUS_TYPE_HPP
Index: abuse-sdl-0.7.0/src/lisp.cpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/lisp.cpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/lisp.cpp 2006-06-21 15:02:33.000000000 +0200
@@ -171,7 +171,9 @@
void *lmalloc(int size, int which_space)
{
-#ifdef WORD_ALLIGN
+ return malloc(size); /* XXX */
+
+#ifdef WORD_ALIGN
size=(size+3)&(~3);
#endif
Index: abuse-sdl-0.7.0/src/lcache.cpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/lcache.cpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/lcache.cpp 2006-06-21 15:02:33.000000000 +0200
@@ -35,7 +35,7 @@
{ ret=sizeof(lisp_pointer); }
else ret=0;
}
-#ifdef WORD_ALLIGN
+#ifdef WORD_ALIGN
return (ret+3)&(~3);
#else
return ret;
Index: abuse-sdl-0.7.0/src/imlib/keys.cpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/keys.cpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/keys.cpp 2006-06-21 15:02:34.000000000 +0200
@@ -11,7 +11,7 @@
void key_name(int key, char *buffer)
{
- static char sing[2];
+ //static char sing[2];
if( key > 255 && key <= JK_MAX_KEY )
strcpy(buffer,jk_key_names[key-256]);
else if( key == JK_BACKSPACE )
Index: abuse-sdl-0.7.0/src/imlib/jwindow.cpp
===================================================================
--- abuse-sdl-0.7.0.orig/src/imlib/jwindow.cpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse-sdl-0.7.0/src/imlib/jwindow.cpp 2006-06-21 15:02:34.000000000 +0200
@@ -175,7 +175,7 @@
ev.window->next=NULL;
if (red)
{
- jwindow *j=ev.window,*p;
+ jwindow *j=ev.window;
/* screen->add_dirty(j->x,j->y,j->x+j->l-1,j->y+j->h-1);
for (p=first;p!=j;p=p->next)
p->screen->add_dirty(j->x-p->x,j->y-p->y,j->x+j->l-1-p->x,j->y+j->h-1-p->y);*/
@@ -282,8 +282,8 @@
{
jwindow *p,*q;
- int mx,my,but;
- image *mouse_pic,*mouse_save;
+ int mx=0,my=0;
+ image *mouse_pic=NULL,*mouse_save=NULL;
if (has_mouse())
{
@@ -426,7 +426,7 @@
ifield *input_manager::unlink(int id) // unlinks ID from fields list and return the pointer to it
{
- for (ifield *i=first,*last;i;i=i->next)
+ for (ifield *i=first,*last=NULL;i;i=i->next)
{
if (i->id==id)
{
abuse_sdl-0.7.0-fixes.patch:
--- NEW FILE abuse_sdl-0.7.0-fixes.patch ---
diff -ur abuse_sdl-0.7.0.orig/src/include/stack.hpp abuse_sdl-0.7.0/src/include/stack.hpp
--- abuse_sdl-0.7.0.orig/src/include/stack.hpp 2002-12-15 06:00:32.000000000 +0100
+++ abuse_sdl-0.7.0/src/include/stack.hpp 2006-08-16 16:54:58.000000000 +0200
@@ -13,20 +13,38 @@
{
public :
T **sdata;
- long son;
-
- grow_stack(int max_size) { sdata=(T **)jmalloc(max_size,"pointer stack"); son=0; }
+ unsigned int son, _max_size;
+ /* <sigh> the max_size parameter is the number of bytes of the pointerstack
+ instead of the number of entries which it ofcourse should have been.
+ This breaks on 64 bit since the caller assumes 4 bytes per pointer and
+ thus on 64 bit allocates not enough memory. Instead of fixing all callers
+ we work around this by multiplying maxsize by 2 on 64 bit. */
+ grow_stack(unsigned int max_size)
+ {
+ max_size *= sizeof(void*)/sizeof(int);
+ sdata = (T **)jmalloc(max_size, "pointer stack");
+ son=0;
+ _max_size=max_size;
+ }
+
void push(T *data)
{
sdata[son]=data;
son++;
+ if (son >= (_max_size/sizeof(int)))
+ {
+ lbreak("stack overflow\n");
+ exit(0);
+ }
}
- T *pop(long total)
- { if (total>son) { lbreak("stack underflow\n"); exit(0); }
+ T *pop(unsigned int total)
+ {
+ if (total>son) { lbreak("stack underflow\n"); exit(0); }
son-=total;
return sdata[son];
}
+
void clean_up()
{
if (son!=0) fprintf(stderr,"Warning cleaning up stack and not empty\n");
diff -ur abuse_sdl-0.7.0.orig/src/light.cpp abuse_sdl-0.7.0/src/light.cpp
--- abuse_sdl-0.7.0.orig/src/light.cpp 2006-08-16 16:56:33.000000000 +0200
+++ abuse_sdl-0.7.0/src/light.cpp 2006-08-16 16:36:07.000000000 +0200
@@ -348,7 +348,7 @@
// f->write(green_light,256*64);
for (int i=0;i<TTINTS;i++)
f->write(tints[i],256);
- fp->write(bright_tint,256);
+ f->write(bright_tint,256);
// f.write(trans_table,256*256);
}
delete f;
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/abuse/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 18 Aug 2006 05:26:18 -0000 1.1
+++ .cvsignore 18 Aug 2006 05:27:25 -0000 1.2
@@ -0,0 +1 @@
+abuse_sdl-0.7.0.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/abuse/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 18 Aug 2006 05:26:18 -0000 1.1
+++ sources 18 Aug 2006 05:27:25 -0000 1.2
@@ -0,0 +1 @@
+59ea4498886642aa975f04233cc92558 abuse_sdl-0.7.0.tar.bz2
More information about the fedora-extras-commits
mailing list