u7drag.h

Go to the documentation of this file.
00001 
00007 /*
00008 Copyright (C) 2000 The Exult Team
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef INCL_U7DRAG
00026 #define INCL_U7DRAG 1
00027 
00028 //  Target information for dragging a shape:
00029 #define U7_TARGET_SHAPEID_NAME "U7SHAPEID"
00030 #define U7_TARGET_SHAPEID 137
00031 
00032 //  Shape files:
00033 #define U7_SHAPE_UNK  -1    /* Unknown.     */
00034 #define U7_SHAPE_SHAPES 0   /* shapes.vga     */
00035 #define U7_SHAPE_GUMPS  1   /* gumps.vga      */
00036 #define U7_SHAPE_FONTS  2   /* fonts.vga      */
00037 #define U7_SHAPE_FACES  3   /* faces.vga      */
00038 #define U7_SHAPE_SPRITES 4    /* sprites.vga      */
00039 #define U7_SHAPE_PAPERDOL 5   /* paperdol.vga     */
00040 
00041 //  Store/get shapeid.
00042 int Store_u7_shapeid(unsigned char *data, int file, int shape, int frame);
00043 void Get_u7_shapeid(unsigned char *data, int& file, int& shape, int& frame);
00044 
00045 //  Target information for dragging a chunk:
00046 #define U7_TARGET_CHUNKID_NAME "U7CHUNKID"
00047 #define U7_TARGET_CHUNKID 138
00048 
00049 //  Store/get chunk #.
00050 int Store_u7_chunkid(unsigned char *data, int cnum);
00051 void Get_u7_chunkid(unsigned char *data, int& cnum);
00052 
00053 //  Target information for dragging a 'combo' (group of shapes):
00054 #define U7_TARGET_COMBOID_NAME "U7COMBOID"
00055 #define U7_TARGET_COMBOID 139
00056 
00057 //  Store/get combo and its elements:
00058 typedef struct U7_combo_data 
00059   { int tx, ty, tz, shape, frame; } U7_combo_data;
00060 int Store_u7_comboid(unsigned char *data, int xtiles, int ytiles,
00061   int tiles_right, int tiles_below, int cnt, U7_combo_data *ents);
00062 void Get_u7_comboid(unsigned char *data, int& xtiles, int& ytiles,
00063   int& tiles_right, int& tiles_below, int& cnt, U7_combo_data *& ents);
00064 
00065 // Put these here since they are shared between XWin and Win32
00066 
00067 typedef void (*Move_shape_handler_fun)(int shape, int frame, int x, int y,
00068           int prevx, int prevy, bool show);
00069 typedef void (*Move_combo_handler_fun)(int xtiles, int ytiles, int tiles_right,
00070   int tiles_below, int x, int y, int prevx, int prevy, bool show);
00071 typedef void (*Drop_shape_handler_fun)(int shape, int frame, int x, int y,
00072               void *data);
00073 typedef void (*Drop_chunk_handler_fun)(int chunk, int x, int y, void *data);
00074 typedef void (*Drop_combo_handler_fun)(int cnt, struct U7_combo_data *combo, 
00075           int x, int y, void *data);
00076 
00077 
00078 
00079 #endif
00080 

Generated on Mon Jul 9 14:42:50 2007 for ExultEngine by  doxygen 1.5.1