~ubuntu-branches/ubuntu/wily/hedgewars/wily

« back to all changes in this revision

Viewing changes to misc/libfreetype/src/raster/ftmisc.h

  • Committer: Package Import Robot
  • Author(s): Dmitry E. Oboukhov
  • Date: 2011-09-23 10:16:55 UTC
  • mfrom: (1.2.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110923101655-3977th2gc5n0a3pv
Tags: 0.9.16-1
* New upstream version.
 + Downloadable content! Simply click to install any content.
   New voices, hats, maps, themes, translations, music, scripts...
   Hedgewars is now more customisable than ever before! As time goes
   by we will be soliciting community content to feature on this page,
   so remember to check it from time to time. If you decide you want
   to go back to standard Hedgewars, just remove the Data directory
   from your Hedgewars config directory.
 + 3-D rendering! Diorama-like rendering of the game in a variety
   of 3D modes. Let us know which ones work best for you, we didn't
   really have the equipment to test them all.
 + Resizable game window.
 + New utilities! The Time Box will remove one of your hedgehogs
   from the game for a while, protecting from attack until it returns,
   somewhere else on the map. Land spray will allow you to build bridges,
   seal up holes, or just make life unpleasant for your enemies.
 + New single player: Bamboo Thicket, That Sinking Feeling, Newton and
   the Tree and multi-player: The Specialists, Space Invaders,
   Racer - scripts! And a ton more script hooks for scripters
 + New twists on old weapons. Drill strike, seduction and fire have
   been adjusted. Defective mines have been added, rope can attach to
   hogs/crates/barrels again, grenades now have variable bounce (use
   precise key + 1-5). Portal gun is now more usable in flight and
   all game actions are a lot faster.
 + New theme - Golf, dozens of new community hats and a new
   localised Default voice, Ukranian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************/
 
2
/*                                                                         */
 
3
/*  ftmisc.h                                                               */
 
4
/*                                                                         */
 
5
/*    Miscellaneous macros for stand-alone rasterizer (specification       */
 
6
/*    only).                                                               */
 
7
/*                                                                         */
 
8
/*  Copyright 2005, 2009, 2010 by                                          */
 
9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 
10
/*                                                                         */
 
11
/*  This file is part of the FreeType project, and may only be used        */
 
12
/*  modified and distributed under the terms of the FreeType project       */
 
13
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 
14
/*  this file you indicate that you have read the license and              */
 
15
/*  understand and accept it fully.                                        */
 
16
/*                                                                         */
 
17
/***************************************************************************/
 
18
 
 
19
 
 
20
  /***************************************************/
 
21
  /*                                                 */
 
22
  /* This file is *not* portable!  You have to adapt */
 
23
  /* its definitions to your platform.               */
 
24
  /*                                                 */
 
25
  /***************************************************/
 
26
 
 
27
#ifndef __FTMISC_H__
 
28
#define __FTMISC_H__
 
29
 
 
30
 
 
31
  /* memset */
 
32
#include FT_CONFIG_STANDARD_LIBRARY_H
 
33
 
 
34
#define FT_BEGIN_HEADER
 
35
#define FT_END_HEADER
 
36
 
 
37
#define FT_LOCAL_DEF( x )   static x
 
38
 
 
39
 
 
40
  /* from include/freetype2/fttypes.h */
 
41
 
 
42
  typedef unsigned char  FT_Byte;
 
43
  typedef signed int     FT_Int;
 
44
  typedef unsigned int   FT_UInt;
 
45
  typedef signed long    FT_Long;
 
46
  typedef unsigned long  FT_ULong;
 
47
  typedef signed long    FT_F26Dot6;
 
48
  typedef int            FT_Error;
 
49
 
 
50
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
 
51
          ( ( (FT_ULong)_x1 << 24 ) |     \
 
52
            ( (FT_ULong)_x2 << 16 ) |     \
 
53
            ( (FT_ULong)_x3 <<  8 ) |     \
 
54
              (FT_ULong)_x4         )
 
55
 
 
56
 
 
57
  /* from include/freetype2/ftsystem.h */
 
58
 
 
59
  typedef struct FT_MemoryRec_*  FT_Memory;
 
60
 
 
61
  typedef void* (*FT_Alloc_Func)( FT_Memory  memory,
 
62
                                  long       size );
 
63
 
 
64
  typedef void (*FT_Free_Func)( FT_Memory  memory,
 
65
                                void*      block );
 
66
 
 
67
  typedef void* (*FT_Realloc_Func)( FT_Memory  memory,
 
68
                                    long       cur_size,
 
69
                                    long       new_size,
 
70
                                    void*      block );
 
71
 
 
72
  typedef struct FT_MemoryRec_
 
73
  {
 
74
    void*            user;
 
75
 
 
76
    FT_Alloc_Func    alloc;
 
77
    FT_Free_Func     free;
 
78
    FT_Realloc_Func  realloc;
 
79
 
 
80
  } FT_MemoryRec;
 
81
 
 
82
 
 
83
  /* from src/ftcalc.c */
 
84
 
 
85
#if ( defined _WIN32 || defined _WIN64 )
 
86
 
 
87
  typedef __int64  FT_Int64;
 
88
 
 
89
#else
 
90
 
 
91
#include "inttypes.h"
 
92
 
 
93
  typedef int64_t  FT_Int64;
 
94
 
 
95
#endif
 
96
 
 
97
 
 
98
  static FT_Long
 
99
  FT_MulDiv( FT_Long  a,
 
100
             FT_Long  b,
 
101
             FT_Long  c )
 
102
  {
 
103
    FT_Int   s;
 
104
    FT_Long  d;
 
105
 
 
106
 
 
107
    s = 1;
 
108
    if ( a < 0 ) { a = -a; s = -1; }
 
109
    if ( b < 0 ) { b = -b; s = -s; }
 
110
    if ( c < 0 ) { c = -c; s = -s; }
 
111
 
 
112
    d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c
 
113
                         : 0x7FFFFFFFL );
 
114
 
 
115
    return ( s > 0 ) ? d : -d;
 
116
  }
 
117
 
 
118
#endif /* __FTMISC_H__ */
 
119
 
 
120
 
 
121
/* END */