00001 /* {{{ 00002 * CalcRogue, a roguelike game for PCs, calculators and PDAs 00003 * Copyright (C) 2003 Jim Babcock 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 * }}} */ 00019 // Construct.c 00026 00027 #include "crogue.h" 00028 00029 #ifndef CASTCONSTRUCT 00030 00031 //{{{ 00032 coord construct_coord(uchar x, uchar y) 00033 { 00034 coord c; 00035 00036 c.x = x; c.y=y; 00037 return c; 00038 } 00039 //}}} 00040 //{{{ 00041 rect construct_rect(uchar x, uchar y, uchar w, uchar h) 00042 { 00043 rect r; 00044 r.topleft.x = x; 00045 r.topleft.y=y; 00046 r.extent.x = w; 00047 r.extent.y = h; 00048 return r; 00049 } 00050 //}}} 00051 //{{{ 00052 direction construct_direction(schar x, schar y) 00053 { 00054 direction d; 00055 00056 d.x = x; 00057 d.y = y; 00058 00059 return d; 00060 } 00061 //}}} 00062 //{{{ 00063 range construct_range(uchar max, uchar min) 00064 { 00065 range r; 00066 00067 r.max = max; 00068 r.min = min; 00069 00070 return r; 00071 } 00072 //}}} 00073 00074 #endif
1.3.6