Changeset 524
- Timestamp:
- Apr 22, 2011, 4:12:53 AM (12 years ago)
- Location:
- abuse/trunk/src
- Files:
-
- 1 added
- 3 deleted
- 55 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/chars.h
r494 r524 18 18 #include "ability.h" 19 19 #include "event.h" 20 #include "macs.h"21 20 #include <stdarg.h> 22 21 #include <time.h> -
abuse/trunk/src/clisp.cpp
r512 r524 12 12 13 13 #include <string.h> 14 #include <unistd.h> 14 15 15 16 #include "common.h" -
abuse/trunk/src/common.h
r518 r524 11 11 #ifndef __COMMON_H__ 12 12 #define __COMMON_H__ 13 14 // 15 // Globally required headers 16 // 17 #include <stdint.h> 13 18 14 19 // … … 26 31 static inline float Max(float a, float b) { return a > b ? a : b; } 27 32 33 // 34 // Byte swapping 35 // 36 static inline int BigEndian() 37 { 38 union { uint32_t const x; uint8_t t[4]; } const u = { 0x01ffff00 }; 39 return u.t[0]; 40 } 41 42 static inline uint16_t Swap16(uint16_t x) 43 { 44 return ((uint16_t)x << 8 ) | ((uint16_t)x >> 8); 45 } 46 47 static inline uint32_t Swap32(uint32_t x) 48 { 49 return ((uint32_t)x >> 24) | (((uint32_t)x & 0x00ff0000) >> 8) 50 | (((uint32_t)x & 0x0000ff00) << 8) | ((uint32_t)x << 24); 51 } 52 53 #define uint16_to_intel(x) (BigEndian() ? Swap16((x)) : (x)) 54 #define uint32_to_intel(x) (BigEndian() ? Swap32((x)) : (x)) 55 #define big_uint16_to_local(x) (BigEndian() ? (x) : Swap16((x))) 56 #define big_uint32_to_local(x) (BigEndian() ? (x) : Swap32((x))) 57 #define uint16_to_local(x) (BigEndian() ? Swap16((x)) : (x)) 58 #define uint32_to_local(x) (BigEndian() ? Swap32((x)) : (x)) 59 60 #define bltl(x) big_uint32_to_local(x) 61 #define bstl(x) big_uint16_to_local(x) 62 #define lltl(x) uint32_to_intel(x) 63 #define lstl(x) uint16_to_intel(x) 64 65 #include <stdio.h> 66 #define ERROR(x,st) { if (!(x)) \ 67 { printf("Error on line %d of %s : %s\n", \ 68 __LINE__,__FILE__,st); exit(1); } } 69 70 // These macros should be removed for the non-debugging version 71 #ifdef NO_CHECK 72 # define CONDITION(x,st) 73 # define CHECK(x) 74 #else 75 # define CONDITION(x,st) ERROR(x,st) 76 # define CHECK(x) CONDITION(x,"Check stop"); 77 #endif 78 28 79 #endif // __COMMON_H__ 29 80 -
abuse/trunk/src/compiled.cpp
r494 r524 15 15 16 16 #include "lisp.h" 17 #include "macs.h"18 17 19 18 extern int total_objects; -
abuse/trunk/src/compiled.h
r494 r524 11 11 #ifndef __COMPILED_HPP_ 12 12 #define __COMPILED_HPP_ 13 #include "macs.h" 13 14 14 extern int32_t S_fall_start,S_falling,S_landing,S_pounce_wait, 15 15 S_turn_around,S_fire_wait,S_ceil_fire,S_top_walk, -
abuse/trunk/src/crc.h
r494 r524 12 12 #define _CRC_HPP_ 13 13 #include "specs.h" 14 #include "macs.h"15 14 16 15 uint16_t calc_crc(uint8_t *buf, int len); -
abuse/trunk/src/demo.cpp
r512 r524 17 17 #include "demo.h" 18 18 #include "specs.h" 19 #include "macs.h"20 19 #include "jwindow.h" 21 20 #include "dprint.h" -
abuse/trunk/src/extend.h
r494 r524 21 21 #include "lisp/lisp.h" 22 22 23 #include "macs.h"24 23 #include "morpher.h" 25 24 #include "chars.h" -
abuse/trunk/src/game.h
r494 r524 14 14 #include "loader2.h" 15 15 16 #include "macs.h"17 16 #include "image.h" 18 17 #include "video.h" -
abuse/trunk/src/imlib/Makefile.am
r512 r524 26 26 sprite.cpp sprite.h \ 27 27 jwindow.cpp jwindow.h \ 28 macs.h video.h event.h mouse.h timing.h jdir.h \29 system.h \28 video.cpp video.h \ 29 event.h mouse.h timing.h jdir.h \ 30 30 $(NULL) 31 31 -
abuse/trunk/src/imlib/dprint.cpp
r494 r524 15 15 #include <stdio.h> 16 16 17 #include " macs.h"17 #include "common.h" 18 18 19 19 void (*dprint_fun)(char *) = NULL; -
abuse/trunk/src/imlib/filesel.cpp
r512 r524 10 10 11 11 #include "config.h" 12 13 #include <unistd.h> 12 14 13 15 #include "common.h" -
abuse/trunk/src/imlib/filter.cpp
r523 r524 14 14 15 15 #include "image.h" 16 #include "macs.h"17 16 #include "filter.h" 18 17 -
abuse/trunk/src/imlib/glview.cpp
r494 r524 13 13 #include <math.h> 14 14 15 #include "macs.h"16 15 #include "mdlread.h" 17 16 #include "video.h" -
abuse/trunk/src/imlib/image.cpp
r523 r524 12 12 13 13 #include <math.h> 14 #ifdef __DOS15 # include <dir.h>16 #else17 # include <unistd.h>18 #endif19 14 #include <stdlib.h> 20 15 … … 22 17 23 18 #include "image.h" 24 #include "macs.h"25 #include "system.h"26 #include "system.h"27 19 28 20 linked_list image_list; // FIXME: only jwindow.cpp needs this -
abuse/trunk/src/imlib/image.h
r523 r524 15 15 #include "linked.h" 16 16 #include "palette.h" 17 #include "system.h"18 17 #include "specs.h" 19 18 #define MAX_DIRTY 200 -
abuse/trunk/src/imlib/input.cpp
r512 r524 16 16 17 17 #include "input.h" 18 #include "macs.h"19 20 18 21 19 void button::remap(filter *f) -
abuse/trunk/src/imlib/palette.cpp
r519 r524 17 17 #include "palette.h" 18 18 #include "image.h" 19 #include "macs.h"20 19 #include "video.h" 21 20 #include "filter.h" -
abuse/trunk/src/imlib/readwav.cpp
r494 r524 11 11 #include "config.h" 12 12 13 #include "common.h" 14 13 15 #include "readwav.h" 14 16 #include "specs.h" 15 #include "macs.h"16 17 #include "dprint.h" 17 18 -
abuse/trunk/src/imlib/specs.cpp
r512 r524 17 17 #include <fcntl.h> 18 18 #include <math.h> 19 #include <unistd.h> 19 20 #if (defined(__MACH__) || !defined(__APPLE__)) 20 21 # include <sys/types.h> … … 27 28 #include "palette.h" 28 29 #include "specs.h" 29 #include "system.h"30 30 #include "dprint.h" 31 31 -
abuse/trunk/src/imlib/specs.h
r494 r524 19 19 20 20 #include "linked.h" 21 #include "system.h"22 21 23 22 extern char const *spec_types[]; -
abuse/trunk/src/imlib/sprite.cpp
r519 r524 15 15 #include "common.h" 16 16 17 #include "macs.h"18 17 #include "video.h" 19 18 #include "image.h" -
abuse/trunk/src/imlib/sprite.h
r494 r524 11 11 #ifndef __SPRITE_HPP 12 12 #define __SPRITE_HPP 13 #include "macs.h"14 13 #include "image.h" 15 14 #include "linked.h" -
abuse/trunk/src/imlib/status.cpp
r512 r524 15 15 #include "common.h" 16 16 17 #include "macs.h"18 17 #include "status.h" 19 18 #include "dprint.h" -
abuse/trunk/src/imlib/timage.h
r521 r524 13 13 14 14 #include "image.h" 15 #include "macs.h"16 15 #include "palette.h" 17 16 #include "filter.h" -
abuse/trunk/src/imlib/video.h
r523 r524 11 11 #ifndef _VIDEO_HPP_ 12 12 #define _VIDEO_HPP_ 13 #include "system.h"14 13 15 14 #define TRI_1024x768x256 0x62 … … 31 30 void close_graphics(); 32 31 void fill_image(image *im, int x1, int y1, int x2, int y2); 32 void update_window_done(); 33 33 34 void update_dirty(image *im, int xoff=0, int yoff=0); 34 35 void put_part_image(image *im, int x, int y, int x1, int y1, int x2, int y2); 36 void put_image(image * im, int x, int y); 35 37 36 38 void clear_put_image(image *im, int x, int y); -
abuse/trunk/src/innet.cpp
r512 r524 16 16 17 17 #include "demo.h" 18 #include "macs.h"19 18 #include "specs.h" 20 19 #include "level.h" -
abuse/trunk/src/intsect.cpp
r494 r524 12 12 13 13 #include <stdlib.h> 14 15 #include "macs.h"16 14 17 15 void pushback(int32_t x1,int32_t y1,int32_t &x2,int32_t &y2, -
abuse/trunk/src/level.cpp
r515 r524 18 18 #include <limits.h> 19 19 #include <time.h> 20 #include <unistd.h> 20 21 21 22 #include "common.h" … … 30 31 #include "objects.h" 31 32 #include "jrand.h" 32 #include "macs.h"33 33 #include "clisp.h" 34 34 #include "status.h" -
abuse/trunk/src/level.h
r494 r524 14 14 15 15 #include "specs.h" 16 #include "macs.h"17 16 #include "objects.h" 18 17 #include "view.h" -
abuse/trunk/src/light.cpp
r518 r524 17 17 #include "light.h" 18 18 #include "image.h" 19 #include "macs.h"20 19 #include "video.h" 21 20 #include "palette.h" -
abuse/trunk/src/lisp/lisp.cpp
r512 r524 29 29 #else 30 30 # include "status.h" 31 # include "macs.h"32 31 # include "specs.h" 33 32 # include "dprint.h" -
abuse/trunk/src/lisp/lisp_gc.cpp
r501 r524 18 18 #ifdef NO_LIBS 19 19 #include "fakelib.h" 20 #else21 #include "macs.h"22 20 #endif 23 21 -
abuse/trunk/src/lisp/lisp_opt.cpp
r494 r524 13 13 #ifdef NO_LIBS 14 14 #include "fakelib.h" 15 #else16 #include "macs.h"17 15 #endif 18 16 -
abuse/trunk/src/lisp/trig.cpp
r494 r524 11 11 #include "config.h" 12 12 13 #include " system.h"13 #include "common.h" 14 14 15 15 /* Python code to generate the tables: -
abuse/trunk/src/net/Makefile.am
r481 r524 8 8 sock.cpp sock.h \ 9 9 tcpip.cpp tcpip.h \ 10 indian.hghandler.h undrv.h \10 ghandler.h undrv.h \ 11 11 $(NULL) 12 12 -
abuse/trunk/src/net/engine.cpp
r494 r524 11 11 #include "config.h" 12 12 13 #include "indian.h" 13 #include "common.h" 14 14 15 #include "../inc/netface.h" // net interface structures to the engine will use 15 16 #include "netfile.h" -
abuse/trunk/src/net/fileman.cpp
r494 r524 19 19 #include <sys/stat.h> 20 20 21 #include " macs.h"21 #include "common.h" 22 22 23 23 #include "fileman.h" -
abuse/trunk/src/net/gserver.cpp
r512 r524 22 22 #include "common.h" 23 23 24 #include "system.h"25 #include "macs.h"26 24 #include "gserver.h" 27 25 #include "netface.h" -
abuse/trunk/src/net/netfile.cpp
r494 r524 11 11 #include "config.h" 12 12 13 #include "indian.h" 13 #include "common.h" 14 14 15 #include "netfile.h" 15 16 #include "../inc/netface.h" -
abuse/trunk/src/net/undrv.cpp
r494 r524 28 28 #include <netdb.h> 29 29 30 #include "indian.h" 30 #include "common.h" 31 31 32 #include "undrv.h" 32 #include "../include/netface.h" // net interface structures to the engine will use 33 34 #include "../include/netface.h" 33 #include "../include/netface.h" // net interface structures the engine will use 35 34 36 35 //#include "netdrv.h" -
abuse/trunk/src/netface.h
r494 r524 14 14 #define __NETFACE_HPP_ 15 15 16 #include <stdint.h> 17 16 18 #define PACKET_MAX_SIZE 1024 // this is a game data packet (udp/ipx) 17 19 #define READ_PACKET_SIZE 1024 // this is a file service packet (tcp/spx) 18 20 #define NET_CRC_FILENAME "#net_crc" 19 21 #define NET_STARTFILE "netstart.spe" 20 #include "indian.h" 22 21 23 #include <string.h> 22 24 -
abuse/trunk/src/newlight.cpp
r518 r524 15 15 #include "light.h" 16 16 #include "image.h" 17 #include "macs.h"18 17 #include "video.h" 19 18 #include "palette.h" -
abuse/trunk/src/nfclient.cpp
r512 r524 20 20 #include "common.h" 21 21 22 #include "system.h"23 22 #include "netface.h" 24 23 -
abuse/trunk/src/nfserver.h
r494 r524 13 13 14 14 #include "specs.h" 15 #include "system.h"16 15 #include "netface.h" 17 16 #include "sock.h" -
abuse/trunk/src/particle.cpp
r518 r524 13 13 #include "common.h" 14 14 15 #include "macs.h"16 15 #include "particle.h" 17 16 #include "view.h" -
abuse/trunk/src/sdlport/event.cpp
r519 r524 25 25 #include "common.h" 26 26 27 #include "system.h"28 27 #include "image.h" 29 28 #include "palette.h" 30 29 #include "video.h" 31 #include "macs.h"32 30 #include "mouse.h" 33 31 #include "event.h" -
abuse/trunk/src/sdlport/jnet.cpp
r494 r524 38 38 39 39 #include "jnet.h" 40 #include "macs.h"41 40 42 41 int current_sock_err; -
abuse/trunk/src/sdlport/jnet.h
r494 r524 14 14 #define __NET_HPP_ 15 15 16 #include "macs.h"17 16 #include "packet.h" 18 17 -
abuse/trunk/src/sdlport/video.cpp
r523 r524 36 36 37 37 #include "filter.h" 38 #include "system.h"39 38 #include "video.h" 40 #include "macs.h"41 39 #include "image.h" 42 40 #include "setup.h" … … 55 53 #endif 56 54 57 // Forward declarations 58 void update_window_part(SDL_Rect *rect); 59 void update_window_done(); 55 static void update_window_part(SDL_Rect *rect); 60 56 61 57 // … … 339 335 340 336 // 341 // put_image()342 // Draw the entire image343 //344 void put_image(image * im, int x, int y)345 {346 put_part_image(im, x, y, 0, 0, im->Size().x - 1, im->Size().y - 1);347 }348 349 //350 // update_dirty_window()351 // Update the dirty parts of the window352 //353 void update_dirty_window(image *im, int xoff, int yoff)354 {355 int count;356 dirty_rect *dr, *q;357 CHECK(im->m_special); // make sure the image has the ability to contain dirty areas358 if(im->m_special->keep_dirt == 0)359 {360 put_image(im, xoff, yoff);361 }362 else363 {364 count = im->m_special->dirties.number_nodes();365 if(!count)366 return; // if nothing to update, return367 dr = (dirty_rect *)(im->m_special->dirties.first());368 while(count > 0)369 {370 put_part_image(im, xoff + dr->dx1, yoff + dr->dy1, dr->dx1, dr->dy1, dr->dx2 + 1, dr->dy2 + 1);371 q = dr;372 dr = (dirty_rect *)(dr->next());373 im->m_special->dirties.unlink(q);374 delete q;375 count--;376 }377 }378 }379 380 //381 // update_dirty()382 // Update the dirty parts of the image383 //384 void update_dirty(image *im, int xoff, int yoff)385 {386 update_dirty_window(im, xoff, yoff);387 update_window_done();388 }389 390 //391 337 // load() 392 338 // Set the palette … … 461 407 } 462 408 463 void update_window_part(SDL_Rect *rect)409 static void update_window_part(SDL_Rect *rect) 464 410 { 465 411 // no partial blit's in case of opengl -
abuse/trunk/src/seq.cpp
r512 r524 14 14 15 15 #include "seq.h" 16 #include "macs.h"17 16 #include "lisp.h" 18 17 -
abuse/trunk/src/status.cpp
r494 r524 13 13 #include <string.h> 14 14 15 #include "macs.h"16 15 #include "status.h" 17 16 #include "dprint.h" -
abuse/trunk/src/transp.h
r494 r524 12 12 #define __TRANSP_HPP_ 13 13 #include "image.h" 14 #include "macs.h"15 14 void transp_put(image *im, image *screen, uint8_t *table, int x, int y); 16 15 -
abuse/trunk/src/unixnfc.cpp
r519 r524 21 21 #include <sys/fcntl.h> 22 22 #include <fcntl.h> 23 24 #include "system.h"25 #include "indian.h"26 23 27 24 #include "netface.h" -
abuse/trunk/src/view.cpp
r513 r524 11 11 #include "config.h" 12 12 13 #include <unistd.h> 14 13 15 #include "common.h" 14 16 15 17 #include "game.h" 16 18 17 #include "system.h"18 19 #include "view.h" 19 20 #include "lisp.h"
Note: See TracChangeset
for help on using the changeset viewer.