adonthell-0.3.8/0000755000175000017500000000000013414165072010500 500000000000000adonthell-0.3.8/README0000644000175000017500000001440612754671106011313 00000000000000 Adonthell 0.3 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING file for more details. Installation: ============= When compiling Adonthell from source, refer to the INSTALL and NEWBIE files for details. Additional information for compiling on a specific platform can be found in the respective README. files. Note that this package alone doesn't allow you to play anything - you'll need a game package in addition to this one. The official game package for this release is Waste's Edge release 0.3. If you don't already have it, you should download it and install it next to this package. Configuring Adonthell: ====================== The most important settings (Screen Mode, Audio Volume and Language) can be changed within the game itself. Some additional settings can only be changed by manually editing the configuration file. This file is create the first time you run Adonthell, and can usually be found in: $HOME/.config/adonthell/adonthellrc. The available options and what they do are: - Screen-mode Whether Adonthell should run fullscreen or in windowed mode 0 = Windowed mode, 1 = Letterbox mode, 2 = Fullscreen mode In window mode, a window just small enough to fit your desktop is created. In letterbox mode, the game runs fullscreen at your desktop resolution, but preserves its 4:3 aspect ratio. So on 16:9 or even wider screens common today, you will see a black border at the edges of the screen, but the image quality will be good. In fullscreen mode, your display resolution will be switched to 640x480 and (depending on your display), no border will be present. Due to scaling and stretching of the graphics to fit your display, image may appear somewhat blurry. - Screen Which display to use in fullscreen mode in case you are using multiple monitors 0 = your primary display, 1 = 2nd display, 2 = 3rd display, and so on - Language [locale] Specifies which language to use. As long as this option is unset, the language is determined by one of the following environment variables: LANG, LC_ALL or LC_MESSAGES. Once the option is set, it overrides any environment variable. For a listing of valid locale strings, run 'locale -a'. Of course, the game you run has to provide the translation you chose here, otherwise you'll get the default (i.e. English) text. Languages available in this package: Language Locale ------------------ Danish da_DA Dutch nl_NL English C French fr_FR (incomplete) Italian it_IT Spanish es_ES (incomplete) If new languages become available, they will be announced on our website: http://adonthell.nongnu.org/ If you want to help translate Waste's Edge into your own language, please have a look at The Translation Project http://translationproject.org/domain/wastesedge.html - Font [font.ttf] Chose a true type font to use for displaying text. If the default font doesn't suit you, or if it does not contain the glyphs required by the Language you selected, you can specify a different font here. Either enter an absolute path to a font file in true type format or enter the font name and copy the font into /gfx/window/font/ . - Quick-load Whether the last saved game should be automatically continued at startup. Only works if at least one saved game exists. 0 = disable, 1 = enable - Audio-channels Whether sound should be mono or stereo 0 = Mono, 1 = Stereo - Audio-resolution Whether audio output should be 8 or 16 bit 0 = 8 bit, 1 = 16 bit - Audio-sample-rate 0 = 11025 Hz, 1 = 22050 Hz, 2 = 44100 Hz - Audio-volume The mixer setting, 0 - 100 % (Note that a value of 0 will turn audio completely off) Running Adonthell: ================== Okay, now you're ready to launch the program. Type $> adonthell-0.3 to run the game named . To get a list of currently installed games you can play, type: $> adonthell-0.3 -l This will print a list of the installed games you can launch with above command. For further information on how to play Adonthell, please refer to the PLAYING file that comes with the game data. Directories: ============ - $HOME/.config/adonthell contains the configuration file - $HOME/.local/share/adonthell/ contains your saved games - Global data directory You can get this directory by invoking 'adonthell -d' (by default /usr/local/share/adonthell). This is the directory where games will install to. If you have a game installed somewhere else, you can play it by invoking 'adonthell -g ' Release Notes: ============== The main purpose of this release is to ensure that Adonthell - Waste's Edge can still be enjoyed on modern operating systems. To that end, support for newer versions of GCC, SDL and Python have been implemented. Adonthell - Waste's Edge -, or v0.3 for short is no complete RPG. As the v0.3 implies, the engine is far from being finished, although it should be free of severe bugs. Missing features include combat, items and magic. But you can interact with NPC's and the game world, and the internals enable us to create a basic plot, so v0.3 is actually playable! You're greatly invited to report us bugs, problems, or anything you think we should know. Any feedback is appreciated, so don't hesitate! Contact: ======== You can reach us in various ways: Mailing list: adonthell-general@nongnu.org Web site: http://adonthell.nongnu.org Tech support: http://savannah.nongnu.org/support/?group_id=702 Reporting Bugs: =============== We hope you'll never have to, but if you discover a problem, we would like to hear about it. Please use the Development mailing list (adonthell-devel@nongnu.org) for that. You can find informations on this and other mailing lists at http://adonthell.nongnu.org/contact/mailinglist.html Thank you for trying this software. - The Adonthell team. adonthell-0.3.8/src/0000755000175000017500000000000013414165072011267 500000000000000adonthell-0.3.8/src/surface.cc0000644000175000017500000005142313000720311013133 00000000000000/* Copyright (C) 1999/2000/2001/2004 Alexandre Courbot Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file surface.cc * @author Alexandre Courbot * @author Kai Sterker * * Defines the surface class. */ #include "surface.h" #include "screen.h" #include #include using namespace std; SDL_Rect surface::srcrect; SDL_Rect surface::dstrect; surface::surface (const u_int8 & scale) : drawable () { scale_ = scale; offset_x_ = 0; is_masked_ = false; mask_changed_ = false; alpha_ = SDL_ALPHA_OPAQUE; alpha_channel_ = false; Surface = NULL; Info = new pixel_info(); } surface::~surface () { delete Info; if (Surface) SDL_DestroyTexture (Surface); } void surface::set_mask (bool m) { // since SDL textures do not support masking, we need to // convert the masked image into the appropriate RGBA // representation. if (!Surface) { // if there is no surface yet, we will have to apply the // surface conversion later mask_changed_ = true; return; } if (m && !is_masked_) { is_masked_ = true; mask_changed_ = false; SDL_Surface *s1 = to_sw_surface(); SDL_Surface *s2 = SDL_CreateRGBSurfaceFrom(NULL, s1->w, s1->h, 32, 0, R_MASK, G_MASK, B_MASK, A_MASK); Info->Format = s2->format->format; SDL_Texture *tmp = SDL_CreateTexture (screen::get_renderer(), Info->Format, SDL_TEXTUREACCESS_STREAMING, s1->w, s1->h); if (!tmp) std::cout << "*** surface_sdl::set_mask: " << SDL_GetError() << std::endl; SDL_LockTexture(tmp, NULL, &s2->pixels, &s2->pitch); SDL_SetSurfaceAlphaMod (s1, SDL_ALPHA_OPAQUE); SDL_SetSurfaceBlendMode (s1, SDL_BLENDMODE_NONE); SDL_BlitSurface (s1, NULL, s2, NULL); SDL_UnlockTexture(tmp); SDL_FreeSurface(s1); SDL_FreeSurface(s2); SDL_DestroyTexture(Surface); Surface = tmp; alpha_channel_ = true; } is_masked_ = m; } void surface::set_alpha (u_int8 t, const bool & alpha_channel) { if ((t == 255) && (alpha_ != 255) && Surface) { SDL_SetTextureAlphaMod(Surface, t); SDL_SetTextureBlendMode(Surface, SDL_BLENDMODE_NONE); } else if (!alpha_channel && alpha_channel_ && Surface) { SDL_SetTextureBlendMode(Surface, SDL_BLENDMODE_NONE); } alpha_ = t; alpha_channel_ = alpha_channel || is_masked_; } SDL_Surface *surface::to_sw_surface(SDL_Rect *rect) const { int bpp; SDL_Surface *s; u_int32 rmask, gmask, bmask, amask; lock(rect); SDL_PixelFormatEnumToMasks(Info->Format, &bpp, &rmask, &gmask, &bmask, &amask); if (!rect) { s = SDL_CreateRGBSurfaceFrom(Info->Pixels, length() * scale(), height() * scale(), bpp, Info->Pitch, rmask, gmask, bmask, amask); } else { s = SDL_CreateRGBSurfaceFrom(Info->Pixels, rect->w, rect->h, bpp, Info->Pitch, rmask, gmask, bmask, amask); } if (is_masked_) { u_int32 trans_col = alpha_channel_? SDL_MapRGBA(s->format, 0xFF, 0x00, 0xFF, 0xFF) : SDL_MapRGB(s->format, 0xFF, 0x00, 0xFF); SDL_SetColorKey(s, 1, trans_col); } if (alpha_channel_ || alpha_ != 255) { if (!alpha_channel_ || is_masked_) SDL_SetSurfaceAlphaMod (s, alpha_); SDL_SetSurfaceBlendMode (s, SDL_BLENDMODE_BLEND); } return s; } void surface::draw (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area * da_opt, surface * target) const { setup_rects (x, y, sx, sy, sl, sh, da_opt); if (!dstrect.w || !dstrect.h) return; if (!target || target == &screen::display) { // blit to screen surface (--> hardware accelerated) if (alpha_channel_ || alpha_ != 255) { if (!alpha_channel_ || is_masked_) SDL_SetTextureAlphaMod(Surface, alpha_); SDL_SetTextureBlendMode(Surface, SDL_BLENDMODE_BLEND); } if (scale() > 1) { srcrect.x *= scale(); srcrect.y *= scale(); srcrect.w *= scale(); srcrect.h *= scale(); } if (screen::scale() > 1) { dstrect.x = dstrect.x * screen::scale() + screen::offset_x(); dstrect.y = dstrect.y * screen::scale() + screen::offset_y(); dstrect.w *= screen::scale(); dstrect.h *= screen::scale(); } SDL_RenderCopy (screen::get_renderer(), Surface, &srcrect, &dstrect); } else { // make sure the drawing target uses the same scale if (target->scale() != scale()) { target->set_scale(scale()); } if (scale() > 1) { srcrect.x *= scale(); srcrect.y *= scale(); srcrect.w *= scale(); srcrect.h *= scale(); dstrect.x = dstrect.x * scale() + target->offset_x_; dstrect.y *= scale(); dstrect.w *= scale(); dstrect.h *= scale(); if (dstrect.x < 0) dstrect.x = 0; if (dstrect.y < 0) dstrect.y = 0; } // make sure we only update the part of the target texture that is actually changed if (dstrect.x + dstrect.w > target->length() * scale()) dstrect.w = target->length() * scale() - dstrect.x; if (dstrect.y + dstrect.h > target->height() * scale()) dstrect.h = target->height() * scale() - dstrect.y; if (dstrect.w <= 0 || dstrect.h <= 0) return; srcrect.w = dstrect.w; srcrect.h = dstrect.h; // blit from one surface to another (--> needs to be in software) SDL_Surface *source_surf = to_sw_surface (); SDL_Surface *target_surf = target->to_sw_surface (&dstrect); SDL_BlitSurface (source_surf, &srcrect, target_surf, NULL); target->unlock(); SDL_FreeSurface(source_surf); SDL_FreeSurface(target_surf); } } void surface::fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area * da_opt) { if (da_opt) { SDL_Rect da = da_opt->setup_rects (); dstrect.x = da.x; dstrect.y = da.y; dstrect.w = da.w; dstrect.h = da.h; } else { dstrect.x = x; dstrect.y = y; dstrect.w = l; dstrect.h = h; } if (this == &screen::display) { u_int8 r, g, b, a; unmap_color(col, r, g, b, a); if (screen::scale() > 1) { dstrect.x = dstrect.x * screen::scale() + screen::offset_x(); dstrect.y = dstrect.y * screen::scale() + screen::offset_y(); dstrect.w *= screen::scale(); dstrect.h *= screen::scale(); } SDL_SetRenderDrawBlendMode(screen::get_renderer(), SDL_BLENDMODE_NONE); SDL_SetRenderDrawColor(screen::get_renderer(), r, g, b, a); SDL_RenderFillRect(screen::get_renderer(), &dstrect); } else { if (is_masked_ && col == screen::trans_col()) { col = map_color(255, 0, 255, SDL_ALPHA_TRANSPARENT); } if (scale() > 1) { dstrect.x = dstrect.x * scale() + offset_x_; dstrect.y *= scale(); dstrect.w *= scale(); dstrect.h *= scale(); if (dstrect.x < 0) dstrect.x = 0; } if (dstrect.x + dstrect.w > length() * scale()) dstrect.w = length() * scale() - dstrect.x; if (dstrect.y + dstrect.h > height() * scale()) dstrect.h = height() * scale() - dstrect.y; if (dstrect.w <= 0 || dstrect.h <= 0) return; lock(&dstrect); u_int32 *src = new u_int32[dstrect.w * dstrect.h]; std::fill_n(src, dstrect.w * dstrect.h, col); SDL_ConvertPixels (dstrect.w, dstrect.h, SDL_PIXELFORMAT_ARGB8888, (const void*) src, dstrect.w*4, Info->Format, Info->Pixels, Info->Pitch); delete[] src; unlock(); } } // convert RGBA color to surface format u_int32 surface::map_color (const u_int8 & r, const u_int8 & g, const u_int8 & b, const u_int8 & a) const { return (a << 24) | (r << 16) | (g << 8) | b; } // convert surface color format into RGBA void surface::unmap_color(u_int32 col, u_int8 & r, u_int8 & g, u_int8 & b, u_int8 & a) const { a = (col & 0xFF000000) >> 24; r = (col & 0x00FF0000) >> 16; g = (col & 0x0000FF00) >> 8; b = (col & 0x000000FF); } void surface::lock (SDL_Rect *rect) const { if (!length () || !height ()) return; if (this != &screen::display) { SDL_LockTexture (Surface, rect, &Info->Pixels, &Info->Pitch); Info->BytesPerPixel = SDL_BYTESPERPIXEL(Info->Format); } } void surface::unlock () const { if (!length () || !height ()) return; if (Info->Pixels) { SDL_UnlockTexture (Surface); Info->Pixels = NULL; } } void surface::put_pix (u_int16 x, u_int16 y, u_int32 col) { u_int8 r, g, b, a; if (this == &screen::display) { unmap_color(col, r, g, b, a); if (screen::scale() > 1) { fillrect(x, y, 1, 1, col); return; } x += screen::offset_x(); y += screen::offset_y(); SDL_SetRenderDrawBlendMode(screen::get_renderer(), SDL_BLENDMODE_NONE); SDL_SetRenderDrawColor(screen::get_renderer(), r, g, b, a); SDL_RenderDrawPoint(screen::get_renderer(), x, y); return; } if (!Info->Pixels) return; u_int8 *offset = ((Uint8 *) Info->Pixels) + y * Info->Pitch + x * Info->BytesPerPixel; if (!alpha_channel_) { unmap_color(col, r, g, b, a); switch (Info->Format) { case SDL_PIXELFORMAT_RGB24: *(offset) = r; *(++offset) = g; *(++offset) = b; break; case SDL_PIXELFORMAT_BGR24: *(offset) = b; *(++offset) = g; *(++offset) = r; break; } return; } #ifdef __BIG_ENDIAN__ unmap_color(col, b, a, g, r); #else unmap_color(col, r, g, b, a); #endif switch (Info->Format) { case SDL_PIXELFORMAT_BGR888: *(++offset) = r; *(++offset) = g; *(++offset) = b; break; case SDL_PIXELFORMAT_RGBA8888: *(offset) = a; *(++offset) = r; *(++offset) = g; *(++offset) = b; break; case SDL_PIXELFORMAT_ARGB8888: *(offset) = r; *(++offset) = g; *(++offset) = b; *(++offset) = a; break; case SDL_PIXELFORMAT_RGB888: *(++offset) = b; *(++offset) = g; *(++offset) = r; break; case SDL_PIXELFORMAT_ABGR8888: *(offset) = b; *(++offset) = g; *(++offset) = r; *(++offset) = a; break; case SDL_PIXELFORMAT_BGRA8888: *(offset) = a; *(++offset) = b; *(++offset) = g; *(++offset) = r; break; default: std::cout << "*** surface::put_pix: Unsupported format " << SDL_GetPixelFormatName(Info->Format) << std::endl; exit(1); }} u_int32 surface::get_pix (u_int16 x, u_int16 y) const { if (!Info->Pixels) return 0; u_int8 r, g, b, a = SDL_ALPHA_OPAQUE; u_int8 *offset = ((Uint8 *) Info->Pixels) + y * Info->Pitch + x * Info->BytesPerPixel; if (!alpha_channel_) { switch (Info->Format) { case SDL_PIXELFORMAT_RGB24: r = *(offset); g = *(++offset); b = *(++offset); break; case SDL_PIXELFORMAT_BGR24: b = *(offset); g = *(++offset); r = *(++offset); break; } return map_color (r, g, b, a); } switch (Info->Format) { case SDL_PIXELFORMAT_BGR888: r = *(++offset); g = *(++offset); b = *(++offset); break; case SDL_PIXELFORMAT_BGRA8888: a = *(offset); r = *(++offset); g = *(++offset); b = *(++offset); break; case SDL_PIXELFORMAT_ABGR8888: r = *(offset); g = *(++offset); b = *(++offset); a = *(++offset); break; case SDL_PIXELFORMAT_RGB888: b = *(++offset); g = *(++offset); r = *(++offset); break; case SDL_PIXELFORMAT_ARGB8888: b = *(offset); g = *(++offset); r = *(++offset); a = *(++offset); break; case SDL_PIXELFORMAT_RGBA8888: a = *(offset); b = *(++offset); g = *(++offset); r = *(++offset); break; default: std::cout << "surface::get_pix: Unsupported format " << SDL_GetPixelFormatName(Info->Format) << std::endl; exit(1); } #ifdef __BIG_ENDIAN__ return map_color (g, r, a, b); #else return map_color (r, g, b, a); #endif } void surface::set_scale(const u_int8 & new_scale) { // cannot scale the screen surface if (this == &screen::display) return; // already at requested scale if (scale() == new_scale) return; if (Surface == NULL) { scale_ = new_scale; return; } int bpp, pitch; u_int8 *target_data; u_int32 rmask, gmask, bmask, amask; lock(); SDL_PixelFormatEnumToMasks(Info->Format, &bpp, &rmask, &gmask, &bmask, &amask); SDL_Texture *target = SDL_CreateTexture (screen::get_renderer(), Info->Format, SDL_TEXTUREACCESS_STREAMING, length()*new_scale, height()*new_scale); if (!target) std::cout << "*** surface_sdl::set_scale: " << SDL_GetError() << std::endl; SDL_LockTexture(target, NULL, (void**)&target_data, &pitch); SDL_Surface *target_surf = SDL_CreateRGBSurfaceFrom(target_data, length()*new_scale, height()*new_scale, bpp, pitch, rmask, gmask, bmask, amask); s_int32 target_line_length = target_surf->format->BytesPerPixel * length()*new_scale; u_int32 real_height = height()*scale(); u_int32 real_length = length()*scale(); for (s_int32 src_y = 0; src_y < real_height; src_y += scale()) { s_int32 target_x = 0; s_int32 target_x_end = 0; // we scale one line horizontally for (s_int32 src_x = 0; src_x < real_length; src_x += scale()) { u_int8 *src = ((Uint8 *) Info->Pixels) + src_y * Info->Pitch + src_x * Info->BytesPerPixel; for (target_x_end += new_scale; target_x < target_x_end; ++target_x) { u_int8 *dest = target_data + target_x * Info->BytesPerPixel; memcpy(dest, src, Info->BytesPerPixel); } } // the next lines will be the same, so we just copy them for (u_int32 i = 1; i < new_scale; i++) { u_int8 *target_next_line = target_data + target_surf->pitch; memcpy (target_next_line, target_data, target_line_length); target_data = target_next_line; } // goto next line target_data += target_surf->pitch; } // scaling complete, now swap the underlying texture SDL_DestroyTexture(Surface); Surface = target; Info->Pixels = target_surf->pixels; scale_ = new_scale; unlock(); SDL_FreeSurface(target_surf); } surface& surface::operator = (const surface& src) { (drawable&) (*this) = (drawable&) src; alpha_channel_ = src.has_alpha_channel(); is_masked_ = src.is_masked(); alpha_ = src.alpha(); scale_ = src.scale(); if (Surface) SDL_DestroyTexture(Surface); if (!src.Surface) { Surface = NULL; } else { int l, h, pitch; void *src_pixels, *dst_pixels; SDL_QueryTexture(src.Surface, &Info->Format, NULL, &l, &h); Surface = SDL_CreateTexture (screen::get_renderer(), Info->Format, SDL_TEXTUREACCESS_STREAMING, l, h); if (!Surface) std::cout << "*** surface_sdl::operator=: " << SDL_GetError() << std::endl; SDL_LockTexture(src.Surface, NULL, &src_pixels, &pitch); SDL_LockTexture(Surface, NULL, &dst_pixels, &pitch); while (h-- > 0) { memcpy (dst_pixels, src_pixels, pitch); src_pixels = (u_int8*) src_pixels + pitch; dst_pixels = (u_int8*) dst_pixels + pitch; } SDL_UnlockTexture(Surface); } return *this; } // Protected methods void surface::resize (u_int16 l, u_int16 h) { if (l == length () && h == height ()) return; if (Surface) SDL_DestroyTexture(Surface); set_length (l); set_height (h); if (l == 0 || h == 0) { Surface = NULL; return; } // is screen surface initialized? if (screen::get_renderer()) { #ifdef __BIG_ENDIAN__ Info->Format = has_alpha_channel() ? SDL_PIXELFORMAT_ARGB8888 : SDL_PIXELFORMAT_RGB24; #else Info->Format = has_alpha_channel() ? SDL_PIXELFORMAT_ABGR8888 : SDL_PIXELFORMAT_BGR24; #endif Surface = SDL_CreateTexture (screen::get_renderer(), Info->Format, SDL_TEXTUREACCESS_STREAMING, l * scale(), h * scale()); if (!Surface) std::cout << "*** surface::resize: " << SDL_GetError() << std::endl; } else { Surface = NULL; std::cout << "*** surface:resize: screen surface not initialized!" << std::endl; exit(1); } } void surface::clear () { if (Surface) { SDL_DestroyTexture(Surface); Surface = NULL; set_length (0); set_height (0); set_alpha (255); is_masked_ = false; alpha_channel_ = false; } } void surface::set_data(void * data, u_int16 l, u_int16 h, u_int8 bytes_per_pixel, u_int32 red_mask, u_int32 green_mask, u_int32 blue_mask, u_int32 alpha_mask) { if (Surface) SDL_DestroyTexture(Surface); scale_ = 1; set_length(l); set_height(h); if (l == 0 || h == 0) { Surface = NULL; return; } alpha_channel_ = alpha_mask != 0; Info->Format = SDL_MasksToPixelFormatEnum (bytes_per_pixel * 8, red_mask, green_mask, blue_mask, alpha_mask); Surface = SDL_CreateTexture (screen::get_renderer(), Info->Format, SDL_TEXTUREACCESS_STREAMING, l, h); if (!Surface) std::cerr << "*** surface::set_data: " << SDL_GetError() << std::endl; lock(NULL); int pitch = bytes_per_pixel * l; void *src = data; while (h-- > 0) { memcpy (Info->Pixels, src, pitch); src = (u_int8*) src + pitch; Info->Pixels = (u_int8*) Info->Pixels + Info->Pitch; } unlock(); if (mask_changed_) { set_mask(true); } } void * surface::get_data (u_int8 bytes_per_pixel, u_int32 red_mask, u_int32 green_mask, u_int32 blue_mask, u_int32 alpha_mask) const { if (scale() != 1) { // always save images without scaling surface tmp; tmp = *this; tmp.set_scale(1); return tmp.get_data(bytes_per_pixel, red_mask, green_mask, blue_mask, alpha_mask); } lock(NULL); u_int32 dst_format = SDL_MasksToPixelFormatEnum(bytes_per_pixel*8, red_mask, green_mask, blue_mask, alpha_mask); void *dst_pixels = calloc (length() * height(), bytes_per_pixel); int dst_pitch = length() * bytes_per_pixel; if (dst_format != Info->Format) { SDL_ConvertPixels(length(), height(), Info->Format, Info->Pixels, Info->Pitch, dst_format, dst_pixels, dst_pitch); } else { u_int8 *dest = (u_int8*) dst_pixels; int h = height(); while (h-- > 0) { memcpy (dest, (u_int8*) Info->Pixels, Info->Pitch); Info->Pixels = (u_int8*) Info->Pixels + Info->Pitch; dest = dest + dst_pitch; } } return dst_pixels; } // Private methods void surface::setup_rects (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area * draw_to) const { if (draw_to) { drawing_area im_zone (x, y, sl, sh); im_zone.assign_drawing_area (draw_to); SDL_Rect da_int = im_zone.setup_rects (); dstrect.x = da_int.x; dstrect.y = da_int.y; dstrect.w = da_int.w; dstrect.h = da_int.h; srcrect = dstrect; srcrect.x = x < dstrect.x ? sx + dstrect.x - x : sx; srcrect.y = y < dstrect.y ? sy + dstrect.y - y : sy; } else { srcrect.x = sx; srcrect.y = sy; srcrect.w = sl; srcrect.h = sh; dstrect = srcrect; dstrect.x = x; dstrect.y = y; } } adonthell-0.3.8/src/py_adonthell.i0000664000175000017500000000610412756155255014060 00000000000000%module adonthell %feature("compactdefaultargs"); %{ #include #include "types.h" #include "time_event.h" #include "map_event.h" #include "event_list.h" #include "event_handler.h" #include "storage.h" #include "gametime.h" #include "gamedate.h" #include #include "input.h" #include "audio.h" #include "character_base.h" #include "quest.h" #include "drawing_area.h" #include "drawable.h" #include "surface.h" #include "screen.h" #include "image.h" #include "animation.h" #include "mapsquare_walkable.h" #include "mapsquare.h" #include "mapobject.h" #include "mapcharacter.h" #include "path.h" #include "landmap.h" #include "mapview.h" #include "character.h" #include "label_input.h" #include "win_types.h" #include "win_label.h" #include "win_image.h" #include "win_write.h" #include "win_mapview.h" #include "win_ttf.h" #include "win_theme.h" #include "win_base.h" #include "text_bubble.h" #include "win_container.h" #include "win_scroll.h" #include "win_select.h" #include "win_manager.h" #include "dialog_screen.h" #include "data_screen.h" #include "gamedata.h" #include "game.h" #include "nls.h" #include "achievements.h" // Workaround for keysym missing in older versions of SDL #ifndef SDLK_UNDO #define SDLK_UNDO 322 #endif // Workaround for bug in pyptrtypes.swg #define SWIG_append_msg SWIG_append_errmsg // This enum allows clearer ownership operation: // obj.thisown = Python (Python will destroy the object) // obj.thisown = C (C has to destroy the object) enum {Python = 1, C = 0}; // pass an instance to python PyObject *get_py_obj (void *instance, const char* class_name) { swig_type_info * ti = SWIG_TypeQuery (class_name); if (ti) return SWIG_NewPointerObj (instance, ti, C); else printf ("*** get_py_obj: Type '%s' not known to SWIG!\n", class_name); return NULL; } %} // Same enum available for Python enum {Python = 1, C = 0}; %include "std_string.i" %typemap (in) PyObject *pyfunc { if (!PyCallable_Check($input)) { PyErr_SetString (PyExc_TypeError, "Need a callable object!"); return NULL; } $1 = $input; } %typemap (in) PyObject* { $1 = $input; } #ifndef Sint32 #define Sint32 s_int32 #endif %include "types.h" %include "fileops.h" %include "event.h" %include "event_list.h" %include "time_event.h" %include "map_event.h" %include "event_handler.h" %include "storage.h" %include "gametime.h" %include "gamedate.h" %include "SDL_keycode.h" %include "input.h" %include "audio.h" %include "character_base.h" %include "py_object.h" %include "drawing_area.h" %include "quest.h" %include "drawable.h" %include "surface.h" %include "screen.h" %include "image.h" %include "animation.h" %include "mapsquare_walkable.h" %include "mapsquare.h" %include "mapobject.h" %include "mapcharacter.h" %include "path.h" %include "character.h" %include "landmap.h" %include "mapview.h" %include "adonthell.h" %include "win_types.h" %include "win_wrappers.h" %include "text_bubble.h" %include "dialog_screen.h" %include "data_screen.h" %include "gamedata.h" %include "game.h" %include "nls.h" %include "prefs.h" %include "achievements.h" adonthell-0.3.8/src/achievements.h0000644000175000017500000001277212756046721014053 00000000000000/* Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file achievements.h * * @author Kai Sterker * @brief Manages in-game achievements */ #ifndef ACHIEVEMENTS_H_ #define ACHIEVEMENTS_H_ #include "py_callback.h" #include "fileops.h" #include using namespace std; #ifndef SWIG /** * Data for a single achievement. This contains of a unique id, * the state that will unlock the achievement, whether the * achievement has already been unlocked and the state of the * achievement in the current game. */ class achievement_data { public: /** * Create a new achievement with the given id and the bitmask * that will eventually unlock it. * @param id the unique achievement id * @param expected the value that will unlock the achievement */ achievement_data(const u_int8 & id, const u_int32 & expected); virtual ~achievement_data(); /** * Get the unique id of the achievement * @return the unique id of the achievement */ u_int8 id() const { return _id; } /** * Set the nth bit of the given achievement to 1. * @param bit the index of the bit to set to 1 * @return \e true if the new achievement value matches the expected * bitmask to permanently unlock the achievement. \e False otherwise. */ bool update(const u_int8 & bit); /** * Check whether the achievement is permanently unlocked * @return \e true if the achievement is unlocked, \e false otherwise. */ bool is_unlocked() const { return _persistent == _expected; } friend class achievements; private: /// the unique id u_int8 _id; /// expected value to unlock this achievement u_int32 _expected; /// value of the achievement for the current game u_int32 _current; /// value of the achievement for all games u_int32 _persistent; }; #endif /** * Class that keeps track of all available achievements, * their permanent unlocked state and state in the current game. */ class achievements { public: /** * Create a new achievement with the given id and the bitmask * that will eventually unlock it. If an achievement with the * given id already exists, it will be updated. * * Note that ids 0 and 255 are reserved. * * @param achievement the unique achievement id * @param bitmask the value that will unlock the achievement * * @return \e true on success, \e false otherwise */ static bool create(const u_int8 & achievement, const u_int32 & bitmask); /** * Set the nth bit of the given achievement to 1. * If the current value of the achievement afterwards matches * the bitmask given when creating the achievement, the achievement * will be unlocked permanently (only once). * * @param achievement the unique achievement id * @param bit the index of the bit to set to 1. */ static void update(const u_int8 & achievement, const u_int8 & bit); /** * Return the total number of available achievements. * @returns the number of achievements. */ static int num_achievements() { return _achievements.size(); } /** * Returns how many achievements have been permanently unlocked. * @returns the number of unlocked achievements. */ static int num_unlocked (); /** * Checks whether the achievement at the given index is unlocked. * @param index a number between 0 and num_achievements * @return \e true if the achievement has been unlocked, \e false if not. */ static bool is_unlocked (const u_int32 & index); /** * Get the achievement id at the given index. * @param index a number between 0 and num_achievements * @return the id of the achievement stored at the given index. */ static u_int8 achievement_id(const u_int32 & index); /** * Allow to connect a python callback to get notified when a new * achievement was unlocked. Callback will receive the achievement id * along with any additional arguments given when connecting the callback * * @param pyfunc the callback to register * @param args the optional arguments to use when executing the callback */ static void py_signal_connect (PyObject *pyfunc, PyObject *args = NULL); #ifndef SWIG /** * Load achievement data from stream. * @param file the stream to read data from. * @return \e true on success, \e false otherwise. */ static bool get_state (igzstream& file); /** * Save achievement data to stream. * @param file the stream to write data to. */ static void put_state (ogzstream& file); /** * Initialize achievements by loading all available * achievements and their permanent unlocked status. */ static void init(); /** * Write permanent unlock status of available achievements. */ static void make_persistent(); #endif private: achievements(); virtual ~achievements(); #ifndef SWIG /// a callback executed when an achievement gets unlocked static py_callback *_callback; /// list of available achievements static vector _achievements; #endif }; #endif adonthell-0.3.8/src/event_list.cc0000644000175000017500000000750512756050014013676 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event_list.cc * @author Kai Sterker * * @brief Implements the event_list class. * */ #include #include "event_list.h" #include "event_handler.h" // Array with callbacks to return a newly instanciated event new_event event_list::instanciate_event[MAX_EVENTS]; // constructor event_list::event_list () { Paused = false; } // destructor event_list::~event_list () { clear (); } // Unregisters and deletes all events. void event_list::clear () { event *ev; while (!Events.empty ()) { ev = Events.back (); ev->set_list (NULL); Events.pop_back (); delete ev; } } // Adds an event to the list and register it with the event_handler. void event_list::add_event (event* ev) { ev->set_list (this); Events.push_back (ev); // if the event list is paused, also pause new events if (Paused) ev->pause (); // only register event if not paused else if (!ev->is_paused ()) event_handler::register_event (ev); } // Remove an event from the list void event_list::remove_event (event *ev) { vector::iterator i; // Search for the event we want to remove i = find (Events.begin (), Events.end (), ev); // found? -> get rid of it :) if (i != Events.end ()) Events.erase (i); } // retrieve event by its id event *event_list::get_event (const string & id) { vector::iterator i; for (i = Events.begin (); i != Events.end (); i++) if ((*i)->id () == id) return *i; return NULL; } // disable all events in the list void event_list::pause () { Paused = true; for (vector::iterator i = Events.begin (); i != Events.end (); i++) (*i)->pause (); } // enable all events in the list void event_list::resume () { Paused = false; for (vector::iterator i = Events.begin (); i != Events.end (); i++) (*i)->resume (); } // Register an event for loading void event_list::register_event (u_int8 type, new_event e) { if (type < MAX_EVENTS) instanciate_event[type] = e; } // Save an event_list to file void event_list::put_state (ogzstream& out) const { std::vector ::iterator i; u_int32 nbr_events = Events.size (); nbr_events >> out; for (i = Events.begin (); i != Events.end (); i++) (*i)->put_state (out); } // Loads an event_list from file bool event_list::get_state (igzstream& in) { u_int32 nbr_events; u_int8 type; event *ev; nbr_events << in; while (nbr_events--) { ev = NULL; type << in; // Instanciate an event of the given type if (type < MAX_EVENTS && instanciate_event[type] != NULL) ev = instanciate_event[type](); // try to load it, ... if (ev != NULL && ev->get_state (in)) add_event (ev); // ... otherwise fail. else { fprintf (stderr, "Could not load event #%i. Aborting ...\n", type); return false; } } return true; } adonthell-0.3.8/src/dialog.cc0000644000175000017500000002474512756050014012766 00000000000000/* (C) Copyright 2000/2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file dialog.cc * @author Kai Sterker * * @brief Declares the dialog class. * * */ #include #include #include #include "character.h" #include "dialog.h" #include "nls.h" #include "yarg.h" // Constructor dialog::dialog (character_base *npc) { npc_portrait_= npc->get_portrait (); npc_name_ = npc->get_name (); npc_color_ = npc->get_color (); } // Destructor dialog::~dialog () { clear (); } // Prepare the dialogue for execution bool dialog::init (string fpath, string name, PyObject *args) { // Load and instanciate the dialogue object if (!dialogue.create_instance (fpath, name, args)) return false; // Remaining setup tasks if (!setup ()) return false; return true; } // Misc. initialisation bool dialog::setup () { PyObject *list, *s; u_int32 i, size; // Get the text that may loop list = dialogue.get_attribute ("loop"); if (list && PyList_Check (list)) { size = PyList_Size (list); for (i = 0; i < size; i++) { s = PyList_GetItem (list, i); if (s && PyInt_Check (s)) loop.push_back (PyInt_AsLong (s)); } Py_DECREF (list); } // Extract the dialogue's strings list = dialogue.get_attribute ("text"); if (list && PyList_Check (list)) { size = PyList_Size (list); strings.resize(size); for (i = 1; i < size; i++) { s = PyList_GetItem (list, i); if (s && PyString_Check (s)) strings[i] = python::as_string (s); else strings[i] = "*** Error"; } Py_DECREF (list); } else return false; // Init the first answer answers.push_back (0); return true; } // Reload a dialogue script that has changed on disk bool dialog::reload (string fpath, string name, PyObject *args) { // Load and instanciate the dialogue object if (!dialogue.reload_instance (fpath, name, args)) return false; // Remaining setup tasks if (!setup ()) return false; return true; } // Clean up void dialog::clear () { strings.clear(); } // iterate over the dialogue text string dialog::text () { if (i_text == text_.end ()) { i_text = text_.begin (); return ""; } return *i_text++; } // Gets the index of either the player or npc array void dialog::run (u_int32 index) { PyObject *arg, *result, *speaker, *speech; s_int32 s, answer = answers[index]; u_int32 stop, size; // empty previous dialogue text text_.clear (); answers.clear (); // end of dialogue if (answer == -1) return; // Mark the Player text as used unless loops allowed if (find (loop.begin (), loop.end (), answer) == loop.end ()) used.push_back (answer); do { // Execute the next part of the dialogue arg = Py_BuildValue ("(i)", answer); // run next part of dialogue dialogue.run (arg); #ifdef PY_DEBUG python::show_traceback (); #endif Py_XDECREF (arg); // Now fill in the NPC's and Player's responses: // 1. Get the neccesary attributes of the dialogue class speaker = dialogue.get_attribute ("speaker"); speech = dialogue.get_attribute ("speech"); // 2. Search the NPC part for used text for (int i = 0; i < PyList_Size (speech); i++) { s = PyInt_AsLong (PyList_GetItem (speech, i)); // Remove text that was already used and isn't allowed to loop if (find (used.begin (), used.end (), s) != used.end ()) { PySequence_DelItem (speaker, i); PySequence_DelItem (speech, i--); } } // check if some text is left at all size = PyList_Size (speech); if (size == 0) { i_text = text_.begin (); return; } // prepare the random number generator yarg::range (0, size - 1); // check type of speaker if (PyList_GetItem (speaker, 0) != Py_None) { // got NPC text, so let the engine decide int rnd = yarg::get (); // get the text answer = PyInt_AsLong (PyList_GetItem (speech, rnd)); text_.push_back (scan_string (nls::translate (strings[answer]))); // get the NPC color, portrait and name string npc = python::as_string (PyList_GetItem (speaker, rnd)); if (!npc.empty()) { if (npc == "Narrator") npc_color_ = 0; else { // set color and portrait of the NPC character_base *mychar = data::characters[npc]; npc_color_ = mychar->get_color (); npc_portrait_ = mychar->get_portrait (); npc_name_ = npc; } } // check whether we shall continue or not arg = Py_BuildValue ("(i)", answer); result = dialogue.call_method_ret ("stop", arg); stop = PyInt_AsLong (result); Py_XDECREF (result); Py_XDECREF (arg); // Mark the NPC text as used unless loops allowed if (find (loop.begin (), loop.end (), answer) == loop.end ()) used.push_back (answer); answers.push_back (answer); } else { // got Player text, so let the player decide for (u_int32 i = 0; i < size; i++) { // simply add all text to let the player select an answer answer = PyInt_AsLong (PyList_GetItem (speech, i)); text_.push_back (scan_string (nls::translate (strings[answer]))); answers.push_back (answer); } // let the player make his decision stop = true; } // cleanup Py_XDECREF (speaker); Py_XDECREF (speech); } while (!stop); // init the iterator for dialogue text retrieval i_text = text_.begin (); } // execute embedded functions and replace shortcuts // yeah, the c string library hurts, but at least it's fast ;) string dialog::scan_string (const string & s) { u_int32 begin, end, len; PyObject *result; const char *start; char *tmp, *mid, *str = NULL; character *the_player = data::the_player; string newstr (s); // replace $... shortcuts while (1) { // check wether the string contains shortcut code at all start = strchr (newstr.c_str (), '$'); if (start == NULL) break; // replace "$name" if (strncmp (start, "$name", 5) == 0) { begin = newstr.length () - strlen (start); string t (newstr, 0, begin); t += the_player->get_name (); t += (start+5); newstr = t; continue; } // replace "$fm" if (strncmp (start, "$fm", 3) == 0) { // extract the "$fm{.../...} part end = strcspn (start, "}"); str = new char[end]; str[end-1] = 0; strncpy (str, start+3, end); if (the_player->storage::get_val ("gender") == FEMALE) mid = get_substr (str, "{", "/"); else mid = get_substr (str, "/", "}"); begin = newstr.length () - strlen(start); tmp = new char[newstr.length () - end + strlen (mid)]; strncpy (tmp, newstr.c_str (), begin); tmp[begin] = 0; strcat (tmp, mid); strcat (tmp, start+end+1); delete[] str; delete[] mid; newstr = tmp; continue; } // Error! cout << "\n*** Error, unknown macro " << start << flush; newstr[newstr.length () - strlen (start)] = ' '; } // execute python functions string repl; while (1) { // check whether the string contains python code at all start = strchr (newstr.c_str (), '{'); if (start == NULL) break; end = strcspn (start, "}"); repl = ""; str = new char[end]; str[end-1] = 0; // extract the code without the brackets strncpy (str, start+1, end-1); // run the string result = PyObject_CallMethod (dialogue.get_instance (false), str, NULL); if (result) { if (PyString_Check (result)) repl = string(nls::translate (python::as_string(result))); } #ifdef PY_DEBUG else { python::show_traceback(); } #endif // Replace existing with new, changed string // 1. Calculate string's length len = newstr.length (); begin = len - strlen (start); tmp = new char[(repl.length()) + len - strlen(str)]; // 2. Merge prefix, resulting string and postfix into new string strncpy (tmp, newstr.c_str (), begin); tmp[begin] = 0; if (!repl.empty()) strcat (tmp, repl.c_str()); strcat (tmp, start+end+1); // 3. Exchange strings newstr = tmp; // Cleanup Py_XDECREF (result); delete[] str; delete[] tmp; } return newstr; } char *dialog::get_substr (const char* string, const char* begin, const char* end) { u_int32 b, e; b = strcspn (string, begin) + 1; e = strcspn (string, end) - b; char *result = new char[e+1]; strncpy (result, string+b, e); result[e] = 0; return result; } adonthell-0.3.8/src/animation.h0000644000175000017500000003702512756047042013352 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot. Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file animation.h * @author Alexandre Courbot * * @brief Declares the animationframe and animation classes. * */ #ifndef _ANIMATION_H #define _ANIMATION_H #include "image.h" #include /** * Handles images properties in an animation. * %Objects of this class have no reason to exist if not affected to an * animation. The fact is, that often in an animation, you want the * same image to appear at different times, different positions or with * different mask and alpha values. An animationframe is a class that * contains the index of the image to display, the alpha and mask parameters * to give it, the time (in game cycles) it should be displayed before going * to the next frame, and the index and the frame to display right after * this one. As images and animationframes are arranged into an indexed array * in an animation, the index values only make sense from the animation point * of view. * */ class animationframe { public: /** * Default constructor. * */ animationframe (); /** * Destructor. * */ ~animationframe (); /** * Resets an animationframe to it's initial (i.e post-constructor) state. * */ void clear (); /** * @name Mask and Alpha Settings. * */ //@{ /** * Returns whether this frame is masked or not. * * * @return true if the surface is masked, false otherwise. */ bool is_masked () const { return is_masked_; } /** * Sets the mask parameter of this frame. * * @param mask true if the surface should be masked, false otherwise. */ void set_mask (bool mask) { is_masked_ = mask; } /** * Returns the alpha value the this frame. * * * @return the alpha value of the frame. */ u_int8 alpha () const { return alpha_; } /** * Sets the alpha value for this frame. * * @param a new alpha value. */ void set_alpha (u_int8 a) { alpha_ = a; } //@} /** * @name Image, delay and next frame settings. * */ //@{ /** * Returns the image number this frame points to. * * * @return the index of the image this frame points to. */ u_int16 image_nbr () const { return imagenbr; } /** * Sets the image this frame should point to. * * @param imnbr the index of the image this frame should point to. */ void set_image_nbr (u_int16 imnbr) { imagenbr = imnbr; } /** * Returns the duration of this frame. * * * @return the delay (in game cycles) of this frame (0 means infinite). */ u_int16 delay () const { return delay_; } /** * Sets the duration of this frame. * * @param d new delay (in game cycles, 0 means infinite). */ void set_delay (u_int16 d) { delay_ = d; } /** * Returns the index of the frame that will be displayed once * the delay of this one expired. * * * @return the index of the frame next to this one. */ u_int16 nextframe () const { return nextframe_; } /** * Sets the index of the frame that will be displayed right after * this one. * * @param nf index of the frame that will be next to this one. */ void set_nextframe (u_int16 nf) { nextframe_ = nf; } //@} /** * @name Individual frames relative position. * */ //@{ /** * Returns the X offset (i.e position relative to the animation's position) * of this frame. * * * @return the X offset of this frame. */ u_int16 offx () const { return gapx; } /** * Returns the Y offset (i.e position relative to the animation's position) * of this frame. * * * @return the Y offset of this frame. */ u_int16 offy () const { return gapy; } /** * Sets the offset for this frame. * * @param ox new X offset. * @param ox new Y offset. */ void set_offset (u_int16 ox, u_int16 oy) { gapx = ox; gapy = oy; } //@} /** * @name Saving/Loading Methods. * */ //@{ /** * Loads an animationframe from an opened file. * * @param file the opened file from which to read. * * @return 0 in case of success, error number in case of error. */ s_int8 get (igzstream& file); /** * Saves an animationframe into an opened file. * * @param file the opened file where to save. * * @return 0 in case of success, error number in case of error. */ s_int8 put (ogzstream& file) const; //@} private: u_int16 imagenbr; bool is_masked_; u_int8 alpha_; s_int16 gapx; s_int16 gapy; u_int16 delay_; u_int16 nextframe_; }; /** * Whether the animation is currently playing or not. */ typedef enum { PLAY = true, STOP = false } play_state; /** * Class that handles animated elements, their update and their playback. * Most often, you will want your drawn %objects to be animated. Then you'll * probably want to use this class. An animation contains: * - A set of images arranged in an indexed array. * - A set of animation_frames. * - A global position offset. * * During playback, the animation look at the first animation_frame. Each * animation_frame refers to an image of the animation, and give it special * mask and alpha parameters, as well as a position offset. It also have * a delay parameter, telling how many %game cycles this frame should stay. * Once the delay expired, the animation jumps to the next frame, which * is pointed by the current frame. That way, you can easily performs loops or * others effects. Each image, as well as each animation_frame, can be accessed * individually, thought you'd better try to avoid as much as possible to mess * with that. * */ class animation : public drawable { public: /** * Default constructor. * */ animation (); /** * Destructor. * */ ~animation (); /** * Clears an animation, that is put it back into the original * (constructor) state. * */ void clear (); /** * @name Playback control methods. * */ //@{ /** * Starts the playback of the animation. * */ void play () { play_flag = PLAY; #ifdef _EDIT_ if (in_editor) must_upt_label_status = true; #endif } /** * Stops the playback of the animation. * */ void stop () { play_flag = STOP; #ifdef _EDIT_ if (in_editor) must_upt_label_status = true; #endif } /** * Returns whether the animation is currently being played. * * * @return PLAY is the animation is currently playing, STOP otherwise. */ play_state playstate () const { return play_flag; } /** * Rewinds the animation to it's beginning. * */ void rewind () { currentframe_ = 0; speedcounter = 0; } /** * Directly jumps to the next frame. * */ void next_frame (); //@} /** * @name State updating Methods. * */ //@{ /** * Updates the animation state. * */ bool update (); //@} /** * @name Drawing Methods. * */ //@{ void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const; //@} /** * @name Saving/Loading Methods. * @note There is no way to save animations with this class. * */ //@{ /** * Loads an animation from an opened file. * @param file the opened file from which to load. * @return 0 in case of success, error code otherwise. * * @todo length and height are loaded while they are calculated later. * Remove this when format will change. * */ s_int8 get (igzstream& file); /** * Loads an animation from it's filename. * * @param fname the name of the file to load. * * @return 0 in case of success, error code otherwise. */ s_int8 load (string fname); /** Saves an animation into an opened file, in %game format, with * alpha and mask values. * @warning as the animation which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving animations with full * truecolor quality, use animation_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save () */ s_int8 put (ogzstream& file) const; /** Saves an animation into an file, in %game format, with * alpha and mask values. * @warning as the animation which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving animations with full * truecolor quality, use animation_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put () */ s_int8 save (string fname) const; //@} /** * @name Global animation properties Methods. * */ //@{ /** * Returns the number of frames in this animation. * * * @return the number of frames in this animation. */ u_int16 nbr_of_frames () const { return frame.size (); } /** * Returns the number of images in this animation. * * * @return the number of images in this animation. */ u_int16 nbr_of_images () const { return t_frame.size (); } /** * Returns the index of the currently displayed frame. * * * @return the index of the frame currently displayed. */ u_int16 currentframe () const { return currentframe_; } /** * Sets the current frame. * * @param framenbr the index of the frame to display now. */ void set_currentframe (u_int16 framenbr) { currentframe_ = framenbr; speedcounter = 0; } /** * Returns the global X offset of the animation. * * * @return the global X offset of the animation. */ s_int16 xoffset () const { return xoffset_; } /** * Returns the global Y offset of the animation. * * * @return the global Y offset of the animation. */ s_int16 yoffset () const { return yoffset_; } /** * Set the global offsets of this animation. * * @param x new X global offset. * @param y new Y global offset. */ void set_offset (s_int16 x, s_int16 y) { xoffset_ = x; yoffset_ = y; } //@} /** * @name Image and Animationframe control Methods. * */ //@{ /** * Returns a pointer to a desired frame. * * @param nbr the index of the frame to get. * * @return pointer to the nbr frame. */ animationframe *get_frame (u_int16 nbr) { return &(frame[nbr]); } /** * Returns a pointer to a desired image. * * @param nbr the index of the image to get. * * @return pointer to the nbr image. */ image *get_image (u_int16 nbr) { return t_frame[nbr]; } /** * Inserts an image at a given position of the image array. * All the frames will be updated so the operation doesn't affect * the animation in any way. * * The animation will be responsible for freeing the inserted image. * * @param im pointer to the image to add. * @param pos index where to add the image. * * @return 0 in case of success, error code otherwise. */ s_int8 insert_image (const image * im, u_int16 pos); /** * Inserts a frame at a given position of the animationframe array. * All the frames will be updated so the operation doesn't affect * the animation in any way. * * @param af the animationframe to add. * @param pos index where to add the frame. * * @return 0 in case of success, error code otherwise. */ s_int8 insert_frame (const animationframe af, u_int16 pos); /** * Removes an image at a given position. * The image itself will also be deleted (). * All the frames will be updated so the operation doesn't affect * the animation in any way. * * @param pos The index of the image to remove. * * @return 0 in case of success, error code otherwise. */ s_int8 delete_image (u_int16 pos); /** * Removes a frame at a given position. * All the frames will be updated so the operation doesn't affect * the animation in any way. * * @param pos The index of the animationframe to remove. * * @return 0 in case of success, error code otherwise. */ s_int8 delete_frame (u_int16 pos); //@} /** * @name Special FX methods. * */ //@{ /** * Zooms an animation. * * @param sx Desired X size. * @param sy Desired Y size. * @param src Source animation to zoom. */ void zoom (u_int16 sx, u_int16 sy, const animation * src); //@} #ifndef SWIG /** * Animation copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ animation& operator = (const animation& src); #endif /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const animation& src) { *this = src; } private: /** * Forbid value passing. */ animation(const animation& src); /** * Calculate the real dimensions of the animation, depending * of it's frames and images. * */ void calculate_dimensions (); mutable vector t_frame; mutable vector frame; u_int16 currentframe_; u_int16 speedcounter; play_state play_flag; s_int16 xoffset_, yoffset_; #ifndef SWIG friend class win_anim; #endif }; #endif adonthell-0.3.8/src/label_input.h0000644000175000017500000000227612756050643013672 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef LABEL_INPUT_H_ #define LABEL_INPUT_H_ #include "label.h" class label_input : public label { public: /** Constructor Initialize to : cursor_moveable, cursor_visible and editable */ label_input (); virtual ~label_input (); /** Set the label input in editable */ void set_editable (const bool); /** Input update */ bool input_update(); protected: bool editable_; }; #endif adonthell-0.3.8/src/gametime.h0000644000175000017500000001053612756050220013151 00000000000000/* Copyright (C) 2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gametime.h * * @author Kai Sterker * @brief Declares the gametime class. */ #ifndef GAMETIME_H_ #define GAMETIME_H_ #include "types.h" /** * Length of a %game cycle, in milliseconds. Decrease it to speed up * the %game, increase it to slow the %game down. This constant * defines how often the state of the game world is updated. * A cycle length of 13 means 1000/13 = 76.9 updates per second. */ #define CYCLE_LENGTH 13 /** * Number of maximum displayed frames per second. This value affects * the renderer only, not the speed of the game itself. Limiting the * frame rate prevents Adonthell from using all the CPU of the * machine it runs on (as long as the machine is fast enough). */ #define FRAME_RATE 50 /** * Defines the maximum number of frames to skip in order to keep the %game's * speed constant on slow machines. If updating the %game state and * drawing everything on %screen takes longer than CYCLE_LENGTH, we * skip frames so that the correct number of updates can be performed, * thus keeping the speed constant. However, we can't skip too many * frames, since that would result in jerky animations and eventually * render the %game unplayable. */ #define FTS_LIMIT 20 /** * Tehe %gametime class makes the speed of the %game independent of * the machine it runs on. This is achieved by keeping the number of * updates to the %game state constant, no matter how fast or slow * the machine. This won't work for very slow machines of course, * but Adonthell will still be playable on a 100 Ghz CPU. */ class gametime { public: /** * Initialize the gametime class. * * @param rt_minutes Defines how many real life minutes make one * gametime day. */ static void init (u_int16 rt_minutes); /** * Return the in-game time that passed since the last call to * this method. * * @return %gametime in minutes. */ static double minute () { return Minute; } /** * */ static void start_action () { fts = 0; running = true; } /** * */ static void stop_action () { running = false; } /** * @name Methods to sync the %game speed to the machine it runs on */ //@{ /** * Returns the number of updates to perform before drawing * the next frame. That is, it returns the number of frames to skip. * If the box Adonthell runs on is sufficiently fast, this number * will be 0. On slower machines, it can be as high as FTS_LIMIT. * * @return number of updates to perform before drawing a frame. * @see FTS_LIMIT */ static u_int8 frames_to_skip () { return fts; } /** * Call this after each run of the main loop to sync the %game's * speed to the machine it is running on. On faster machines it * delays the execution and for slower boxes it calculates the * number of frames to skip. If the engine should do 50 frames per * second, for example, but the main loop takes 26ms to perform, * every second frame will be skipped to keep the %game' speed * constant. * It also updates the internal clock. * * @see frames_to_skip () */ static void update (); //@} private: #ifndef SWIG // One minute of gametime in game cycles static double Minute; static bool running; // Frames to skip. static u_int8 fts; // Timers used to calculate the delay between 2 update() calls. static u_int32 timer1, timer2; #endif // SWIG }; #endif // GAMETIME_H_ adonthell-0.3.8/src/yarg.cc0000644000175000017500000000455512756053331012473 00000000000000/* (C) Copyright 1998/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file yarg.cc * @author Kai Sterker * * @brief Yet Another Random Number Genarator. * * */ #include #include "yarg.h" unsigned char yarg::schieberegister[16];// Here the random numbers are created int yarg::min; // Smallest possible numbe int yarg::max; // Largest possible number // Init the generator with a seed and a range void yarg::init (std::string str, int mn, int mx) { int s = str.length (); for (int i = 0; i < 16; i++) schieberegister[i] = str[i%s]; range (mn, mx); } // change the range of the generator void yarg::range (int mn, int mx) { min = (mx < mn ? mx : mn); max = (mn > mx ? mn : mx); } // Apply the time to get a bit extra variation void yarg::randomize () { long int clk = clock (); int s = sizeof (clk); for (int i = 0; i < 16; i++) schieberegister[i] = schieberegister[i]^(clk >> (8+i)%s); } // Retrieve the next/nth random number int yarg::get (int steps) { for (int i = 0; i < steps; i++) folgezustand(); return zufallszahl(); } // Here the dice get rolled void yarg::folgezustand () { unsigned char tmp = schieberegister[0]; for (int i = 0; i < 15; i++) { if (i%3 == 0) schieberegister[i] = schieberegister[i+1]^tmp; else schieberegister[i] = schieberegister[i+1]; } schieberegister[15] = tmp; } // Here we generate the actual random number int yarg::zufallszahl () { unsigned int zahl = 0; for (int i = 0; i < 16; i++) zahl += schieberegister[i] << (i*8)%(sizeof(zahl)*8); zahl = zahl >> 1; return (zahl%(max - min + 1)) + min; } adonthell-0.3.8/src/win_manager.h0000644000175000017500000001432612756053037013662 00000000000000/* (C) Copyright 2000/2001/2004 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file win_manager.h * * @author Joel Vennin * @brief Declares the win_manager class. */ #ifndef _WIN_MANAGER_ #define _WIN_MANAGER_ #include "str_hash.h" #include "win_theme.h" #include "win_ttf.h" #ifndef SWIG using namespace std; #endif /** * The window manager takes care of basic GUI functions, such as * %input focus, window state updates and displaying everything in * the right order. * It also provides centralised access to fonts and themes, so * that they can be used by different windows without having to * load them multiple times. * For something to appear on screen, it has to be passes to the * window manager. * * Before the window manager can be used, adonthell::main() has * to be called. This instanciates a window manager object and * makes it available to other classes via the static * win_manager::active pointer. All windows added to that instance * have access to the input focus, although only one window can * own it at any given time. * * Another call to adonthell::main() will create a new window * manager instance that grabs the input focus. As long as it * is in existance, none of the parent windows are updated, nor may * they recieve the focus. A call to adonthell::main_quit() will * delete the topmost window manager and return focus to the underlying * windows. * * That way it is possible to create a hierarchie of windows, where * where only windows on the same level may share the input focus, * but only those on the highest level receive input. */ class win_manager { public: /** * Standard constructor */ win_manager (); /** * Destructor */ ~win_manager (); /** * @name Window handling methods * */ //@{ /** * Add a window to the window manager. * * @param wnd The window to be added */ void add (win_base *wnd); // static bool exist (win_base *); /** * Remove a window from the window manager. The * window is erased from the window list, but not deleted. * If it had the %input focus, it is passed on to the topmost * window, i.e. the last one in the window list (if such a * window exists). * * @param wnd The window to be removed */ void remove (win_base *wnd); /** * Update the state of all top level windows. Calls the * %update() method of all windows in the window list. If * that method returns 0, it will be removed from the window * list and deleted. */ void update (); /** * Checks for user input. Calls the %input_update() method of * the window that has the %input focus. * * @sa set_focus () */ void input_update (); /** * Draws all windows. If the window hierarchie consists * of multiple levels, the lowest windows are drawn first. Within * each level, windows are drawn in the order they appear in the * window list. */ void draw (); /** * Gives the input focus to wnd. Only one window can have the * focus at a time, so focus will be removed from the window * that had it so far. Only the window with the focus will * receive user input. * * @sa input_update () */ void set_focus (win_base *wnd); /** * Closes and deletes all windows of the current level. */ void destroy (); #ifndef SWIG /** * Pointer to the active, i.e. topmost window manager. */ static win_manager *active; #endif /** * Use this method to get the active manger from Python */ static win_manager *get_active () { return active; } //@} /** * @name Theme and font related methods * */ //@{ /** * Empty for now */ static void init (const string & font); /** * Delete all themes and fonts currently loaded. */ static void cleanup (); /** * Load a theme from disk. * * @param name The name of the theme to load. */ static void add_theme (string name); /** * Delete a theme. * * @param name The name of the theme to delete. * @return * @li true in case of success. * @li false in case of error. */ static bool remove_theme (string name); /** * Returns a pointer to a theme. Loads the theme from disk * if it isn't in memory yet. * * @param name The name of the theme to get. * @return Pointer to the theme. */ static win_theme *get_theme (string name); /** * Load a font from disk. * * @param name The name of the font to load. */ static void add_font (string name); /** * Delete a font. * * @param name The name of the font to delete. * @return * @li true in case of success. * @li false in case of error. */ static bool remove_font (string name); /** * Returns a pointer to a font. Loads the font from disk * if it isn't in memory yet. * * @param name The name of the font to get. * @return Pointer to the font. */ static win_font *get_font (string name); //@} private: #ifndef SWIG static hash_map theme; static hash_map font; list wnd_list; list::iterator current; win_base *wnd_focus; win_manager *prev; static string font_file; #endif // SWIG }; #endif adonthell-0.3.8/src/event.cc0000644000175000017500000001253012756050014012635 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event.cc * @author Kai Sterker * * @brief Defines the base event class. */ #include "event.h" #include "event_handler.h" // constructor event::event () { Action = ACTION_NOTHING; Registered = false; Paused = false; Repeat = -1; Script = NULL; PyFunc = NULL; Args = NULL; List = NULL; Id = ""; } // destructor event::~event () { // automatically remove myself from the event_handler if (Registered) event_handler::remove_event (this); // ... and from the event_list if (List) List->remove_event (this); clear (); } // cleanup void event::clear () { switch (Action) { // script attached case ACTION_SCRIPT: { delete Script; Py_XDECREF (Args); Args = NULL; Script = NULL; break; } // python callback attached case ACTION_PYFUNC: { delete PyFunc; PyFunc = NULL; break; } default: break; } Action = ACTION_NOTHING; } // set a script as event's action void event::set_script (std::string filename, PyObject * args) { // cleanup clear (); if (filename == "") return; Py_XINCREF (args); Args = args; u_int16 argssize = args == NULL ? 1 : PyTuple_Size (args) + 1; PyObject *theargs = PyTuple_New (argssize); // We can pass_instance directly 'cause PyTuple_SetItem steals a // reference to the result of pass_instance. PyTuple_SetItem (theargs, 0, python::pass_instance (this, "event")); for (u_int16 i = 1; i < argssize; i++) { PyObject *intref = PyTuple_GetItem (args, i - 1); Py_INCREF (intref); PyTuple_SetItem (theargs, i, intref); } Script = new py_object; Script->create_instance (EVENTS_DIR + filename, filename, theargs); Py_DECREF (theargs); Action = ACTION_SCRIPT; } // set a python callback as event's action void event::set_callback (PyObject *callback, PyObject *args) { // cleanup clear (); // create the callback PyFunc = new py_callback (callback, args); // tell the event what to do Action = ACTION_PYFUNC; } // set a C/C++ callback as event's action void event::set_callback (const Functor0 & callback) { // cleanup clear (); Callback = callback; Action = ACTION_CPPFUNC; } // save the state of the script associated with the event void event::put_state (ogzstream & file) const { Type >> file; // Id >> file; Repeat >> file; Paused >> file; Action >> file; switch (Action) { // save script case ACTION_SCRIPT: { Script->class_name () >> file; if (Args) { true >> file; python::put_tuple (Args, file); } else false >> file; return; } // save python callback case ACTION_PYFUNC: { PyFunc->put_state (file); return; } default: return; } } // load the state of the script associated with the event bool event::get_state (igzstream & file) { // Note that �Type� is already read by event_list::load to // determine what event subclass to instanciate // Id << file; Repeat << file; Paused << file; Action << file; switch (Action) { // load script from file case ACTION_SCRIPT: { std::string name; bool has_args; PyObject * args = NULL; name << file; has_args << file; if (has_args) args = python::get_tuple (file); set_script (name, args); Py_XDECREF (args); return true; } // load python callback from file case ACTION_PYFUNC: { PyFunc = new py_callback; return PyFunc->get_state (file); } default: return true; } return false; } // the event_list this event is kept in void event::set_list (event_list *l) { List = l; } // disable the event temporarily void event::pause () { event_handler::remove_event (this); Paused = true; } // resume a disabled event void event::resume () { event_handler::register_event (this); Paused = false; } // repeat an event s_int32 event::do_repeat () { if (Repeat > 0) Repeat--; return Repeat; } adonthell-0.3.8/src/prefs.cc0000644000175000017500000002751012765562132012650 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file prefs.cc * * @author Kai Sterker * @brief Adonthell's configuration */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "prefs.h" #include "python_class.h" #include "game.h" config::config () { // set some default values where possible screen_mode = 0; // Letterbox display = 0; // Display for fullscreen mode quick_load = 0; // Quick-load disabled audio_channels = 1; // Stereo audio_resolution = 1; // 16 bit audio_sample_rate = 2; // 11025, 22050 or 44100 Hz audio_volume = 35; // 0 - 100% language = ""; // Let the user's environment decide font = ""; // use default font // set OS specific directory containing the adonthellrc file adonthellrc = game::get_system_dir(CONFIG); } /** * Displays the help message - for internal use only. * */ void print_help_message (char * argv[]) { cout << "Usage: " << argv[0] << " [OPTIONS] GAME" << endl; cout << endl; cout << "Where [OPTIONS] can be:\n"; cout << "-h print this help message" << endl; cout << "-d print the data directory and exit" << endl; cout << "-v print version and exit" << endl; cout << "-l list installed games and exit" << endl; cout << "-g dir play the game contained in dir (for development only)" << endl; cout << "-c byte-compile all Python scripts in this directory (for " << endl; cout << " development only)" << endl; } /** * Displays the available games - for internal use only. * */ void print_available_games () { struct dirent * d; DIR * mydir = opendir ((game::global_data_dir() + "/games").c_str()); bool nogames = true; if (!mydir) { cerr << "Cannot open directory " << game::global_data_dir() + "/games!" << endl; exit (1); } while ((d = readdir (mydir)) != NULL) { string s (d->d_name); if (s != "." && s != "..") { if (nogames) { nogames = false; cout << "Installed games (Suitable for the GAME parameter):\n"; } cout << " - " << d->d_name << endl; } } if (nogames) cout << "No games available.\n"; closedir (mydir); } void config::parse_arguments (int argc, char * argv[]) { int c; // Check for options while (1) { c = getopt (argc, argv, "lcdhvg:"); if (c == -1) break; switch (c) { case 'l': print_available_games (); exit (0); break; case 'd': cout << game::global_data_dir() << endl; exit (0); break; case 'v': cout << VERSION << endl; exit (0); break; case 'c': { python::init (); #if PY_VERSION_HEX < 0x03020000 python::exec_string ("import compileall; compileall.compile_dir (\".\", 0);"); #else // starting with Python 3.2, .pyc files end up in the __pycache__ directory unless // legacy=True parameter is used. See https://www.python.org/dev/peps/pep-3147/ python::exec_string ("import compileall; compileall.compile_dir (\".\", maxlevels=0, legacy=True);"); #endif python::cleanup (); exit (0); break; } case 'g': { gamedir = optarg; if (gamedir[gamedir.size () - 1] == '/') gamedir.erase (gamedir.size () - 1); // Check whether the requested game directory exists DIR * mydir = opendir (gamedir.c_str ()); if (!mydir) { cerr << "Cannot open directory " << gamedir << "!" << endl; exit (1); } closedir (mydir); break; } case '?': case 'h': print_help_message (argv); exit (0); break; } } // Check whether the GAME parameter is needed if (gamedir == "") { // Check whether the GAME parameter is given if (argc - optind != 1) { print_help_message (argv); exit (0); } // Check whether the requested game exists struct dirent * d; DIR * mydir = opendir ((game::global_data_dir() + "/games").c_str()); bool found = false; if (!mydir) { cerr << "Cannot open directory " << game::global_data_dir() + "/games!" << endl; exit (1); } while ((d = readdir (mydir)) != NULL) { if (string (d->d_name) == argv[optind]) found = true; } closedir (mydir); if (!found) { cerr << "Game '" << argv[optind] << "' can't be found.\n" << "Run '" << argv[0] << " -l' for a list of available games.\n"; exit (1); } // The game exists, so let the show continue... gamedir = game::global_data_dir() + "/games/"; gamedir += argv[optind]; } // Now check whether the directory is a valid game directory string tfile = gamedir + "/gamename.txt"; ifstream f (tfile.c_str ()); if (!f.is_open ()) { cerr << "Directory " << gamedir << " is not a valid game directory.\n"; exit (1); } char t[256]; f.getline (t, 256); game_name = t; f.close (); } // That's more or less a move operator, as the source is destroyed config& config::operator =(const config *c) { display = c->display; screen_mode = c->screen_mode; audio_channels = c->audio_channels; audio_resolution = c->audio_resolution; audio_sample_rate = c->audio_sample_rate; audio_volume = c->audio_volume; adonthellrc = c->adonthellrc; delete c; return *this; } char *config::get_adonthellrc () { return (char *) adonthellrc.c_str (); } // write a default configuration file void config::write_adonthellrc () { string fname; #ifndef WIN32 fname = adonthellrc + "/adonthellrc"; #else fname = adonthellrc + "/adonthell.ini"; #endif ofstream rc (fname.c_str ()); rc << "# Sample Adonthell configuration file;\n" << "# edit to your needs!\n\n" << "# Screen-mode num\n# 0 Windowed mode\n# 1 Letterbox mode\n" << "# 2 Fullscreen mode\n Screen-mode " << (int) screen_mode << "\n\n" << "# Display num\n# Index of the display to use in fullscreen mode" << "\n Display " << (int) display << "\n\n" << "# Language [locale]\n# Where locale has the form fr_FR or de_DE, etc.\n" << " Language [" << language << "]\n\n" << "# Font [font.ttf]\n# Path to a true type font to use. Leave empty for default\n" << " Font [" << font << "]\n\n" << "# Quick-load num\n# 0 off\n# 1 on\n Quick-load " << (int) quick_load << "\n\n" << "# Audio-channels num\n# 0 Mono\n# 1 Stereo\n" << " Audio-channels " << (int) audio_channels << "\n\n" << "# Audio-resolution num\n# 0 8 bit\n# 1 16 bit\n" << " Audio-resolution " << (int) audio_resolution << "\n\n" << "# Audio-sample-rate num\n# 0 11025 Hz\n# 1 22050 Hz\n# 2 44100 Hz\n" << " Audio-sample-rate " << (int) audio_sample_rate << "\n\n" << "# Audio-volume num\n# 0 - 100 %\n" << " Audio-volume " << (int) audio_volume << "\n\n" << "# Version number of this file. Please don't edit\n Version [" << VERSION << "]\n"; rc.close (); } bool config::read_adonthellrc () { int n, i = 1; u_int32 major = 0, minor = 0, micro = 0, MAJOR, MINOR, MICRO; char suffix[16] = "\0", SUFFIX[16] = "\0"; string s, fname; #ifndef WIN32 fname = adonthellrc + "/adonthellrc"; #else fname = adonthellrc + "/adonthell.ini"; #endif // prefsin is declared in lex.prefs.c prefsin = fopen (fname.c_str (), "r"); // open failed -> try to write new configuration if (!prefsin) { write_adonthellrc (); // now try again if (!(prefsin = fopen (fname.c_str (), "r"))) { fprintf (stderr, "*** warning: prefs::read_adonthellrc: creating config file failed\n"); return false; } } // adonthellrc opened -> read configuration while (i) { switch (i = parse_adonthellrc (n, s)) { case PREFS_LANGUAGE: { if (parse_adonthellrc (n, s) == PREFS_STR) language = s; break; } case PREFS_FONT: { if (parse_adonthellrc (n, s) == PREFS_STR) font = s; break; } case PREFS_SCREEN_MODE: { if (parse_adonthellrc (n, s) == PREFS_NUM) screen_mode = n; break; } case PREFS_DISPLAY: { if (parse_adonthellrc (n, s) == PREFS_NUM) display = n; break; } case PREFS_QUICK_LOAD: { if (parse_adonthellrc (n, s) == PREFS_NUM) quick_load = n; break; } case PREFS_AUDIO_RESOLUTION: { if (parse_adonthellrc (n, s) == PREFS_NUM) audio_resolution = n; break; } case PREFS_AUDIO_CHANNELS: { if (parse_adonthellrc (n, s) == PREFS_NUM) audio_channels = n; break; } case PREFS_AUDIO_SAMPLE_RATE: { if (parse_adonthellrc (n, s) == PREFS_NUM) audio_sample_rate = n; break; } case PREFS_AUDIO_VOLUME: { if (parse_adonthellrc (n, s) == PREFS_NUM) audio_volume = n; break; } case PREFS_VERSION: { // get config file version number if (parse_adonthellrc (n, s) == PREFS_STR) sscanf (s.c_str (), "%u.%u.%u%15s", &major, &minor, µ, suffix); break; } default: break; } } fclose (prefsin); // get engine version numbers sscanf (VERSION, "%u.%u.%u%15s", &MAJOR, &MINOR, &MICRO, SUFFIX); // compare version of config file and engine if (major < MAJOR || (major == MAJOR && minor < MINOR) || (major == MAJOR && minor == MINOR && micro < MICRO) || strcmp (suffix, SUFFIX) != 0) { // update config file if engine is newer write_adonthellrc (); } return true; } adonthell-0.3.8/src/win_container.h0000644000175000017500000001016412756052704014226 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_CONTAINER_H_ #define _WIN_CONTAINER_H_ #include #include "win_base.h" using namespace std; typedef list lwb; class win_container : public win_base { public: win_container(); void move(s_int16, s_int16); void resize(u_int16, u_int16); virtual void add(win_base *); virtual void remove(win_base *); virtual void remove_all(); virtual void destroy(); virtual ~win_container(); virtual bool update(); virtual bool input_update(); virtual bool draw(); void set_visible_all(bool b); virtual void set_brightness(bool b); virtual void set_trans(bool b); virtual void set_space_with_border(u_int16 b){space_with_border_=b;update_layout();} virtual void set_space_with_object(u_int16 o){space_with_object_=o;update_layout();} u_int16 space_with_border(){return space_with_border_;} u_int16 space_with_object(){return space_with_object_;} void set_layout(u_int8 l){layout_=l;update_layout();} void set_focus_object(win_base * f); win_base * focus_object(){return focus_object_;} const static u_int8 SPACE_WITH_BORDER = 10; const static u_int8 SPACE_WITH_OBJECT = 10; const static u_int8 LIST_LAYOUT = 1; const static u_int8 NO_LAYOUT = 0; protected: void update_position(); void update_layout(); u_int16 space_with_object_; u_int16 space_with_border_; u_int8 layout_; lwb list_wb_; win_base * focus_object_; }; /* class win_base; class win_theme; class win_container : public win_base { protected: list list_obj; u_int16 space_between_border_; u_int16 space_between_object_; // u_int8 justify_; u_int8 layout_; void update_layout(); public: win_container(s_int16 tx,s_int16 ty,u_int16 tl,u_int16 th,win_theme * wth); ~win_container(); //add an object virtual void add(win_base *); //remove an object virtual void remove(win_base *); //remove all, but not in memory virtual void remove_all(); //destroy all object of the list and in memory virtual void destroy(); //update function bool update(); //draw on the screen bool draw(); void move(s_int16 tx,s_int16 ty); void resize(u_int16,u_int16); //set the space between object and the border, work if you use layout or justify virtual void set_space_between_border(u_int16); //set the space between object and the border, work if you use layout virtual void set_space_between_object(u_int16); u_int16 space_between_border(){return space_between_border_;} u_int16 space_between_object(){return space_between_object_;} //if true all of this object is in brightness mode void set_draw_brightness(bool b); //bugs in this functions. void set_visible_all(bool); */ /* //justify all object : WIN_JUSTIFY_LEFT, WIN_JUSTIFY_RIGHT, WIN_JUSTIFY_CENTER void set_justify(u_int8); //justify an win_base object in this object void set_justify(win_base * wb,u_int8); */ /* //align all object void set_align_all(u_int8); //set the layout (like in java i think) Now 2 sort of layout but i can add several if you suggest me. WIN_LAYOUT_NO (no layout: you put your object where you want) //and WIN_LAYOUT_LIST( all object show like a listbox) void set_layout(u_int8 lay); //IMPORTANT: You can use set_justify and layout to do good window void update_real_position(); void set_focus(bool b); bool is_focus(){return focus_;} }; */ #endif adonthell-0.3.8/src/mapsquare.h0000644000175000017500000002674512756051356013403 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapsquare.h * @author Alexandre Courbot * * @brief Declares the mapsquare and mapsquare_area classes. * * */ #ifndef MAPSQUARE_H_ #define MAPSQUARE_H_ #include #include "mapsquare_walkable.h" class mapobject; class mapcharacter; /** * Contains informations about the position of an object on a map. * * Objects of this class has no reason to exist outside of a mapsquare. * You'll NEVER want to manipulate this class directly - only mapsquare, * mapsquare_area and landmap will. */ class mapsquare_tile { public: /** * Default constructor. */ mapsquare_tile (); /** * Destructor. */ ~mapsquare_tile (); #ifndef SWIG /** * Compare the location on the landsubmap of two mapsquare_tiles. * A mapsquare_tile is < to another if it's Y position is < to the other * one's or if it's Y position == the other one's and it's X position is * < to the other one's. * * @attention Not available from Python. * * @sa operator <= () * @sa operator == () */ bool operator < (const mapsquare_tile & mt) const { return (mt.y > y || (mt.y == y && mt.x > x)); } /** * Compare the location on the landsubmap of two mapsquare_tiles. * A mapsquare_tile is <= to another if it's Y position is < to the other * one's or if it's Y position == the other one's and it's X position is * <= to the other one's. * * @attention Not available from Python. * * @sa operator < () * @sa operator == () */ bool operator <= (const mapsquare_tile & mt) const { return (mt.y > y || (mt.y == y && mt.x >= x)); } /** * Compare the location on the landsubmap of two mapsquare_tiles. * A mapsquare_tile is == to another if their X and Y position are * equal. * * @attention Not available from Python. * * @sa operator < () * @sa operator <= () */ bool operator == (const mapsquare_tile & mt) const { return (mt.y == y && mt.x == x); } #endif private: /// Pointer to the object here. mapobject * mapobj; /// Is this mapsquare_tile a base square? bool is_base; #ifndef SWIG /// Iterator to the base tile of this mapsquare_tile. list ::iterator base_tile; #endif /// x and y positions. u_int16 x, y; #ifndef SWIG friend class mapsquare; friend class mapsquare_area; friend class landmap; friend class mapview; #endif }; /** * Contains informations about the position of a character on a map. * * Objects of this class has no reason to exist outside of a mapsquare. * You'll NEVER want to manipulate this class directly - only mapsquare, * mapsquare_area and landmap will. */ class mapsquare_char { public: /** * Default constructor. */ mapsquare_char (); /** * Destructor. */ ~mapsquare_char (); #ifndef SWIG /** * Compare the location on the landsubmap of two mapsquare_chars. * A mapsquare_char is < to another if it's Y position is < to the other * one's or if it's Y position == the other one's and it's X position is * < to the other one's. * @sa operator <= () * @sa operator == () */ bool operator < (const mapsquare_char & mt) const { return (mt.y > y || (mt.y == y && mt.x > x)); } /** * Compare the location on the landsubmap of two mapsquare_chars. * A mapsquare_char is <= to another if it's Y position is < to the other * one's or if it's Y position == the other one's and it's X position is * <= to the other one's. * @sa operator < () * @sa operator == () */ bool operator <= (const mapsquare_char & mt) const { return (mt.y > y || (mt.y == y && mt.x >= x)); } /** * Compare the location on the landsubmap of two mapsquare_chars. * A mapsquare_char is == to another if their X and Y position are * equal. * @sa operator < () * @sa operator <= () */ bool operator == (const mapsquare_char & mt) const { return (mt.y == y && mt.x == x); } #endif private: /// Pointer to the mapcharacter concerned by this mapchar_square. mapcharacter *mchar; /// Is it the base tile? bool is_base; /// Is this mapsquare_tile walkable? bool walkable; #ifndef SWIG /// Iterator to the base tile of this mapsquare_char. list ::iterator base_tile; #endif /// x and y positions. u_int16 x, y; #ifndef SWIG friend class mapcharacter; friend class mapsquare; friend class landmap; friend class mapview; #endif }; /** * Base unit of a landsubmap, where you can place mapobjects or mapcharacters. * A landsubmap is a 2 dimensionnal array of mapsquares. When a mapobject is * placed on a landsubmap, it belongs to one or several mapsquares. A mapsquare * is made of a list of mapsquare_tiles, containing informations about the objects * that are on it, and a list of mapsquare_char, which informs about the mapcharacters * here. This make it possible to have several mapobjects * and mapcharacters on the same mapsquare. * * These two lists are sorted by the position of the object or mapcharacter's base square * on the map. This make it fast to iterate through the lists during drawing, as we always * want to iterate the list in this order. */ class mapsquare : public mapsquare_walkable { public: /** * Default constructor. * */ mapsquare (); #ifndef SWIG /** * Copy constructor. * */ mapsquare (const mapsquare& src); #endif /** * Destructor. * */ ~mapsquare (); /** * Returns the X position of this mapsquare. * * * @return X position of this mapsquare. */ u_int16 x () { return x_; } /** * Returns the Y position of this mapsquare. * * * @return Y position of this mapsquare. */ u_int16 y () { return y_; } /** * Returns whether the mapsquare is free for a character to go on or not. * It only checks if a mapcharacter is already here. It doesn't deal with the * walkable problem. * @return * - false if the mapsquare isn't free. * - true if the mapsquare is free. */ bool is_free (); /** * Return a pointer to the mapcharacter that occupies this mapsquare. * * @return pointer to the mapcharacter that occupies the mapsquare, NULL if none. */ mapcharacter *whoshere (); /** * @name Pathfinding data members. * * These members are here to allow faster and more efficient * pathfinding. Though they can as well be used for something else, * but their value isn't guaranteed to stay constant. It is safe * to modify them however, so they are public and uninitialised. * */ //@{ /** * Distance from the source square. * */ u_int16 g; /** * Estimated distance to the goal square. * */ u_int16 h; /** * Sum of g + h. * */ u_int16 f; /** * Parent square for the path * */ mapsquare * parent; /** * If == false, then this square will never be considered * as walkable by pathfinding functions. * */ bool can_use_for_pathfinding; //@} private: #ifndef SWIG /// List of mapsquare_tiles. list tiles; /// Iterator to where the base tiles begin. /// This serves as an "accelerator" for mapview::draw () which /// can go directly to the base tiles of a squares with this /// iterator. list ::iterator base_begin; /// List of mapsquare_chars. list mapchars; /// Coordinates of the square. u_int16 x_, y_; friend class mapcharacter; friend class mapsquare_area; friend class landmap; friend class mapview; #endif }; // mapsquare /** * Area of mapsquares, for use with landmap. * * This class has no reason to exist is not belonging * to a landmap. You'll NEVER use this class directly - * anyway you can't do anything usefull with it alone. * */ class mapsquare_area { public: /** * Default constructor. * */ mapsquare_area (); /** * Destructor. * */ ~mapsquare_area (); /** * Totally clears the area. * */ void clear (); /** * @name Area settings * */ //@{ /** * Returns the length of the area. * * @return length (in number of squares) of the area. * */ u_int16 area_length () const { return area.size (); } /** * Returns the height of the area. * * @return height (in number of squares) of the area. * */ u_int16 area_height () const { if (area.size ()) return area[0].size (); else return 0; } /** * Returns a pointer to a desired square. * * @param x X position of the square to get. * @param y Y position of the square to get. * * @return pointer to the (x,y) square. */ mapsquare * get_square (u_int16 x, u_int16 y) const { return &(area[x][y]); } /** * Resize the area. * * @param nl new length (in number of squares) of the area. * @param nh new height (in number of squares) of the area. */ void resize_area (u_int16 nl, u_int16 nh); //@} private: /** * Forbids value passing. * */ mapsquare_area (const mapsquare_area& src); #ifndef SWIG /** * Forbids mapsquare_area copy. * */ mapsquare_area & operator = (const mapsquare_area & mo); #endif /** * Place a mapobject on the submap. * * @param px X position of the base square of the object. * @param py Y position of the base square of the object. * @param mobj pointer to the mapobject to remove. */ s_int8 put_mapobject (u_int16 px, u_int16 py, mapobject * mobj); /** * Remove a mapobject from the submap. * * @param px X position of the base square of the object. * @param py Y position of the base square of the object. * @param mobj pointer to the mapobject to remove. */ void remove_mapobject (u_int16 px, u_int16 py, mapobject * mobj); /** * 2 dimensionnal array of mapsquares - the actual map * */ #ifndef SWIG mutable vector > area; friend class mapcharacter; friend class mapview; friend class landmap; #endif }; #endif adonthell-0.3.8/src/map_event.cc0000644000175000017500000000601212756051074013477 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file map_event.cc * * @author Kai Sterker * @brief Implements the different map events. */ #include "map_event.h" // constructor map_event::map_event () : event () { submap = x = y = dir = map = -1; c = NULL; } // compare two map events bool map_event::equals (const event* e) { // we know that we've got a map_event :) map_event *t = (map_event *) e; if (submap != -1 && t->submap != submap) return false; if (x != -1 && t->x != x) return false; if (y != -1 && t->y != y) return false; if (dir != -1 && t->dir != dir) return false; if (map != -1 && t->map != map) return false; if (c && t->c != c) return false; return true; } // Execute map event's script s_int32 map_event::execute (const event* e) { switch (Action) { case ACTION_SCRIPT: { map_event *t = (map_event *) e; PyObject *args = Py_BuildValue ("(i, i, i, i, s)", t->submap, t->x, t->y, t->dir, t->c->get_id ().c_str ()); Script->run (args); Py_DECREF (args); break; } case ACTION_PYFUNC: { PyFunc->callback_func0 (); break; } case ACTION_CPPFUNC: { Callback (); break; } default: break; } return do_repeat (); } // Load a map event from file bool map_event::get_state (igzstream& f) { event::get_state (f); string name; string s; submap << f; x << f; y << f; dir << f; map << f; s << f; if (s != "") c = (mapcharacter*) data::characters[s.c_str ()]; else c = NULL; return true; } // Save map event to file void map_event::put_state (ogzstream& out) const { event::put_state (out); submap >> out; x >> out; y >> out; dir >> out; map >> out; if (c) c->get_id () >> out; else { string s = ""; s >> out; } } // constructor enter_event::enter_event () : map_event () { Type = ENTER_EVENT; } // constructor leave_event::leave_event () : map_event () { Type = LEAVE_EVENT; } // constructor action_event::action_event () : map_event () { Type = ACTION_EVENT; } adonthell-0.3.8/src/mapsquare_walkable.h0000644000175000017500000002047112756051311015222 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapsquare_walkable.h * @author Alexandre Courbot * * @brief Declares the mapsquare_walkable and mapsquare_walkable_area classes. * * */ #ifndef MAPSQUARE_WALKABLE_H_ #define MAPSQUARE_WALKABLE_H_ #include "fileops.h" #include "drawable.h" #include /** * Size of a mapsquare (in pixels). * */ const u_int16 MAPSQUARE_SIZE = 20; /** * Walkable from every side. * */ #define ALL_WALKABLE 15 /** * Walkable from South. * */ #define WALKABLE_SOUTH 1 /** * Walkable from North. * */ #define WALKABLE_NORTH 2 /** * Walkable from East. * */ #define WALKABLE_EAST 4 /** * Walkable from West. * */ #define WALKABLE_WEST 8 /** * Unreachable. * */ #define NONE_WALKABLE 0 /** * Contains information about the walkability of a mapsquare. * */ class mapsquare_walkable { public: /** * Default constructor. * */ mapsquare_walkable(); /** * Loads a mapsquare_walkable from an opened file. * * @param file the file to load from. * * @return 0 in case of success, error code otherwise. */ s_int8 get (igzstream& file); /** * Puts a mapsquare_walkable into an opened file. * * @param file the file where to save. * * @return 0 in case of success, error code otherwise. */ s_int8 put (ogzstream& file) const; /** * Returns whether a mapsquare is walkable from west. * * * @return true if the mapsquare is walkable from west, false otherwise. */ bool is_walkable_west () const { return walkable & WALKABLE_WEST; } /** * Returns whether a mapsquare is walkable from east. * * * @return true if the mapsquare is walkable from east, false otherwise. */ bool is_walkable_east () const { return walkable & WALKABLE_EAST; } /** * Returns whether a mapsquare is walkable from north. * * * @return true if the mapsquare is walkable from north, false otherwise. */ bool is_walkable_north () const { return walkable & WALKABLE_NORTH; } /** * Returns whether a mapsquare is walkable from south. * * * @return true if the mapsquare is walkable from south, false otherwise. */ bool is_walkable_south () const { return walkable & WALKABLE_SOUTH; } /** * Sets the reachability from west of a mapsquare. * * @param w true if the mapsquare should be reachable from west, false otherwise. */ void set_walkable_west (bool w) { if (!w) walkable &= (ALL_WALKABLE - WALKABLE_WEST); else walkable |= WALKABLE_WEST; } /** * Sets the reachability from east of a mapsquare. * * @param w true if the mapsquare should be reachable from east, false otherwise. */ void set_walkable_east (bool w) { if (!w) walkable &= (ALL_WALKABLE - WALKABLE_EAST); else walkable |= WALKABLE_EAST; } /** * Sets the reachability from north of a mapsquare. * * @param w true if the mapsquare should be reachable from north, false otherwise. */ void set_walkable_north (bool w) { if (!w) walkable &= (ALL_WALKABLE - WALKABLE_NORTH); else walkable |= WALKABLE_NORTH; } /** * Sets the reachability from south of a mapsquare. * * @param w true if the mapsquare should be reachable from south, false otherwise. */ void set_walkable_south (bool w) { if (!w) walkable &= (ALL_WALKABLE - WALKABLE_SOUTH); else walkable |= WALKABLE_SOUTH; } /** * Gets the raw walkable parameter of a mapsquare. * * @return walkable parameter of this mapsquare. */ u_int8 get_walkable () const { return walkable; } /** * Sets the walkable parameter of a mapsquare. * * @param w new walkable status. */ void set_walkable (u_int8 w) { walkable = w; } private: u_int8 walkable; }; /** * Area of mapsquare_walkables, for use with mapcharacter and mapobject classes. * */ class mapsquare_walkable_area : public drawable { public: /** * Default constructor. * */ mapsquare_walkable_area (); /** * Destructor. * */ ~mapsquare_walkable_area (); /** * Totally clears the area. * */ void clear (); virtual void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const = 0; /** * @name Area settings. * */ //@{ /** * Returns the length of the area. * * @return length (in number of squares) of the area. * */ u_int16 area_length () const { return area.size (); } /** * Returns the height of the area. * * @return height (in number of squares) of the area. * */ u_int16 area_height () const { if (area.size ()) return area[0].size (); else return 0; } /** * Returns a pointer to a desired square. * * @param x X position of the square to get. * @param y Y position of the square to get. * * @return pointer to the (x,y) square. */ mapsquare_walkable * get_square (u_int16 x, u_int16 y) const { return &(area[x][y]); } /** * Resize the area. * * @param nl new length (in number of squares) of the area. * @param nh new height (in number of squares) of the area. */ void resize_area (u_int16 nl, u_int16 nh); //@} /** * @name Base square settings. * */ //@{ /** * Returns the X offset of the base square of this object. * * * @return X offset of the base square. */ u_int16 base_x () const { return basex; } /** * Returns the Y offset of the base square of this object. * * * @return Y offset of the base square. */ u_int16 base_y () const { return basey; } /** * Sets the base square of this object. * * @param nx X offset of the new base square. * @param ny Y offset of the new base square. */ void set_base (u_int16 nx, u_int16 ny); //@} /** * Loads an area from an opened file. * @param file the opened file from which to load. * @return 0 in case of success, error code otherwise. * */ s_int8 get (igzstream & file); /** * Saves an area into an opened file. * @param file the opened file where to write. * @return 0 in case of success, error code otherwise. * */ s_int8 put (ogzstream & file) const; #ifndef SWIG /** * Area copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ mapsquare_walkable_area & operator = (const mapsquare_walkable_area & mo); #endif /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const mapsquare_walkable_area& src) { *this = src; } private: /** * Forbids value passing. * */ mapsquare_walkable_area (const mapsquare_walkable_area & src); mutable vector > area; u_int16 basex; u_int16 basey; }; #endif adonthell-0.3.8/src/win_keys.h0000644000175000017500000000204312756053004013206 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_KEYS_H_ #define _WIN_KEYS_H_ #include "input.h" class win_keys { public: static SDL_Keycode KEY_ACTIVATE_ENTRY; static SDL_Keycode KEY_UP; static SDL_Keycode KEY_DOWN; static SDL_Keycode KEY_PREVIOUS; static SDL_Keycode KEY_NEXT; static SDL_Keycode KEY_ACTIVATE; }; #endif adonthell-0.3.8/src/modules/0000755000175000017500000000000013414165072012737 500000000000000adonthell-0.3.8/src/modules/adonthell.py0000664000175000017500000044052113264663270015221 00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_adonthell', [dirname(__file__)]) except ImportError: import _adonthell return _adonthell if fp is not None: try: _mod = imp.load_module('_adonthell', fp, pathname, description) finally: fp.close() return _mod _adonthell = swig_import_helper() del swig_import_helper else: import _adonthell del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self, class_type, name, value, static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name, None) if method: return method(self, value) if (not static): object.__setattr__(self, name, value) else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self, class_type, name, value): return _swig_setattr_nondynamic(self, class_type, name, value, 0) def _swig_getattr_nondynamic(self, class_type, name, static=1): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name, None) if method: return method(self) if (not static): return object.__getattr__(self, name) else: raise AttributeError(name) def _swig_getattr(self, class_type, name): return _swig_getattr_nondynamic(self, class_type, name, 0) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object: pass _newclass = 0 def _swig_setattr_nondynamic_method(set): def set_attr(self, name, value): if (name == "thisown"): return self.this.own(value) if hasattr(self, name) or (name == "this"): set(self, name, value) else: raise AttributeError("You cannot add attributes to %s" % self) return set_attr _adonthell.Python_swigconstant(_adonthell) Python = _adonthell.Python _adonthell.C_swigconstant(_adonthell) C = _adonthell.C _adonthell.READ_swigconstant(_adonthell) READ = _adonthell.READ _adonthell.WRITE_swigconstant(_adonthell) WRITE = _adonthell.WRITE class gz_file(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_gz_file(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_gz_file __del__ = lambda self: None def open(self, *args): return _adonthell.gz_file_open(self, *args) def close(self, *args): return _adonthell.gz_file_close(self, *args) def is_open(self, *args): return _adonthell.gz_file_is_open(self, *args) def eof(self, *args): return _adonthell.gz_file_eof(self, *args) gz_file_swigregister = _adonthell.gz_file_swigregister gz_file_swigregister(gz_file) class igzstream(gz_file): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_igzstream(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_igzstream __del__ = lambda self: None def open(self, *args): return _adonthell.igzstream_open(self, *args) def get_block(self, *args): return _adonthell.igzstream_get_block(self, *args) def get_bool(self, *args): return _adonthell.igzstream_get_bool(self, *args) def get_uint8(self, *args): return _adonthell.igzstream_get_uint8(self, *args) def get_sint8(self, *args): return _adonthell.igzstream_get_sint8(self, *args) def get_uint16(self, *args): return _adonthell.igzstream_get_uint16(self, *args) def get_sint16(self, *args): return _adonthell.igzstream_get_sint16(self, *args) def get_uint32(self, *args): return _adonthell.igzstream_get_uint32(self, *args) def get_sint32(self, *args): return _adonthell.igzstream_get_sint32(self, *args) def get_string(self, *args): return _adonthell.igzstream_get_string(self, *args) def get_float(self, *args): return _adonthell.igzstream_get_float(self, *args) igzstream_swigregister = _adonthell.igzstream_swigregister igzstream_swigregister(igzstream) class ogzstream(gz_file): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_ogzstream(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_ogzstream __del__ = lambda self: None def open(self, *args): return _adonthell.ogzstream_open(self, *args) def put_block(self, *args): return _adonthell.ogzstream_put_block(self, *args) def put_bool(self, *args): return _adonthell.ogzstream_put_bool(self, *args) def put_uint8(self, *args): return _adonthell.ogzstream_put_uint8(self, *args) def put_sint8(self, *args): return _adonthell.ogzstream_put_sint8(self, *args) def put_uint16(self, *args): return _adonthell.ogzstream_put_uint16(self, *args) def put_sint16(self, *args): return _adonthell.ogzstream_put_sint16(self, *args) def put_uint32(self, *args): return _adonthell.ogzstream_put_uint32(self, *args) def put_sint32(self, *args): return _adonthell.ogzstream_put_sint32(self, *args) def put_string(self, *args): return _adonthell.ogzstream_put_string(self, *args) def put_float(self, *args): return _adonthell.ogzstream_put_float(self, *args) ogzstream_swigregister = _adonthell.ogzstream_swigregister ogzstream_swigregister(ogzstream) class fileops(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr put_version = staticmethod(_adonthell.fileops_put_version) get_version = staticmethod(_adonthell.fileops_get_version) def __init__(self, *args): this = _adonthell.new_fileops(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_fileops __del__ = lambda self: None fileops_swigregister = _adonthell.fileops_swigregister fileops_swigregister(fileops) def fileops_put_version(*args): return _adonthell.fileops_put_version(*args) fileops_put_version = _adonthell.fileops_put_version def fileops_get_version(*args): return _adonthell.fileops_get_version(*args) fileops_get_version = _adonthell.fileops_get_version _adonthell.EVENTS_DIR_swigconstant(_adonthell) EVENTS_DIR = _adonthell.EVENTS_DIR class event(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _adonthell.delete_event __del__ = lambda self: None def clear(self, *args): return _adonthell.event_clear(self, *args) def type(self, *args): return _adonthell.event_type(self, *args) def id(self, *args): return _adonthell.event_id(self, *args) def set_id(self, *args): return _adonthell.event_set_id(self, *args) def registered(self, *args): return _adonthell.event_registered(self, *args) def repeat(self, *args): return _adonthell.event_repeat(self, *args) def set_repeat(self, *args): return _adonthell.event_set_repeat(self, *args) def execute(self, *args): return _adonthell.event_execute(self, *args) def equals(self, *args): return _adonthell.event_equals(self, *args) def set_script(self, *args): return _adonthell.event_set_script(self, *args) def set_callback(self, *args): return _adonthell.event_set_callback(self, *args) def pause(self, *args): return _adonthell.event_pause(self, *args) def resume(self, *args): return _adonthell.event_resume(self, *args) def is_paused(self, *args): return _adonthell.event_is_paused(self, *args) def put_state(self, *args): return _adonthell.event_put_state(self, *args) def get_state(self, *args): return _adonthell.event_get_state(self, *args) event_swigregister = _adonthell.event_swigregister event_swigregister(event) class event_list(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_event_list(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_event_list __del__ = lambda self: None def clear(self, *args): return _adonthell.event_list_clear(self, *args) def add_event(self, *args): return _adonthell.event_list_add_event(self, *args) def remove_event(self, *args): return _adonthell.event_list_remove_event(self, *args) def get_event(self, *args): return _adonthell.event_list_get_event(self, *args) def pause(self, *args): return _adonthell.event_list_pause(self, *args) def resume(self, *args): return _adonthell.event_list_resume(self, *args) def is_paused(self, *args): return _adonthell.event_list_is_paused(self, *args) def put_state(self, *args): return _adonthell.event_list_put_state(self, *args) def get_state(self, *args): return _adonthell.event_list_get_state(self, *args) event_list_swigregister = _adonthell.event_list_swigregister event_list_swigregister(event_list) class time_event(event): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_time_event(*args) try: self.this.append(this) except Exception: self.this = this def set_repeat(self, *args): return _adonthell.time_event_set_repeat(self, *args) def equals(self, *args): return _adonthell.time_event_equals(self, *args) def execute(self, *args): return _adonthell.time_event_execute(self, *args) def put_state(self, *args): return _adonthell.time_event_put_state(self, *args) def get_state(self, *args): return _adonthell.time_event_get_state(self, *args) def pause(self, *args): return _adonthell.time_event_pause(self, *args) def resume(self, *args): return _adonthell.time_event_resume(self, *args) def time(self, *args): return _adonthell.time_event_time(self, *args) __swig_destroy__ = _adonthell.delete_time_event __del__ = lambda self: None time_event_swigregister = _adonthell.time_event_swigregister time_event_swigregister(time_event) class map_event(event): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_map_event(*args) try: self.this.append(this) except Exception: self.this = this def put_state(self, *args): return _adonthell.map_event_put_state(self, *args) def get_state(self, *args): return _adonthell.map_event_get_state(self, *args) submap = _swig_property(_adonthell.map_event_submap_get, _adonthell.map_event_submap_set) x = _swig_property(_adonthell.map_event_x_get, _adonthell.map_event_x_set) y = _swig_property(_adonthell.map_event_y_get, _adonthell.map_event_y_set) dir = _swig_property(_adonthell.map_event_dir_get, _adonthell.map_event_dir_set) map = _swig_property(_adonthell.map_event_map_get, _adonthell.map_event_map_set) c = _swig_property(_adonthell.map_event_c_get, _adonthell.map_event_c_set) def equals(self, *args): return _adonthell.map_event_equals(self, *args) def execute(self, *args): return _adonthell.map_event_execute(self, *args) __swig_destroy__ = _adonthell.delete_map_event __del__ = lambda self: None map_event_swigregister = _adonthell.map_event_swigregister map_event_swigregister(map_event) class enter_event(map_event): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_enter_event(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_enter_event __del__ = lambda self: None enter_event_swigregister = _adonthell.enter_event_swigregister enter_event_swigregister(enter_event) class leave_event(map_event): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_leave_event(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_leave_event __del__ = lambda self: None leave_event_swigregister = _adonthell.leave_event_swigregister leave_event_swigregister(leave_event) class action_event(map_event): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_action_event(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_action_event __del__ = lambda self: None action_event_swigregister = _adonthell.action_event_swigregister action_event_swigregister(action_event) class event_handler(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr init = staticmethod(_adonthell.event_handler_init) cleanup = staticmethod(_adonthell.event_handler_cleanup) remove_event = staticmethod(_adonthell.event_handler_remove_event) raise_event = staticmethod(_adonthell.event_handler_raise_event) def __init__(self, *args): this = _adonthell.new_event_handler(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_event_handler __del__ = lambda self: None event_handler_swigregister = _adonthell.event_handler_swigregister event_handler_swigregister(event_handler) def event_handler_init(*args): return _adonthell.event_handler_init(*args) event_handler_init = _adonthell.event_handler_init def event_handler_cleanup(*args): return _adonthell.event_handler_cleanup(*args) event_handler_cleanup = _adonthell.event_handler_cleanup def event_handler_remove_event(*args): return _adonthell.event_handler_remove_event(*args) event_handler_remove_event = _adonthell.event_handler_remove_event def event_handler_raise_event(*args): return _adonthell.event_handler_raise_event(*args) event_handler_raise_event = _adonthell.event_handler_raise_event class storage(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_storage(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_storage __del__ = lambda self: None def set_val(self, *args): return _adonthell.storage_set_val(self, *args) def get_val(self, *args): return _adonthell.storage_get_val(self, *args) def next(self, *args): return _adonthell.storage_next(self, *args) storage_swigregister = _adonthell.storage_swigregister storage_swigregister(storage) class objects(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_objects(*args) try: self.this.append(this) except Exception: self.this = this def set_val(self, *args): return _adonthell.objects_set_val(self, *args) def get_val(self, *args): return _adonthell.objects_get_val(self, *args) def erase(self, *args): return _adonthell.objects_erase(self, *args) def next(self, *args): return _adonthell.objects_next(self, *args) __swig_destroy__ = _adonthell.delete_objects __del__ = lambda self: None objects_swigregister = _adonthell.objects_swigregister objects_swigregister(objects) _adonthell.CYCLE_LENGTH_swigconstant(_adonthell) CYCLE_LENGTH = _adonthell.CYCLE_LENGTH _adonthell.FRAME_RATE_swigconstant(_adonthell) FRAME_RATE = _adonthell.FRAME_RATE _adonthell.FTS_LIMIT_swigconstant(_adonthell) FTS_LIMIT = _adonthell.FTS_LIMIT class gametime(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr init = staticmethod(_adonthell.gametime_init) minute = staticmethod(_adonthell.gametime_minute) start_action = staticmethod(_adonthell.gametime_start_action) stop_action = staticmethod(_adonthell.gametime_stop_action) frames_to_skip = staticmethod(_adonthell.gametime_frames_to_skip) update = staticmethod(_adonthell.gametime_update) def __init__(self, *args): this = _adonthell.new_gametime(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_gametime __del__ = lambda self: None gametime_swigregister = _adonthell.gametime_swigregister gametime_swigregister(gametime) def gametime_init(*args): return _adonthell.gametime_init(*args) gametime_init = _adonthell.gametime_init def gametime_minute(*args): return _adonthell.gametime_minute(*args) gametime_minute = _adonthell.gametime_minute def gametime_start_action(*args): return _adonthell.gametime_start_action(*args) gametime_start_action = _adonthell.gametime_start_action def gametime_stop_action(*args): return _adonthell.gametime_stop_action(*args) gametime_stop_action = _adonthell.gametime_stop_action def gametime_frames_to_skip(*args): return _adonthell.gametime_frames_to_skip(*args) gametime_frames_to_skip = _adonthell.gametime_frames_to_skip def gametime_update(*args): return _adonthell.gametime_update(*args) gametime_update = _adonthell.gametime_update class gamedate(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr update = staticmethod(_adonthell.gamedate_update) time = staticmethod(_adonthell.gamedate_time) weekday = staticmethod(_adonthell.gamedate_weekday) day = staticmethod(_adonthell.gamedate_day) hour = staticmethod(_adonthell.gamedate_hour) minute = staticmethod(_adonthell.gamedate_minute) parse_time = staticmethod(_adonthell.gamedate_parse_time) get_state = staticmethod(_adonthell.gamedate_get_state) put_state = staticmethod(_adonthell.gamedate_put_state) def __init__(self, *args): this = _adonthell.new_gamedate(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_gamedate __del__ = lambda self: None gamedate_swigregister = _adonthell.gamedate_swigregister gamedate_swigregister(gamedate) def gamedate_update(*args): return _adonthell.gamedate_update(*args) gamedate_update = _adonthell.gamedate_update def gamedate_time(*args): return _adonthell.gamedate_time(*args) gamedate_time = _adonthell.gamedate_time def gamedate_weekday(*args): return _adonthell.gamedate_weekday(*args) gamedate_weekday = _adonthell.gamedate_weekday def gamedate_day(*args): return _adonthell.gamedate_day(*args) gamedate_day = _adonthell.gamedate_day def gamedate_hour(*args): return _adonthell.gamedate_hour(*args) gamedate_hour = _adonthell.gamedate_hour def gamedate_minute(*args): return _adonthell.gamedate_minute(*args) gamedate_minute = _adonthell.gamedate_minute def gamedate_parse_time(*args): return _adonthell.gamedate_parse_time(*args) gamedate_parse_time = _adonthell.gamedate_parse_time def gamedate_get_state(*args): return _adonthell.gamedate_get_state(*args) gamedate_get_state = _adonthell.gamedate_get_state def gamedate_put_state(*args): return _adonthell.gamedate_put_state(*args) gamedate_put_state = _adonthell.gamedate_put_state _adonthell.SDLK_SCANCODE_MASK_swigconstant(_adonthell) SDLK_SCANCODE_MASK = _adonthell.SDLK_SCANCODE_MASK _adonthell.SDLK_UNKNOWN_swigconstant(_adonthell) SDLK_UNKNOWN = _adonthell.SDLK_UNKNOWN _adonthell.SDLK_RETURN_swigconstant(_adonthell) SDLK_RETURN = _adonthell.SDLK_RETURN _adonthell.SDLK_ESCAPE_swigconstant(_adonthell) SDLK_ESCAPE = _adonthell.SDLK_ESCAPE _adonthell.SDLK_BACKSPACE_swigconstant(_adonthell) SDLK_BACKSPACE = _adonthell.SDLK_BACKSPACE _adonthell.SDLK_TAB_swigconstant(_adonthell) SDLK_TAB = _adonthell.SDLK_TAB _adonthell.SDLK_SPACE_swigconstant(_adonthell) SDLK_SPACE = _adonthell.SDLK_SPACE _adonthell.SDLK_EXCLAIM_swigconstant(_adonthell) SDLK_EXCLAIM = _adonthell.SDLK_EXCLAIM _adonthell.SDLK_QUOTEDBL_swigconstant(_adonthell) SDLK_QUOTEDBL = _adonthell.SDLK_QUOTEDBL _adonthell.SDLK_HASH_swigconstant(_adonthell) SDLK_HASH = _adonthell.SDLK_HASH _adonthell.SDLK_PERCENT_swigconstant(_adonthell) SDLK_PERCENT = _adonthell.SDLK_PERCENT _adonthell.SDLK_DOLLAR_swigconstant(_adonthell) SDLK_DOLLAR = _adonthell.SDLK_DOLLAR _adonthell.SDLK_AMPERSAND_swigconstant(_adonthell) SDLK_AMPERSAND = _adonthell.SDLK_AMPERSAND _adonthell.SDLK_QUOTE_swigconstant(_adonthell) SDLK_QUOTE = _adonthell.SDLK_QUOTE _adonthell.SDLK_LEFTPAREN_swigconstant(_adonthell) SDLK_LEFTPAREN = _adonthell.SDLK_LEFTPAREN _adonthell.SDLK_RIGHTPAREN_swigconstant(_adonthell) SDLK_RIGHTPAREN = _adonthell.SDLK_RIGHTPAREN _adonthell.SDLK_ASTERISK_swigconstant(_adonthell) SDLK_ASTERISK = _adonthell.SDLK_ASTERISK _adonthell.SDLK_PLUS_swigconstant(_adonthell) SDLK_PLUS = _adonthell.SDLK_PLUS _adonthell.SDLK_COMMA_swigconstant(_adonthell) SDLK_COMMA = _adonthell.SDLK_COMMA _adonthell.SDLK_MINUS_swigconstant(_adonthell) SDLK_MINUS = _adonthell.SDLK_MINUS _adonthell.SDLK_PERIOD_swigconstant(_adonthell) SDLK_PERIOD = _adonthell.SDLK_PERIOD _adonthell.SDLK_SLASH_swigconstant(_adonthell) SDLK_SLASH = _adonthell.SDLK_SLASH _adonthell.SDLK_0_swigconstant(_adonthell) SDLK_0 = _adonthell.SDLK_0 _adonthell.SDLK_1_swigconstant(_adonthell) SDLK_1 = _adonthell.SDLK_1 _adonthell.SDLK_2_swigconstant(_adonthell) SDLK_2 = _adonthell.SDLK_2 _adonthell.SDLK_3_swigconstant(_adonthell) SDLK_3 = _adonthell.SDLK_3 _adonthell.SDLK_4_swigconstant(_adonthell) SDLK_4 = _adonthell.SDLK_4 _adonthell.SDLK_5_swigconstant(_adonthell) SDLK_5 = _adonthell.SDLK_5 _adonthell.SDLK_6_swigconstant(_adonthell) SDLK_6 = _adonthell.SDLK_6 _adonthell.SDLK_7_swigconstant(_adonthell) SDLK_7 = _adonthell.SDLK_7 _adonthell.SDLK_8_swigconstant(_adonthell) SDLK_8 = _adonthell.SDLK_8 _adonthell.SDLK_9_swigconstant(_adonthell) SDLK_9 = _adonthell.SDLK_9 _adonthell.SDLK_COLON_swigconstant(_adonthell) SDLK_COLON = _adonthell.SDLK_COLON _adonthell.SDLK_SEMICOLON_swigconstant(_adonthell) SDLK_SEMICOLON = _adonthell.SDLK_SEMICOLON _adonthell.SDLK_LESS_swigconstant(_adonthell) SDLK_LESS = _adonthell.SDLK_LESS _adonthell.SDLK_EQUALS_swigconstant(_adonthell) SDLK_EQUALS = _adonthell.SDLK_EQUALS _adonthell.SDLK_GREATER_swigconstant(_adonthell) SDLK_GREATER = _adonthell.SDLK_GREATER _adonthell.SDLK_QUESTION_swigconstant(_adonthell) SDLK_QUESTION = _adonthell.SDLK_QUESTION _adonthell.SDLK_AT_swigconstant(_adonthell) SDLK_AT = _adonthell.SDLK_AT _adonthell.SDLK_LEFTBRACKET_swigconstant(_adonthell) SDLK_LEFTBRACKET = _adonthell.SDLK_LEFTBRACKET _adonthell.SDLK_BACKSLASH_swigconstant(_adonthell) SDLK_BACKSLASH = _adonthell.SDLK_BACKSLASH _adonthell.SDLK_RIGHTBRACKET_swigconstant(_adonthell) SDLK_RIGHTBRACKET = _adonthell.SDLK_RIGHTBRACKET _adonthell.SDLK_CARET_swigconstant(_adonthell) SDLK_CARET = _adonthell.SDLK_CARET _adonthell.SDLK_UNDERSCORE_swigconstant(_adonthell) SDLK_UNDERSCORE = _adonthell.SDLK_UNDERSCORE _adonthell.SDLK_BACKQUOTE_swigconstant(_adonthell) SDLK_BACKQUOTE = _adonthell.SDLK_BACKQUOTE _adonthell.SDLK_a_swigconstant(_adonthell) SDLK_a = _adonthell.SDLK_a _adonthell.SDLK_b_swigconstant(_adonthell) SDLK_b = _adonthell.SDLK_b _adonthell.SDLK_c_swigconstant(_adonthell) SDLK_c = _adonthell.SDLK_c _adonthell.SDLK_d_swigconstant(_adonthell) SDLK_d = _adonthell.SDLK_d _adonthell.SDLK_e_swigconstant(_adonthell) SDLK_e = _adonthell.SDLK_e _adonthell.SDLK_f_swigconstant(_adonthell) SDLK_f = _adonthell.SDLK_f _adonthell.SDLK_g_swigconstant(_adonthell) SDLK_g = _adonthell.SDLK_g _adonthell.SDLK_h_swigconstant(_adonthell) SDLK_h = _adonthell.SDLK_h _adonthell.SDLK_i_swigconstant(_adonthell) SDLK_i = _adonthell.SDLK_i _adonthell.SDLK_j_swigconstant(_adonthell) SDLK_j = _adonthell.SDLK_j _adonthell.SDLK_k_swigconstant(_adonthell) SDLK_k = _adonthell.SDLK_k _adonthell.SDLK_l_swigconstant(_adonthell) SDLK_l = _adonthell.SDLK_l _adonthell.SDLK_m_swigconstant(_adonthell) SDLK_m = _adonthell.SDLK_m _adonthell.SDLK_n_swigconstant(_adonthell) SDLK_n = _adonthell.SDLK_n _adonthell.SDLK_o_swigconstant(_adonthell) SDLK_o = _adonthell.SDLK_o _adonthell.SDLK_p_swigconstant(_adonthell) SDLK_p = _adonthell.SDLK_p _adonthell.SDLK_q_swigconstant(_adonthell) SDLK_q = _adonthell.SDLK_q _adonthell.SDLK_r_swigconstant(_adonthell) SDLK_r = _adonthell.SDLK_r _adonthell.SDLK_s_swigconstant(_adonthell) SDLK_s = _adonthell.SDLK_s _adonthell.SDLK_t_swigconstant(_adonthell) SDLK_t = _adonthell.SDLK_t _adonthell.SDLK_u_swigconstant(_adonthell) SDLK_u = _adonthell.SDLK_u _adonthell.SDLK_v_swigconstant(_adonthell) SDLK_v = _adonthell.SDLK_v _adonthell.SDLK_w_swigconstant(_adonthell) SDLK_w = _adonthell.SDLK_w _adonthell.SDLK_x_swigconstant(_adonthell) SDLK_x = _adonthell.SDLK_x _adonthell.SDLK_y_swigconstant(_adonthell) SDLK_y = _adonthell.SDLK_y _adonthell.SDLK_z_swigconstant(_adonthell) SDLK_z = _adonthell.SDLK_z _adonthell.SDLK_CAPSLOCK_swigconstant(_adonthell) SDLK_CAPSLOCK = _adonthell.SDLK_CAPSLOCK _adonthell.SDLK_F1_swigconstant(_adonthell) SDLK_F1 = _adonthell.SDLK_F1 _adonthell.SDLK_F2_swigconstant(_adonthell) SDLK_F2 = _adonthell.SDLK_F2 _adonthell.SDLK_F3_swigconstant(_adonthell) SDLK_F3 = _adonthell.SDLK_F3 _adonthell.SDLK_F4_swigconstant(_adonthell) SDLK_F4 = _adonthell.SDLK_F4 _adonthell.SDLK_F5_swigconstant(_adonthell) SDLK_F5 = _adonthell.SDLK_F5 _adonthell.SDLK_F6_swigconstant(_adonthell) SDLK_F6 = _adonthell.SDLK_F6 _adonthell.SDLK_F7_swigconstant(_adonthell) SDLK_F7 = _adonthell.SDLK_F7 _adonthell.SDLK_F8_swigconstant(_adonthell) SDLK_F8 = _adonthell.SDLK_F8 _adonthell.SDLK_F9_swigconstant(_adonthell) SDLK_F9 = _adonthell.SDLK_F9 _adonthell.SDLK_F10_swigconstant(_adonthell) SDLK_F10 = _adonthell.SDLK_F10 _adonthell.SDLK_F11_swigconstant(_adonthell) SDLK_F11 = _adonthell.SDLK_F11 _adonthell.SDLK_F12_swigconstant(_adonthell) SDLK_F12 = _adonthell.SDLK_F12 _adonthell.SDLK_PRINTSCREEN_swigconstant(_adonthell) SDLK_PRINTSCREEN = _adonthell.SDLK_PRINTSCREEN _adonthell.SDLK_SCROLLLOCK_swigconstant(_adonthell) SDLK_SCROLLLOCK = _adonthell.SDLK_SCROLLLOCK _adonthell.SDLK_PAUSE_swigconstant(_adonthell) SDLK_PAUSE = _adonthell.SDLK_PAUSE _adonthell.SDLK_INSERT_swigconstant(_adonthell) SDLK_INSERT = _adonthell.SDLK_INSERT _adonthell.SDLK_HOME_swigconstant(_adonthell) SDLK_HOME = _adonthell.SDLK_HOME _adonthell.SDLK_PAGEUP_swigconstant(_adonthell) SDLK_PAGEUP = _adonthell.SDLK_PAGEUP _adonthell.SDLK_DELETE_swigconstant(_adonthell) SDLK_DELETE = _adonthell.SDLK_DELETE _adonthell.SDLK_END_swigconstant(_adonthell) SDLK_END = _adonthell.SDLK_END _adonthell.SDLK_PAGEDOWN_swigconstant(_adonthell) SDLK_PAGEDOWN = _adonthell.SDLK_PAGEDOWN _adonthell.SDLK_RIGHT_swigconstant(_adonthell) SDLK_RIGHT = _adonthell.SDLK_RIGHT _adonthell.SDLK_LEFT_swigconstant(_adonthell) SDLK_LEFT = _adonthell.SDLK_LEFT _adonthell.SDLK_DOWN_swigconstant(_adonthell) SDLK_DOWN = _adonthell.SDLK_DOWN _adonthell.SDLK_UP_swigconstant(_adonthell) SDLK_UP = _adonthell.SDLK_UP _adonthell.SDLK_NUMLOCKCLEAR_swigconstant(_adonthell) SDLK_NUMLOCKCLEAR = _adonthell.SDLK_NUMLOCKCLEAR _adonthell.SDLK_KP_DIVIDE_swigconstant(_adonthell) SDLK_KP_DIVIDE = _adonthell.SDLK_KP_DIVIDE _adonthell.SDLK_KP_MULTIPLY_swigconstant(_adonthell) SDLK_KP_MULTIPLY = _adonthell.SDLK_KP_MULTIPLY _adonthell.SDLK_KP_MINUS_swigconstant(_adonthell) SDLK_KP_MINUS = _adonthell.SDLK_KP_MINUS _adonthell.SDLK_KP_PLUS_swigconstant(_adonthell) SDLK_KP_PLUS = _adonthell.SDLK_KP_PLUS _adonthell.SDLK_KP_ENTER_swigconstant(_adonthell) SDLK_KP_ENTER = _adonthell.SDLK_KP_ENTER _adonthell.SDLK_KP_1_swigconstant(_adonthell) SDLK_KP_1 = _adonthell.SDLK_KP_1 _adonthell.SDLK_KP_2_swigconstant(_adonthell) SDLK_KP_2 = _adonthell.SDLK_KP_2 _adonthell.SDLK_KP_3_swigconstant(_adonthell) SDLK_KP_3 = _adonthell.SDLK_KP_3 _adonthell.SDLK_KP_4_swigconstant(_adonthell) SDLK_KP_4 = _adonthell.SDLK_KP_4 _adonthell.SDLK_KP_5_swigconstant(_adonthell) SDLK_KP_5 = _adonthell.SDLK_KP_5 _adonthell.SDLK_KP_6_swigconstant(_adonthell) SDLK_KP_6 = _adonthell.SDLK_KP_6 _adonthell.SDLK_KP_7_swigconstant(_adonthell) SDLK_KP_7 = _adonthell.SDLK_KP_7 _adonthell.SDLK_KP_8_swigconstant(_adonthell) SDLK_KP_8 = _adonthell.SDLK_KP_8 _adonthell.SDLK_KP_9_swigconstant(_adonthell) SDLK_KP_9 = _adonthell.SDLK_KP_9 _adonthell.SDLK_KP_0_swigconstant(_adonthell) SDLK_KP_0 = _adonthell.SDLK_KP_0 _adonthell.SDLK_KP_PERIOD_swigconstant(_adonthell) SDLK_KP_PERIOD = _adonthell.SDLK_KP_PERIOD _adonthell.SDLK_APPLICATION_swigconstant(_adonthell) SDLK_APPLICATION = _adonthell.SDLK_APPLICATION _adonthell.SDLK_POWER_swigconstant(_adonthell) SDLK_POWER = _adonthell.SDLK_POWER _adonthell.SDLK_KP_EQUALS_swigconstant(_adonthell) SDLK_KP_EQUALS = _adonthell.SDLK_KP_EQUALS _adonthell.SDLK_F13_swigconstant(_adonthell) SDLK_F13 = _adonthell.SDLK_F13 _adonthell.SDLK_F14_swigconstant(_adonthell) SDLK_F14 = _adonthell.SDLK_F14 _adonthell.SDLK_F15_swigconstant(_adonthell) SDLK_F15 = _adonthell.SDLK_F15 _adonthell.SDLK_F16_swigconstant(_adonthell) SDLK_F16 = _adonthell.SDLK_F16 _adonthell.SDLK_F17_swigconstant(_adonthell) SDLK_F17 = _adonthell.SDLK_F17 _adonthell.SDLK_F18_swigconstant(_adonthell) SDLK_F18 = _adonthell.SDLK_F18 _adonthell.SDLK_F19_swigconstant(_adonthell) SDLK_F19 = _adonthell.SDLK_F19 _adonthell.SDLK_F20_swigconstant(_adonthell) SDLK_F20 = _adonthell.SDLK_F20 _adonthell.SDLK_F21_swigconstant(_adonthell) SDLK_F21 = _adonthell.SDLK_F21 _adonthell.SDLK_F22_swigconstant(_adonthell) SDLK_F22 = _adonthell.SDLK_F22 _adonthell.SDLK_F23_swigconstant(_adonthell) SDLK_F23 = _adonthell.SDLK_F23 _adonthell.SDLK_F24_swigconstant(_adonthell) SDLK_F24 = _adonthell.SDLK_F24 _adonthell.SDLK_EXECUTE_swigconstant(_adonthell) SDLK_EXECUTE = _adonthell.SDLK_EXECUTE _adonthell.SDLK_HELP_swigconstant(_adonthell) SDLK_HELP = _adonthell.SDLK_HELP _adonthell.SDLK_MENU_swigconstant(_adonthell) SDLK_MENU = _adonthell.SDLK_MENU _adonthell.SDLK_SELECT_swigconstant(_adonthell) SDLK_SELECT = _adonthell.SDLK_SELECT _adonthell.SDLK_STOP_swigconstant(_adonthell) SDLK_STOP = _adonthell.SDLK_STOP _adonthell.SDLK_AGAIN_swigconstant(_adonthell) SDLK_AGAIN = _adonthell.SDLK_AGAIN _adonthell.SDLK_UNDO_swigconstant(_adonthell) SDLK_UNDO = _adonthell.SDLK_UNDO _adonthell.SDLK_CUT_swigconstant(_adonthell) SDLK_CUT = _adonthell.SDLK_CUT _adonthell.SDLK_COPY_swigconstant(_adonthell) SDLK_COPY = _adonthell.SDLK_COPY _adonthell.SDLK_PASTE_swigconstant(_adonthell) SDLK_PASTE = _adonthell.SDLK_PASTE _adonthell.SDLK_FIND_swigconstant(_adonthell) SDLK_FIND = _adonthell.SDLK_FIND _adonthell.SDLK_MUTE_swigconstant(_adonthell) SDLK_MUTE = _adonthell.SDLK_MUTE _adonthell.SDLK_VOLUMEUP_swigconstant(_adonthell) SDLK_VOLUMEUP = _adonthell.SDLK_VOLUMEUP _adonthell.SDLK_VOLUMEDOWN_swigconstant(_adonthell) SDLK_VOLUMEDOWN = _adonthell.SDLK_VOLUMEDOWN _adonthell.SDLK_KP_COMMA_swigconstant(_adonthell) SDLK_KP_COMMA = _adonthell.SDLK_KP_COMMA _adonthell.SDLK_KP_EQUALSAS400_swigconstant(_adonthell) SDLK_KP_EQUALSAS400 = _adonthell.SDLK_KP_EQUALSAS400 _adonthell.SDLK_ALTERASE_swigconstant(_adonthell) SDLK_ALTERASE = _adonthell.SDLK_ALTERASE _adonthell.SDLK_SYSREQ_swigconstant(_adonthell) SDLK_SYSREQ = _adonthell.SDLK_SYSREQ _adonthell.SDLK_CANCEL_swigconstant(_adonthell) SDLK_CANCEL = _adonthell.SDLK_CANCEL _adonthell.SDLK_CLEAR_swigconstant(_adonthell) SDLK_CLEAR = _adonthell.SDLK_CLEAR _adonthell.SDLK_PRIOR_swigconstant(_adonthell) SDLK_PRIOR = _adonthell.SDLK_PRIOR _adonthell.SDLK_RETURN2_swigconstant(_adonthell) SDLK_RETURN2 = _adonthell.SDLK_RETURN2 _adonthell.SDLK_SEPARATOR_swigconstant(_adonthell) SDLK_SEPARATOR = _adonthell.SDLK_SEPARATOR _adonthell.SDLK_OUT_swigconstant(_adonthell) SDLK_OUT = _adonthell.SDLK_OUT _adonthell.SDLK_OPER_swigconstant(_adonthell) SDLK_OPER = _adonthell.SDLK_OPER _adonthell.SDLK_CLEARAGAIN_swigconstant(_adonthell) SDLK_CLEARAGAIN = _adonthell.SDLK_CLEARAGAIN _adonthell.SDLK_CRSEL_swigconstant(_adonthell) SDLK_CRSEL = _adonthell.SDLK_CRSEL _adonthell.SDLK_EXSEL_swigconstant(_adonthell) SDLK_EXSEL = _adonthell.SDLK_EXSEL _adonthell.SDLK_KP_00_swigconstant(_adonthell) SDLK_KP_00 = _adonthell.SDLK_KP_00 _adonthell.SDLK_KP_000_swigconstant(_adonthell) SDLK_KP_000 = _adonthell.SDLK_KP_000 _adonthell.SDLK_THOUSANDSSEPARATOR_swigconstant(_adonthell) SDLK_THOUSANDSSEPARATOR = _adonthell.SDLK_THOUSANDSSEPARATOR _adonthell.SDLK_DECIMALSEPARATOR_swigconstant(_adonthell) SDLK_DECIMALSEPARATOR = _adonthell.SDLK_DECIMALSEPARATOR _adonthell.SDLK_CURRENCYUNIT_swigconstant(_adonthell) SDLK_CURRENCYUNIT = _adonthell.SDLK_CURRENCYUNIT _adonthell.SDLK_CURRENCYSUBUNIT_swigconstant(_adonthell) SDLK_CURRENCYSUBUNIT = _adonthell.SDLK_CURRENCYSUBUNIT _adonthell.SDLK_KP_LEFTPAREN_swigconstant(_adonthell) SDLK_KP_LEFTPAREN = _adonthell.SDLK_KP_LEFTPAREN _adonthell.SDLK_KP_RIGHTPAREN_swigconstant(_adonthell) SDLK_KP_RIGHTPAREN = _adonthell.SDLK_KP_RIGHTPAREN _adonthell.SDLK_KP_LEFTBRACE_swigconstant(_adonthell) SDLK_KP_LEFTBRACE = _adonthell.SDLK_KP_LEFTBRACE _adonthell.SDLK_KP_RIGHTBRACE_swigconstant(_adonthell) SDLK_KP_RIGHTBRACE = _adonthell.SDLK_KP_RIGHTBRACE _adonthell.SDLK_KP_TAB_swigconstant(_adonthell) SDLK_KP_TAB = _adonthell.SDLK_KP_TAB _adonthell.SDLK_KP_BACKSPACE_swigconstant(_adonthell) SDLK_KP_BACKSPACE = _adonthell.SDLK_KP_BACKSPACE _adonthell.SDLK_KP_A_swigconstant(_adonthell) SDLK_KP_A = _adonthell.SDLK_KP_A _adonthell.SDLK_KP_B_swigconstant(_adonthell) SDLK_KP_B = _adonthell.SDLK_KP_B _adonthell.SDLK_KP_C_swigconstant(_adonthell) SDLK_KP_C = _adonthell.SDLK_KP_C _adonthell.SDLK_KP_D_swigconstant(_adonthell) SDLK_KP_D = _adonthell.SDLK_KP_D _adonthell.SDLK_KP_E_swigconstant(_adonthell) SDLK_KP_E = _adonthell.SDLK_KP_E _adonthell.SDLK_KP_F_swigconstant(_adonthell) SDLK_KP_F = _adonthell.SDLK_KP_F _adonthell.SDLK_KP_XOR_swigconstant(_adonthell) SDLK_KP_XOR = _adonthell.SDLK_KP_XOR _adonthell.SDLK_KP_POWER_swigconstant(_adonthell) SDLK_KP_POWER = _adonthell.SDLK_KP_POWER _adonthell.SDLK_KP_PERCENT_swigconstant(_adonthell) SDLK_KP_PERCENT = _adonthell.SDLK_KP_PERCENT _adonthell.SDLK_KP_LESS_swigconstant(_adonthell) SDLK_KP_LESS = _adonthell.SDLK_KP_LESS _adonthell.SDLK_KP_GREATER_swigconstant(_adonthell) SDLK_KP_GREATER = _adonthell.SDLK_KP_GREATER _adonthell.SDLK_KP_AMPERSAND_swigconstant(_adonthell) SDLK_KP_AMPERSAND = _adonthell.SDLK_KP_AMPERSAND _adonthell.SDLK_KP_DBLAMPERSAND_swigconstant(_adonthell) SDLK_KP_DBLAMPERSAND = _adonthell.SDLK_KP_DBLAMPERSAND _adonthell.SDLK_KP_VERTICALBAR_swigconstant(_adonthell) SDLK_KP_VERTICALBAR = _adonthell.SDLK_KP_VERTICALBAR _adonthell.SDLK_KP_DBLVERTICALBAR_swigconstant(_adonthell) SDLK_KP_DBLVERTICALBAR = _adonthell.SDLK_KP_DBLVERTICALBAR _adonthell.SDLK_KP_COLON_swigconstant(_adonthell) SDLK_KP_COLON = _adonthell.SDLK_KP_COLON _adonthell.SDLK_KP_HASH_swigconstant(_adonthell) SDLK_KP_HASH = _adonthell.SDLK_KP_HASH _adonthell.SDLK_KP_SPACE_swigconstant(_adonthell) SDLK_KP_SPACE = _adonthell.SDLK_KP_SPACE _adonthell.SDLK_KP_AT_swigconstant(_adonthell) SDLK_KP_AT = _adonthell.SDLK_KP_AT _adonthell.SDLK_KP_EXCLAM_swigconstant(_adonthell) SDLK_KP_EXCLAM = _adonthell.SDLK_KP_EXCLAM _adonthell.SDLK_KP_MEMSTORE_swigconstant(_adonthell) SDLK_KP_MEMSTORE = _adonthell.SDLK_KP_MEMSTORE _adonthell.SDLK_KP_MEMRECALL_swigconstant(_adonthell) SDLK_KP_MEMRECALL = _adonthell.SDLK_KP_MEMRECALL _adonthell.SDLK_KP_MEMCLEAR_swigconstant(_adonthell) SDLK_KP_MEMCLEAR = _adonthell.SDLK_KP_MEMCLEAR _adonthell.SDLK_KP_MEMADD_swigconstant(_adonthell) SDLK_KP_MEMADD = _adonthell.SDLK_KP_MEMADD _adonthell.SDLK_KP_MEMSUBTRACT_swigconstant(_adonthell) SDLK_KP_MEMSUBTRACT = _adonthell.SDLK_KP_MEMSUBTRACT _adonthell.SDLK_KP_MEMMULTIPLY_swigconstant(_adonthell) SDLK_KP_MEMMULTIPLY = _adonthell.SDLK_KP_MEMMULTIPLY _adonthell.SDLK_KP_MEMDIVIDE_swigconstant(_adonthell) SDLK_KP_MEMDIVIDE = _adonthell.SDLK_KP_MEMDIVIDE _adonthell.SDLK_KP_PLUSMINUS_swigconstant(_adonthell) SDLK_KP_PLUSMINUS = _adonthell.SDLK_KP_PLUSMINUS _adonthell.SDLK_KP_CLEAR_swigconstant(_adonthell) SDLK_KP_CLEAR = _adonthell.SDLK_KP_CLEAR _adonthell.SDLK_KP_CLEARENTRY_swigconstant(_adonthell) SDLK_KP_CLEARENTRY = _adonthell.SDLK_KP_CLEARENTRY _adonthell.SDLK_KP_BINARY_swigconstant(_adonthell) SDLK_KP_BINARY = _adonthell.SDLK_KP_BINARY _adonthell.SDLK_KP_OCTAL_swigconstant(_adonthell) SDLK_KP_OCTAL = _adonthell.SDLK_KP_OCTAL _adonthell.SDLK_KP_DECIMAL_swigconstant(_adonthell) SDLK_KP_DECIMAL = _adonthell.SDLK_KP_DECIMAL _adonthell.SDLK_KP_HEXADECIMAL_swigconstant(_adonthell) SDLK_KP_HEXADECIMAL = _adonthell.SDLK_KP_HEXADECIMAL _adonthell.SDLK_LCTRL_swigconstant(_adonthell) SDLK_LCTRL = _adonthell.SDLK_LCTRL _adonthell.SDLK_LSHIFT_swigconstant(_adonthell) SDLK_LSHIFT = _adonthell.SDLK_LSHIFT _adonthell.SDLK_LALT_swigconstant(_adonthell) SDLK_LALT = _adonthell.SDLK_LALT _adonthell.SDLK_LGUI_swigconstant(_adonthell) SDLK_LGUI = _adonthell.SDLK_LGUI _adonthell.SDLK_RCTRL_swigconstant(_adonthell) SDLK_RCTRL = _adonthell.SDLK_RCTRL _adonthell.SDLK_RSHIFT_swigconstant(_adonthell) SDLK_RSHIFT = _adonthell.SDLK_RSHIFT _adonthell.SDLK_RALT_swigconstant(_adonthell) SDLK_RALT = _adonthell.SDLK_RALT _adonthell.SDLK_RGUI_swigconstant(_adonthell) SDLK_RGUI = _adonthell.SDLK_RGUI _adonthell.SDLK_MODE_swigconstant(_adonthell) SDLK_MODE = _adonthell.SDLK_MODE _adonthell.SDLK_AUDIONEXT_swigconstant(_adonthell) SDLK_AUDIONEXT = _adonthell.SDLK_AUDIONEXT _adonthell.SDLK_AUDIOPREV_swigconstant(_adonthell) SDLK_AUDIOPREV = _adonthell.SDLK_AUDIOPREV _adonthell.SDLK_AUDIOSTOP_swigconstant(_adonthell) SDLK_AUDIOSTOP = _adonthell.SDLK_AUDIOSTOP _adonthell.SDLK_AUDIOPLAY_swigconstant(_adonthell) SDLK_AUDIOPLAY = _adonthell.SDLK_AUDIOPLAY _adonthell.SDLK_AUDIOMUTE_swigconstant(_adonthell) SDLK_AUDIOMUTE = _adonthell.SDLK_AUDIOMUTE _adonthell.SDLK_MEDIASELECT_swigconstant(_adonthell) SDLK_MEDIASELECT = _adonthell.SDLK_MEDIASELECT _adonthell.SDLK_WWW_swigconstant(_adonthell) SDLK_WWW = _adonthell.SDLK_WWW _adonthell.SDLK_MAIL_swigconstant(_adonthell) SDLK_MAIL = _adonthell.SDLK_MAIL _adonthell.SDLK_CALCULATOR_swigconstant(_adonthell) SDLK_CALCULATOR = _adonthell.SDLK_CALCULATOR _adonthell.SDLK_COMPUTER_swigconstant(_adonthell) SDLK_COMPUTER = _adonthell.SDLK_COMPUTER _adonthell.SDLK_AC_SEARCH_swigconstant(_adonthell) SDLK_AC_SEARCH = _adonthell.SDLK_AC_SEARCH _adonthell.SDLK_AC_HOME_swigconstant(_adonthell) SDLK_AC_HOME = _adonthell.SDLK_AC_HOME _adonthell.SDLK_AC_BACK_swigconstant(_adonthell) SDLK_AC_BACK = _adonthell.SDLK_AC_BACK _adonthell.SDLK_AC_FORWARD_swigconstant(_adonthell) SDLK_AC_FORWARD = _adonthell.SDLK_AC_FORWARD _adonthell.SDLK_AC_STOP_swigconstant(_adonthell) SDLK_AC_STOP = _adonthell.SDLK_AC_STOP _adonthell.SDLK_AC_REFRESH_swigconstant(_adonthell) SDLK_AC_REFRESH = _adonthell.SDLK_AC_REFRESH _adonthell.SDLK_AC_BOOKMARKS_swigconstant(_adonthell) SDLK_AC_BOOKMARKS = _adonthell.SDLK_AC_BOOKMARKS _adonthell.SDLK_BRIGHTNESSDOWN_swigconstant(_adonthell) SDLK_BRIGHTNESSDOWN = _adonthell.SDLK_BRIGHTNESSDOWN _adonthell.SDLK_BRIGHTNESSUP_swigconstant(_adonthell) SDLK_BRIGHTNESSUP = _adonthell.SDLK_BRIGHTNESSUP _adonthell.SDLK_DISPLAYSWITCH_swigconstant(_adonthell) SDLK_DISPLAYSWITCH = _adonthell.SDLK_DISPLAYSWITCH _adonthell.SDLK_KBDILLUMTOGGLE_swigconstant(_adonthell) SDLK_KBDILLUMTOGGLE = _adonthell.SDLK_KBDILLUMTOGGLE _adonthell.SDLK_KBDILLUMDOWN_swigconstant(_adonthell) SDLK_KBDILLUMDOWN = _adonthell.SDLK_KBDILLUMDOWN _adonthell.SDLK_KBDILLUMUP_swigconstant(_adonthell) SDLK_KBDILLUMUP = _adonthell.SDLK_KBDILLUMUP _adonthell.SDLK_EJECT_swigconstant(_adonthell) SDLK_EJECT = _adonthell.SDLK_EJECT _adonthell.SDLK_SLEEP_swigconstant(_adonthell) SDLK_SLEEP = _adonthell.SDLK_SLEEP _adonthell.SDLK_APP1_swigconstant(_adonthell) SDLK_APP1 = _adonthell.SDLK_APP1 _adonthell.SDLK_APP2_swigconstant(_adonthell) SDLK_APP2 = _adonthell.SDLK_APP2 _adonthell.SDLK_AUDIOREWIND_swigconstant(_adonthell) SDLK_AUDIOREWIND = _adonthell.SDLK_AUDIOREWIND _adonthell.SDLK_AUDIOFASTFORWARD_swigconstant(_adonthell) SDLK_AUDIOFASTFORWARD = _adonthell.SDLK_AUDIOFASTFORWARD _adonthell.KMOD_NONE_swigconstant(_adonthell) KMOD_NONE = _adonthell.KMOD_NONE _adonthell.KMOD_LSHIFT_swigconstant(_adonthell) KMOD_LSHIFT = _adonthell.KMOD_LSHIFT _adonthell.KMOD_RSHIFT_swigconstant(_adonthell) KMOD_RSHIFT = _adonthell.KMOD_RSHIFT _adonthell.KMOD_LCTRL_swigconstant(_adonthell) KMOD_LCTRL = _adonthell.KMOD_LCTRL _adonthell.KMOD_RCTRL_swigconstant(_adonthell) KMOD_RCTRL = _adonthell.KMOD_RCTRL _adonthell.KMOD_LALT_swigconstant(_adonthell) KMOD_LALT = _adonthell.KMOD_LALT _adonthell.KMOD_RALT_swigconstant(_adonthell) KMOD_RALT = _adonthell.KMOD_RALT _adonthell.KMOD_LGUI_swigconstant(_adonthell) KMOD_LGUI = _adonthell.KMOD_LGUI _adonthell.KMOD_RGUI_swigconstant(_adonthell) KMOD_RGUI = _adonthell.KMOD_RGUI _adonthell.KMOD_NUM_swigconstant(_adonthell) KMOD_NUM = _adonthell.KMOD_NUM _adonthell.KMOD_CAPS_swigconstant(_adonthell) KMOD_CAPS = _adonthell.KMOD_CAPS _adonthell.KMOD_MODE_swigconstant(_adonthell) KMOD_MODE = _adonthell.KMOD_MODE _adonthell.KMOD_RESERVED_swigconstant(_adonthell) KMOD_RESERVED = _adonthell.KMOD_RESERVED class input(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr init = staticmethod(_adonthell.input_init) shutdown = staticmethod(_adonthell.input_shutdown) update = staticmethod(_adonthell.input_update) is_pushed = staticmethod(_adonthell.input_is_pushed) has_been_pushed = staticmethod(_adonthell.input_has_been_pushed) get_next_key = staticmethod(_adonthell.input_get_next_key) get_next_unicode = staticmethod(_adonthell.input_get_next_unicode) start_text_input = staticmethod(_adonthell.input_start_text_input) stop_text_input = staticmethod(_adonthell.input_stop_text_input) is_text_input = staticmethod(_adonthell.input_is_text_input) clear_keys_queue = staticmethod(_adonthell.input_clear_keys_queue) def __init__(self, *args): this = _adonthell.new_input(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_input __del__ = lambda self: None input_swigregister = _adonthell.input_swigregister input_swigregister(input) def input_init(*args): return _adonthell.input_init(*args) input_init = _adonthell.input_init def input_shutdown(*args): return _adonthell.input_shutdown(*args) input_shutdown = _adonthell.input_shutdown def input_update(*args): return _adonthell.input_update(*args) input_update = _adonthell.input_update def input_is_pushed(*args): return _adonthell.input_is_pushed(*args) input_is_pushed = _adonthell.input_is_pushed def input_has_been_pushed(*args): return _adonthell.input_has_been_pushed(*args) input_has_been_pushed = _adonthell.input_has_been_pushed def input_get_next_key(*args): return _adonthell.input_get_next_key(*args) input_get_next_key = _adonthell.input_get_next_key def input_get_next_unicode(*args): return _adonthell.input_get_next_unicode(*args) input_get_next_unicode = _adonthell.input_get_next_unicode def input_start_text_input(*args): return _adonthell.input_start_text_input(*args) input_start_text_input = _adonthell.input_start_text_input def input_stop_text_input(*args): return _adonthell.input_stop_text_input(*args) input_stop_text_input = _adonthell.input_stop_text_input def input_is_text_input(*args): return _adonthell.input_is_text_input(*args) input_is_text_input = _adonthell.input_is_text_input def input_clear_keys_queue(*args): return _adonthell.input_clear_keys_queue(*args) input_clear_keys_queue = _adonthell.input_clear_keys_queue _adonthell.NUM_WAVES_swigconstant(_adonthell) NUM_WAVES = _adonthell.NUM_WAVES _adonthell.NUM_MUSIC_swigconstant(_adonthell) NUM_MUSIC = _adonthell.NUM_MUSIC _adonthell.NUM_CHANNELS_swigconstant(_adonthell) NUM_CHANNELS = _adonthell.NUM_CHANNELS class audio(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr init = staticmethod(_adonthell.audio_init) cleanup = staticmethod(_adonthell.audio_cleanup) put_state = staticmethod(_adonthell.audio_put_state) get_state = staticmethod(_adonthell.audio_get_state) load_background = staticmethod(_adonthell.audio_load_background) unload_background = staticmethod(_adonthell.audio_unload_background) set_background_volume = staticmethod(_adonthell.audio_set_background_volume) pause_music = staticmethod(_adonthell.audio_pause_music) unpause_music = staticmethod(_adonthell.audio_unpause_music) load_wave = staticmethod(_adonthell.audio_load_wave) unload_wave = staticmethod(_adonthell.audio_unload_wave) play_wave = staticmethod(_adonthell.audio_play_wave) play_background = staticmethod(_adonthell.audio_play_background) fade_in_background = staticmethod(_adonthell.audio_fade_in_background) fade_out_background = staticmethod(_adonthell.audio_fade_out_background) change_background = staticmethod(_adonthell.audio_change_background) is_initialized = staticmethod(_adonthell.audio_is_initialized) is_schedule_activated = staticmethod(_adonthell.audio_is_schedule_activated) is_background_finished = staticmethod(_adonthell.audio_is_background_finished) set_schedule_active = staticmethod(_adonthell.audio_set_schedule_active) set_schedule = staticmethod(_adonthell.audio_set_schedule) run_schedule = staticmethod(_adonthell.audio_run_schedule) def __init__(self, *args): this = _adonthell.new_audio(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_audio __del__ = lambda self: None audio_swigregister = _adonthell.audio_swigregister audio_swigregister(audio) def audio_init(*args): return _adonthell.audio_init(*args) audio_init = _adonthell.audio_init def audio_cleanup(*args): return _adonthell.audio_cleanup(*args) audio_cleanup = _adonthell.audio_cleanup def audio_put_state(*args): return _adonthell.audio_put_state(*args) audio_put_state = _adonthell.audio_put_state def audio_get_state(*args): return _adonthell.audio_get_state(*args) audio_get_state = _adonthell.audio_get_state def audio_load_background(*args): return _adonthell.audio_load_background(*args) audio_load_background = _adonthell.audio_load_background def audio_unload_background(*args): return _adonthell.audio_unload_background(*args) audio_unload_background = _adonthell.audio_unload_background def audio_set_background_volume(*args): return _adonthell.audio_set_background_volume(*args) audio_set_background_volume = _adonthell.audio_set_background_volume def audio_pause_music(*args): return _adonthell.audio_pause_music(*args) audio_pause_music = _adonthell.audio_pause_music def audio_unpause_music(*args): return _adonthell.audio_unpause_music(*args) audio_unpause_music = _adonthell.audio_unpause_music def audio_load_wave(*args): return _adonthell.audio_load_wave(*args) audio_load_wave = _adonthell.audio_load_wave def audio_unload_wave(*args): return _adonthell.audio_unload_wave(*args) audio_unload_wave = _adonthell.audio_unload_wave def audio_play_wave(*args): return _adonthell.audio_play_wave(*args) audio_play_wave = _adonthell.audio_play_wave def audio_play_background(*args): return _adonthell.audio_play_background(*args) audio_play_background = _adonthell.audio_play_background def audio_fade_in_background(*args): return _adonthell.audio_fade_in_background(*args) audio_fade_in_background = _adonthell.audio_fade_in_background def audio_fade_out_background(*args): return _adonthell.audio_fade_out_background(*args) audio_fade_out_background = _adonthell.audio_fade_out_background def audio_change_background(*args): return _adonthell.audio_change_background(*args) audio_change_background = _adonthell.audio_change_background def audio_is_initialized(*args): return _adonthell.audio_is_initialized(*args) audio_is_initialized = _adonthell.audio_is_initialized def audio_is_schedule_activated(*args): return _adonthell.audio_is_schedule_activated(*args) audio_is_schedule_activated = _adonthell.audio_is_schedule_activated def audio_is_background_finished(*args): return _adonthell.audio_is_background_finished(*args) audio_is_background_finished = _adonthell.audio_is_background_finished def audio_set_schedule_active(*args): return _adonthell.audio_set_schedule_active(*args) audio_set_schedule_active = _adonthell.audio_set_schedule_active def audio_set_schedule(*args): return _adonthell.audio_set_schedule(*args) audio_set_schedule = _adonthell.audio_set_schedule def audio_run_schedule(*args): return _adonthell.audio_run_schedule(*args) audio_run_schedule = _adonthell.audio_run_schedule _adonthell.DIALOG_DIR_swigconstant(_adonthell) DIALOG_DIR = _adonthell.DIALOG_DIR _adonthell.DWARF_swigconstant(_adonthell) DWARF = _adonthell.DWARF _adonthell.ELF_swigconstant(_adonthell) ELF = _adonthell.ELF _adonthell.HALFELF_swigconstant(_adonthell) HALFELF = _adonthell.HALFELF _adonthell.HUMAN_swigconstant(_adonthell) HUMAN = _adonthell.HUMAN _adonthell.FEMALE_swigconstant(_adonthell) FEMALE = _adonthell.FEMALE _adonthell.MALE_swigconstant(_adonthell) MALE = _adonthell.MALE _adonthell.NPC_swigconstant(_adonthell) NPC = _adonthell.NPC _adonthell.PLAYER_swigconstant(_adonthell) PLAYER = _adonthell.PLAYER _adonthell.PARTY_swigconstant(_adonthell) PARTY = _adonthell.PARTY class character_base(storage): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_character_base(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_character_base __del__ = lambda self: None def get_name(self, *args): return _adonthell.character_base_get_name(self, *args) def get_id(self, *args): return _adonthell.character_base_get_id(self, *args) def set_name(self, *args): return _adonthell.character_base_set_name(self, *args) def get_color(self, *args): return _adonthell.character_base_get_color(self, *args) def set_color(self, *args): return _adonthell.character_base_set_color(self, *args) def get_portrait(self, *args): return _adonthell.character_base_get_portrait(self, *args) def set_portrait(self, *args): return _adonthell.character_base_set_portrait(self, *args) def get_dialogue(self, *args): return _adonthell.character_base_get_dialogue(self, *args) def set_dialogue(self, *args): return _adonthell.character_base_set_dialogue(self, *args) def get_state(self, *args): return _adonthell.character_base_get_state(self, *args) def put_state(self, *args): return _adonthell.character_base_put_state(self, *args) character_base_swigregister = _adonthell.character_base_swigregister character_base_swigregister(character_base) class py_object(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_py_object(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_py_object __del__ = lambda self: None def clear(self, *args): return _adonthell.py_object_clear(self, *args) def create_instance(self, *args): return _adonthell.py_object_create_instance(self, *args) def reload_instance(self, *args): return _adonthell.py_object_reload_instance(self, *args) def call_method_ret(self, *args): return _adonthell.py_object_call_method_ret(self, *args) def call_method(self, *args): return _adonthell.py_object_call_method(self, *args) def run(self, *args): return _adonthell.py_object_run(self, *args) def has_attribute(self, *args): return _adonthell.py_object_has_attribute(self, *args) def get_attribute(self, *args): return _adonthell.py_object_get_attribute(self, *args) def get_attribute_int(self, *args): return _adonthell.py_object_get_attribute_int(self, *args) def get_attribute_string(self, *args): return _adonthell.py_object_get_attribute_string(self, *args) def set_attribute(self, *args): return _adonthell.py_object_set_attribute(self, *args) def set_attribute_int(self, *args): return _adonthell.py_object_set_attribute_int(self, *args) def set_attribute_string(self, *args): return _adonthell.py_object_set_attribute_string(self, *args) def get_instance(self, *args): return _adonthell.py_object_get_instance(self, *args) def class_name(self, *args): return _adonthell.py_object_class_name(self, *args) def file_name(self, *args): return _adonthell.py_object_file_name(self, *args) py_object_swigregister = _adonthell.py_object_swigregister py_object_swigregister(py_object) class drawing_area(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_drawing_area(*args) try: self.this.append(this) except Exception: self.this = this def x(self, *args): return _adonthell.drawing_area_x(self, *args) def y(self, *args): return _adonthell.drawing_area_y(self, *args) def length(self, *args): return _adonthell.drawing_area_length(self, *args) def height(self, *args): return _adonthell.drawing_area_height(self, *args) def move(self, *args): return _adonthell.drawing_area_move(self, *args) def resize(self, *args): return _adonthell.drawing_area_resize(self, *args) def assign_drawing_area(self, *args): return _adonthell.drawing_area_assign_drawing_area(self, *args) def assigned_drawing_area(self, *args): return _adonthell.drawing_area_assigned_drawing_area(self, *args) def detach_drawing_area(self, *args): return _adonthell.drawing_area_detach_drawing_area(self, *args) def setup_rects(self, *args): return _adonthell.drawing_area_setup_rects(self, *args) __swig_destroy__ = _adonthell.delete_drawing_area __del__ = lambda self: None drawing_area_swigregister = _adonthell.drawing_area_swigregister drawing_area_swigregister(drawing_area) class quest(storage): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_quest(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_quest __del__ = lambda self: None quest_swigregister = _adonthell.quest_swigregister quest_swigregister(quest) class drawable(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _adonthell.delete_drawable __del__ = lambda self: None def length(self, *args): return _adonthell.drawable_length(self, *args) def height(self, *args): return _adonthell.drawable_height(self, *args) def update(self, *args): return _adonthell.drawable_update(self, *args) def input_update(self, *args): return _adonthell.drawable_input_update(self, *args) def draw(self, *args): return _adonthell.drawable_draw(self, *args) drawable_swigregister = _adonthell.drawable_swigregister drawable_swigregister(drawable) _adonthell.R_MASK_swigconstant(_adonthell) R_MASK = _adonthell.R_MASK _adonthell.G_MASK_swigconstant(_adonthell) G_MASK = _adonthell.G_MASK _adonthell.B_MASK_swigconstant(_adonthell) B_MASK = _adonthell.B_MASK _adonthell.A_MASK_swigconstant(_adonthell) A_MASK = _adonthell.A_MASK _adonthell.BYTES_PER_PIXEL_swigconstant(_adonthell) BYTES_PER_PIXEL = _adonthell.BYTES_PER_PIXEL class pixel_info(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_pixel_info(*args) try: self.this.append(this) except Exception: self.this = this Pixels = _swig_property(_adonthell.pixel_info_Pixels_get, _adonthell.pixel_info_Pixels_set) Pitch = _swig_property(_adonthell.pixel_info_Pitch_get, _adonthell.pixel_info_Pitch_set) Format = _swig_property(_adonthell.pixel_info_Format_get, _adonthell.pixel_info_Format_set) BytesPerPixel = _swig_property(_adonthell.pixel_info_BytesPerPixel_get, _adonthell.pixel_info_BytesPerPixel_set) __swig_destroy__ = _adonthell.delete_pixel_info __del__ = lambda self: None pixel_info_swigregister = _adonthell.pixel_info_swigregister pixel_info_swigregister(pixel_info) class surface(drawable): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_surface(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_surface __del__ = lambda self: None def is_masked(self, *args): return _adonthell.surface_is_masked(self, *args) def set_mask(self, *args): return _adonthell.surface_set_mask(self, *args) def alpha(self, *args): return _adonthell.surface_alpha(self, *args) def set_alpha(self, *args): return _adonthell.surface_set_alpha(self, *args) def has_alpha_channel(self, *args): return _adonthell.surface_has_alpha_channel(self, *args) def scale(self, *args): return _adonthell.surface_scale(self, *args) def set_scale(self, *args): return _adonthell.surface_set_scale(self, *args) def draw(self, *args): return _adonthell.surface_draw(self, *args) def draw_part(self, *args): return _adonthell.surface_draw_part(self, *args) def fillrect(self, *args): return _adonthell.surface_fillrect(self, *args) def map_color(self, *args): return _adonthell.surface_map_color(self, *args) def unmap_color(self, *args): return _adonthell.surface_unmap_color(self, *args) def lock(self, *args): return _adonthell.surface_lock(self, *args) def unlock(self, *args): return _adonthell.surface_unlock(self, *args) def put_pix(self, *args): return _adonthell.surface_put_pix(self, *args) def put_pix_rgb(self, *args): return _adonthell.surface_put_pix_rgb(self, *args) def get_pix(self, *args): return _adonthell.surface_get_pix(self, *args) def get_pix_rgb(self, *args): return _adonthell.surface_get_pix_rgb(self, *args) def copy(self, *args): return _adonthell.surface_copy(self, *args) surface_swigregister = _adonthell.surface_swigregister surface_swigregister(surface) class screen(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr cleanup = staticmethod(_adonthell.screen_cleanup) get_renderer = staticmethod(_adonthell.screen_get_renderer) format = staticmethod(_adonthell.screen_format) display = _swig_property(_adonthell.screen_display_get, _adonthell.screen_display_set) init = staticmethod(_adonthell.screen_init) length = staticmethod(_adonthell.screen_length) height = staticmethod(_adonthell.screen_height) bytes_per_pixel = staticmethod(_adonthell.screen_bytes_per_pixel) trans_col = staticmethod(_adonthell.screen_trans_col) scale = staticmethod(_adonthell.screen_scale) offset_x = staticmethod(_adonthell.screen_offset_x) offset_y = staticmethod(_adonthell.screen_offset_y) clear = staticmethod(_adonthell.screen_clear) show = staticmethod(_adonthell.screen_show) mode = staticmethod(_adonthell.screen_mode) set_fullscreen = staticmethod(_adonthell.screen_set_fullscreen) info = staticmethod(_adonthell.screen_info) transition = staticmethod(_adonthell.screen_transition) def __init__(self, *args): this = _adonthell.new_screen(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_screen __del__ = lambda self: None screen_swigregister = _adonthell.screen_swigregister screen_swigregister(screen) def screen_cleanup(*args): return _adonthell.screen_cleanup(*args) screen_cleanup = _adonthell.screen_cleanup def screen_get_renderer(*args): return _adonthell.screen_get_renderer(*args) screen_get_renderer = _adonthell.screen_get_renderer def screen_format(*args): return _adonthell.screen_format(*args) screen_format = _adonthell.screen_format cvar = _adonthell.cvar def screen_init(*args): return _adonthell.screen_init(*args) screen_init = _adonthell.screen_init def screen_length(*args): return _adonthell.screen_length(*args) screen_length = _adonthell.screen_length def screen_height(*args): return _adonthell.screen_height(*args) screen_height = _adonthell.screen_height def screen_bytes_per_pixel(*args): return _adonthell.screen_bytes_per_pixel(*args) screen_bytes_per_pixel = _adonthell.screen_bytes_per_pixel def screen_trans_col(*args): return _adonthell.screen_trans_col(*args) screen_trans_col = _adonthell.screen_trans_col def screen_scale(*args): return _adonthell.screen_scale(*args) screen_scale = _adonthell.screen_scale def screen_offset_x(*args): return _adonthell.screen_offset_x(*args) screen_offset_x = _adonthell.screen_offset_x def screen_offset_y(*args): return _adonthell.screen_offset_y(*args) screen_offset_y = _adonthell.screen_offset_y def screen_clear(*args): return _adonthell.screen_clear(*args) screen_clear = _adonthell.screen_clear def screen_show(*args): return _adonthell.screen_show(*args) screen_show = _adonthell.screen_show def screen_mode(*args): return _adonthell.screen_mode(*args) screen_mode = _adonthell.screen_mode def screen_set_fullscreen(*args): return _adonthell.screen_set_fullscreen(*args) screen_set_fullscreen = _adonthell.screen_set_fullscreen def screen_info(*args): return _adonthell.screen_info(*args) screen_info = _adonthell.screen_info def screen_transition(*args): return _adonthell.screen_transition(*args) screen_transition = _adonthell.screen_transition class image(surface): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_image(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_image __del__ = lambda self: None def resize(self, *args): return _adonthell.image_resize(self, *args) def clear(self, *args): return _adonthell.image_clear(self, *args) def get(self, *args): return _adonthell.image_get(self, *args) def load(self, *args): return _adonthell.image_load(self, *args) def get_raw(self, *args): return _adonthell.image_get_raw(self, *args) def load_raw(self, *args): return _adonthell.image_load_raw(self, *args) def get_pnm(self, *args): return _adonthell.image_get_pnm(self, *args) def load_pnm(self, *args): return _adonthell.image_load_pnm(self, *args) def put(self, *args): return _adonthell.image_put(self, *args) def save(self, *args): return _adonthell.image_save(self, *args) def put_raw(self, *args): return _adonthell.image_put_raw(self, *args) def save_raw(self, *args): return _adonthell.image_save_raw(self, *args) def put_pnm(self, *args): return _adonthell.image_put_pnm(self, *args) def save_pnm(self, *args): return _adonthell.image_save_pnm(self, *args) def zoom(self, *args): return _adonthell.image_zoom(self, *args) def zoom_to(self, *args): return _adonthell.image_zoom_to(self, *args) def tile(self, *args): return _adonthell.image_tile(self, *args) def tile_to(self, *args): return _adonthell.image_tile_to(self, *args) def brightness(self, *args): return _adonthell.image_brightness(self, *args) def copy(self, *args): return _adonthell.image_copy(self, *args) image_swigregister = _adonthell.image_swigregister image_swigregister(image) class animationframe(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_animationframe(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_animationframe __del__ = lambda self: None def clear(self, *args): return _adonthell.animationframe_clear(self, *args) def is_masked(self, *args): return _adonthell.animationframe_is_masked(self, *args) def set_mask(self, *args): return _adonthell.animationframe_set_mask(self, *args) def alpha(self, *args): return _adonthell.animationframe_alpha(self, *args) def set_alpha(self, *args): return _adonthell.animationframe_set_alpha(self, *args) def image_nbr(self, *args): return _adonthell.animationframe_image_nbr(self, *args) def set_image_nbr(self, *args): return _adonthell.animationframe_set_image_nbr(self, *args) def delay(self, *args): return _adonthell.animationframe_delay(self, *args) def set_delay(self, *args): return _adonthell.animationframe_set_delay(self, *args) def nextframe(self, *args): return _adonthell.animationframe_nextframe(self, *args) def set_nextframe(self, *args): return _adonthell.animationframe_set_nextframe(self, *args) def offx(self, *args): return _adonthell.animationframe_offx(self, *args) def offy(self, *args): return _adonthell.animationframe_offy(self, *args) def set_offset(self, *args): return _adonthell.animationframe_set_offset(self, *args) def get(self, *args): return _adonthell.animationframe_get(self, *args) def put(self, *args): return _adonthell.animationframe_put(self, *args) animationframe_swigregister = _adonthell.animationframe_swigregister animationframe_swigregister(animationframe) _adonthell.PLAY_swigconstant(_adonthell) PLAY = _adonthell.PLAY _adonthell.STOP_swigconstant(_adonthell) STOP = _adonthell.STOP class animation(drawable): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_animation(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_animation __del__ = lambda self: None def clear(self, *args): return _adonthell.animation_clear(self, *args) def play(self, *args): return _adonthell.animation_play(self, *args) def stop(self, *args): return _adonthell.animation_stop(self, *args) def playstate(self, *args): return _adonthell.animation_playstate(self, *args) def rewind(self, *args): return _adonthell.animation_rewind(self, *args) def next_frame(self, *args): return _adonthell.animation_next_frame(self, *args) def update(self, *args): return _adonthell.animation_update(self, *args) def draw(self, *args): return _adonthell.animation_draw(self, *args) def get(self, *args): return _adonthell.animation_get(self, *args) def load(self, *args): return _adonthell.animation_load(self, *args) def put(self, *args): return _adonthell.animation_put(self, *args) def save(self, *args): return _adonthell.animation_save(self, *args) def nbr_of_frames(self, *args): return _adonthell.animation_nbr_of_frames(self, *args) def nbr_of_images(self, *args): return _adonthell.animation_nbr_of_images(self, *args) def currentframe(self, *args): return _adonthell.animation_currentframe(self, *args) def set_currentframe(self, *args): return _adonthell.animation_set_currentframe(self, *args) def xoffset(self, *args): return _adonthell.animation_xoffset(self, *args) def yoffset(self, *args): return _adonthell.animation_yoffset(self, *args) def set_offset(self, *args): return _adonthell.animation_set_offset(self, *args) def get_frame(self, *args): return _adonthell.animation_get_frame(self, *args) def get_image(self, *args): return _adonthell.animation_get_image(self, *args) def insert_image(self, *args): return _adonthell.animation_insert_image(self, *args) def insert_frame(self, *args): return _adonthell.animation_insert_frame(self, *args) def delete_image(self, *args): return _adonthell.animation_delete_image(self, *args) def delete_frame(self, *args): return _adonthell.animation_delete_frame(self, *args) def zoom(self, *args): return _adonthell.animation_zoom(self, *args) def copy(self, *args): return _adonthell.animation_copy(self, *args) animation_swigregister = _adonthell.animation_swigregister animation_swigregister(animation) _adonthell.ALL_WALKABLE_swigconstant(_adonthell) ALL_WALKABLE = _adonthell.ALL_WALKABLE _adonthell.WALKABLE_SOUTH_swigconstant(_adonthell) WALKABLE_SOUTH = _adonthell.WALKABLE_SOUTH _adonthell.WALKABLE_NORTH_swigconstant(_adonthell) WALKABLE_NORTH = _adonthell.WALKABLE_NORTH _adonthell.WALKABLE_EAST_swigconstant(_adonthell) WALKABLE_EAST = _adonthell.WALKABLE_EAST _adonthell.WALKABLE_WEST_swigconstant(_adonthell) WALKABLE_WEST = _adonthell.WALKABLE_WEST _adonthell.NONE_WALKABLE_swigconstant(_adonthell) NONE_WALKABLE = _adonthell.NONE_WALKABLE class mapsquare_walkable(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapsquare_walkable(*args) try: self.this.append(this) except Exception: self.this = this def get(self, *args): return _adonthell.mapsquare_walkable_get(self, *args) def put(self, *args): return _adonthell.mapsquare_walkable_put(self, *args) def is_walkable_west(self, *args): return _adonthell.mapsquare_walkable_is_walkable_west(self, *args) def is_walkable_east(self, *args): return _adonthell.mapsquare_walkable_is_walkable_east(self, *args) def is_walkable_north(self, *args): return _adonthell.mapsquare_walkable_is_walkable_north(self, *args) def is_walkable_south(self, *args): return _adonthell.mapsquare_walkable_is_walkable_south(self, *args) def set_walkable_west(self, *args): return _adonthell.mapsquare_walkable_set_walkable_west(self, *args) def set_walkable_east(self, *args): return _adonthell.mapsquare_walkable_set_walkable_east(self, *args) def set_walkable_north(self, *args): return _adonthell.mapsquare_walkable_set_walkable_north(self, *args) def set_walkable_south(self, *args): return _adonthell.mapsquare_walkable_set_walkable_south(self, *args) def get_walkable(self, *args): return _adonthell.mapsquare_walkable_get_walkable(self, *args) def set_walkable(self, *args): return _adonthell.mapsquare_walkable_set_walkable(self, *args) __swig_destroy__ = _adonthell.delete_mapsquare_walkable __del__ = lambda self: None mapsquare_walkable_swigregister = _adonthell.mapsquare_walkable_swigregister mapsquare_walkable_swigregister(mapsquare_walkable) MAPSQUARE_SIZE = cvar.MAPSQUARE_SIZE class mapsquare_walkable_area(drawable): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _adonthell.delete_mapsquare_walkable_area __del__ = lambda self: None def clear(self, *args): return _adonthell.mapsquare_walkable_area_clear(self, *args) def draw(self, *args): return _adonthell.mapsquare_walkable_area_draw(self, *args) def area_length(self, *args): return _adonthell.mapsquare_walkable_area_area_length(self, *args) def area_height(self, *args): return _adonthell.mapsquare_walkable_area_area_height(self, *args) def get_square(self, *args): return _adonthell.mapsquare_walkable_area_get_square(self, *args) def resize_area(self, *args): return _adonthell.mapsquare_walkable_area_resize_area(self, *args) def base_x(self, *args): return _adonthell.mapsquare_walkable_area_base_x(self, *args) def base_y(self, *args): return _adonthell.mapsquare_walkable_area_base_y(self, *args) def set_base(self, *args): return _adonthell.mapsquare_walkable_area_set_base(self, *args) def get(self, *args): return _adonthell.mapsquare_walkable_area_get(self, *args) def put(self, *args): return _adonthell.mapsquare_walkable_area_put(self, *args) def copy(self, *args): return _adonthell.mapsquare_walkable_area_copy(self, *args) mapsquare_walkable_area_swigregister = _adonthell.mapsquare_walkable_area_swigregister mapsquare_walkable_area_swigregister(mapsquare_walkable_area) class mapsquare_tile(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapsquare_tile(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapsquare_tile __del__ = lambda self: None mapsquare_tile_swigregister = _adonthell.mapsquare_tile_swigregister mapsquare_tile_swigregister(mapsquare_tile) class mapsquare_char(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapsquare_char(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapsquare_char __del__ = lambda self: None mapsquare_char_swigregister = _adonthell.mapsquare_char_swigregister mapsquare_char_swigregister(mapsquare_char) class mapsquare(mapsquare_walkable): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapsquare(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapsquare __del__ = lambda self: None def x(self, *args): return _adonthell.mapsquare_x(self, *args) def y(self, *args): return _adonthell.mapsquare_y(self, *args) def is_free(self, *args): return _adonthell.mapsquare_is_free(self, *args) def whoshere(self, *args): return _adonthell.mapsquare_whoshere(self, *args) g = _swig_property(_adonthell.mapsquare_g_get, _adonthell.mapsquare_g_set) h = _swig_property(_adonthell.mapsquare_h_get, _adonthell.mapsquare_h_set) f = _swig_property(_adonthell.mapsquare_f_get, _adonthell.mapsquare_f_set) parent = _swig_property(_adonthell.mapsquare_parent_get, _adonthell.mapsquare_parent_set) can_use_for_pathfinding = _swig_property(_adonthell.mapsquare_can_use_for_pathfinding_get, _adonthell.mapsquare_can_use_for_pathfinding_set) mapsquare_swigregister = _adonthell.mapsquare_swigregister mapsquare_swigregister(mapsquare) class mapsquare_area(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapsquare_area(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapsquare_area __del__ = lambda self: None def clear(self, *args): return _adonthell.mapsquare_area_clear(self, *args) def area_length(self, *args): return _adonthell.mapsquare_area_area_length(self, *args) def area_height(self, *args): return _adonthell.mapsquare_area_area_height(self, *args) def get_square(self, *args): return _adonthell.mapsquare_area_get_square(self, *args) def resize_area(self, *args): return _adonthell.mapsquare_area_resize_area(self, *args) mapsquare_area_swigregister = _adonthell.mapsquare_area_swigregister mapsquare_area_swigregister(mapsquare_area) _adonthell.MAPOBJECTS_DIR_swigconstant(_adonthell) MAPOBJECTS_DIR = _adonthell.MAPOBJECTS_DIR class mapobject(mapsquare_walkable_area): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapobject(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapobject __del__ = lambda self: None def clear(self, *args): return _adonthell.mapobject_clear(self, *args) def update(self, *args): return _adonthell.mapobject_update(self, *args) def draw(self, *args): return _adonthell.mapobject_draw(self, *args) def draw_from_base(self, *args): return _adonthell.mapobject_draw_from_base(self, *args) def get(self, *args): return _adonthell.mapobject_get(self, *args) def load(self, *args): return _adonthell.mapobject_load(self, *args) def put(self, *args): return _adonthell.mapobject_put(self, *args) def save(self, *args): return _adonthell.mapobject_save(self, *args) def nbr_of_animations(self, *args): return _adonthell.mapobject_nbr_of_animations(self, *args) def get_animation(self, *args): return _adonthell.mapobject_get_animation(self, *args) def insert_animation(self, *args): return _adonthell.mapobject_insert_animation(self, *args) def delete_animation(self, *args): return _adonthell.mapobject_delete_animation(self, *args) def copy(self, *args): return _adonthell.mapobject_copy(self, *args) mapobject_swigregister = _adonthell.mapobject_swigregister mapobject_swigregister(mapobject) _adonthell.MAPCHAR_DIR_swigconstant(_adonthell) MAPCHAR_DIR = _adonthell.MAPCHAR_DIR _adonthell.STAND_NORTH_swigconstant(_adonthell) STAND_NORTH = _adonthell.STAND_NORTH _adonthell.STAND_SOUTH_swigconstant(_adonthell) STAND_SOUTH = _adonthell.STAND_SOUTH _adonthell.STAND_WEST_swigconstant(_adonthell) STAND_WEST = _adonthell.STAND_WEST _adonthell.STAND_EAST_swigconstant(_adonthell) STAND_EAST = _adonthell.STAND_EAST _adonthell.WALK_NORTH_swigconstant(_adonthell) WALK_NORTH = _adonthell.WALK_NORTH _adonthell.WALK_SOUTH_swigconstant(_adonthell) WALK_SOUTH = _adonthell.WALK_SOUTH _adonthell.WALK_WEST_swigconstant(_adonthell) WALK_WEST = _adonthell.WALK_WEST _adonthell.WALK_EAST_swigconstant(_adonthell) WALK_EAST = _adonthell.WALK_EAST _adonthell.NBR_MOVES_swigconstant(_adonthell) NBR_MOVES = _adonthell.NBR_MOVES _adonthell.NO_MOVE_swigconstant(_adonthell) NO_MOVE = _adonthell.NO_MOVE class mapcharacter(mapsquare_walkable_area, character_base, event_list): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapcharacter(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapcharacter __del__ = lambda self: None def clear(self, *args): return _adonthell.mapcharacter_clear(self, *args) def filename(self, *args): return _adonthell.mapcharacter_filename(self, *args) def update(self, *args): return _adonthell.mapcharacter_update(self, *args) def draw(self, *args): return _adonthell.mapcharacter_draw(self, *args) def draw_bubble(self, *args): return _adonthell.mapcharacter_draw_bubble(self, *args) def get(self, *args): return _adonthell.mapcharacter_get(self, *args) def load(self, *args): return _adonthell.mapcharacter_load(self, *args) def put(self, *args): return _adonthell.mapcharacter_put(self, *args) def save(self, *args): return _adonthell.mapcharacter_save(self, *args) def get_state(self, *args): return _adonthell.mapcharacter_get_state(self, *args) def put_state(self, *args): return _adonthell.mapcharacter_put_state(self, *args) def set_map(self, *args): return _adonthell.mapcharacter_set_map(self, *args) def remove_from_map(self, *args): return _adonthell.mapcharacter_remove_from_map(self, *args) def mymap(self, *args): return _adonthell.mapcharacter_mymap(self, *args) def stand_north(self, *args): return _adonthell.mapcharacter_stand_north(self, *args) def stand_south(self, *args): return _adonthell.mapcharacter_stand_south(self, *args) def stand_east(self, *args): return _adonthell.mapcharacter_stand_east(self, *args) def stand_west(self, *args): return _adonthell.mapcharacter_stand_west(self, *args) def stand(self, *args): return _adonthell.mapcharacter_stand(self, *args) def go_north(self, *args): return _adonthell.mapcharacter_go_north(self, *args) def go_south(self, *args): return _adonthell.mapcharacter_go_south(self, *args) def go_east(self, *args): return _adonthell.mapcharacter_go_east(self, *args) def go_west(self, *args): return _adonthell.mapcharacter_go_west(self, *args) def can_go_north(self, *args): return _adonthell.mapcharacter_can_go_north(self, *args) def can_go_south(self, *args): return _adonthell.mapcharacter_can_go_south(self, *args) def can_go_east(self, *args): return _adonthell.mapcharacter_can_go_east(self, *args) def can_go_west(self, *args): return _adonthell.mapcharacter_can_go_west(self, *args) def look_invert(self, *args): return _adonthell.mapcharacter_look_invert(self, *args) def whosnext(self, *args): return _adonthell.mapcharacter_whosnext(self, *args) def speak(self, *args): return _adonthell.mapcharacter_speak(self, *args) def is_speaking(self, *args): return _adonthell.mapcharacter_is_speaking(self, *args) def get_bubble(self, *args): return _adonthell.mapcharacter_get_bubble(self, *args) def set_offset(self, *args): return _adonthell.mapcharacter_set_offset(self, *args) def remove_from_pos(self, *args): return _adonthell.mapcharacter_remove_from_pos(self, *args) def jump_to(self, *args): return _adonthell.mapcharacter_jump_to(self, *args) def submap(self, *args): return _adonthell.mapcharacter_submap(self, *args) def posx(self, *args): return _adonthell.mapcharacter_posx(self, *args) def posy(self, *args): return _adonthell.mapcharacter_posy(self, *args) def offx(self, *args): return _adonthell.mapcharacter_offx(self, *args) def offy(self, *args): return _adonthell.mapcharacter_offy(self, *args) def currentmove(self, *args): return _adonthell.mapcharacter_currentmove(self, *args) def set_goal(self, *args): return _adonthell.mapcharacter_set_goal(self, *args) def set_callback(self, *args): return _adonthell.mapcharacter_set_callback(self, *args) def follow_path(self, *args): return _adonthell.mapcharacter_follow_path(self, *args) def goal_reached(self, *args): return _adonthell.mapcharacter_goal_reached(self, *args) def stop_moving(self, *args): return _adonthell.mapcharacter_stop_moving(self, *args) def time_callback(self, *args): return _adonthell.mapcharacter_time_callback(self, *args) def time_callback_string(self, *args): return _adonthell.mapcharacter_time_callback_string(self, *args) def set_schedule(self, *args): return _adonthell.mapcharacter_set_schedule(self, *args) def schedule_file(self, *args): return _adonthell.mapcharacter_schedule_file(self, *args) def is_schedule_activated(self, *args): return _adonthell.mapcharacter_is_schedule_activated(self, *args) def set_schedule_active(self, *args): return _adonthell.mapcharacter_set_schedule_active(self, *args) def do_stuff(self, *args): return _adonthell.mapcharacter_do_stuff(self, *args) def set_action(self, *args): return _adonthell.mapcharacter_set_action(self, *args) def action_file(self, *args): return _adonthell.mapcharacter_action_file(self, *args) def is_action_activated(self, *args): return _adonthell.mapcharacter_is_action_activated(self, *args) def set_action_active(self, *args): return _adonthell.mapcharacter_set_action_active(self, *args) def launch_action(self, *args): return _adonthell.mapcharacter_launch_action(self, *args) def get_animation(self, *args): return _adonthell.mapcharacter_get_animation(self, *args) def copy(self, *args): return _adonthell.mapcharacter_copy(self, *args) mapcharacter_swigregister = _adonthell.mapcharacter_swigregister mapcharacter_swigregister(mapcharacter) class path(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def clear(self, *args): return _adonthell.path_clear(self, *args) def calculate(self, *args): return _adonthell.path_calculate(self, *args) def nbr_moves(self, *args): return _adonthell.path_nbr_moves(self, *args) def get_move(self, *args): return _adonthell.path_get_move(self, *args) def get_state(self, *args): return _adonthell.path_get_state(self, *args) def put_state(self, *args): return _adonthell.path_put_state(self, *args) def __init__(self, *args): this = _adonthell.new_path(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_path __del__ = lambda self: None path_swigregister = _adonthell.path_swigregister path_swigregister(path) class character(mapcharacter): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_character(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_character __del__ = lambda self: None character_swigregister = _adonthell.character_swigregister character_swigregister(character) _adonthell.MAPS_DIR_swigconstant(_adonthell) MAPS_DIR = _adonthell.MAPS_DIR class landmap(event_list): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_landmap(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_landmap __del__ = lambda self: None def clear(self, *args): return _adonthell.landmap_clear(self, *args) def nbr_of_mapobjects(self, *args): return _adonthell.landmap_nbr_of_mapobjects(self, *args) def nbr_of_submaps(self, *args): return _adonthell.landmap_nbr_of_submaps(self, *args) def nbr_of_mapcharacters(self, *args): return _adonthell.landmap_nbr_of_mapcharacters(self, *args) def filename(self, *args): return _adonthell.landmap_filename(self, *args) def get_mapcharacter(self, *args): return _adonthell.landmap_get_mapcharacter(self, *args) def get_mapobject(self, *args): return _adonthell.landmap_get_mapobject(self, *args) def get_submap(self, *args): return _adonthell.landmap_get_submap(self, *args) def update(self, *args): return _adonthell.landmap_update(self, *args) def get(self, *args): return _adonthell.landmap_get(self, *args) def load(self, *args): return _adonthell.landmap_load(self, *args) def put(self, *args): return _adonthell.landmap_put(self, *args) def save(self, *args): return _adonthell.landmap_save(self, *args) def get_state(self, *args): return _adonthell.landmap_get_state(self, *args) def put_state(self, *args): return _adonthell.landmap_put_state(self, *args) def put_mapobject(self, *args): return _adonthell.landmap_put_mapobject(self, *args) def remove_mapobject(self, *args): return _adonthell.landmap_remove_mapobject(self, *args) def insert_submap(self, *args): return _adonthell.landmap_insert_submap(self, *args) def delete_submap(self, *args): return _adonthell.landmap_delete_submap(self, *args) def insert_mapobject(self, *args): return _adonthell.landmap_insert_mapobject(self, *args) def delete_mapobject(self, *args): return _adonthell.landmap_delete_mapobject(self, *args) landmap_swigregister = _adonthell.landmap_swigregister landmap_swigregister(landmap) class mapview(drawable): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_mapview(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_mapview __del__ = lambda self: None def attach_map(self, *args): return _adonthell.mapview_attach_map(self, *args) def detach_map(self, *args): return _adonthell.mapview_detach_map(self, *args) def set_pos(self, *args): return _adonthell.mapview_set_pos(self, *args) def center_on(self, *args): return _adonthell.mapview_center_on(self, *args) def currentsubmap(self, *args): return _adonthell.mapview_currentsubmap(self, *args) def posx(self, *args): return _adonthell.mapview_posx(self, *args) def posy(self, *args): return _adonthell.mapview_posy(self, *args) def offx(self, *args): return _adonthell.mapview_offx(self, *args) def offy(self, *args): return _adonthell.mapview_offy(self, *args) def can_scroll_right(self, *args): return _adonthell.mapview_can_scroll_right(self, *args) def can_scroll_left(self, *args): return _adonthell.mapview_can_scroll_left(self, *args) def can_scroll_up(self, *args): return _adonthell.mapview_can_scroll_up(self, *args) def can_scroll_down(self, *args): return _adonthell.mapview_can_scroll_down(self, *args) def scroll_right(self, *args): return _adonthell.mapview_scroll_right(self, *args) def scroll_left(self, *args): return _adonthell.mapview_scroll_left(self, *args) def scroll_down(self, *args): return _adonthell.mapview_scroll_down(self, *args) def scroll_up(self, *args): return _adonthell.mapview_scroll_up(self, *args) def get_state(self, *args): return _adonthell.mapview_get_state(self, *args) def put_state(self, *args): return _adonthell.mapview_put_state(self, *args) def resize(self, *args): return _adonthell.mapview_resize(self, *args) def set_schedule(self, *args): return _adonthell.mapview_set_schedule(self, *args) def schedule_file(self, *args): return _adonthell.mapview_schedule_file(self, *args) def update(self, *args): return _adonthell.mapview_update(self, *args) def draw(self, *args): return _adonthell.mapview_draw(self, *args) mapview_swigregister = _adonthell.mapview_swigregister mapview_swigregister(mapview) class adonthell(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_adonthell(*args) try: self.this.append(this) except Exception: self.this = this def main(self, *args): return _adonthell.adonthell_main(self, *args) def main_loop(self, *args): return _adonthell.adonthell_main_loop(self, *args) def main_quit(self, *args): return _adonthell.adonthell_main_quit(self, *args) def fade_out(self, *args): return _adonthell.adonthell_fade_out(self, *args) def fade_in(self, *args): return _adonthell.adonthell_fade_in(self, *args) def get_state(self, *args): return _adonthell.adonthell_get_state(self, *args) def put_state(self, *args): return _adonthell.adonthell_put_state(self, *args) def control_active(self, *args): return _adonthell.adonthell_control_active(self, *args) def set_control_active(self, *args): return _adonthell.adonthell_set_control_active(self, *args) def get_landmap(self, *args): return _adonthell.adonthell_get_landmap(self, *args) def update_map(self, *args): return _adonthell.adonthell_update_map(self, *args) def set_update_map(self, *args): return _adonthell.adonthell_set_update_map(self, *args) def get_mapview(self, *args): return _adonthell.adonthell_get_mapview(self, *args) def draw(self, *args): return _adonthell.adonthell_draw(self, *args) def set_mapview_schedule(self, *args): return _adonthell.adonthell_set_mapview_schedule(self, *args) def mapview_start(self, *args): return _adonthell.adonthell_mapview_start(self, *args) def mapview_stop(self, *args): return _adonthell.adonthell_mapview_stop(self, *args) __swig_destroy__ = _adonthell.delete_adonthell __del__ = lambda self: None adonthell_swigregister = _adonthell.adonthell_swigregister adonthell_swigregister(adonthell) _adonthell.WIN_NB_TABLE_CHAR_swigconstant(_adonthell) WIN_NB_TABLE_CHAR = _adonthell.WIN_NB_TABLE_CHAR _adonthell.WIN_TEXT_MAX_LENGTH_swigconstant(_adonthell) WIN_TEXT_MAX_LENGTH = _adonthell.WIN_TEXT_MAX_LENGTH _adonthell.WIN_FONT_HEIGHT_swigconstant(_adonthell) WIN_FONT_HEIGHT = _adonthell.WIN_FONT_HEIGHT _adonthell.WIN_FONT_LENGHT_swigconstant(_adonthell) WIN_FONT_LENGHT = _adonthell.WIN_FONT_LENGHT _adonthell.WIN_SPACE_LENGHT_swigconstant(_adonthell) WIN_SPACE_LENGHT = _adonthell.WIN_SPACE_LENGHT _adonthell.WIN_DIRECTORY_swigconstant(_adonthell) WIN_DIRECTORY = _adonthell.WIN_DIRECTORY _adonthell.WIN_FONT_DIRECTORY_swigconstant(_adonthell) WIN_FONT_DIRECTORY = _adonthell.WIN_FONT_DIRECTORY _adonthell.WIN_BORDER_DIRECTORY_swigconstant(_adonthell) WIN_BORDER_DIRECTORY = _adonthell.WIN_BORDER_DIRECTORY _adonthell.WIN_BACKGROUND_DIRECTORY_swigconstant(_adonthell) WIN_BACKGROUND_DIRECTORY = _adonthell.WIN_BACKGROUND_DIRECTORY _adonthell.WIN_SCROLLBAR_DIRECTORY_swigconstant(_adonthell) WIN_SCROLLBAR_DIRECTORY = _adonthell.WIN_SCROLLBAR_DIRECTORY _adonthell.WIN_CURSOR_DIRECTORY_swigconstant(_adonthell) WIN_CURSOR_DIRECTORY = _adonthell.WIN_CURSOR_DIRECTORY _adonthell.WIN_FONT_FILE_IDX_swigconstant(_adonthell) WIN_FONT_FILE_IDX = _adonthell.WIN_FONT_FILE_IDX _adonthell.WIN_FONT_FILE_PIC_swigconstant(_adonthell) WIN_FONT_FILE_PIC = _adonthell.WIN_FONT_FILE_PIC _adonthell.WIN_FONT_FILE_swigconstant(_adonthell) WIN_FONT_FILE = _adonthell.WIN_FONT_FILE _adonthell.WIN_V_BORDER_TEMPLATE_FILE_swigconstant(_adonthell) WIN_V_BORDER_TEMPLATE_FILE = _adonthell.WIN_V_BORDER_TEMPLATE_FILE _adonthell.WIN_H_BORDER_TEMPLATE_FILE_swigconstant(_adonthell) WIN_H_BORDER_TEMPLATE_FILE = _adonthell.WIN_H_BORDER_TEMPLATE_FILE _adonthell.WIN_CORNER_TOP_LEFT_FILE_swigconstant(_adonthell) WIN_CORNER_TOP_LEFT_FILE = _adonthell.WIN_CORNER_TOP_LEFT_FILE _adonthell.WIN_CORNER_TOP_RIGHT_FILE_swigconstant(_adonthell) WIN_CORNER_TOP_RIGHT_FILE = _adonthell.WIN_CORNER_TOP_RIGHT_FILE _adonthell.WIN_CORNER_BOTTOM_LEFT_FILE_swigconstant(_adonthell) WIN_CORNER_BOTTOM_LEFT_FILE = _adonthell.WIN_CORNER_BOTTOM_LEFT_FILE _adonthell.WIN_CORNER_BOTTOM_RIGHT_FILE_swigconstant(_adonthell) WIN_CORNER_BOTTOM_RIGHT_FILE = _adonthell.WIN_CORNER_BOTTOM_RIGHT_FILE _adonthell.WIN_BACKGROUND_FILE_swigconstant(_adonthell) WIN_BACKGROUND_FILE = _adonthell.WIN_BACKGROUND_FILE _adonthell.WIN_SCROLLBAR_BAR_TOP_swigconstant(_adonthell) WIN_SCROLLBAR_BAR_TOP = _adonthell.WIN_SCROLLBAR_BAR_TOP _adonthell.WIN_SCROLLBAR_BAR_MID_swigconstant(_adonthell) WIN_SCROLLBAR_BAR_MID = _adonthell.WIN_SCROLLBAR_BAR_MID _adonthell.WIN_SCROLLBAR_BAR_BOT_swigconstant(_adonthell) WIN_SCROLLBAR_BAR_BOT = _adonthell.WIN_SCROLLBAR_BAR_BOT _adonthell.WIN_SCROLLBAR_BAR_FLEX_swigconstant(_adonthell) WIN_SCROLLBAR_BAR_FLEX = _adonthell.WIN_SCROLLBAR_BAR_FLEX _adonthell.WIN_SCROLLBAR_BACK_TOP_swigconstant(_adonthell) WIN_SCROLLBAR_BACK_TOP = _adonthell.WIN_SCROLLBAR_BACK_TOP _adonthell.WIN_SCROLLBAR_BACK_MID_swigconstant(_adonthell) WIN_SCROLLBAR_BACK_MID = _adonthell.WIN_SCROLLBAR_BACK_MID _adonthell.WIN_SCROLLBAR_BACK_BOT_swigconstant(_adonthell) WIN_SCROLLBAR_BACK_BOT = _adonthell.WIN_SCROLLBAR_BACK_BOT _adonthell.WIN_CURSOR_FILE_swigconstant(_adonthell) WIN_CURSOR_FILE = _adonthell.WIN_CURSOR_FILE _adonthell.WIN_BORDER_NORMAL_SIZE_swigconstant(_adonthell) WIN_BORDER_NORMAL_SIZE = _adonthell.WIN_BORDER_NORMAL_SIZE _adonthell.WIN_BORDER_MINI_SIZE_swigconstant(_adonthell) WIN_BORDER_MINI_SIZE = _adonthell.WIN_BORDER_MINI_SIZE _adonthell.WIN_BRIGHTNESS_LEVEL_swigconstant(_adonthell) WIN_BRIGHTNESS_LEVEL = _adonthell.WIN_BRIGHTNESS_LEVEL class win_manager(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_manager(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_manager __del__ = lambda self: None def add(self, *args): return _adonthell.win_manager_add(self, *args) def remove(self, *args): return _adonthell.win_manager_remove(self, *args) def update(self, *args): return _adonthell.win_manager_update(self, *args) def input_update(self, *args): return _adonthell.win_manager_input_update(self, *args) def draw(self, *args): return _adonthell.win_manager_draw(self, *args) def set_focus(self, *args): return _adonthell.win_manager_set_focus(self, *args) def destroy(self, *args): return _adonthell.win_manager_destroy(self, *args) get_active = staticmethod(_adonthell.win_manager_get_active) init = staticmethod(_adonthell.win_manager_init) cleanup = staticmethod(_adonthell.win_manager_cleanup) add_theme = staticmethod(_adonthell.win_manager_add_theme) remove_theme = staticmethod(_adonthell.win_manager_remove_theme) get_theme = staticmethod(_adonthell.win_manager_get_theme) add_font = staticmethod(_adonthell.win_manager_add_font) remove_font = staticmethod(_adonthell.win_manager_remove_font) get_font = staticmethod(_adonthell.win_manager_get_font) win_manager_swigregister = _adonthell.win_manager_swigregister win_manager_swigregister(win_manager) def win_manager_get_active(*args): return _adonthell.win_manager_get_active(*args) win_manager_get_active = _adonthell.win_manager_get_active def win_manager_init(*args): return _adonthell.win_manager_init(*args) win_manager_init = _adonthell.win_manager_init def win_manager_cleanup(*args): return _adonthell.win_manager_cleanup(*args) win_manager_cleanup = _adonthell.win_manager_cleanup def win_manager_add_theme(*args): return _adonthell.win_manager_add_theme(*args) win_manager_add_theme = _adonthell.win_manager_add_theme def win_manager_remove_theme(*args): return _adonthell.win_manager_remove_theme(*args) win_manager_remove_theme = _adonthell.win_manager_remove_theme def win_manager_get_theme(*args): return _adonthell.win_manager_get_theme(*args) win_manager_get_theme = _adonthell.win_manager_get_theme def win_manager_add_font(*args): return _adonthell.win_manager_add_font(*args) win_manager_add_font = _adonthell.win_manager_add_font def win_manager_remove_font(*args): return _adonthell.win_manager_remove_font(*args) win_manager_remove_font = _adonthell.win_manager_remove_font def win_manager_get_font(*args): return _adonthell.win_manager_get_font(*args) win_manager_get_font = _adonthell.win_manager_get_font class win_font(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_font(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_font __del__ = lambda self: None def load(self, *args): return _adonthell.win_font_load(self, *args) def in_table(self, *args): return _adonthell.win_font_in_table(self, *args) def height(self, *args): return _adonthell.win_font_height(self, *args) def length(self, *args): return _adonthell.win_font_length(self, *args) cursor = _swig_property(_adonthell.win_font_cursor_get, _adonthell.win_font_cursor_set) win_font_swigregister = _adonthell.win_font_swigregister win_font_swigregister(win_font) _adonthell.win_event_ACTIVATE_swigconstant(_adonthell) win_event_ACTIVATE = _adonthell.win_event_ACTIVATE _adonthell.win_event_UNACTIVATE_swigconstant(_adonthell) win_event_UNACTIVATE = _adonthell.win_event_UNACTIVATE _adonthell.win_event_UPDATE_swigconstant(_adonthell) win_event_UPDATE = _adonthell.win_event_UPDATE _adonthell.win_event_DRAW_swigconstant(_adonthell) win_event_DRAW = _adonthell.win_event_DRAW _adonthell.win_event_DRAW_ON_VISIBLE_swigconstant(_adonthell) win_event_DRAW_ON_VISIBLE = _adonthell.win_event_DRAW_ON_VISIBLE _adonthell.win_event_ACTIVATE_KEY_swigconstant(_adonthell) win_event_ACTIVATE_KEY = _adonthell.win_event_ACTIVATE_KEY _adonthell.win_event_SELECT_swigconstant(_adonthell) win_event_SELECT = _adonthell.win_event_SELECT _adonthell.win_event_UNSELECT_swigconstant(_adonthell) win_event_UNSELECT = _adonthell.win_event_UNSELECT _adonthell.win_event_KEYBOARD_swigconstant(_adonthell) win_event_KEYBOARD = _adonthell.win_event_KEYBOARD _adonthell.win_event_SCROLL_UP_swigconstant(_adonthell) win_event_SCROLL_UP = _adonthell.win_event_SCROLL_UP _adonthell.win_event_SCROLL_DOWN_swigconstant(_adonthell) win_event_SCROLL_DOWN = _adonthell.win_event_SCROLL_DOWN _adonthell.win_event_NEXT_swigconstant(_adonthell) win_event_NEXT = _adonthell.win_event_NEXT _adonthell.win_event_PREVIOUS_swigconstant(_adonthell) win_event_PREVIOUS = _adonthell.win_event_PREVIOUS _adonthell.win_event_CLOSE_swigconstant(_adonthell) win_event_CLOSE = _adonthell.win_event_CLOSE _adonthell.win_event_DESTROY_swigconstant(_adonthell) win_event_DESTROY = _adonthell.win_event_DESTROY class win_event(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_event(*args) try: self.this.append(this) except Exception: self.this = this def set_return_code(self, *args): return _adonthell.win_event_set_return_code(self, *args) def update(self, *args): return _adonthell.win_event_update(self, *args) def py_signal_connect(self, *args): return _adonthell.win_event_py_signal_connect(self, *args) __swig_destroy__ = _adonthell.delete_win_event __del__ = lambda self: None win_event_swigregister = _adonthell.win_event_swigregister win_event_swigregister(win_event) _adonthell.win_border_MINI_swigconstant(_adonthell) win_border_MINI = _adonthell.win_border_MINI _adonthell.win_border_NORMAL_swigconstant(_adonthell) win_border_NORMAL = _adonthell.win_border_NORMAL class win_border(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_border(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_border __del__ = lambda self: None def load(self, *args): return _adonthell.win_border_load(self, *args) def update(self, *args): return _adonthell.win_border_update(self, *args) def destroy(self, *args): return _adonthell.win_border_destroy(self, *args) def draw(self, *args): return _adonthell.win_border_draw(self, *args) def set_visible_border(self, *args): return _adonthell.win_border_set_visible_border(self, *args) def set_brightness_border(self, *args): return _adonthell.win_border_set_brightness_border(self, *args) def set_border(self, *args): return _adonthell.win_border_set_border(self, *args) def set_trans_border(self, *args): return _adonthell.win_border_set_trans_border(self, *args) def length_border(self, *args): return _adonthell.win_border_length_border(self, *args) def height_border(self, *args): return _adonthell.win_border_height_border(self, *args) win_border_swigregister = _adonthell.win_border_swigregister win_border_swigregister(win_border) class win_background(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_background(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_background __del__ = lambda self: None def load(self, *args): return _adonthell.win_background_load(self, *args) def update(self, *args): return _adonthell.win_background_update(self, *args) def destroy(self, *args): return _adonthell.win_background_destroy(self, *args) def draw(self, *args): return _adonthell.win_background_draw(self, *args) def set_visible_background(self, *args): return _adonthell.win_background_set_visible_background(self, *args) def set_background(self, *args): return _adonthell.win_background_set_background(self, *args) def set_brightness_background(self, *args): return _adonthell.win_background_set_brightness_background(self, *args) def set_trans_background(self, *args): return _adonthell.win_background_set_trans_background(self, *args) win_background_swigregister = _adonthell.win_background_swigregister win_background_swigregister(win_background) _adonthell.win_base_ALIGN_NONE_swigconstant(_adonthell) win_base_ALIGN_NONE = _adonthell.win_base_ALIGN_NONE _adonthell.win_base_ALIGN_LEFT_swigconstant(_adonthell) win_base_ALIGN_LEFT = _adonthell.win_base_ALIGN_LEFT _adonthell.win_base_ALIGN_CENTER_swigconstant(_adonthell) win_base_ALIGN_CENTER = _adonthell.win_base_ALIGN_CENTER _adonthell.win_base_ALIGN_RIGHT_swigconstant(_adonthell) win_base_ALIGN_RIGHT = _adonthell.win_base_ALIGN_RIGHT class win_base(win_event, win_border, drawing_area, win_background): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_base(*args) try: self.this.append(this) except Exception: self.this = this def x(self, *args): return _adonthell.win_base_x(self, *args) def y(self, *args): return _adonthell.win_base_y(self, *args) def pad_x(self, *args): return _adonthell.win_base_pad_x(self, *args) def pad_y(self, *args): return _adonthell.win_base_pad_y(self, *args) def real_x(self, *args): return _adonthell.win_base_real_x(self, *args) def real_y(self, *args): return _adonthell.win_base_real_y(self, *args) def move(self, *args): return _adonthell.win_base_move(self, *args) def resize(self, *args): return _adonthell.win_base_resize(self, *args) def is_visible(self, *args): return _adonthell.win_base_is_visible(self, *args) def set_visible(self, *args): return _adonthell.win_base_set_visible(self, *args) def is_activate(self, *args): return _adonthell.win_base_is_activate(self, *args) def set_activate(self, *args): return _adonthell.win_base_set_activate(self, *args) def is_focus(self, *args): return _adonthell.win_base_is_focus(self, *args) def set_focus(self, *args): return _adonthell.win_base_set_focus(self, *args) def is_trans(self, *args): return _adonthell.win_base_is_trans(self, *args) def set_trans(self, *args): return _adonthell.win_base_set_trans(self, *args) def is_brightness(self, *args): return _adonthell.win_base_is_brightness(self, *args) def set_brightness(self, *args): return _adonthell.win_base_set_brightness(self, *args) def set_align(self, *args): return _adonthell.win_base_set_align(self, *args) def align(self, *args): return _adonthell.win_base_align(self, *args) def is_can_be_selected(self, *args): return _adonthell.win_base_is_can_be_selected(self, *args) def set_can_be_selected(self, *args): return _adonthell.win_base_set_can_be_selected(self, *args) def update(self, *args): return _adonthell.win_base_update(self, *args) def draw(self, *args): return _adonthell.win_base_draw(self, *args) def input_update(self, *args): return _adonthell.win_base_input_update(self, *args) __swig_destroy__ = _adonthell.delete_win_base __del__ = lambda self: None win_base_swigregister = _adonthell.win_base_swigregister win_base_swigregister(win_base) _adonthell.win_container_SPACE_WITH_BORDER_swigconstant(_adonthell) win_container_SPACE_WITH_BORDER = _adonthell.win_container_SPACE_WITH_BORDER _adonthell.win_container_SPACE_WITH_OBJECT_swigconstant(_adonthell) win_container_SPACE_WITH_OBJECT = _adonthell.win_container_SPACE_WITH_OBJECT _adonthell.win_container_LIST_LAYOUT_swigconstant(_adonthell) win_container_LIST_LAYOUT = _adonthell.win_container_LIST_LAYOUT _adonthell.win_container_NO_LAYOUT_swigconstant(_adonthell) win_container_NO_LAYOUT = _adonthell.win_container_NO_LAYOUT class win_container(win_base): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_container(*args) try: self.this.append(this) except Exception: self.this = this def move(self, *args): return _adonthell.win_container_move(self, *args) def resize(self, *args): return _adonthell.win_container_resize(self, *args) def add(self, *args): return _adonthell.win_container_add(self, *args) def remove(self, *args): return _adonthell.win_container_remove(self, *args) def remove_all(self, *args): return _adonthell.win_container_remove_all(self, *args) def destroy(self, *args): return _adonthell.win_container_destroy(self, *args) __swig_destroy__ = _adonthell.delete_win_container __del__ = lambda self: None def update(self, *args): return _adonthell.win_container_update(self, *args) def input_update(self, *args): return _adonthell.win_container_input_update(self, *args) def draw(self, *args): return _adonthell.win_container_draw(self, *args) def set_visible_all(self, *args): return _adonthell.win_container_set_visible_all(self, *args) def set_brightness(self, *args): return _adonthell.win_container_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_container_set_trans(self, *args) def set_space_with_border(self, *args): return _adonthell.win_container_set_space_with_border(self, *args) def set_space_with_object(self, *args): return _adonthell.win_container_set_space_with_object(self, *args) def space_with_border(self, *args): return _adonthell.win_container_space_with_border(self, *args) def space_with_object(self, *args): return _adonthell.win_container_space_with_object(self, *args) def set_layout(self, *args): return _adonthell.win_container_set_layout(self, *args) def set_focus_object(self, *args): return _adonthell.win_container_set_focus_object(self, *args) def focus_object(self, *args): return _adonthell.win_container_focus_object(self, *args) win_container_swigregister = _adonthell.win_container_swigregister win_container_swigregister(win_container) class win_image(image, win_base): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr __swig_destroy__ = _adonthell.delete_win_image __del__ = lambda self: None def draw(self, *args): return _adonthell.win_image_draw(self, *args) def update(self, *args): return _adonthell.win_image_update(self, *args) def input_update(self, *args): return _adonthell.win_image_input_update(self, *args) def set_brightness(self, *args): return _adonthell.win_image_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_image_set_trans(self, *args) def pack(self, *args): return _adonthell.win_image_pack(self, *args) def set_auto_refresh(self, *args): return _adonthell.win_image_set_auto_refresh(self, *args) def __init__(self, *args): this = _adonthell.new_win_image(*args) try: self.this.append(this) except Exception: self.this = this win_image_swigregister = _adonthell.win_image_swigregister win_image_swigregister(win_image) _adonthell.label_NOTHING_swigconstant(_adonthell) label_NOTHING = _adonthell.label_NOTHING _adonthell.label_AUTO_HEIGHT_swigconstant(_adonthell) label_AUTO_HEIGHT = _adonthell.label_AUTO_HEIGHT _adonthell.label_AUTO_SIZE_swigconstant(_adonthell) label_AUTO_SIZE = _adonthell.label_AUTO_SIZE class label(image): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_label(*args) try: self.this.append(this) except Exception: self.this = this def text_string(self, *args): return _adonthell.label_text_string(self, *args) def text_char(self, *args): return _adonthell.label_text_char(self, *args) def set_text(self, *args): return _adonthell.label_set_text(self, *args) def add_text(self, *args): return _adonthell.label_add_text(self, *args) def set_font(self, *args): return _adonthell.label_set_font(self, *args) def set_form(self, *args): return _adonthell.label_set_form(self, *args) def set_cursor_visible(self, *args): return _adonthell.label_set_cursor_visible(self, *args) def set_cursor_moveable(self, *args): return _adonthell.label_set_cursor_moveable(self, *args) def resize(self, *args): return _adonthell.label_resize(self, *args) def update(self, *args): return _adonthell.label_update(self, *args) def input_update(self, *args): return _adonthell.label_input_update(self, *args) __swig_destroy__ = _adonthell.delete_label __del__ = lambda self: None label_swigregister = _adonthell.label_swigregister label_swigregister(label) class win_label(label, win_base): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_label(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_label __del__ = lambda self: None def draw(self, *args): return _adonthell.win_label_draw(self, *args) def update(self, *args): return _adonthell.win_label_update(self, *args) def input_update(self, *args): return _adonthell.win_label_input_update(self, *args) def set_brightness(self, *args): return _adonthell.win_label_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_label_set_trans(self, *args) def pack(self, *args): return _adonthell.win_label_pack(self, *args) def set_auto_refresh(self, *args): return _adonthell.win_label_set_auto_refresh(self, *args) win_label_swigregister = _adonthell.win_label_swigregister win_label_swigregister(win_label) class label_input(label): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def input_update(self, *args): return _adonthell.label_input_input_update(self, *args) def __init__(self, *args): this = _adonthell.new_label_input(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_label_input __del__ = lambda self: None label_input_swigregister = _adonthell.label_input_swigregister label_input_swigregister(label_input) class win_write(label_input, win_base): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_write(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_write __del__ = lambda self: None def draw(self, *args): return _adonthell.win_write_draw(self, *args) def update(self, *args): return _adonthell.win_write_update(self, *args) def input_update(self, *args): return _adonthell.win_write_input_update(self, *args) def set_brightness(self, *args): return _adonthell.win_write_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_write_set_trans(self, *args) def pack(self, *args): return _adonthell.win_write_pack(self, *args) def set_auto_refresh(self, *args): return _adonthell.win_write_set_auto_refresh(self, *args) win_write_swigregister = _adonthell.win_write_swigregister win_write_swigregister(win_write) class win_mapview(mapview, win_base): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_mapview(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_mapview __del__ = lambda self: None def draw(self, *args): return _adonthell.win_mapview_draw(self, *args) def update(self, *args): return _adonthell.win_mapview_update(self, *args) def input_update(self, *args): return _adonthell.win_mapview_input_update(self, *args) def set_brightness(self, *args): return _adonthell.win_mapview_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_mapview_set_trans(self, *args) def pack(self, *args): return _adonthell.win_mapview_pack(self, *args) def set_auto_refresh(self, *args): return _adonthell.win_mapview_set_auto_refresh(self, *args) win_mapview_swigregister = _adonthell.win_mapview_swigregister win_mapview_swigregister(win_mapview) class win_scrollbar(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_scrollbar(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_scrollbar __del__ = lambda self: None def update_bar(self, *args): return _adonthell.win_scrollbar_update_bar(self, *args) def load(self, *args): return _adonthell.win_scrollbar_load(self, *args) def update_back(self, *args): return _adonthell.win_scrollbar_update_back(self, *args) def destroy(self, *args): return _adonthell.win_scrollbar_destroy(self, *args) def set_scrollbar(self, *args): return _adonthell.win_scrollbar_set_scrollbar(self, *args) def set_visible_scrollbar(self, *args): return _adonthell.win_scrollbar_set_visible_scrollbar(self, *args) def set_trans_scrollbar(self, *args): return _adonthell.win_scrollbar_set_trans_scrollbar(self, *args) def set_brightness_scrollbar(self, *args): return _adonthell.win_scrollbar_set_brightness_scrollbar(self, *args) def draw(self, *args): return _adonthell.win_scrollbar_draw(self, *args) def height_bar(self, *args): return _adonthell.win_scrollbar_height_bar(self, *args) win_scrollbar_swigregister = _adonthell.win_scrollbar_swigregister win_scrollbar_swigregister(win_scrollbar) _adonthell.win_scroll_PAD_DEFAULT_swigconstant(_adonthell) win_scroll_PAD_DEFAULT = _adonthell.win_scroll_PAD_DEFAULT class win_scroll(win_container, win_scrollbar): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_scroll(*args) try: self.this.append(this) except Exception: self.this = this def amplitude(self, *args): return _adonthell.win_scroll_amplitude(self, *args) def add(self, *args): return _adonthell.win_scroll_add(self, *args) def remove(self, *args): return _adonthell.win_scroll_remove(self, *args) def remove_all(self, *args): return _adonthell.win_scroll_remove_all(self, *args) def resize(self, *args): return _adonthell.win_scroll_resize(self, *args) def destroy(self, *args): return _adonthell.win_scroll_destroy(self, *args) def draw(self, *args): return _adonthell.win_scroll_draw(self, *args) def update(self, *args): return _adonthell.win_scroll_update(self, *args) def input_update(self, *args): return _adonthell.win_scroll_input_update(self, *args) def set_space_between_border(self, *args): return _adonthell.win_scroll_set_space_between_border(self, *args) def set_space_between_object(self, *args): return _adonthell.win_scroll_set_space_between_object(self, *args) def cursor_y(self, *args): return _adonthell.win_scroll_cursor_y(self, *args) def set_auto_scrollbar(self, *args): return _adonthell.win_scroll_set_auto_scrollbar(self, *args) def set_auto_refresh(self, *args): return _adonthell.win_scroll_set_auto_refresh(self, *args) def set_brightness(self, *args): return _adonthell.win_scroll_set_brightness(self, *args) def set_trans(self, *args): return _adonthell.win_scroll_set_trans(self, *args) __swig_destroy__ = _adonthell.delete_win_scroll __del__ = lambda self: None win_scroll_swigregister = _adonthell.win_scroll_swigregister win_scroll_swigregister(win_scroll) _adonthell.win_select_MODE_BORDER_swigconstant(_adonthell) win_select_MODE_BORDER = _adonthell.win_select_MODE_BORDER _adonthell.win_select_MODE_BRIGHTNESS_swigconstant(_adonthell) win_select_MODE_BRIGHTNESS = _adonthell.win_select_MODE_BRIGHTNESS class win_select(win_scroll): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_select(*args) try: self.this.append(this) except Exception: self.this = this def input_update(self, *args): return _adonthell.win_select_input_update(self, *args) def add(self, *args): return _adonthell.win_select_add(self, *args) def remove(self, *args): return _adonthell.win_select_remove(self, *args) def remove_all(self, *args): return _adonthell.win_select_remove_all(self, *args) def set_mode(self, *args): return _adonthell.win_select_set_mode(self, *args) def set_border_select(self, *args): return _adonthell.win_select_set_border_select(self, *args) def set_circle(self, *args): return _adonthell.win_select_set_circle(self, *args) def is_circle(self, *args): return _adonthell.win_select_is_circle(self, *args) def set_default(self, *args): return _adonthell.win_select_set_default(self, *args) def set_default_object(self, *args): return _adonthell.win_select_set_default_object(self, *args) def set_default_position(self, *args): return _adonthell.win_select_set_default_position(self, *args) def get_selected_object(self, *args): return _adonthell.win_select_get_selected_object(self, *args) def get_selected_position(self, *args): return _adonthell.win_select_get_selected_position(self, *args) __swig_destroy__ = _adonthell.delete_win_select __del__ = lambda self: None win_select_swigregister = _adonthell.win_select_swigregister win_select_swigregister(win_select) class win_theme(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_win_theme(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_win_theme __del__ = lambda self: None def destroy(self, *args): return _adonthell.win_theme_destroy(self, *args) win_theme_swigregister = _adonthell.win_theme_swigregister win_theme_swigregister(win_theme) class text_bubble(win_label): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_text_bubble(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_text_bubble __del__ = lambda self: None def update(self, *args): return _adonthell.text_bubble_update(self, *args) def remaining(self, *args): return _adonthell.text_bubble_remaining(self, *args) text_bubble_swigregister = _adonthell.text_bubble_swigregister text_bubble_swigregister(text_bubble) _adonthell.MAX_COLOR_swigconstant(_adonthell) MAX_COLOR = _adonthell.MAX_COLOR class dialog_screen(win_container): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_dialog_screen(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_dialog_screen __del__ = lambda self: None def init(self, *args): return _adonthell.dialog_screen_init(self, *args) def set_portrait(self, *args): return _adonthell.dialog_screen_set_portrait(self, *args) def set_name(self, *args): return _adonthell.dialog_screen_set_name(self, *args) def set_npc(self, *args): return _adonthell.dialog_screen_set_npc(self, *args) def update(self, *args): return _adonthell.dialog_screen_update(self, *args) def run(self, *args): return _adonthell.dialog_screen_run(self, *args) dialog_screen_swigregister = _adonthell.dialog_screen_swigregister dialog_screen_swigregister(dialog_screen) _adonthell.LOAD_SCREEN_swigconstant(_adonthell) LOAD_SCREEN = _adonthell.LOAD_SCREEN _adonthell.SAVE_SCREEN_swigconstant(_adonthell) SAVE_SCREEN = _adonthell.SAVE_SCREEN class data_screen(win_container): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_data_screen(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_data_screen __del__ = lambda self: None def update(self, *args): return _adonthell.data_screen_update(self, *args) def get_result(self, *args): return _adonthell.data_screen_get_result(self, *args) data_screen_swigregister = _adonthell.data_screen_swigregister data_screen_swigregister(data_screen) class gamedata(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_gamedata(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_gamedata __del__ = lambda self: None def put(self, *args): return _adonthell.gamedata_put(self, *args) def get(self, *args): return _adonthell.gamedata_get(self, *args) def directory(self, *args): return _adonthell.gamedata_directory(self, *args) def description(self, *args): return _adonthell.gamedata_description(self, *args) def location(self, *args): return _adonthell.gamedata_location(self, *args) def gametime(self, *args): return _adonthell.gamedata_gametime(self, *args) def timestamp(self, *args): return _adonthell.gamedata_timestamp(self, *args) def set_description(self, *args): return _adonthell.gamedata_set_description(self, *args) def set_directory(self, *args): return _adonthell.gamedata_set_directory(self, *args) def set_gametime(self, *args): return _adonthell.gamedata_set_gametime(self, *args) init = staticmethod(_adonthell.gamedata_init) cleanup = staticmethod(_adonthell.gamedata_cleanup) load_characters = staticmethod(_adonthell.gamedata_load_characters) load_quests = staticmethod(_adonthell.gamedata_load_quests) load_mapengine = staticmethod(_adonthell.gamedata_load_mapengine) load_audio = staticmethod(_adonthell.gamedata_load_audio) load_achievements = staticmethod(_adonthell.gamedata_load_achievements) load = staticmethod(_adonthell.gamedata_load) load_newest = staticmethod(_adonthell.gamedata_load_newest) save = staticmethod(_adonthell.gamedata_save) unload = staticmethod(_adonthell.gamedata_unload) next_save = staticmethod(_adonthell.gamedata_next_save) user_data_dir = staticmethod(_adonthell.gamedata_user_data_dir) game_data_dir = staticmethod(_adonthell.gamedata_game_data_dir) get_saved_game = staticmethod(_adonthell.gamedata_get_saved_game) quests = staticmethod(_adonthell.gamedata_quests) player = staticmethod(_adonthell.gamedata_player) get_character = staticmethod(_adonthell.gamedata_get_character) get_quest = staticmethod(_adonthell.gamedata_get_quest) characters = staticmethod(_adonthell.gamedata_characters) engine = staticmethod(_adonthell.gamedata_engine) gamedata_swigregister = _adonthell.gamedata_swigregister gamedata_swigregister(gamedata) def gamedata_init(*args): return _adonthell.gamedata_init(*args) gamedata_init = _adonthell.gamedata_init def gamedata_cleanup(*args): return _adonthell.gamedata_cleanup(*args) gamedata_cleanup = _adonthell.gamedata_cleanup def gamedata_load_characters(*args): return _adonthell.gamedata_load_characters(*args) gamedata_load_characters = _adonthell.gamedata_load_characters def gamedata_load_quests(*args): return _adonthell.gamedata_load_quests(*args) gamedata_load_quests = _adonthell.gamedata_load_quests def gamedata_load_mapengine(*args): return _adonthell.gamedata_load_mapengine(*args) gamedata_load_mapengine = _adonthell.gamedata_load_mapengine def gamedata_load_audio(*args): return _adonthell.gamedata_load_audio(*args) gamedata_load_audio = _adonthell.gamedata_load_audio def gamedata_load_achievements(*args): return _adonthell.gamedata_load_achievements(*args) gamedata_load_achievements = _adonthell.gamedata_load_achievements def gamedata_load(*args): return _adonthell.gamedata_load(*args) gamedata_load = _adonthell.gamedata_load def gamedata_load_newest(*args): return _adonthell.gamedata_load_newest(*args) gamedata_load_newest = _adonthell.gamedata_load_newest def gamedata_save(*args): return _adonthell.gamedata_save(*args) gamedata_save = _adonthell.gamedata_save def gamedata_unload(*args): return _adonthell.gamedata_unload(*args) gamedata_unload = _adonthell.gamedata_unload def gamedata_next_save(*args): return _adonthell.gamedata_next_save(*args) gamedata_next_save = _adonthell.gamedata_next_save def gamedata_user_data_dir(*args): return _adonthell.gamedata_user_data_dir(*args) gamedata_user_data_dir = _adonthell.gamedata_user_data_dir def gamedata_game_data_dir(*args): return _adonthell.gamedata_game_data_dir(*args) gamedata_game_data_dir = _adonthell.gamedata_game_data_dir def gamedata_get_saved_game(*args): return _adonthell.gamedata_get_saved_game(*args) gamedata_get_saved_game = _adonthell.gamedata_get_saved_game def gamedata_quests(*args): return _adonthell.gamedata_quests(*args) gamedata_quests = _adonthell.gamedata_quests def gamedata_player(*args): return _adonthell.gamedata_player(*args) gamedata_player = _adonthell.gamedata_player def gamedata_get_character(*args): return _adonthell.gamedata_get_character(*args) gamedata_get_character = _adonthell.gamedata_get_character def gamedata_get_quest(*args): return _adonthell.gamedata_get_quest(*args) gamedata_get_quest = _adonthell.gamedata_get_quest def gamedata_characters(*args): return _adonthell.gamedata_characters(*args) gamedata_characters = _adonthell.gamedata_characters def gamedata_engine(*args): return _adonthell.gamedata_engine(*args) gamedata_engine = _adonthell.gamedata_engine _adonthell.CONFIG_swigconstant(_adonthell) CONFIG = _adonthell.CONFIG _adonthell.USER_DATA_swigconstant(_adonthell) USER_DATA = _adonthell.USER_DATA class game(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr User_data_dir = _swig_property(_adonthell.game_User_data_dir_get, _adonthell.game_User_data_dir_set) Global_data_dir = _swig_property(_adonthell.game_Global_data_dir_get, _adonthell.game_Global_data_dir_set) Game_data_dir = _swig_property(_adonthell.game_Game_data_dir_get, _adonthell.game_Game_data_dir_set) init = staticmethod(_adonthell.game_init) set_game_data_dir = staticmethod(_adonthell.game_set_game_data_dir) user_data_dir = staticmethod(_adonthell.game_user_data_dir) global_data_dir = staticmethod(_adonthell.game_global_data_dir) game_data_dir = staticmethod(_adonthell.game_game_data_dir) find_file = staticmethod(_adonthell.game_find_file) find_directory = staticmethod(_adonthell.game_find_directory) def __init__(self, *args): this = _adonthell.new_game(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_game __del__ = lambda self: None game_swigregister = _adonthell.game_swigregister game_swigregister(game) def game_init(*args): return _adonthell.game_init(*args) game_init = _adonthell.game_init def game_set_game_data_dir(*args): return _adonthell.game_set_game_data_dir(*args) game_set_game_data_dir = _adonthell.game_set_game_data_dir def game_user_data_dir(*args): return _adonthell.game_user_data_dir(*args) game_user_data_dir = _adonthell.game_user_data_dir def game_global_data_dir(*args): return _adonthell.game_global_data_dir(*args) game_global_data_dir = _adonthell.game_global_data_dir def game_game_data_dir(*args): return _adonthell.game_game_data_dir(*args) game_game_data_dir = _adonthell.game_game_data_dir def game_find_file(*args): return _adonthell.game_find_file(*args) game_find_file = _adonthell.game_find_file def game_find_directory(*args): return _adonthell.game_find_directory(*args) game_find_directory = _adonthell.game_find_directory class nls(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr init = staticmethod(_adonthell.nls_init) set_language = staticmethod(_adonthell.nls_set_language) translate = staticmethod(_adonthell.nls_translate) def __init__(self, *args): this = _adonthell.new_nls(*args) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _adonthell.delete_nls __del__ = lambda self: None nls_swigregister = _adonthell.nls_swigregister nls_swigregister(nls) def nls_init(*args): return _adonthell.nls_init(*args) nls_init = _adonthell.nls_init def nls_set_language(*args): return _adonthell.nls_set_language(*args) nls_set_language = _adonthell.nls_set_language def nls_translate(*args): return _adonthell.nls_translate(*args) nls_translate = _adonthell.nls_translate class config(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args): this = _adonthell.new_config(*args) try: self.this.append(this) except Exception: self.this = this def parse_arguments(self, *args): return _adonthell.config_parse_arguments(self, *args) def write_adonthellrc(self, *args): return _adonthell.config_write_adonthellrc(self, *args) def read_adonthellrc(self, *args): return _adonthell.config_read_adonthellrc(self, *args) def get_adonthellrc(self, *args): return _adonthell.config_get_adonthellrc(self, *args) language = _swig_property(_adonthell.config_language_get, _adonthell.config_language_set) font = _swig_property(_adonthell.config_font_get, _adonthell.config_font_set) game_name = _swig_property(_adonthell.config_game_name_get, _adonthell.config_game_name_set) gamedir = _swig_property(_adonthell.config_gamedir_get, _adonthell.config_gamedir_set) screen_mode = _swig_property(_adonthell.config_screen_mode_get, _adonthell.config_screen_mode_set) display = _swig_property(_adonthell.config_display_get, _adonthell.config_display_set) quick_load = _swig_property(_adonthell.config_quick_load_get, _adonthell.config_quick_load_set) audio_channels = _swig_property(_adonthell.config_audio_channels_get, _adonthell.config_audio_channels_set) audio_resolution = _swig_property(_adonthell.config_audio_resolution_get, _adonthell.config_audio_resolution_set) audio_sample_rate = _swig_property(_adonthell.config_audio_sample_rate_get, _adonthell.config_audio_sample_rate_set) audio_volume = _swig_property(_adonthell.config_audio_volume_get, _adonthell.config_audio_volume_set) __swig_destroy__ = _adonthell.delete_config __del__ = lambda self: None config_swigregister = _adonthell.config_swigregister config_swigregister(config) class achievements(object): thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr create = staticmethod(_adonthell.achievements_create) update = staticmethod(_adonthell.achievements_update) num_achievements = staticmethod(_adonthell.achievements_num_achievements) num_unlocked = staticmethod(_adonthell.achievements_num_unlocked) is_unlocked = staticmethod(_adonthell.achievements_is_unlocked) achievement_id = staticmethod(_adonthell.achievements_achievement_id) py_signal_connect = staticmethod(_adonthell.achievements_py_signal_connect) achievements_swigregister = _adonthell.achievements_swigregister achievements_swigregister(achievements) def achievements_create(*args): return _adonthell.achievements_create(*args) achievements_create = _adonthell.achievements_create def achievements_update(*args): return _adonthell.achievements_update(*args) achievements_update = _adonthell.achievements_update def achievements_num_achievements(*args): return _adonthell.achievements_num_achievements(*args) achievements_num_achievements = _adonthell.achievements_num_achievements def achievements_num_unlocked(*args): return _adonthell.achievements_num_unlocked(*args) achievements_num_unlocked = _adonthell.achievements_num_unlocked def achievements_is_unlocked(*args): return _adonthell.achievements_is_unlocked(*args) achievements_is_unlocked = _adonthell.achievements_is_unlocked def achievements_achievement_id(*args): return _adonthell.achievements_achievement_id(*args) achievements_achievement_id = _adonthell.achievements_achievement_id def achievements_py_signal_connect(*args): return _adonthell.achievements_py_signal_connect(*args) achievements_py_signal_connect = _adonthell.achievements_py_signal_connect adonthell-0.3.8/src/modules/Makefile.am0000644000175000017500000000101212756103157014711 00000000000000moddatadir = $(gamedatadir)/modules pyc_files = dialogue.pyc adonthell.pyc py_files = dialogue.py adonthell.py if COMPILE_SCRIPTS nodist_moddata_DATA = $(pyc_files) all: $(py_files) @if test x$(top_srcdir) != x$(top_builddir) ; then \ for i in $(py_files); do \ cp $(srcdir)/$$i $(builddir)/$$i; \ done \ fi ; PYTHONHOME=@PY_PREFIX@ $(top_builddir)/src/adonthell-0.3 -c else nodist_moddata_DATA = $(py_files) endif EXTRA_DIST = $(py_files) $(pyc_files) : $(py_files) CLEANFILES = $(pyc_files) adonthell-0.3.8/src/modules/Makefile.in0000644000175000017500000003704513414164743014741 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/modules ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moddatadir)" DATA = $(nodist_moddata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FT2_CFLAGS = @FT2_CFLAGS@ FT2_LIBS = @FT2_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ IGE_MAC_CFLAGS = @IGE_MAC_CFLAGS@ IGE_MAC_LIBS = @IGE_MAC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OGG_CFLAGS = @OGG_CFLAGS@ OGG_DEFS = @OGG_DEFS@ OGG_LIBS = @OGG_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PY_CFLAGS = @PY_CFLAGS@ PY_LIBS = @PY_LIBS@ PY_PREFIX = @PY_PREFIX@ P_DOT = @P_DOT@ P_DOXYGEN = @P_DOXYGEN@ RANLIB = @RANLIB@ SDL2_CONFIG = @SDL2_CONFIG@ SDL2_FRAMEWORK = @SDL2_FRAMEWORK@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_DEFS = @SDL_DEFS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gamedatadir = @gamedatadir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ moddatadir = $(gamedatadir)/modules pyc_files = dialogue.pyc adonthell.pyc py_files = dialogue.py adonthell.py @COMPILE_SCRIPTS_FALSE@nodist_moddata_DATA = $(py_files) @COMPILE_SCRIPTS_TRUE@nodist_moddata_DATA = $(pyc_files) EXTRA_DIST = $(py_files) CLEANFILES = $(pyc_files) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/modules/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nodist_moddataDATA: $(nodist_moddata_DATA) @$(NORMAL_INSTALL) @list='$(nodist_moddata_DATA)'; test -n "$(moddatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(moddatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moddatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(moddatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(moddatadir)" || exit $$?; \ done uninstall-nodist_moddataDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_moddata_DATA)'; test -n "$(moddatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(moddatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(moddatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_moddataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_moddataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nodist_moddataDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nodist_moddataDATA .PRECIOUS: Makefile @COMPILE_SCRIPTS_TRUE@all: $(py_files) @COMPILE_SCRIPTS_TRUE@ @if test x$(top_srcdir) != x$(top_builddir) ; then \ @COMPILE_SCRIPTS_TRUE@ for i in $(py_files); do \ @COMPILE_SCRIPTS_TRUE@ cp $(srcdir)/$$i $(builddir)/$$i; \ @COMPILE_SCRIPTS_TRUE@ done \ @COMPILE_SCRIPTS_TRUE@ fi ; @COMPILE_SCRIPTS_TRUE@ PYTHONHOME=@PY_PREFIX@ $(top_builddir)/src/adonthell-0.3 -c $(pyc_files) : $(py_files) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: adonthell-0.3.8/src/modules/dialogue.py0000664000175000017500000000635212742773625015046 00000000000000# # $Id$ # # (C) Copyright 2002 Kai Sterker # Part of the Adonthell Project http://adonthell.linuxgames.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY. # # See the COPYING file for more details # import sys # -- Base class for all dialogue scripts class base(object): # -- Execute one iteration of the dialogue # This consists of the following steps: # # 1) Run the code of the selected line of text # 2) Append all followers whose condition is true to the speech # to be used for the next selection. Also append the speaker # associated with each line of text. # # All data for these actions is retrieved from the derived class. def run (self, index): self.speech = [] self.speaker = [] result = 0 # -- get the code to execute and the list of following # dialogue options code, followers = self.dlg[index][1:] # -- if there is code, try to execute it if code != -1: self.execute (self.code[code], 1) # -- for each following option: for (speech, operation, cond) in followers: # -- if we're in an elif or else part of a condition # and a former condition was true already, continue if operation == 1 and result == 1: continue # -- try to ececute the condition, if there is one if cond != -1: result = self.execute (self.cond[cond], 0) else: result = 1 # -- only append the option if the condition was met if result == 1: speaker = self.dlg[speech][0] if speaker == "Default": speaker = self.the_npc.get_name () self.speaker.append (speaker) self.speech.append (speech) # -- finally, return return # -- Execute some arbitrary Python code def execute (self, statement, multiline): try: # -- this is for multiline code without retval if multiline == 1: code = compile (statement, "", "exec") return eval (code, self.namespace, locals ()) # -- this is for single line statements with retval else: return eval (statement, self.namespace, locals ()) except: # -- in case of an error, print what happened and continue err_type, value = sys.exc_info ()[:2] print ("Error in statement\n %s %s:\n '%s'" \ % (statement, str (err_type), str (value))) return 0 # -- Decide whether the dialogue engine should return control to the # player (1) or not (0) def stop (self, index): followers = self.dlg[index][2] if len (followers) > 0 and self.dlg[followers[0][0]][0] == None: return 0 else: return 1 # -- Allow usage of undeclared variables def __getattr__ (self, name): return 0 adonthell-0.3.8/src/win_scroll.cc0000644000175000017500000001072612756053067013707 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_scroll.h" win_scroll::win_scroll():win_scrollbar(this) { cursor_y_=0; max_amplitude_=0; cur_amplitude_=0; index_pad_=PAD_DEFAULT; set_auto_scrollbar(false); set_auto_refresh(false); } bool win_scroll::down() { if( max_amplitude_ == 0 ) return false; if( cur_amplitude_ + index_pad_ > max_amplitude_ ) cur_amplitude_ = max_amplitude_; else cur_amplitude_ += index_pad_; update_amplitude(); on_down(); return true; } void win_scroll::resize(u_int16 tl,u_int16 th) { win_container::resize(tl,th); find_amplitude(); win_scrollbar::update_back(); win_scrollbar::update_bar(); } bool win_scroll::up() { if( max_amplitude_==0 ) return false ; if( cur_amplitude_-index_pad_ < 0) cur_amplitude_ = 0; else cur_amplitude_ -= index_pad_; update_amplitude(); on_up(); return true; } void win_scroll::set_pos (const u_int8 pos) { cur_amplitude_ = (max_amplitude_ * pos) / 255; if (max_amplitude_ != 0) update_amplitude (); } void win_scroll::update_amplitude() { for(lwb::iterator i=list_wb_.begin() ; i!=list_wb_.end() ; i++) { (*i)->pad_y() = -cur_amplitude_ ; (*i)->update_position(); } cursor_y_= ((height() - win_scrollbar::height_bar()) * cur_amplitude_) / max_amplitude_; } void win_scroll::set_space_between_border(u_int16 tmp) { win_container::set_space_with_border(tmp); find_amplitude(); win_scrollbar::update_bar(); } void win_scroll::set_space_between_object(u_int16 tmp) { win_container::set_space_with_object(tmp); find_amplitude(); win_scrollbar::update_bar(); } void win_scroll::add(win_base *wb) { win_container::add(wb); find_amplitude(); win_scrollbar::update_bar(); } void win_scroll::remove(win_base *wb) { win_container::remove(wb); find_amplitude(); win_scrollbar::update_bar(); } void win_scroll::remove_all() { win_container::remove_all(); max_amplitude_=0; cur_amplitude_=0; win_scrollbar::update_bar(); } void win_scroll::destroy() { win_container::destroy(); max_amplitude_=0; cur_amplitude_=0; win_scrollbar::update_bar(); } bool win_scroll::draw() { if(win_base::draw()) { assign_drawing_area(wb_father_); win_background::draw(this); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->draw(); win_scrollbar::draw(wb_father_); win_border::draw(wb_father_); detach_drawing_area(); return true; } return false; } bool win_scroll::update() { if(win_container::update()) { if(auto_scrollbar_) { u_int16 old = amplitude(); find_amplitude(); if(old != amplitude()) { win_scrollbar::set_visible_scrollbar(amplitude()!=0); win_scrollbar::update_bar(); } } else if(auto_refresh_) { u_int16 old = amplitude(); find_amplitude(); if(old != amplitude()) win_scrollbar::update_bar(); } return true; } return false; } bool win_scroll::input_update() { if(win_container::input_update()) { if(focus_object_) return true; if(input::is_pushed(win_keys::KEY_UP)) up(); if(input::is_pushed(win_keys::KEY_DOWN)) down(); return true; } return false; } void win_scroll::find_amplitude() { //search the max y object to calcul the amplitude max_amplitude_ = cursor_y_ = cur_amplitude_ = 0; // max_amplitude_ = 0; for(lwb::iterator i=list_wb_.begin() ; i!=list_wb_.end() ; i++) if((*i)->y() + (*i)->height() > height() - space_with_border() && (*i)->y() + (*i)->height() - height() + space_with_border() > max_amplitude_ ) max_amplitude_ = (*i)->y() + (*i)->height() - height() + space_with_border(); } adonthell-0.3.8/src/fileops.h0000644000175000017500000001707012756050052013025 00000000000000/* Copyright (C) 2001/2003 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file fileops.h * @author Alexandre Courbot * * @brief Declares the igzstream, ogzstream and fileops classes. * */ #ifndef FILEOPS_H_ #define FILEOPS_H_ #include #include #include "types.h" #ifndef SWIG using namespace std; #endif /** * Enumeration to know whether a file is read or write opened. * */ typedef enum { READ, WRITE } gz_type; /** * Base class for igzstream and ogzstream. * */ class gz_file { public: /** * Default constructor. * */ gz_file (); #ifndef SWIG /** * * * @param fname name of the file to open. * @param t access (READ or WRITE). */ gz_file (const string & fname, gz_type t); #endif /** * Destructor. * */ virtual ~gz_file (); /** * Opens a file. * * @param fname name of the file to open. * @param t access (READ or WRITE). * * @return true if succeed, false otherwise. */ bool open (const string & fname, gz_type t); /** * Close the file that was opened. * */ void close (); /** * Returns whether the file is opened or not. * * * @return true if the file is opened, false otherwise. */ bool is_open () { return opened; } /** * Returns whether the file is at it's end or not. * * * @return true if the end of file is reached, else otherwise. */ bool eof () { return gzeof (file); } protected: /** * The actual gzFile. * */ gzFile file; private: /// NEVER pass this by value. gz_file (gz_file& src); /// Opened or not? bool opened; }; /** * Class to read data from a Gzip compressed file. */ class igzstream : public gz_file { public: /** * Default constructor. * */ igzstream (); #ifndef SWIG /** * Opens a file for read access. * * @param fname name of the file to open. * */ igzstream (const string & fname); #endif /** * Destructor. * */ ~igzstream (); /** * Opens a file for read access. * * @param fname name of the file to open. * * @return true if succeed, false otherwise. */ bool open (const string & fname); /** * Reads a block of bytes from the file. * * @param to pointer to the buffer where to read. * @param size number of bytes to read. */ void get_block (void * to, u_int32 size); #ifndef SWIG /// Reads a boolean. friend bool& operator << (bool& n, igzstream& gfile); /// Reads a char. friend char& operator << (char& n, igzstream& gfile); /// Reads a u_int8. friend u_int8& operator << (u_int8& n, igzstream& gfile); /// Reads a s_int8. friend s_int8& operator << (s_int8& n, igzstream& gfile); /// Reads a u_int16. friend u_int16& operator << (u_int16& n, igzstream& gfile); /// Reads a s_int16. friend s_int16& operator << (s_int16& n, igzstream& gfile); /// Reads a u_int32. friend u_int32& operator << (u_int32& n, igzstream& gfile); /// Reads a s_int32. friend s_int32& operator << (s_int32& n, igzstream& gfile); /// Reads a string. friend string& operator << (string& s, igzstream& gfile); /// Reads a float. friend float& operator << (float& s, igzstream& gfile); #endif bool get_bool (); u_int8 get_uint8 (); s_int8 get_sint8 (); u_int16 get_uint16 (); s_int16 get_sint16 (); u_int32 get_uint32 (); s_int32 get_sint32 (); string get_string (); float get_float (); private: /// NEVER pass this by value. igzstream (igzstream& src); }; /** * Class to write data from a Gzip compressed file. */ class ogzstream : public gz_file { public: /** * Default constructor. * */ ogzstream (); #ifndef SWIG /** * Opens a file for write access. * * @param fname name of the file to open. * */ ogzstream (const string & fname); #endif /** * Destructor. * */ ~ogzstream (); /** * Opens a file for write access. * * @param fname name of the file to open. * * @return true if succeed, false otherwise. */ bool open (const string & fname); /** * Writes a block of bytes to the file. * * @param to pointer to the buffer to write. * @param size number of bytes to write. */ void put_block (void * to, u_int32 size); #ifndef SWIG /// Writes a boolean. friend const bool& operator >> (const bool& n, ogzstream& gfile); /// Writes a char. friend const char& operator >> (const char& n, ogzstream& gfile); /// Writes a u_int8. friend const u_int8& operator >> (const u_int8& n, ogzstream& gfile); /// Writes a s_int8. friend const s_int8& operator >> (const s_int8& n, ogzstream& gfile); /// Writes a u_int16. friend const u_int16& operator >> (const u_int16& n, ogzstream& gfile); /// Writes a s_int16. friend const s_int16& operator >> (const s_int16& n, ogzstream& gfile); /// Writes a u_int32. friend const u_int32& operator >> (const u_int32& n, ogzstream& gfile); /// Writes a s_int32. friend const s_int32& operator >> (const s_int32& n, ogzstream& gfile); /// Writes a string. friend string& operator >> (const string& s, ogzstream& gfile); /// Writes a float. friend const float& operator >> (const float& s, ogzstream& gfile); #endif void put_bool (const bool &n) { n >> *this; } void put_uint8 (const u_int8 &n) { n >> *this; } void put_sint8 (const s_int8 &n) { n >> *this; } void put_uint16 (const u_int16 &n) { n >> *this; } void put_sint16 (const s_int16 &n) { n >> *this; } void put_uint32 (const u_int32 &n) { n >> *this; } void put_sint32 (const s_int32 &n) { n >> *this; } void put_string (const string& s) { s >> *this; } void put_float (const float &n) { n >> *this; } private: /// NEVER pass this by value. ogzstream (ogzstream& src); }; /// File version control class. class fileops { public: /** * Sets the version number of a file. * * @param file file where to write the version number. * @param version version number to write. */ static void put_version (ogzstream& file, u_int16 version); // Set version of a file /** * * * @param file file to check version. * @param min minimum expected version number. * @param max maximum expected version number. * @param name filename of the passed file. * * @return true if */ static bool get_version (igzstream& file, u_int16 min, u_int16 max, string name); // Check version }; #endif // __FILEOPS_H__ adonthell-0.3.8/src/screen.h0000644000175000017500000001325513164235552012650 00000000000000/* Copyright (C) 1999/2000/2001/2004 Alexandre Courbot Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file screen.h * @author Alexandre Courbot * @author Kai Sterker * * @brief Declares the screen class. * * */ #ifndef SCREEN_H_ #define SCREEN_H_ #include "surface.h" #include "prefs.h" #include #ifndef SWIG using namespace std; #endif /** Screen access is made through this class. * This static class sets video modes, flush the frame buffer to the physical * screen and make abstraction of the real screen depth to ease the graphic * programmer's task. */ class screen { public: static void cleanup(); static SDL_Renderer *get_renderer() { return Renderer; } static u_int32 format() { return Window != NULL ? SDL_GetWindowPixelFormat(Window) : SDL_PIXELFORMAT_UNKNOWN; } /** * The actual screen surface. * It is publicly available so you can do fast operations on the screen. * Manipulate it just as a classic surface. * */ static surface display; /** Initializes the video subsystem and creates the required resources. * @param nl X screen resolution. * @param nh Y screen resolution. * @param depth desired screen depth. * @param myconfig configuration data. * @return true on success, false otherwise. */ static bool init (u_int16 nl, u_int16 nh, u_int8 depth, const config & myconfig); /** Returns the length of the screen. * @return length of the screen. */ static u_int16 length () { return display.length (); } /** Returns the height of the screen. * @return height of the screen. */ static u_int16 height () { return display.height (); } /** Returns the screen depth, in bytes per pixel. * @return screen depth, in bytes per pixel. */ static u_int8 bytes_per_pixel () { return bytes_per_pixel_; } /** Returns the translucent color in %screen's depth format. * For manipulation on images that will only be displayed, this is * the right function to call for getting the translucent color. * @return the translucent color in %screen's depth format. */ static u_int32 trans_col () { return trans; } /** * Scale factor of the screen. */ static u_int8 scale () { return scale_; } /** * X offset of the viewport */ static u_int16 offset_x() { return clip_rect_.x; } /** * Y offset of the viewport */ static u_int16 offset_y() { return clip_rect_.y; } /** * Totally clears the screen with black. * */ static void clear () { SDL_SetRenderDrawColor(Renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); if (clip_rect_.x || clip_rect_.y) { // SDL renderers do not treat clip rect identical when clearing screen SDL_RenderSetClipRect(Renderer, NULL); SDL_RenderClear(Renderer); SDL_RenderSetClipRect(Renderer, &clip_rect_); } else { SDL_RenderClear(Renderer); } } /** Ensure the framebuffer is copied to the physical screen. */ static void show () { SDL_RenderPresent(Renderer); } /** Returns whether the current mode is fullscreen or windowed. * @return * - 0: windowed mode. * - 1: letterbox mode * - 2: fullscreen mode */ static u_int8 mode () { return mode_; } /** Sets fullscreen/windowed mode. * @param mode * - 0: windowed mode. * - 1: letterbox mode * - 2: fullscreen mode * @return * @li true if the operation succeed. * @li false if the mode is already set, or the system doesn't support * this mode. */ static bool set_fullscreen (const u_int8 & m); /** * Returns information about the current screen settings, * suitable for being displayed to the user. * * * @return printable information about the current screen settings. */ static string info (); /** * Make a nice transition effect. * * @param i advancement of the transition (finished when i == screen::length () / 2) */ static void transition (u_int16 i); private: static u_int8 get_scale_for_display(u_int8 screen, u_int16 nl, u_int16 nh); static void update_scale(); /// Bytes per pixel. static u_int8 bytes_per_pixel_; /// Transparent color. static u_int32 trans; /// Whether fullscreen is on or not. static u_int8 mode_; /// The output window static SDL_Window *Window; /// the render target static SDL_Renderer *Renderer; /// scale factor of the screen static u_int8 scale_; /// clipping rectangle for letterbox mode static SDL_Rect clip_rect_; /// the mode to use for true fullscreen static SDL_DisplayMode fullscreen_mode; }; #endif adonthell-0.3.8/src/gettext.h0000644000175000017500000002344412742773625013067 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011, 2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 #endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ adonthell-0.3.8/src/time_event.h0000644000175000017500000001174112756052556013535 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file time_event.h * * @author Kai Sterker * @brief Declares the time_event class. */ #ifndef TIME_EVENT_H__ #define TIME_EVENT_H__ #include "event.h" /** * The time %event executes the attached script or callback at a certain * point in %game-time. This point can either be relative to the current * time, or absolute in time. In any case, this point should be in the * future. Time %event with an alarm time in the past will be triggered * at once. */ class time_event : public event { public: /** * @name Initialization */ //@{ /** * Create a new time %event. * * @param time The time when the %event should be raised. The string * specifies week, day, hour, minute and 1/10 minute in the format * "wdhmt". If a number is * 0, it can be omitted. * @param absolute Decides whether the given time is relative from now * on, or an absolute time */ time_event (const string & time, bool absolute = false); #ifndef SWIG /** * Standard constructor. */ time_event () : event () { Type = TIME_EVENT; Repeat = 1; } /** * Create a new time %event. This constructor is primarily used for * raising time events. * * @param time The "alarm" time in %gametime minutes. */ time_event (const u_int32 & time) : event () { Type = TIME_EVENT; Time = time; Repeat = 1; } #endif // SWIG /** * Set whether the %event should be raised at fixed intervals. * * @param interval The time between two occurences of the %event. * @param count The number of times the %event shall be repeated. * Specify -1 to repeat it an unlimited number of times. */ void set_repeat (const string & interval, s_int32 count = -1); //@} /** * @name Event Handling */ //@{ /** * Compare two time events for equality. * * @param evnt The time event to compare this to. * @return True if the two events equal, false otherwise. */ bool equals (const event * evnt) { time_event *e = (time_event *) evnt; return Time <= e->time (); } /** * Executes the script associated with this time %event. If the * event repeats it is re-registered with the %event handler. * * @param evnt The %event that triggered this time %event. * * @return The number of times the %event needs to be repeated. */ s_int32 execute (const event * evnt); //@} /** * @name Loading / Saving */ //@{ /** * Saves the basic %event %data (such as the type or script data) * to a file. * * @param out file where to save the %event. */ void put_state (ogzstream& out) const; /** * Loads the basic %event %date from a file. * * @param in file to load the %event from. * @return \e true if the %event could be loaded, \e false otherwise */ bool get_state (igzstream& in); //@} /** * @name Pausing / Resuming execution */ //@{ /** * Disable the %event temporarily. As long as it in this state, the * event will neither be executed, nor will its repeat-count change. * * The alarm time of relative time events will be prolongued be the * time the event was paused. Absolute events will only be deferred * until they are resumed. */ void pause (); /** * Re-enable an %event that has been paused. * * Absolute events that are past their alarm time are executed at once. */ void resume (); //@} /** * Get the event's "alarm" time, i.e. the time when it needs to be * executed. * * @return the "alarm" time in 1/10 %gametime minutes. */ u_int32 time () const { return Time; } private: #ifndef SWIG // the time when the event shall be triggered u_int32 Time; // time that lies between two occurances of the event u_int32 Interval; // whether the alarm time is relative or absolute bool Absolute; #endif // SWIG }; #endif // TIME_EVENT_H__ adonthell-0.3.8/src/win_container.cc0000644000175000017500000002245212756052674014375 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_container.h" win_container::win_container() { move(0,0); set_layout(NO_LAYOUT); set_space_with_border(SPACE_WITH_BORDER); set_space_with_object(SPACE_WITH_OBJECT); focus_object_ = NULL; } win_container::~win_container() { destroy(); } void win_container::move(s_int16 tx, s_int16 ty) { win_base::move(tx,ty); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->update_position(); } void win_container::resize(u_int16 tl, u_int16 th) { win_base::resize(tl,th); update_layout(); } void win_container::update_position() { win_base::update_position(); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->update_position(); } void win_container::add(win_base * w) { list_wb_.push_back(w); w->set_container(this); update_layout(); } void win_container::remove(win_base * w) { list_wb_.remove(w); w->set_container(NULL); update_layout(); } void win_container::remove_all() { for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) { (*i)->set_container(NULL); list_wb_.erase(i); } } void win_container::destroy() { for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) delete *i; list_wb_.clear(); } bool win_container::update() { if(win_base::update()) { for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) { if(!(*i)->update()) { list_wb_.erase(i); delete *i--; } } return true; } return false; } bool win_container::input_update() { if(win_base::input_update()) { if(focus_object_) focus_object_->input_update(); return true; } return false; } void win_container::set_focus_object(win_base * f) { if(focus_object_) focus_object_->set_focus(false); if(f) f->set_focus(true); focus_object_ = f; } void win_container::set_brightness(bool b) { win_base::set_brightness(b); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->set_brightness(b); } void win_container::set_trans(bool b) { win_base::set_trans(b); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->set_trans(b); } void win_container::set_visible_all(bool b) { set_visible(b); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->set_visible(b); } bool win_container::draw() { if(win_base::draw()) { assign_drawing_area(wb_father_); win_background::draw(this); for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) (*i)->draw(); win_border::draw(wb_father_); detach_drawing_area(); return true; } return false; } void win_container::update_layout() { u_int16 indice_h=space_with_border_; switch(layout_) { case LIST_LAYOUT: for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++) { (*i)->move((*i)->x(),indice_h); indice_h+=(*i)->height()+space_with_object_; } break; } } /* #include #include "types.h" #include "image.h" #include "win_types.h" #include "win_base.h" #include "win_border.h" #include "win_theme.h" #include "win_container.h" //constructor win_container::win_container(s_int16 tx,s_int16 ty,u_int16 tl,u_int16 th,win_theme * wth):win_base(tx,ty,tl,th,wth) { //clear the list og object list_obj.clear(); //set the space between border and object space_between_border_=WIN_SPACE_BETWEEN_BORDER; //set space between object and another object space_between_object_=WIN_SPACE_BETWEEN_OBJECT; */ /* //set justify ----> WARNING MAYBE IN WIN_BASE ???? justify_=WIN_JUSTIFY_NO; */ /* //set layout equals no layout_=WIN_LAYOUT_NO; } void win_container::set_space_between_object(u_int16 tmp) { //set the space between object and call update layout to redefine position of each element space_between_object_=tmp; update_layout(); } void win_container::set_space_between_border(u_int16 tmp) { //set the space between border and object and call update layout to redefine position of each element space_between_border_=tmp; update_layout(); } win_container::~win_container() { destroy(); } void win_container::add(win_base * tmp) { //add the object list_obj.push_back(tmp); //set the new object tmp->wb_father_=this; tmp->update_real_position(); tmp->update_align(); //update layout update_layout(); //if the win_container is brightness set the new object in brightness mode if(draw_brightness_) tmp->set_draw_brightness(true); } void win_container::remove(win_base * tmp) { list::iterator i=list_obj.begin(); while(i!=list_obj.end() && tmp!=(*i)) i++; if(i!=list_obj.end()) { //list_obj.remove(tmp); tmp->wb_father_=NULL; list_obj.erase(i); update_layout(); } } void win_container::remove_all() { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->wb_father_=NULL; list_obj.clear(); } void win_container::destroy() { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) delete *i; list_obj.clear(); } void win_container::resize(u_int16 tl,u_int16 th) { win_base::resize(tl,th); for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->update_align(); } bool win_container::update() { //call the win update ---> on update() if(win_base::update()) { //update all the element in the list for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) { if(!(*i)->update()) { remove(*i); delete *i--; } } return true; } return false; } bool win_container::draw() { if(win_base::draw()) { assign_drawing_area(); //assign drawing area //draw the background draw_background(); //next draw all the element for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->draw(); //draw the border draw_border(); //detach the drawing area detach_drawing_area(); return true; } return false; } //set visible mode for all element in list void win_container::set_visible_all(bool b) { visible_=b; for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_visible(visible_); } //set draw brightness for all element in the list void win_container::set_draw_brightness(bool b) { win_base::set_draw_brightness(b); for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_draw_brightness(b); } */ /* //set justify an object in this container void win_container::set_justify(win_base * wb, u_int8 just) { switch(just) { case WIN_JUSTIFY_LEFT: wb->move(space_between_border_,wb->y()); break; case WIN_JUSTIFY_RIGHT: wb->move(length_-space_between_border_-wb->length(),wb->y()); break; case WIN_JUSTIFY_CENTER: if(length_>wb->length()) wb->move((length_-wb->length())>>1,wb->y()); break; } } //justify all the element */ /* void win_container::set_align_all(u_int8 a) { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_align(a); } //sezt the layout and update void win_container::set_layout(u_int8 lay) { layout_=lay; update_layout(); } // void win_container::update_real_position() { win_base::update_real_position(); for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->update_real_position(); } void win_container::move(s_int16 tx,s_int16 ty) { win_base::move(tx,ty); update_real_position(); } //just one layout actually but i whish add another --> grid layout void win_container::update_layout() { u_int16 old_h=0; u_int16 indice_h=space_between_border_; u_int16 indice_l=space_between_border_; switch(layout_) { case WIN_LAYOUT_LIST: //u_int16 indice=space_between_border_; for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) { (*i)->move((*i)->x(),indice_h); indice_h+=(*i)->height()+space_between_object_; } break; case WIN_LAYOUT_AUTO: for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) { if(indice_l+(*i)->length()>length_) { indice_l=space_between_border_; indice_h+=old_h+space_between_object_; (*i)->move(indice_l,indice_h); } (*i)->move(indice_l,indice_h); indice_l+=(*i)->length()+space_between_object_; old_h=(*i)->height(); } break; default: break; } } void win_container::set_focus(bool b) { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_focus(b); focus_=b; } */ adonthell-0.3.8/src/quest.h0000644000175000017500000000237212756051746012537 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef __QUEST_H__ #define __QUEST_H__ #include "fileops.h" #include "storage.h" // This class stores flags and variables defining the player's // progress in a specific quest class quest : public storage { public: quest (); ~quest (); #ifndef SWIG void load (igzstream&); void save (ogzstream&); string name; #endif // SWIG }; #ifndef SWIG namespace data { /** * All the quests. * */ extern dictionary quests; } #endif #endif // __QUEST_H__ adonthell-0.3.8/src/.indent.pro0000664000175000017500000000103612742773625013306 00000000000000--tab-size4 --blank-lines-after-declarations --blank-lines-after-procedures --braces-after-if-line --brace-indent0 --indent-level4 --line-comments-indentation0 --declaration-indentation1 --continuation-indentation4 --braces-after-struct-decl-line --case-brace-indentation0 --case-indentation4 --continue-at-parentheses --no-blank-lines-after-commas --no-comment-delimiters-on-blank-lines --dont-cuddle-else --no-space-after-parentheses --dont-line-up-parentheses --dont-star-comments --dont-break-procedure-type --space-after-procedure-calls adonthell-0.3.8/src/prefs.l0000664000175000017500000000255612742773625012531 00000000000000%{ /* $Id$ Copyright (C) 2000/2004 Kai Sterker Part of the Adonthell Project http://adonthell.linuxgames.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the COPYING file for more details. */ #include #include #include "prefs.h" #define YY_DECL int parse_adonthellrc (int &mynum, string &mytext) %} digit [0-9] num {digit}+ %x text %option noyywrap nounput never-interactive prefix="prefs" %% "#".*[\n]? ; /* Eat up comments */ Screen-mode return PREFS_SCREEN_MODE; Display return PREFS_DISPLAY; Language return PREFS_LANGUAGE; Font return PREFS_FONT; Quick-load return PREFS_QUICK_LOAD; Audio-channels return PREFS_AUDIO_CHANNELS; Audio-resolution return PREFS_AUDIO_RESOLUTION; Audio-sample-rate return PREFS_AUDIO_SAMPLE_RATE; Audio-volume return PREFS_AUDIO_VOLUME; Version return PREFS_VERSION; \[ mytext = ""; BEGIN(text); \] BEGIN(INITIAL); return PREFS_STR; [^\]]+ mytext += yytext; {num} mynum = atoi (yytext); return PREFS_NUM; [ \t\n]+ ; . return PREFS_UNKNOWN; adonthell-0.3.8/src/label_input.cc0000644000175000017500000000547613001505771014024 00000000000000/* (C) Copyright 2000/2001/2003/2004 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "label_input.h" label_input::label_input () : label () { set_cursor_visible (true); set_cursor_moveable (true); set_editable (true); } label_input::~label_input() { if (input::is_text_input()) { input::stop_text_input(); } } void label_input::set_editable (const bool b) { editable_ = b; } bool label_input::input_update() { if (!editable_) return false; if (!input::is_text_input()) { input::start_text_input(); } label::input_update(); if (my_font_ == NULL) return false; int count; std::string c = input::get_next_unicode (); while (!c.empty()) { cursor_undraw (); if (c[0] == SDLK_BACKSPACE || c[0] == SDLK_DELETE) { if (my_text_.empty () || my_cursor_.idx == 0) return true; // possibly delete multi-byte utf-8 char if (my_cursor_.idx > 2 && (u_int8) my_text_[my_cursor_.idx-3] == 0xEF) count = 3; else if (my_cursor_.idx > 1 && (u_int8) my_text_[my_cursor_.idx-2] == 0xC3) count = 2; else count = 1; my_cursor_.idx -= count; u_int16 idx = my_cursor_.idx; u_int16 glyph = ucd (idx); #ifndef __HAIKU__ my_text_.erase (my_cursor_.idx, count); #else while(count > 0) { my_text_.erase (my_cursor_.idx, 1); count--; } #endif update_cursor (); my_old_cursor_ = my_cursor_; offset_x_ = my_cursor_.offset_x; fillrect (my_cursor_.pos_x, my_cursor_.pos_y, (*my_font_) [glyph].length (), my_font_->height (), screen::trans_col ()); build (false); } else if (c[0] == SDLK_RETURN) add_text ("\n"); else { u_int16 idx = 0; if (my_font_->in_table (ucd(c, idx))) { add_text (c); } else { add_text("?"); } } c = input::get_next_unicode (); } return true; } adonthell-0.3.8/src/character_base.cc0000644000175000017500000000441712756050014014447 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file character_base.cc * @author Kai Sterker * * @brief Defines the character_base class. * * */ #include "character_base.h" #include using namespace std; character_base::character_base () { color = 1; name = ""; dialogue = ""; // characters are NPC's by default set_val ("type", NPC); } character_base::~character_base () { } void character_base::set_name (string newname) { name = newname; } void character_base::set_dialogue (string newdlg) { dialogue = newdlg; } void character_base::put_state(ogzstream& out) { storage::iterator i; u_int32 j; // Save name name >> out; // save color color >> out; // Save all attributes and flags j = size (); j >> out; for (i = begin (); i != end (); i++) { string s = (*i).first; s >> out; (*i).second >> out; } dialogue >> out; portrait >> out; } void character_base::get_state (igzstream& in) { u_int32 i, size; s_int32 value; // load name name << in; // load color color << in; // load all attributes and flags size << in; for (i = 0; i < size; i++) { string key; key << in; /// @bug : We should be able to pass a string to objects /// instead of a char *, which memory isn't freed at exit. value << in; set_val (key.c_str (), value); } dialogue << in; portrait << in; } adonthell-0.3.8/src/label.cc0000644000175000017500000004600712756050653012612 00000000000000/* (C) Copyright 2000/2001/2004 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "label.h" u_int16 label::cursor_blink_cycle = 75; #define LINE_LENGTH(line) (line.pos_x + line.offset_x/screen::scale()) /** Constructor */ label::label () : image () { // no font at the beginning my_font_ = NULL; new_text_ = ""; // init the cursor and the text vector init_vec_cursor (); // set my default form set_form (NOTHING); set_cursor_visible (false); set_cursor_moveable (false); cursor_cur_blink_ = 0; set_mask (true); } /** Destructor */ label::~label () { } /** Set the font */ void label::set_font (win_font & font) { my_font_ = &font; } /** Set the text */ void label::set_text (const string & text) { // init the vector and the cursor init_vec_cursor (); my_old_cursor_ = my_cursor_; // set the text my_text_ = text; my_cursor_.idx = my_text_.length (); // build the vector build (true); } /** Add text */ void label::add_text (const string & text) { new_text_ += text; // collect more text if we have unfinished utf8 int size = new_text_.length (); if (size == 2 && (u_int8) new_text_[0] >= 0xE0) return; if (size == 1 && (u_int8) new_text_[0] >= 0x80) return; my_old_cursor_ = my_cursor_; if (my_old_cursor_.idx == my_text_.length ()) { my_text_ += new_text_; my_cursor_.idx = my_text_.length (); } else my_text_.insert (my_cursor_.idx, new_text_); new_text_ = ""; build (false); } /** REsize the label */ void label::resize (u_int16 l, u_int16 h) { image::resize (l, h); set_text (my_text_); } /** Set the form */ void label::set_form (const u_int8 form) { my_form_ = form; if (my_text_.empty()) return; build (true); } /** Init vector and cursor */ void label::init_vec_cursor () { // init the cursor memset(&my_cursor_, 0, sizeof my_cursor_); // init the vector my_vect_.clear (); // create a line in the vector Sline_text tmp; memset(&tmp, 0, sizeof tmp); // add the new line at the beginning of the vector my_vect_.push_back (tmp); // the beginning of the display line, 0 is the first line start_line_ = 0; } /** Update the vector start : it's the index where the function must start to update */ void label::build (const bool erase_all) { if (my_font_ == NULL) return; set_mask (false); switch (my_form_) { case NOTHING : build_form_nothing (); update_cursor (); draw_string (!erase_all); break; case AUTO_HEIGHT : build_form_auto_height (); update_cursor (); draw_string (!erase_all); break; case AUTO_SIZE : build_form_auto_size (); update_cursor (); draw_string (false); break; } set_mask (true); } /** Set if cursor is visible */ void label::set_cursor_visible (const bool b) { visible_cursor_ = b; } /** Set the cursor moveable with arrow */ void label::set_cursor_moveable (const bool b) { moveable_cursor_ = b; } /** Build the label when the form set top nothing */ void label::build_form_nothing () { // temporary variable u_int16 j, word_length, word_length_pix, start_idx; s_int16 word_offset_x; // temporary line Sline_text line_tmp; // we start at the beginning index of cursor line line_tmp.idx_beg = my_vect_[my_old_cursor_.line].idx_beg; line_tmp.pos_x = 0; line_tmp.offset_x = 0; // we start always at the begin index of the line start_idx = line_tmp.idx_beg; // erase the vector vector ::iterator ii = my_vect_.begin (); u_int16 i = 0; while (i != my_old_cursor_.line) { i++; ii++; } my_vect_.erase (ii, my_vect_.end ()); u_int16 prev_c = 0; while (start_idx < my_text_.length () ) { // if cur letter is an \n if (my_text_[start_idx] == '\n') { // the last index of this line line_tmp.idx_end = start_idx; // add to the vector line my_vect_.push_back (line_tmp); // init a Sline_text line_tmp.pos_x = 0; line_tmp.offset_x = 0; line_tmp.idx_beg = ++start_idx; prev_c = 0; } else if (my_text_[start_idx] == ' ') { if ((*my_font_) [' '].length () + LINE_LENGTH(line_tmp) > length ()) { line_tmp.idx_end = start_idx; // add to the vector line my_vect_.push_back (line_tmp); // init a Sline_text line_tmp.pos_x = 0; line_tmp.offset_x = 0; line_tmp.idx_beg = ++start_idx; prev_c = 0; } else { line_tmp.pos_x += (*my_font_) [' '].length (); if (prev_c != 0) line_tmp.offset_x += my_font_->kerning(prev_c, ' '); start_idx++; prev_c = ' '; } } else { // find a word switch (find_word (start_idx, word_length, word_length_pix, word_offset_x, prev_c, LINE_LENGTH(line_tmp))) { case 0 : // enough place line_tmp.pos_x += word_length_pix; line_tmp.offset_x += word_offset_x; break; case 1 : // enough place, but return at the next line // here we erase end of the last line if (length () && height ()) { offset_x_ = line_tmp.offset_x; fillrect (line_tmp.pos_x, (my_vect_.size () - start_line_) * my_font_->height (), length () - LINE_LENGTH(line_tmp), my_font_->height (), screen::trans_col () ); } line_tmp.idx_end = (start_idx - word_length) - 1; my_vect_.push_back (line_tmp); line_tmp.pos_x = word_length_pix; line_tmp.offset_x = word_offset_x; line_tmp.idx_beg = start_idx - word_length; break; case 2 : // not enough place j = start_idx - word_length; while (j < start_idx) { u_int16 c = ucd (j); if (line_tmp.pos_x + (*my_font_) [c].length () > length ()) { line_tmp.idx_end = j - 1; my_vect_.push_back (line_tmp); line_tmp.pos_x = 0; line_tmp.offset_x = 0; line_tmp.idx_beg = j; } line_tmp.pos_x += (*my_font_) [c].length (); if (prev_c != 0) line_tmp.offset_x += my_font_->kerning(prev_c, c); j++; prev_c = c; } break; } } } // it is the last line line_tmp.idx_end = start_idx - 1; my_vect_.push_back (line_tmp); } void label::build_form_auto_height () { // it's the same build_form_nothing (); // now verify if it's always the same size u_int16 new_size = my_vect_.size () * my_font_->height (); if (new_size != height ()) { image tmp (length (), new_size); tmp.fillrect (0, 0, length (), new_size, screen::trans_col ()); draw (0, 0, 0, 0, length (), my_old_cursor_.pos_y + my_font_->height (), NULL, &tmp); image::resize (length (), new_size); tmp.draw (0, 0, NULL, this); } } void label::build_form_auto_size () { // find the max height and the max length // clear the vector_ my_vect_.clear (); // temporary line Sline_text line_tmp; line_tmp.pos_x = 0; line_tmp.offset_x = 0; line_tmp.idx_beg = 0; u_int16 i = 0, max_length = 0; u_int16 prev_c = 0; while ( i < my_text_.size ()) { if (my_text_[i] == '\n') { if (line_tmp.pos_x + LINE_LENGTH(line_tmp) > max_length) { max_length = LINE_LENGTH(line_tmp); } line_tmp.idx_end = i; my_vect_.push_back (line_tmp); line_tmp.idx_beg = i+1; line_tmp.pos_x = 0; line_tmp.offset_x = 0; prev_c = 0; } else { u_int16 c = ucd (i); line_tmp.pos_x += (*my_font_) [c].length (); if (prev_c != 0) line_tmp.offset_x += my_font_->kerning(prev_c, c); prev_c = c; } i++; } if (LINE_LENGTH(line_tmp) > max_length) { max_length = LINE_LENGTH(line_tmp); } // the last line line_tmp.idx_end = i-1; my_vect_.push_back (line_tmp); // now resize the label image::resize (max_length, my_vect_.size () * my_font_->height ()); } void label::fit_text_width() { u_int16 new_size = 0; for (vector::iterator i = my_vect_.begin(); i != my_vect_.end(); i++) { if (LINE_LENGTH((*i)) > new_size) { new_size = LINE_LENGTH((*i)); } } if (new_size < length ()) { set_length(new_size); } } void label::clean_surface (const bool erase_all) { if (length () && height ()) { if ( my_cursor_.idx != my_text_.length ()) { offset_x_ = my_old_cursor_.offset_x; fillrect ( my_old_cursor_.pos_x, my_old_cursor_.pos_y, length () - my_old_cursor_.pos_x, my_font_->height (), screen::trans_col (), NULL); offset_x_ = 0; fillrect (0, my_old_cursor_.pos_y + my_font_->height (), length (), height () -my_old_cursor_.pos_y + my_font_->height (), screen::trans_col ()); } else if (erase_all) { offset_x_ = 0; fillrect (0, 0, length (), height (), screen::trans_col ()); } } } // find a word // index : the word begin at the index // wlength : size of word // wlengthpix : size of word in pixel // length : // return 0 if enough size for this word, 1 if enough but must return on the next line, 2 if the word is bigger than the length u_int8 label::find_word (u_int16 & index, u_int16 & wlength, u_int16 & wlengthpix, s_int16 & woffset, u_int16 & last_letter, const u_int16 rlength) { u_int16 c = 0; wlength = index; wlengthpix = 0; woffset = 0; while (index < my_text_.length () && my_text_[index] != ' ' && my_text_[index] != '\n') { c = ucd (index); wlengthpix += (*my_font_) [c].length (); if (last_letter != 0) woffset += my_font_->kerning(last_letter, c); last_letter = c; index++; } // count of characters (which is != count of letters due to utf-8 encoding) wlength = index - wlength; last_letter = c; // if size of word is bigger than the length of label if (wlengthpix + woffset/screen::scale() < length () - rlength) return 0; else if (wlengthpix + woffset/screen::scale() < length ()) return 1; return 2; } void label::update_cursor () { // find the cursor position bool b = false; // init the blink cursor cursor_cur_blink_ = cursor_blink_cycle; // find the iterator line where is the cursor while (!b && my_cursor_.line < my_vect_.size () ) { if (my_cursor_.idx >= my_vect_[my_cursor_.line].idx_beg && my_cursor_.idx <= my_vect_[my_cursor_.line].idx_end ) b = true; else if (my_cursor_.idx > my_vect_[my_cursor_.line].idx_end) { if (my_cursor_.line == my_vect_.size () - 1) b = true; else my_cursor_.line++; } else if (my_cursor_.idx < my_vect_[my_cursor_.line].idx_beg) { my_cursor_.line--; } } // now find the x position of the cursor my_cursor_.pos_x = 0; my_cursor_.offset_x = 0; u_int16 prev_c = 0; u_int16 j = my_vect_[my_cursor_.line].idx_beg; while (j < my_cursor_.idx) { u_int16 c = ucd (j); my_cursor_.pos_x+= (*my_font_) [c].length (); if (prev_c != 0) my_cursor_.offset_x += my_font_->kerning(prev_c, c); prev_c = c; j++; } // find y position my_cursor_.pos_y = (my_cursor_.line - start_line_) * my_font_->height (); } // if bool is false redraw all, if bool is true redraw just at beginning of the cursor void label::draw_string (const bool at_cursor) { u_int16 tmp_start_line; u_int16 tx = 0, ty = 0; u_int16 idx_cur_line, j; u_int16 c, prev_c = 0; s_int16 ox = 0; // if not at cursor, we erase all clean_surface (!at_cursor); if (at_cursor) { tmp_start_line = my_old_cursor_.line; tx = my_old_cursor_.pos_x; ox = my_cursor_.offset_x; // my_cursor_ has been updated with the correct offset! idx_cur_line = my_old_cursor_.idx; ty = (tmp_start_line - start_line_) * my_font_->height (); } else { tmp_start_line = start_line_; idx_cur_line = my_vect_[tmp_start_line].idx_beg; } // draw the first line for (j = idx_cur_line; j < my_vect_[tmp_start_line].idx_end + 1 ; j++) { c = ucd (j); if (c != '\n' && my_font_->in_table (c)) { if (prev_c != 0) ox += my_font_->kerning(prev_c, c); offset_x_ = ox; (*my_font_) [c].draw (tx, ty, NULL, this); tx += (*my_font_) [c].length (); prev_c = c; } else prev_c = 0; } ty += my_font_->height (); tmp_start_line++; // draw another line while (tmp_start_line < my_vect_.size ()) { tx = 0; ox = 0; for (j = my_vect_[tmp_start_line].idx_beg; j < my_vect_[tmp_start_line].idx_end + 1 ; j++) { c = ucd (j); if (my_font_->in_table (c)) { if (prev_c != 0) ox += my_font_->kerning(prev_c, c); offset_x_ = ox; (*my_font_) [c].draw (tx, ty, NULL, this); tx += (*my_font_) [c].length (); prev_c = c; } else prev_c = 0; } ty += my_font_->height (); tmp_start_line++; } } bool label::update () { if (visible_cursor_) { if (! (height () && length ())) return true; if (cursor_cur_blink_ == cursor_blink_cycle) { set_mask(false); cursor_draw (); set_mask(true); cursor_cur_blink_ = 0; }else if (cursor_cur_blink_ == (cursor_blink_cycle >> 1)) cursor_undraw (); cursor_cur_blink_++; } return true; } void label::cursor_draw () { // draw the cursor u_int16 idx = my_cursor_.idx; offset_x_ = my_cursor_.offset_x; if (last_letter (idx) || my_text_[idx] == '\n') my_font_->cursor->draw (my_cursor_.pos_x, my_cursor_.pos_y,NULL, this); else my_font_->cursor->draw (my_cursor_.pos_x, my_cursor_.pos_y,0, 0, (*my_font_) [ucd (idx)].length (), my_font_->height (), NULL, this); } void label::cursor_undraw () { // draw letter instead u_int16 idx = my_cursor_.idx; offset_x_ = my_cursor_.offset_x; if (last_letter (idx) || my_text_[idx] == '\n') { fillrect(my_cursor_.pos_x, my_cursor_.pos_y, my_font_->cursor->length () , my_font_->cursor->height(), screen::trans_col()); } else (*my_font_) [ucd (idx)].draw (my_cursor_.pos_x, my_cursor_.pos_y, NULL, this); } bool label::last_letter (u_int16 idx) { if ((u_int8) my_text_[idx] == 0xEF) return my_text_.length () - idx == 2; if ((u_int8) my_text_[idx] == 0xC3) return my_text_.length () - idx == 1; return my_cursor_.idx == my_text_.length (); } bool label::input_update () { if(input::has_been_pushed(KEY_CURSOR_NEXT)) { if (! (height () && length ())) return false; // cursor_undraw (); // cursor_next (); } else if (input::has_been_pushed(KEY_CURSOR_PREVIOUS)) { if (! (height () && length ())) return false; // cursor_undraw (); // cursor_previous (); } return true; } void label::cursor_next () { if (!moveable_cursor_) return; if (my_cursor_.idx < my_text_.length ()) { // TODO: kerning u_int8 count; if (my_cursor_.idx < my_text_.length () - 2 && (u_int8) my_text_[my_cursor_.idx+1] == 0xEF) count = 3; else if (my_cursor_.idx < my_text_.length () - 1 && (u_int8) my_text_[my_cursor_.idx+1] == 0xC3) count = 2; else count = 1; my_cursor_.idx += count; update_cursor (); } } void label::cursor_previous () { if (!moveable_cursor_) return; if (my_cursor_.idx > 0) { // TODO: kerning u_int8 count; if (my_cursor_.idx > 2 && (u_int8) my_text_[my_cursor_.idx-3] == 0xEF) count = 3; else if (my_cursor_.idx > 1 && (u_int8) my_text_[my_cursor_.idx-2] == 0xC3) count = 2; else count = 1; my_cursor_.idx -= count; update_cursor (); } } const string & label::text_string () const { return my_text_; } const char * label::text_char () const { return my_text_.c_str (); } // utf-8 --> utf-16 u_int16 label::ucd (const std::string & text, u_int16 & i) const { const u_int8 c = text.at(i); if (c < 0x80) return c; if (c < 0xe0) { const u_int8 c1 = text.at(++i); return ((u_int16) (c & 0x1f) << 6) | (u_int16) (c1 ^ 0x80); } const u_int8 c1 = text.at(++i); const u_int8 c2 = text.at(++i); return ((u_int16) (c & 0x0f) << 12) | ((u_int16) (c1 ^ 0x80) << 6) | (u_int16) (c2 ^ 0x80); } adonthell-0.3.8/src/storage.h0000644000175000017500000001110012756052274013024 00000000000000/* Copyright (C) 2000/2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file storage.h * @author Kai Sterker * * @brief Declares the storage and objects classes. * * */ #ifndef STORAGE_H_ #define STORAGE_H_ #include #include #include #include "types.h" #include "str_hash.h" #ifndef SWIG using namespace std; #endif /** * Base storage class. If you want to access attributes of an object of yours * you have to derive that object's class from 'storage' and store the attributes * in the hash_map. * */ class storage { public: /** * Default constructor. * */ storage () { changed = 1; } /** * Destructor. * */ ~storage (); /** * Sets key to value. * * @param key key. * @param value value. */ void set_val (string key, s_int32 value); /** * Returns the value of a key. * * @param key key to return. * * @return value of key. */ s_int32 get_val (string key); /** * Returns the next (key, value) pair of the storage. * * * @return Next element. */ pair next (); #ifndef SWIG /** * Returns the value of a key. * * @attention Not available from Python. From Python, use get () * instead. * * @param key key to return * * @return value of key. */ s_int32& operator[] (string key); #endif private: #ifndef SWIG hash_map data; hash_map::iterator i; u_int8 changed; #endif public: #ifndef SWIG /** * Storage iterator, similar to STL iterator. * */ typedef hash_map::iterator iterator; /** * Returns an iterator to the beginning of the storage. * * * @return iterator to the beginning of the storage. */ iterator begin () { return data.begin (); } /** * Returns an iterator to the end of the storage. * * * @return iterator to the end of the storage. */ iterator end () { return data.end (); } /** * Returns the size (number of elements) of the storage. * * * @return size of the storage. */ u_int32 size () const { return data.size (); } #endif }; /** * The global container for access to all the different %game objects * from within a script */ class objects { public: /** * Default constructor. * */ objects () { changed = 1; } /** * Associates an object to a key. * * @param key key. * @param val storage associated to key. */ void set_val (const char * key, storage* val); /** * Returns a storage associated to a key. * * @param key key to return. * * @return storage associated to key. */ storage* get_val (const char * key); /** * Erases a storage from it's key. * * @param key key to erase. */ void erase (const char * key); /** * Returns the next storage in the object. * * * @return next storage in the object. */ storage* next (); private: #ifndef SWIG /* * Checks two strings for their order (needed for the map) * */ struct ltstr { bool operator()(const char* s1, const char* s2) const { return strcmp (s1, s2) < 0; } }; map data; map::iterator i; u_int8 changed; #endif }; #ifndef SWIG /** * Stores %objects of any kind. * * Please see the hash_map documentation in STL documentation for a detailed * description of this class. * */ template class dictionary : public hash_map { }; #endif #endif // STORAGE_H_ adonthell-0.3.8/src/input.cc0000644000175000017500000001344013164000216012645 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot. Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file input.cc * @author Alexandre Courbot * @author Kai Sterker * * @brief Defines the input class. * * */ #include #include #include #include #include #include "input.h" u_int8 * input::keystate=NULL; u_int8 * input::p_keystate=NULL; bool input::text_input = false; s_int32 input::keystatelength; u_int16 input::mouse_posx, input::mouse_posy; bool input::mouse_button[3]; std::queue input::input_queue; SDL_GameController *input::controller = NULL; void input::init() { const u_int8 *state = SDL_GetKeyboardState(&keystatelength); keystate=new u_int8[keystatelength]; memcpy(keystate, state, keystatelength); // set_keyboard_mode(MODE_STATE); p_keystate=new u_int8[keystatelength]; memset(p_keystate, 0, keystatelength); controller = init_controller(); } SDL_GameController *input::init_controller() { for (int i = 0; i < SDL_NumJoysticks(); ++i) { if (SDL_IsGameController(i)) { SDL_GameController *controller = SDL_GameControllerOpen(i); if (controller) { return controller; } else { std::cerr << "Failed to open controller " << SDL_GameControllerNameForIndex(i) << ": " << SDL_GetError() << std::endl; } } } return NULL; } void input::shutdown() { if(controller != NULL) { SDL_GameControllerClose(controller); } delete[] p_keystate; } void input::update() { static SDL_Event event; while (SDL_PollEvent(&event)) { switch (event.type) { case SDL_KEYDOWN: { SDL_Scancode idx = event.key.keysym.scancode; if (!event.key.repeat) { keystate[idx]=1; p_keystate[idx]++; if (text_input) { if (idx == SDL_SCANCODE_BACKSPACE || idx == SDL_SCANCODE_DELETE || idx == SDL_SCANCODE_RETURN) { input_queue.push(std::string(1, (char)event.key.keysym.sym)); } } } break; } case SDL_KEYUP: { SDL_Scancode idx = event.key.keysym.scancode; keystate[idx]=0; break; } case SDL_TEXTINPUT: { if (text_input) { input_queue.push(event.text.text); } break; } case SDL_CONTROLLERBUTTONDOWN: { SDL_Scancode idx = map_controller_button((SDL_GameControllerButton) event.cbutton.button); if (idx != SDL_SCANCODE_UNKNOWN) { keystate[idx] = 1; p_keystate[idx]++; } break; } case SDL_CONTROLLERBUTTONUP: { SDL_Scancode idx = map_controller_button((SDL_GameControllerButton) event.cbutton.button); if (idx != SDL_SCANCODE_UNKNOWN) { keystate[idx] = 0; } break; } case SDL_CONTROLLERDEVICEADDED: { if (controller == NULL) { controller = init_controller(); } break; } case SDL_CONTROLLERDEVICEREMOVED: { if (controller != NULL) { SDL_Joystick *stick = SDL_GameControllerGetJoystick(controller); if (event.cdevice.which == SDL_JoystickInstanceID(stick)) { SDL_GameControllerClose(controller); controller = NULL; } } break; } } } } SDL_Scancode input::map_controller_button(const SDL_GameControllerButton & button) { switch(button) { case SDL_CONTROLLER_BUTTON_DPAD_UP: { return SDL_SCANCODE_UP; } case SDL_CONTROLLER_BUTTON_DPAD_DOWN: { return SDL_SCANCODE_DOWN; } case SDL_CONTROLLER_BUTTON_DPAD_LEFT: { return SDL_SCANCODE_LEFT; } case SDL_CONTROLLER_BUTTON_DPAD_RIGHT: { return SDL_SCANCODE_RIGHT; } case SDL_CONTROLLER_BUTTON_A: { return SDL_SCANCODE_RETURN; } case SDL_CONTROLLER_BUTTON_B: { return SDL_SCANCODE_ESCAPE; } case SDL_CONTROLLER_BUTTON_LEFTSHOULDER: { return SDL_SCANCODE_PAGEUP; } case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER: { return SDL_SCANCODE_PAGEDOWN; } default: { return SDL_SCANCODE_UNKNOWN; } } } bool input::is_pushed(SDL_Keycode key) { bool ret; SDL_Scancode idx = SDL_GetScancodeFromKey(key); ret=keystate[idx]; if((ret)&&(p_keystate[idx])) p_keystate[idx]--; return ret; } bool input::has_been_pushed(SDL_Keycode key) { bool ret; SDL_Scancode idx = SDL_GetScancodeFromKey(key); ret=p_keystate[idx]; if((ret)&&(!(--p_keystate[idx]))) keystate[idx]=0; return ret; } SDL_Keycode input::get_next_key() { static SDL_Event event; static bool b; b=false; if(SDL_PeepEvents(&event,1,SDL_GETEVENT,SDL_KEYDOWN,SDL_KEYDOWN)==1) { b=true; if(p_keystate[event.key.keysym.scancode]) p_keystate[event.key.keysym.scancode]--; keystate[event.key.keysym.scancode]=0; } if (b) return(event.key.keysym.sym); return(-1); } std::string input::get_next_unicode() { if (!input_queue.empty()) { std::string utf8_result(input_queue.front()); input_queue.pop(); return utf8_result; } return ""; } void input::start_text_input() { while(!input_queue.empty()) input_queue.pop(); SDL_StartTextInput(); text_input = true; } void input::stop_text_input() { clear_keys_queue(); text_input = false; SDL_StopTextInput(); } void input::clear_keys_queue() { memset(p_keystate, 0, keystatelength); } adonthell-0.3.8/src/time_event_handler.h0000644000175000017500000000450612756052527015231 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file time_event_handler.h * * @author Kai Sterker * @brief Declares the time_event_handler class. */ #ifndef TIME_EVENT_HANDLER_H__ #define TIME_EVENT_HANDLER_H__ #include #include "event_handler_base.h" using std::vector; /** * This class keeps track of time events, i.e. events that are raised * at a certain point in (%game) time. All registered events are * sorted by the time they need to be raised, so that only one * comparison decides upon whether an %event is to be raised. */ class time_event_handler : public event_handler_base { public: /** * Register a time %event with the %event handler. It is inserted * into the vector of registered events depending on its "alarm" * time. The %event needs to be removed before it can be safely * deleted. * * @param evnt Pointer to the %event to be registered. */ void register_event (event *evnt); /** * Removes the given %event from the %event handler. Once it is * no longer needed, it can be freed. * * @param evnt Pointer to the %event to be removed. */ void remove_event (event *evnt); /** * Raise one or more events in case the given time matches their * "alarm" time. When they need to be repeated, they are * re-inserted into the %event-vector. * * @param evnt An %event structure with the current %game time in * minutes. */ void raise_event (const event *evnt); private: // storage for registered time events. vector Events; }; #endif // TIME_EVENT_HANDLER_H__ adonthell-0.3.8/src/py_object.h0000644000175000017500000001607312756051701013346 00000000000000/* Copyright (C) 1999/2000/2001/2003 Kai Sterker Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file py_object.h * @author Kai Sterker * @author Alexandre Courbot * * @brief Declares the py_object class. */ #ifndef PY_OBJECT_H #define PY_OBJECT_H #include "python_class.h" /** * Python object class. * * Use this class to create instances of Python classes contained in Python * modules, then control their execution. You can pass an argument tuple to * the class constructor and to any method you want to run. It is further * possible to access and change attributes of the Python instance. * */ class py_object { public: /** * Default constructor. * */ py_object (); /** * Destructor. * */ ~py_object (); /** * Resets the script to it's post-constructor state. * */ void clear (); /** * @name PyObject creation */ //@{ /** * Creates an instance of a Python class. * * @param file file name of the module to use. * @param classname name of the class to import. * @param args Python tuple containing the arguments to pass to the * Python class constructor. */ bool create_instance (string file, string classname, PyObject * args = NULL); /** * Similar to create_instance, except that it will reload the module * from disk, in case it has been changed in the meantime. Mainly interesting * for script development or tools like dlgedit. * * @param file file name of the module to use. * @param classname name of the class to import. * @param args Python tuple containing the arguments to pass to the * Python class constructor. */ bool reload_instance (string file, string classname, PyObject * args = NULL); //@} /** * @name PyObject method calling */ //@{ /** * Call a method of this object. * * @param name name of the method to call. * @param args Python tuple containing the arguments to pass to the method. * @return the return value of the method as PyObject. Needs to be * Py_DECREF'd when no longer needed. */ PyObject *call_method_ret (const string &name, PyObject *args = NULL) const; /** * Call a method of this object. * * @param name name of the method to call. * @param args Python tuple containing the arguments to pass to the method. */ void call_method (const string & name, PyObject * args = NULL) const { PyObject *result = call_method_ret (name, args); Py_XDECREF (result); } /** * Calls the run () method of this object. * Equivalent to call_method ("run", args); * * @param args Python tuple containing the arguments to pass to the method. */ void run (PyObject * args = NULL) { call_method ("run", args); } //@} /** * @name PyObject member access */ //@{ /** * Tests whether the object contains a certain attribute (i.e. method * or variable). * * @param name Name of the attribute to test for * @return true if the attribute exists, false otherwise. */ bool has_attribute (const std::string & name); /** * Returns a new reference to an attribute of this object. * * @param name Name of the attribute to access * @return New reference to the attribute or NULL on error */ PyObject* get_attribute (const string & name) const; /** * Returns the given attribute as integer value. * * @param name Name of the attribute to access * @return An integer. */ s_int32 get_attribute_int (const string & name); /** * Returns the given attribute as string value. * * @param name Name of the attribute to access * @return A string. */ string get_attribute_string (const string & name); /** * Assign a new attribute to the module, overriding an existing * attribute of the same name. * * @param name The attribute's name * @param value The attribute's value */ void set_attribute (const string & name, PyObject *value); /** * Assign a new integer attribute to the module, overriding an * existing attribute of the same name. * * @param name The attribute's name * @param value The attribute's value */ void set_attribute_int (const string & name, s_int32 value); /** * Assign a new string attribute to the module, overriding an * existing attribute of the same name. * * @param name The attribute's name * @param value The attribute's value */ void set_attribute_string (const string & name, const string & value); //@} /** * @name Member access */ //@{ /** * Direct access to the instance object. The default behaviour is to * increase the instance's reference count, so that this method can * be safely called from Python scripts. * * @param incref whether to increase the reference count. * @return the Python class instance. */ PyObject *get_instance (const bool & incref = true) const { if (incref) { Py_XINCREF (Instance); } return Instance; } /** * Returns the class name of this object. This is the name of the * wrapped Python class. * * @return class name of this object. */ std::string class_name () const { return Classname; } /** * Returns the file name of this object. This is the name of the * Python module containing the wrapped class. * * @return fi�e name of this object. */ std::string file_name () const { return Filename; } //@} protected: /** * The python class instance wrapped by %py_object */ PyObject *Instance; private: /** * Helper for create_instance and reload_instance * */ bool instanciate (PyObject*, string, string, PyObject*); /** * The class name of the current script */ std::string Classname; /** * The file name of the current script */ std::string Filename; }; #endif // PY_OBJECT_H adonthell-0.3.8/src/mapcharacter.cc0000644000175000017500000007740212756051120014156 00000000000000/* Copyright (C) 1999/2000/2001/2002 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapcharacter.cc * * @author Alexandre Courbot * @brief Defines the mapcharacter class. */ #include "mapcharacter.h" #include "map_event.h" #include "time_event.h" #include "event_handler.h" #include "landmap.h" #include "win_manager.h" using namespace std; // Public methods mapcharacter::mapcharacter () : mapsquare_walkable_area (), character_base (), event_list () { submap_ = posx_ = posy_ = offx_ = offy_ = 0; refmap = NULL; anim.resize (NBR_MOVES); for (u_int16 i = 0; i < NBR_MOVES; i++) anim[i] = new animation; current_move = STAND_NORTH; previous_move = NO_MOVE; saying = NULL; schedule_activated = true; action_activated = true; goal_reached_ = true; schedule_args = NULL; action_args = NULL; callback = NULL; } mapcharacter::~mapcharacter () { clear (); for (u_int16 i = 0; i < anim.size (); i++) delete anim[i]; anim.clear (); } void mapcharacter::clear () { event_list::clear (); if (saying) delete saying; for (u_int16 i = 0; i < anim.size (); i++) anim[i]->clear (); mapsquare_walkable_area::clear (); schedule.clear (); action.clear (); filename_ = ""; Py_XDECREF (schedule_args); schedule_args = NULL; Py_XDECREF (action_args); action_args = NULL; schedule_file_ = ""; action_file_ = ""; if (callback) delete callback; } s_int8 mapcharacter::get (igzstream& file) { int i; for (i = 0; i < NBR_MOVES; i++) { anim[i]->get (file); anim[i]->stop (); } mapsquare_walkable_area::get (file); return 0; } s_int8 mapcharacter::load (string fname) { string s = MAPCHAR_DIR; s += fname; igzstream file (s); if (!file.is_open ()) return -1; s_int8 retvalue; if (fileops::get_version (file, 1, 1, s)) retvalue = get (file); file.close (); filename_ = fname; return 0; } s_int8 mapcharacter::put (ogzstream& file) const { int i; for (i = 0; i < NBR_MOVES; i++) { anim[i]->put (file); } mapsquare_walkable_area::put (file); return 0; } s_int8 mapcharacter::save (string fname) const { string s = MAPCHAR_DIR; s += fname; ogzstream file (s); if (!file.is_open ()) return -1; s_int8 retvalue; fileops::put_version (file, 1); retvalue = put (file); file.close (); return 0; } s_int8 mapcharacter::get_state (igzstream& file) { string t; bool b; u_int16 current_move__; s_int8 offx__, offy__; remove_from_pos (); t << file; load (t); // Reads the data members current_move__ << file; previous_move << file; submap_ << file; posx_ << file; posy_ << file; offx__ << file; offy__ << file; jump_to (submap (), posx (), posy ()); set_offset (offx__, offy__); current_move = current_move__; // Get the path state mypath.get_state (file); // The map must be attached manually for now! :( mypath.refmap = refmap; pathindex << file; goal_reached_ << file; // Schedule state PyObject * args; t << file; b << file; args = NULL; if (b) args = python::get_tuple (file); set_schedule (t, args); Py_XDECREF (args); b << file; set_schedule_active (b); // Action state t << file; b << file; args = NULL; if (b) args = python::get_tuple (file); set_action (t, args); Py_XDECREF (args); b << file; set_action_active (b); // get the events py_callback::instance = schedule.get_instance (false); return event_list::get_state (file); } s_int8 mapcharacter::put_state (ogzstream& file) const { // Write the mapcharacter's file name filename_ >> file; // Write the data members current_move >> file; previous_move >> file; submap_ >> file; posx_ >> file; posy_ >> file; offx_ >> file; offy_ >> file; // Save the path state mypath.put_state (file); pathindex >> file; goal_reached_ >> file; // Save the schedule script state schedule_file () >> file; if (schedule_args) { true >> file; python::put_tuple (schedule_args, file); } else false >> file; is_schedule_activated () >> file; // Save the action script state action_file () >> file; if (action_args) { true >> file; python::put_tuple (action_args, file); } else false >> file; is_action_activated () >> file; // save the events event_list::put_state (file); return 0; } void mapcharacter::set_map (landmap * m) { if (mymap ()) return; m->mapchar.push_back (this); refmap = m; } void mapcharacter::remove_from_map () { if (!mymap ()) return; leave_position (); vector ::iterator i; for (i = mymap ()->mapchar.begin (); (*i) != this; i++); mymap ()->mapchar.erase (i); refmap = NULL; } void mapcharacter::remove_from_pos () { leave_position (); } void mapcharacter::jump_to (u_int16 smap, u_int16 x, u_int16 y, u_int16 pos) { leave_position (); set_pos (smap, x, y); set_offset (0, 0); switch (pos) { case STAND_NORTH: stand_north (); break; case STAND_SOUTH: stand_south (); break; case STAND_WEST: stand_west (); break; case STAND_EAST: stand_east (); break; default: stand (); break; } enter_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = pos; event_handler::raise_event (&evt); } void mapcharacter::stand () { if (current_move >= WALK_NORTH && current_move != NO_MOVE) { previous_move = current_move; current_move -= WALK_NORTH; } } void mapcharacter::stand_north () { previous_move = current_move; current_move = STAND_NORTH; } void mapcharacter::stand_south () { previous_move = current_move; current_move = STAND_SOUTH; } void mapcharacter::stand_east () { previous_move = current_move; current_move = STAND_EAST; } void mapcharacter::stand_west () { previous_move = current_move; current_move = STAND_WEST; } bool mapcharacter::can_go_north () const { if (!posy ()) return false; u_int16 i, j; u_int16 sx = (posx () - base_x () < 0) ? 0 : posx () - base_x (); u_int16 sy = (posy () - base_y () < 0) ? 0 : posy () - base_y (); s_int16 ax = sx - (posx () - base_x ()); s_int16 ay = sy - (posy () - base_y ()); u_int16 ex = (posx () - base_x () + area_length () > refmap->submap[submap ()]->area_length ()) ? refmap->submap[submap ()]->area_length () : posx () - base_x () + area_length (); u_int16 ey = (posy () - base_y () + area_height () > refmap->submap[submap ()]->area_height ()) ? refmap->submap[submap ()]->area_height () : posy () - base_y () + area_height (); for (j = sy; j < ey; j++) for (i = sx; i < ex; i++) { if (get_square (i - sx + ax, j - sy + ay)->get_walkable ()) continue; if (!j) continue; if (!(refmap->submap[submap ()]->area[i][j].is_walkable_north () && refmap->submap[submap ()]->area[i][j - 1].is_walkable_south () && refmap->submap[submap ()]->area[i][j - 1].is_free ())) return false; } return true; } bool mapcharacter::can_go_south () const { if (posy () == refmap->submap[submap ()]->area_height () - 1) return false; u_int16 i, j; u_int16 sx = (posx () - base_x () < 0) ? 0 : posx () - base_x (); u_int16 sy = (posy () - base_y () < 0) ? 0 : posy () - base_y (); s_int16 ax = sx - (posx () - base_x ()); s_int16 ay = sy - (posy () - base_y ()); u_int16 ex = (posx () - base_x () + area_length () >= refmap->submap[submap ()]->area_length ()) ? refmap->submap[submap ()]->area_length () : posx () - base_x () + area_length (); u_int16 ey = (posy () - base_y () + area_height () >= refmap->submap[submap ()]->area_height ()) ? refmap->submap[submap ()]->area_height () : posy () - base_y () + area_height (); for (j = sy; j < ey; j++) for (i = sx; i < ex; i++) { if (get_square (i - sx + ax, j - sy + ay)->get_walkable ()) continue; if (j == refmap->submap[submap ()]->area_height () - 1) continue; if (!(refmap->submap[submap ()]->area[i][j].is_walkable_south () && refmap->submap[submap ()]->area[i][j + 1].is_walkable_north () && refmap->submap[submap ()]->area[i][j + 1].is_free ())) return false; } return true; } bool mapcharacter::can_go_east () const { if (posx () == refmap->submap[submap ()]->area_length () - 1) return false; u_int16 i, j; u_int16 sx = (posx () - base_x () < 0) ? 0 : posx () - base_x (); u_int16 sy = (posy () - base_y () < 0) ? 0 : posy () - base_y (); s_int16 ax = sx - (posx () - base_x ()); s_int16 ay = sy - (posy () - base_y ()); u_int16 ex = (posx () - base_x () + area_length () >= refmap->submap[submap ()]->area_length ()) ? refmap->submap[submap ()]->area_length () : posx () - base_x () + area_length (); u_int16 ey = (posy () - base_y () + area_height () >= refmap->submap[submap ()]->area_height ()) ? refmap->submap[submap ()]->area_height () : posy () - base_y () + area_height (); for (j = sy; j < ey; j++) for (i = sx; i < ex; i++) { if (get_square (i - sx + ax, j - sy + ay)->get_walkable ()) continue; if (i == refmap->submap[submap ()]->area_length () - 1) continue; if (!(refmap->submap[submap ()]->area[i][j].is_walkable_east () && refmap->submap[submap ()]->area[i + 1][j].is_walkable_west () && refmap->submap[submap ()]->area[i + 1][j].is_free ())) return false; } return true; } bool mapcharacter::can_go_west () const { if (!posx ()) return false; u_int16 i, j; u_int16 sx = (posx () - base_x () < 0) ? 0 : posx () - base_x (); u_int16 sy = (posy () - base_y () < 0) ? 0 : posy () - base_y (); s_int16 ax = sx - (posx () - base_x ()); s_int16 ay = sy - (posy () - base_y ()); u_int16 ex = (posx () - base_x () + area_length () > refmap->submap[submap ()]->area_length ()) ? refmap->submap[submap ()]->area_length () : posx () - base_x () + area_length (); u_int16 ey = (posy () - base_y () + area_height () > refmap->submap[submap ()]->area_height ()) ? refmap->submap[submap ()]->area_height () : posy () - base_y () + area_height (); for (j = sy; j < ey; j++) for (i = sx; i < ex; i++) { if (get_square (i - sx + ax, j - sy + ay)->get_walkable ()) continue; if (!i) continue; if (!(refmap->submap[submap ()]->area[i][j].is_walkable_west () && refmap->submap[submap ()]->area[i - 1][j].is_walkable_east () && refmap->submap[submap ()]->area[i - 1][j].is_free ())) return false; } return true; } bool mapcharacter::go_north () { if (current_move < WALK_NORTH) { bool ret = can_go_north (); previous_move = current_move; if (ret) current_move = WALK_NORTH; else current_move = STAND_NORTH; return ret; } return false; } bool mapcharacter::go_south () { if (current_move < WALK_NORTH) { bool ret = can_go_south (); previous_move = current_move; if (ret) current_move = WALK_SOUTH; else current_move = STAND_SOUTH; return ret; } return false; } bool mapcharacter::go_east () { if (current_move < WALK_NORTH) { bool ret = can_go_east (); previous_move = current_move; if (ret) current_move = WALK_EAST; else current_move = STAND_EAST; return ret; } return false; } bool mapcharacter::go_west () { if (current_move < WALK_NORTH) { bool ret = can_go_west (); previous_move = current_move; if (ret) current_move = WALK_WEST; else current_move = STAND_WEST; return ret; } return false; } bool mapcharacter::set_goal (u_int16 x, u_int16 y, u_int16 dir) { mypath.refmap = mymap (); mypath.submap = submap (); mypath.start.x = posx (); mypath.start.y = posy (); mypath.goal.x = x; mypath.goal.y = y; mypath.dir = dir; pathindex = 0; goal_reached_ = false; return mypath.calculate (); } void mapcharacter::set_callback (PyObject *cb, PyObject *args) { if (callback) delete callback; callback = new py_callback (cb, args); } void mapcharacter::time_callback (string delay, PyObject *cb, PyObject *args) { time_event *ev = new time_event (delay); ev->set_callback (cb, args); add_event (ev); } void mapcharacter::time_callback_string (string delay, string cb, PyObject *args) { PyObject *instance = schedule.get_instance (false); // check that we have a valid instance that contains our callback if (instance == NULL) { fprintf (stderr, "*** error: mapcharacter::time_callback: Invalid instance!"); return; } PyObject *callback = PyObject_GetAttrString (instance, (char *) cb.c_str ()); if (!PyCallable_Check (callback)) { fprintf (stderr, "*** error: mapcharacter::time_callback: Setting callback ' %s' failed!", cb.c_str ()); } else { time_event *ev = new time_event (delay); ev->set_callback (callback, args); add_event (ev); } Py_XDECREF (callback); } bool mapcharacter::follow_path () { // If a movment is engaged, let it finish first. if (offx () || offy ()) return false; // If the goal isn't reached yet. if (pathindex < mypath.nbr_moves ()) { u_int16 dir = mypath.get_move (pathindex); u_int8 success = 0; // Try to follow the direction switch (dir) { case WALK_NORTH: if (go_north ()) success = 1; break; case WALK_SOUTH: if (go_south ()) success = 1; break; case WALK_WEST: if (go_west ()) success = 1; break; case WALK_EAST: if (go_east ()) success = 1; break; } // Who the fuck is on my way!!?@! I have to find a new path now! if (!success) { mypath.start.x = posx (); mypath.start.y = posy (); mypath.submap = submap (); mypath.calculate (); pathindex = 0; } else pathindex++; } else { switch (mypath.dir) { case STAND_NORTH: stand_north (); break; case STAND_SOUTH: stand_south (); break; case STAND_WEST: stand_west (); break; case STAND_EAST: stand_east (); break; } // goal reached -> notify script (as the script might immediately // set the next goal, we gotta set goal_reached_ before that) goal_reached_ = true; if (callback) callback->callback_func0 (); return true; } return false; } void mapcharacter::stop_moving () { set_goal (posx (), posy ()); } bool mapcharacter::goal_reached () { return goal_reached_; } void mapcharacter::look_invert (u_int16 p) { switch (p) { case STAND_NORTH: stand_south (); break; case STAND_SOUTH: stand_north (); break; case STAND_EAST: stand_west (); break; case STAND_WEST: stand_east (); break; } } mapcharacter *mapcharacter::whosnext () const { switch (current_move) { case STAND_NORTH: if (posy () == 0) return NULL; return refmap->submap[submap ()]->area[posx ()][posy () - 1].whoshere (); break; case STAND_SOUTH: if (posy () == refmap->submap[submap ()]->area_height () - 1) return NULL; return refmap->submap[submap ()]->area[posx ()][posy () + 1].whoshere (); break; case STAND_WEST: if (posx () == 0) return NULL; return refmap->submap[submap ()]->area[posx () - 1][posy ()].whoshere (); break; case STAND_EAST: if (posx () == refmap->submap[submap ()]->area_length () - 1) return NULL; return refmap->submap[submap ()]->area[posx () + 1][posy ()].whoshere (); break; } return NULL; } bool mapcharacter::do_stuff (string method, PyObject *args) { if (!schedule.has_attribute (method)) return false; else schedule.call_method (method, args == Py_None ? NULL : args); return true; } void mapcharacter::set_schedule (string file, PyObject * args) { // Clears the schedule schedule.clear (); Py_XDECREF (schedule_args); schedule_args = NULL; // Set new schedule if (file != "") { if (args == Py_None) args = NULL; Py_XINCREF (args); schedule_args = args; u_int16 argssize = args == NULL ? 1 : PyTuple_Size (args) + 1; PyObject * theargs; theargs = PyTuple_New (argssize); // We can pass_instance directly 'cause PyTuple_SetItem steals a // reference to the result of pass_instance. PyTuple_SetItem (theargs, 0, python::pass_instance (this, "mapcharacter")); for (u_int16 i = 1; i < argssize; i++) { PyObject * intref = PyTuple_GetItem (args, i - 1); Py_INCREF (intref); PyTuple_SetItem (theargs, i, intref); } schedule.create_instance ("schedules.mapcharacters." + file, file, theargs); Py_DECREF (theargs); if (!schedule.has_attribute ("run")) set_schedule_active (false); } schedule_file_ = file; } void mapcharacter::set_action (string file, PyObject * args) { // Clears the action script action.clear (); Py_XDECREF (action_args); action_args = NULL; if (file != "") { Py_XINCREF (args); action_args = args; u_int16 argssize = args == NULL ? 1 : PyTuple_Size (args) + 1; PyObject * theargs; theargs = PyTuple_New (argssize); // We can pass_instance directly 'cause PyTuple_SetItem steals a // reference to the result of pass_instance. PyTuple_SetItem (theargs, 0, python::pass_instance (this, "mapcharacter")); for (u_int16 i = 1; i < argssize; i++) { PyObject * intref = PyTuple_GetItem (args, i - 1); Py_INCREF (intref); PyTuple_SetItem (theargs, i, intref); } action.create_instance ("actions." + file, file, theargs); Py_DECREF (theargs); } action_file_ = file; } bool mapcharacter::update () { update_move (); if (is_schedule_activated ()) schedule.run (); // if we have a goal, then go there! if (!goal_reached ()) follow_path (); if (previous_move != NO_MOVE && previous_move != current_move) { anim[previous_move]->stop (); anim[previous_move]->rewind (); anim[current_move]->play (); } if (saying && !saying->update ()) { delete saying; saying = NULL; } return true; } void mapcharacter::launch_action (mapcharacter * requester) { PyObject *args = PyTuple_New (1); PyTuple_SetItem (args, 0, python::pass_instance (requester, "mapcharacter")); if (is_action_activated ()) action.run (args); Py_DECREF (args); } void mapcharacter::draw (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target) const { anim[current_move]->draw (x, y, da_opt, target); } void mapcharacter::draw_bubble (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target) const { if (saying) { s_int16 dx = x - (saying->drawing_area::length () >> 1) + (anim[current_move]->length () >> 1); s_int16 dy = y - (saying->drawing_area::height ()) + 5; if (dx < 4) dx = 4; else if (dx + saying->drawing_area::length () > da_opt->x () + da_opt->length () - 4) dx = da_opt->x () + da_opt->length () - saying->drawing_area::length () - 4; saying->move (dx, dy); saying->assign_drawing_area (da_opt); saying->draw (); saying->detach_drawing_area (); } } mapcharacter & mapcharacter::operator = (const mapcharacter & src) { u_int16 i; clear (); (mapsquare_walkable_area&) (*this) = (mapsquare_walkable_area&) src; (character_base&) (*this) = (character_base&) src; for (i = 0; i < NBR_MOVES; i++) (*anim[i]) = (*src.anim[i]); schedule = src.schedule; action = src.action; current_move = src.currentmove (); if (src.mymap ()) { set_map (src.mymap ()); set_pos (src.submap (), src.posx (), src.posy ()); set_offset (src.offx (), src.offy ()); } filename_ = src.filename_; return *this; } // Private methods void mapcharacter::occupy (u_int16 smap, u_int16 px, u_int16 py) { mapsquare_char mschar; list ::iterator it; u_int16 sx = (px - base_x () < 0) ? 0 : px - base_x (); u_int16 sy = (py - base_y () < 0) ? 0 : py - base_y (); u_int16 ex = (sx + area_length () > refmap->submap[smap]->area_length ()) ? refmap->submap[smap]->area_length () : sx + area_length (); u_int16 ey = (sy + area_height () > refmap->submap[smap]->area_height ()) ? refmap->submap[smap]->area_height () : sy + area_height (); u_int16 i, j; // Placing the base tile first mschar.mchar = this; mschar.is_base = true; mschar.x = px; mschar.y = py; mschar.walkable = get_square (base_x (), base_y ())->get_walkable () == ALL_WALKABLE; refmap->submap[smap]->area[px][py].mapchars.push_back (mschar); it = --refmap->submap[smap]->area[px][py].mapchars.end (); it->base_tile = it; mschar.base_tile = it; mschar.is_base = false; // Ready to place the rest now for (i = sx; i < ex; i++) for (j = sy; j < ey; j++) if (i != px || j != py) { mschar.x = i; mschar.y = j; mschar.walkable = get_square (sx + base_x () - px, sy + base_y () - py)-> get_walkable () == ALL_WALKABLE; refmap->submap[smap]->area[i][j].mapchars.push_back (mschar); } } void mapcharacter::leave (u_int16 smap, u_int16 px, u_int16 py) { list ::iterator it; list ::iterator e; u_int16 sx = (px - base_x () < 0) ? 0 : px - base_x (); u_int16 sy = (py - base_y () < 0) ? 0 : py - base_y (); u_int16 ex = (sx + area_length () > refmap->submap[smap]->area_length ()) ? refmap->submap[smap]->area_length () : sx + area_length (); u_int16 ey = (sy + area_height () > refmap->submap[smap]->area_height ()) ? refmap->submap[smap]->area_height () : sy + area_height (); u_int16 i, j; for (i = sx; i < ex; i++) for (j = sy; j < ey; j++) { it = refmap->submap[smap]->area[i][j].mapchars.begin (); e = refmap->submap[smap]->area[i][j].mapchars.end (); while (it != e && it->mchar != this) it++; if (it != e) refmap->submap[smap]->area[px][py].mapchars.erase (it); } } void mapcharacter::leave_position () { leave (submap (), posx (), posy ()); switch (current_move) { case WALK_NORTH: case WALK_SOUTH: leave (submap (), posx (), posy () - 1); break; case WALK_WEST: case WALK_EAST: leave (submap (), posx () - 1, posy ()); break; } } void mapcharacter::set_pos (u_int16 smap, u_int16 x, u_int16 y) { // update character position submap_ = smap; posx_ = x; posy_ = y; // mark the character's place as occupied occupy (submap (), posx (), posy ()); } void mapcharacter::update_move () { if (refmap) switch (currentmove ()) { case WALK_NORTH: if (!offy ()) { if (!can_go_north ()) { stand_north (); break; } leave_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_NORTH; event_handler::raise_event (&evt); occupy (submap (), posx (), posy () - 1); set_offset (offx (), offy () - 1); } set_offset (offx (), offy () - 1); if (offy () == -MAPSQUARE_SIZE) { leave (submap (), posx (), posy ()); leave (submap (), posx (), posy () - 1); set_pos (submap (), posx (), posy () - 1); set_offset (offx (), 0); stand_north (); enter_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_NORTH; event_handler::raise_event (&evt); } break; case WALK_SOUTH: if (!offy ()) { if (!can_go_south ()) { stand_south (); break; } leave_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_SOUTH; event_handler::raise_event (&evt); leave (submap (), posx (), posy ()); occupy (submap (), posx (), posy ()); set_pos (submap (), posx (), posy () + 1); set_offset (0, -(MAPSQUARE_SIZE - 1)); } else { set_offset (offx (), offy () + 1); if (!offy ()) { leave (submap (), posx (), posy () - 1); stand_south (); enter_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_SOUTH; event_handler::raise_event (&evt); } } break; case WALK_WEST: if (!offx ()) { if (!can_go_west ()) { stand_west (); break; } leave_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_WEST; event_handler::raise_event (&evt); occupy (submap (), posx () - 1, posy ()); } set_offset (offx () -1, offy ()); if (offx () == -MAPSQUARE_SIZE) { leave (submap (), posx (), posy ()); leave (submap (), posx () - 1, posy ()); set_pos (submap (), posx () - 1, posy ()); set_offset (0, offy ()); stand_west (); enter_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_WEST; event_handler::raise_event (&evt); } break; case WALK_EAST: if (!offx ()) { if (!can_go_east ()) { stand_east (); break; } leave_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_EAST; event_handler::raise_event (&evt); leave (submap (), posx (), posy ()); occupy (submap (), posx (), posy ()); set_pos (submap (), posx () + 1, posy ()); set_offset (-(MAPSQUARE_SIZE - 1), 0); } else { set_offset (offx () + 1, offy ()); if (!offx ()) { leave (submap (), posx () - 1, posy ()); stand_east (); enter_event evt; evt.submap = submap (); evt.x = posx (); evt.y = posy (); evt.c = this; evt.dir = WALK_EAST; event_handler::raise_event (&evt); } } break; } anim[current_move]->update (); } void mapcharacter::speak (const string & text) { if (saying) delete saying; string col; switch (get_color ()) { case 1: col = "yellow"; break; case 2: col = "red"; break; case 3: col = "violet"; break; case 4: col = "blue"; break; case 5: col = "green"; break; default: col = "white"; break; } saying = new text_bubble (text, col, "original"); } adonthell-0.3.8/src/event_handler_base.h0000644000175000017500000000343512756050014015172 00000000000000/* Copyright (C) 2000/2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event_handler_base.h * @author Kai Sterker * * @brief Declares the base class for event handlers. * */ #ifndef EVENT_HANDLER_BASE_H__ #define EVENT_HANDLER_BASE_H__ #include "event.h" /** * This is the base class for actual event handlers. It * keeps track of registered scripts, recieves triggered events * and executes scripts handling those events */ class event_handler_base { public: /** * Destructor */ virtual ~event_handler_base () {} /** * Registers an %event. * * @param ev pointer to the %event to register. */ virtual void register_event (event* ev) = 0; /** * Unregister an %event. * * @param ev pointer to the %event to unregister. */ virtual void remove_event (event* ev) = 0; /** * Check if an %event corresponding to ev exists, and execute it. * * @param ev %event to raise. */ virtual void raise_event (const event* ev) = 0; }; #endif // EVENT_HANDLER_BASE_H__ adonthell-0.3.8/src/mapobject.h0000644000175000017500000001436112756051270013333 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapobject.h * * @author Alexandre Courbot * @brief Declares the mapobject class. */ #ifndef _MAPOBJECT_H #define _MAPOBJECT_H #include "animation.h" #include "mapsquare_walkable.h" /// Where the mapobjects resides in the data tree. #define MAPOBJECTS_DIR "gfx/mapobjects/" /** * Objects that can be placed on a landmap. * * A mapobject is basically a set of animations. Each animation can be freely * placed on a resizeable grid which represents the actual land where the * object will be placed. This grid also has information about the walkability * of it's squares, which will be repercuted on the landmap as soon as the * object is placed. * */ class mapobject : public mapsquare_walkable_area { public: /** * Default constructor. * */ mapobject (); /** * Destructor. * */ ~mapobject (); /** * Resets the mapobject to its post-constructor state. * */ void clear (); /** * @name State updating. * */ //@{ /** * Updates the mapobject's state. * */ bool update (); //@} /** * @name Drawing methods. * */ //@{ void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const; /** * Similar to draw (), but assume the x and y parameters are where the base * square should appear. * * @param x X position where to draw. * @param y Y position where to draw. * @param da_opt optional drawing_area to use during the drawing operation. * @param target pointer to the surface where to draw the drawable. If NULL, draw on the screen. */ void draw_from_base (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const; //@} /** * @name Loading/saving methods. * * @note You can't save a mapobject with this class. * */ //@{ /** * Loads a mapobject from an opened file. * @param file the opened file from which to load. * @return 0 in case of success, error code otherwise. * */ s_int8 get (igzstream & file); /** * Loads a mapobject from it's filename. * * @param fname the name of the file to load. * * @return 0 in case of success, error code otherwise. */ s_int8 load (string fname); /** Saves an mapobject into an opened file, in %game format, with * alpha and mask values. * @warning as the mapobject which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving mapobjects with full * truecolor quality, use mapobject_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save () */ s_int8 put (ogzstream& file) const; /** Saves an mapobject into an file, in %game format, with * alpha and mask values. * @warning as the mapobject which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving mapobjects with full * truecolor quality, use mapobject_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put () */ s_int8 save (string fname) const; //@} /** * @name Individual animations manipulation. * */ //@{ /** * Returns the number of animations of this mapobject. * * * @return the number of animations of this mapobject. */ u_int16 nbr_of_animations () const { return anim.size (); } /** * Returns a pointer to one of the mapobject's animations. * * @param nbr index of the animation to get. * * @return pointer to the nbr animation. */ animation *get_animation (u_int16 nbr) { return anim[nbr]; } /** * Inserts an animation at a given position of the animations array. * * The mapobject will be responsible for freeing the inserted animation. * * @param an pointer to the animation to add. * @param pos index where to add the animation. * * @return 0 in case of success, error code otherwise. */ s_int8 insert_animation (animation * an, u_int16 pos); /** * Removes an animation at a given position. * The animation itself will also be deleted (). * * @param pos The index of the animation to remove. * * @return 0 in case of success, error code otherwise. */ s_int8 delete_animation (u_int16 pos); //@} #ifndef SWIG /** * Mapobject copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ mapobject & operator = (const mapobject & mo); #endif /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const mapobject& src) { *this = src; } private: /** * Forbid value passing. * */ mapobject (mapobject &src); mutable vector anim; }; #endif adonthell-0.3.8/src/character.h0000644000175000017500000000272112756050014013313 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file character.h * @author Kai Sterker * * @brief Declares the character class. * * */ #ifndef CHARACTER_H_ #define CHARACTER_H_ #include "mapcharacter.h" /** * Class holding %game characters. * */ class character : public mapcharacter { public: /** * Default constructor. * */ character(); /** * Destructor. * */ ~character(); }; #ifndef SWIG namespace data { /** * All the game's characters, different from the player. * */ extern dictionary characters; /** * The player character. * */ extern character *the_player; } #endif #endif // CHARACTER_H_ adonthell-0.3.8/src/mapview.h0000644000175000017500000002031512756051376013042 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapview.h * @author Alexandre Courbot * * @brief Declares the mapview class. * * */ #ifndef MAPVIEW_H_ #define MAPVIEW_H_ #include "landmap.h" #include "python_class.h" /** * Allows you to display a landmap on a specified area of a surface. * * This class just acts as a "camera" which takes snapshots of a landmap. * It's size can be specified, a schedule can be set to * update it's movment. Nothing prevents you from having several mapviews * on the same map that displays each a different (or similar) part of the * landmap. * */ class mapview : public drawable { public: /** * Default constructor. * */ mapview (); /** * Destructor. * */ ~mapview (); /** * Attach/Detach a map * */ //@{ /** * Sets which map this mapview will display. * * @param m pointer to the map that will be displayed by the mapview. */ void attach_map (landmap * m); /** * Stops displaying a map. * */ void detach_map (); //@} /** * Position settings * */ //@{ /** * Sets the position of the top-left corner of the mapview on the map. * * You'll probably don't want to use this method. To center the mapview * on a precise position, see center_on () instead. * * @param sm submap. * @param x X position. * @param y Y position. * @param ox X offset. * @param oy Y offset. * * @sa center_on () * */ s_int8 set_pos (u_int16 sm, u_int16 x, u_int16 y, s_int16 ox = 0, s_int16 oy = 0); /** * Sets the position of the center of the mapview on the map. * * @param sm submap. * @param x X position. * @param y Y position. * @param ox X offset. * @param oy Y offset. * */ s_int8 center_on (u_int16 sm, u_int16 x, u_int16 y, s_int16 ox = 0, s_int16 oy = 0); //@} /** * Position information * */ //@{ /** * Returns the submap this mapview is displaying. * * * @return current submap this mapview is displaying. */ u_int16 currentsubmap () { return currentsubmap_; } /** * Returns the X position of the mapview. * * * @return X position of the mapview. */ u_int16 posx () const { return posx_; } /** * Returns the Y position of the mapview. * * * @return Y position of the mapview. */ u_int16 posy () const { return posy_; } /** * Returns the X offset of the mapview. * * * @return X offset of the mapview. */ u_int16 offx () const { return offx_; } /** * Returns the Y offset of the mapview. * * * @return Y offset of the mapview. */ u_int16 offy () const { return offy_; } //@} /** * Basic movment * */ //@{ /** * Returns whether it is possible to scroll to right. A scrolling is impossible * if the mapview is at the map limits. * * * @return true if a right scrolling is possible, false otherwise. */ bool can_scroll_right () { s_int32 tpx = posx () * MAPSQUARE_SIZE + offx () + length (); return (tpx < m_map->submap[currentsubmap_]->area_length () * MAPSQUARE_SIZE); } /** * Returns whether it is possible to scroll to left. A scrolling is impossible * if the mapview is at the map limits. * * * @return true if a left scrolling is possible, false otherwise. */ bool can_scroll_left () { return (posx_ || offx_); } /** * Returns whether it is possible to scroll to up. A scrolling is impossible * if the mapview is at the map limits. * * * @return true if a up scrolling is possible, false otherwise. */ bool can_scroll_up () { return (posy_ || offy_); } /** * Returns whether it is possible to scroll to down. A scrolling is impossible * if the mapview is at the map limits. * * * @return true if a down scrolling is possible, false otherwise. */ bool can_scroll_down () { s_int32 tpy = posy () * MAPSQUARE_SIZE + offy () + height (); return (tpy < m_map->submap[currentsubmap_]->area_height () * MAPSQUARE_SIZE); } /** * Scrolls 1 pixel to right, if possible. * */ void scroll_right (); /** * Scrolls 1 pixel to left, if possible. * */ void scroll_left (); /** * Scrolls 1 pixel to down, if possible. * */ void scroll_down (); /** * Scrolls 1 pixel to up, if possible. * */ void scroll_up (); //@} /** * State saving/loading * */ //@{ /** * Restore the mapview's state from an opened file. * * @param file the opened file from which to load the state. * * @return 0 in case of success, error code otherwise. */ s_int8 get_state (igzstream& file); /** * Saves the mapview's state into an opened file. * * @param file the opened file where to the state. * * @return 0 in case of success, error code otherwise. */ s_int8 put_state (ogzstream& file); //@} /** * Resize the mapview. The parameters are given in pixels. * * @param l new length. * @param h new height. */ void resize (u_int16 l, u_int16 h); /** * Assign a schedule to the mapview. * * The schedule's filename will be \e "scripts/schedules/mapviews/.py". * * @param file name of the schedule to use. * @param args Python tuple containing extra arguments passed to the class constructor. * * @warning the args tuple argument MUST ONLY contain strings or integers, as it will * be saved with the mapcharacter state by python::put_tuple (). * */ void set_schedule (string file, PyObject * args = NULL); /** * Returns the name of the mapview's current schedule. * * * @return name of the mapview's current schedule. */ string schedule_file () { return schedule_file_; } /** * Updates the mapview's state and launchs his schedule. * */ bool update (); void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface *target = NULL) const; private: /** * Forbid value passing. */ mapview (const mapview& src); #ifndef SWIG void draw_tile (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator it) const; void draw_mapchar (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator itc) const; void draw_bubble (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator itc) const; #endif landmap *m_map; u_int16 d_length, d_height; // size of the view in map squares u_int16 currentsubmap_; u_int16 posx_, posy_; u_int16 offx_, offy_; mutable drawing_area da; py_object schedule; PyObject * schedule_args; string schedule_file_; }; #endif adonthell-0.3.8/src/py_adonthell_wrap.cc0000664000175000017500000460401513264663270015253 00000000000000/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.8 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #ifndef SWIGPYTHON #define SWIGPYTHON #endif #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper& rhs); SwigValueWrapper(const SwigValueWrapper& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ # undef _DEBUG # include # define _DEBUG #else # include #endif /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if () { if () { *ptr = ; return SWIG_NEWOBJ; } else { *ptr = ; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb) { int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { size_t l = 0; size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; const unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { unsigned char *u = (unsigned char *) ptr; const unsigned char *eu = u + sz; for (; u != eu; ++u) { char d = *(c++); unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) #define PyString_Check(name) PyBytes_Check(name) #define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_AsString(str) PyBytes_AsString(str) #define PyString_Size(str) PyBytes_Size(str) #define PyString_InternFromString(key) PyUnicode_InternFromString(key) #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intintargfunc ssizessizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) { long result = 0; PyObject *i = PyNumber_Int(x); if (i) { result = PyInt_AsLong(i); Py_DECREF(i); } return result; } #endif #if PY_VERSION_HEX < 0x02050000 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x) #endif #if PY_VERSION_HEX < 0x02040000 #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((op), arg); \ if (vret) \ return vret; \ } \ } while (0) #endif #if PY_VERSION_HEX < 0x02030000 typedef struct { PyTypeObject type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *name, *slots; } PyHeapTypeObject; #endif #if PY_VERSION_HEX < 0x02030000 typedef destructor freefunc; #endif #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION > 3)) # define SWIGPY_USE_CAPSULE # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) #endif #if PY_VERSION_HEX < 0x03020000 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ #if PY_VERSION_HEX >= 0x03000000 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { return PyInstanceMethod_New(func); } #else SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) { return NULL; } #endif #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #ifdef SWIGPYTHON_BUILTIN #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) #else #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #endif #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ #if defined(SWIGPYTHON_BUILTIN) SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } #else SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { #if PY_VERSION_HEX < 0x02030000 PyDict_SetItemString(d, (char *)name, obj); #else PyDict_SetItemString(d, name, obj); #endif Py_DECREF(obj); } #endif /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { if (min <= 1 && max >= 1) { Py_ssize_t i; objs[0] = args; for (i = 1; i < max; ++i) { objs[i] = 0; } return 2; } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { Py_ssize_t i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) #ifdef __cplusplus extern "C" { #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; PyTypeObject *pytype; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; data->pytype = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; #ifdef SWIGPYTHON_BUILTIN PyObject *dict; #endif } SwigPyObject; #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME PyObject * SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *)v; if (!sobj->dict) sobj->dict = PyDict_New(); Py_INCREF(sobj->dict); return sobj->dict; } #endif SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); # else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); # endif # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } return repr; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); return res; } SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); #ifdef SWIGPYTHON_BUILTIN static swig_type_info *SwigPyObject_stype = 0; SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { SwigPyClientData *cd; assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; assert(cd); assert(cd->pytype); return cd->pytype; } #else SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); return type; } #endif SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { #ifdef SWIGPYTHON_BUILTIN PyTypeObject *target_tp = SwigPyObject_type(); if (PyType_IsSubtype(op->ob_type, target_tp)) return 1; return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); #else return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); #endif } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; /* PyObject_CallFunction() has the potential to silently drop the active active exception. In cases of unnamed temporary variable or where we just finished iterating over a generator StopIteration will be active right now, and this needs to remain true upon return from SwigPyObject_dealloc. So save and restore. */ PyObject *val = NULL, *type = NULL, *tb = NULL; PyErr_Fetch(&val, &type, &tb); if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } if (!res) PyErr_WriteUnraisable(destroy); PyErr_Restore(val, type, tb); Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #else if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ 0, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ #endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ #if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ #endif 0 /* tp_next */ #endif }; swigpyobject_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpyobject_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpyobject_type) < 0) return NULL; #endif } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == SwigPyPacked_TypeOnce()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ #endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ #if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ #endif 0 /* tp_next */ #endif }; swigpypacked_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 swigpypacked_type.ob_type = &PyType_Type; #else if (PyType_Ready(&swigpypacked_type) < 0) return NULL; #endif } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } static PyObject *swig_this = NULL; SWIGRUNTIME PyObject * SWIG_This(void) { if (swig_this == NULL) swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { PyObject *obj; if (SwigPyObject_Check(pyobj)) return (SwigPyObject *) pyobj; #ifdef SWIGPYTHON_BUILTIN (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { pyobj = PyWeakref_GET_OBJECT(pyobj); if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } # endif return NULL; #else obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; #endif } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { int res; SwigPyObject *sobj; int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; if (!obj) return SWIG_ERROR; if (obj == Py_None && !implicit_conv) { if (ptr) *ptr = 0; return SWIG_OK; } res = SWIG_ERROR; sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } res = SWIG_OK; } else { if (implicit_conv) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } if (!SWIG_IsOK(res) && obj == Py_None) { if (ptr) *ptr = 0; if (PyErr_Occurred()) PyErr_Clear(); res = SWIG_OK; } } return res; } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); if (inst) { PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst = 0; PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { SwigPyClientData *clientdata; PyObject * robj; int own; if (!ptr) return SWIG_Py_Void(); clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; if (clientdata && clientdata->pytype) { SwigPyObject *newobj; if (flags & SWIG_BUILTIN_TP_INIT) { newobj = (SwigPyObject*) self; if (newobj->ptr) { PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); while (newobj->next) newobj = (SwigPyObject *) newobj->next; newobj->next = next_self; newobj = (SwigPyObject *)next_self; #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif } } else { newobj = PyObject_New(SwigPyObject, clientdata->pytype); #ifdef SWIGPYTHON_BUILTIN newobj->dict = 0; #endif } if (newobj) { newobj->ptr = ptr; newobj->ty = type; newobj->own = own; newobj->next = 0; return (PyObject*) newobj; } return SWIG_Py_Void(); } assert(!(flags & SWIG_BUILTIN_TP_INIT)); robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); Py_DECREF(robj); robj = inst; } return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else # ifdef SWIGPY_USE_CAPSULE type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); # else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); # endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) #else SWIG_Python_DestroyModule(void *vptr) #endif { #ifdef SWIGPY_USE_CAPSULE swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); #else swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif #ifdef SWIGPY_USE_CAPSULE PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } #endif } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { #ifdef SWIGPY_USE_CAPSULE descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); #else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); #endif } else { swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { #ifdef SWIGPY_USE_CAPSULE obj = PyCapsule_New((void*) descriptor, NULL, NULL); #else obj = PyCObject_FromVoidPtr(descriptor, NULL); #endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : ""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef SWIGPYTHON_BUILTIN SWIGRUNTIME int SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyTypeObject *tp = obj->ob_type; PyObject *descr; PyObject *encoded_name; descrsetfunc f; int res = -1; # ifdef Py_USING_UNICODE if (PyString_Check(name)) { name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); if (!name) return -1; } else if (!PyUnicode_Check(name)) # else if (!PyString_Check(name)) # endif { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { Py_INCREF(name); } if (!tp->tp_dict) { if (PyType_Ready(tp) < 0) goto done; } descr = _PyType_Lookup(tp, name); f = NULL; if (descr != NULL) f = descr->ob_type->tp_descr_set; if (!f) { if (PyString_Check(name)) { encoded_name = name; Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: Py_DECREF(name); return res; } #endif #ifdef __cplusplus } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_SDL_Keymod swig_types[0] #define SWIGTYPE_p_SDL_RWops swig_types[1] #define SWIGTYPE_p_SDL_Rect swig_types[2] #define SWIGTYPE_p_SDL_Renderer swig_types[3] #define SWIGTYPE_p_achievements swig_types[4] #define SWIGTYPE_p_action_event swig_types[5] #define SWIGTYPE_p_adonthell swig_types[6] #define SWIGTYPE_p_animation swig_types[7] #define SWIGTYPE_p_animationframe swig_types[8] #define SWIGTYPE_p_audio swig_types[9] #define SWIGTYPE_p_char swig_types[10] #define SWIGTYPE_p_character swig_types[11] #define SWIGTYPE_p_character_base swig_types[12] #define SWIGTYPE_p_config swig_types[13] #define SWIGTYPE_p_data_screen swig_types[14] #define SWIGTYPE_p_dialog_screen swig_types[15] #define SWIGTYPE_p_dictionaryT_character_p_t swig_types[16] #define SWIGTYPE_p_dictionaryT_quest_p_t swig_types[17] #define SWIGTYPE_p_drawable swig_types[18] #define SWIGTYPE_p_drawing_area swig_types[19] #define SWIGTYPE_p_enter_event swig_types[20] #define SWIGTYPE_p_event swig_types[21] #define SWIGTYPE_p_event_handler swig_types[22] #define SWIGTYPE_p_event_list swig_types[23] #define SWIGTYPE_p_fileops swig_types[24] #define SWIGTYPE_p_game swig_types[25] #define SWIGTYPE_p_gamedata swig_types[26] #define SWIGTYPE_p_gamedate swig_types[27] #define SWIGTYPE_p_gametime swig_types[28] #define SWIGTYPE_p_gz_file swig_types[29] #define SWIGTYPE_p_gz_type swig_types[30] #define SWIGTYPE_p_igzstream swig_types[31] #define SWIGTYPE_p_image swig_types[32] #define SWIGTYPE_p_input swig_types[33] #define SWIGTYPE_p_int swig_types[34] #define SWIGTYPE_p_label swig_types[35] #define SWIGTYPE_p_label_input swig_types[36] #define SWIGTYPE_p_landmap swig_types[37] #define SWIGTYPE_p_leave_event swig_types[38] #define SWIGTYPE_p_map_event swig_types[39] #define SWIGTYPE_p_mapcharacter swig_types[40] #define SWIGTYPE_p_mapobject swig_types[41] #define SWIGTYPE_p_mapsquare swig_types[42] #define SWIGTYPE_p_mapsquare_area swig_types[43] #define SWIGTYPE_p_mapsquare_char swig_types[44] #define SWIGTYPE_p_mapsquare_tile swig_types[45] #define SWIGTYPE_p_mapsquare_walkable swig_types[46] #define SWIGTYPE_p_mapsquare_walkable_area swig_types[47] #define SWIGTYPE_p_mapview swig_types[48] #define SWIGTYPE_p_nls swig_types[49] #define SWIGTYPE_p_objects swig_types[50] #define SWIGTYPE_p_ogzstream swig_types[51] #define SWIGTYPE_p_p_char swig_types[52] #define SWIGTYPE_p_pairT_std__string_int_t swig_types[53] #define SWIGTYPE_p_path swig_types[54] #define SWIGTYPE_p_pixel_info swig_types[55] #define SWIGTYPE_p_play_state swig_types[56] #define SWIGTYPE_p_py_object swig_types[57] #define SWIGTYPE_p_quest swig_types[58] #define SWIGTYPE_p_screen swig_types[59] #define SWIGTYPE_p_short swig_types[60] #define SWIGTYPE_p_storage swig_types[61] #define SWIGTYPE_p_surface swig_types[62] #define SWIGTYPE_p_sys_dir_type swig_types[63] #define SWIGTYPE_p_text_bubble swig_types[64] #define SWIGTYPE_p_time_event swig_types[65] #define SWIGTYPE_p_unsigned_char swig_types[66] #define SWIGTYPE_p_void swig_types[67] #define SWIGTYPE_p_win_background swig_types[68] #define SWIGTYPE_p_win_base swig_types[69] #define SWIGTYPE_p_win_border swig_types[70] #define SWIGTYPE_p_win_container swig_types[71] #define SWIGTYPE_p_win_event swig_types[72] #define SWIGTYPE_p_win_font swig_types[73] #define SWIGTYPE_p_win_image swig_types[74] #define SWIGTYPE_p_win_label swig_types[75] #define SWIGTYPE_p_win_manager swig_types[76] #define SWIGTYPE_p_win_mapview swig_types[77] #define SWIGTYPE_p_win_scroll swig_types[78] #define SWIGTYPE_p_win_scrollbar swig_types[79] #define SWIGTYPE_p_win_select swig_types[80] #define SWIGTYPE_p_win_theme swig_types[81] #define SWIGTYPE_p_win_write swig_types[82] static swig_type_info *swig_types[84]; static swig_module_info swig_module = {swig_types, 83, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif #if (PY_VERSION_HEX <= 0x02020000) # error "This python version requires swig to be run with the '-nomodern' option" #endif #if (PY_VERSION_HEX <= 0x02020000) # error "This python version requires swig to be run with the '-nomodernargs' option" #endif /*----------------------------------------------- @(target):= _adonthell.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__adonthell #else # define SWIG_init init_adonthell #endif #define SWIG_name "_adonthell" #define SWIGVERSION 0x030008 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; } ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include #include "types.h" #include "time_event.h" #include "map_event.h" #include "event_list.h" #include "event_handler.h" #include "storage.h" #include "gametime.h" #include "gamedate.h" #include #include "input.h" #include "audio.h" #include "character_base.h" #include "quest.h" #include "drawing_area.h" #include "drawable.h" #include "surface.h" #include "screen.h" #include "image.h" #include "animation.h" #include "mapsquare_walkable.h" #include "mapsquare.h" #include "mapobject.h" #include "mapcharacter.h" #include "path.h" #include "landmap.h" #include "mapview.h" #include "character.h" #include "label_input.h" #include "win_types.h" #include "win_label.h" #include "win_image.h" #include "win_write.h" #include "win_mapview.h" #include "win_ttf.h" #include "win_theme.h" #include "win_base.h" #include "text_bubble.h" #include "win_container.h" #include "win_scroll.h" #include "win_select.h" #include "win_manager.h" #include "dialog_screen.h" #include "data_screen.h" #include "gamedata.h" #include "game.h" #include "nls.h" #include "achievements.h" // Workaround for keysym missing in older versions of SDL #ifndef SDLK_UNDO #define SDLK_UNDO 322 #endif // Workaround for bug in pyptrtypes.swg #define SWIG_append_msg SWIG_append_errmsg // This enum allows clearer ownership operation: // obj.thisown = Python (Python will destroy the object) // obj.thisown = C (C has to destroy the object) enum {Python = 1, C = 0}; // pass an instance to python PyObject *get_py_obj (void *instance, const char* class_name) { swig_type_info * ti = SWIG_TypeQuery (class_name); if (ti) return SWIG_NewPointerObj (instance, ti, C); else printf ("*** get_py_obj: Type '%s' not known to SWIG!\n", class_name); return NULL; } SWIGINTERNINLINE PyObject* SWIG_From_int (int value) { return PyInt_FromLong((long) value); } #include SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { #if defined(SWIG_PYTHON_2_UNICODE) #if PY_VERSION_HEX<0x03000000 if (PyUnicode_Check(obj)) { char *cstr; Py_ssize_t len; if (!alloc && cptr) { return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (cptr) { if (alloc) *alloc = SWIG_NEWOBJ; *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); } if (psize) *psize = len + 1; Py_XDECREF(obj); return SWIG_OK; } else { Py_XDECREF(obj); } } #endif #endif swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; #if PY_VERSION_HEX < 0x03000000 } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; #endif } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include #include SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else #endif if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int (PyObject * obj, int *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < INT_MIN || v > INT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< int >(v); } } return res; } SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { #if PY_VERSION_HEX < 0x03000000 if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else #endif if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); return SWIG_OverflowError; } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned int >(v); } } return res; } #define SWIG_From_long PyLong_FromLong SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long (unsigned long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_char (unsigned char value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_signed_SS_char (signed char value) { return SWIG_From_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_unsigned_SS_short (unsigned short value) { return SWIG_From_unsigned_SS_long (value); } SWIGINTERNINLINE PyObject * SWIG_From_short (short value) { return SWIG_From_long (value); } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_int (unsigned int value) { return PyInt_FromSize_t((size_t) value); } SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { if (carray) { if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { #if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03010000 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); #else return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); #endif #else return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); #endif } } else { return SWIG_Py_Void(); } } SWIGINTERNINLINE PyObject * SWIG_From_std_string (const std::string& s) { return SWIG_FromCharPtrAndSize(s.data(), s.size()); } #define SWIG_From_double PyFloat_FromDouble SWIGINTERNINLINE PyObject * SWIG_From_float (float value) { return SWIG_From_double (value); } SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { int r; if (!PyBool_Check(obj)) return SWIG_ERROR; r = PyObject_IsTrue(obj); if (r == -1) return SWIG_ERROR; if (val) *val = r ? true : false; return SWIG_OK; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned char >(v); } } return res; } SWIGINTERN int SWIG_AsVal_signed_SS_char (PyObject * obj, signed char *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < SCHAR_MIN || v > SCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< signed char >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned short >(v); } } return res; } SWIGINTERN int SWIG_AsVal_short (PyObject * obj, short *val) { long v; int res = SWIG_AsVal_long (obj, &v); if (SWIG_IsOK(res)) { if ((v < SHRT_MIN || v > SHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< short >(v); } } return res; } /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ #ifndef SWIG_isfinite # if defined(isfinite) # define SWIG_isfinite(X) (isfinite(X)) # elif defined(_MSC_VER) # define SWIG_isfinite(X) (_finite(X)) # elif defined(__sun) && defined(__SVR4) # include # define SWIG_isfinite(X) (finite(X)) # endif #endif /* Accept infinite as a valid float value unless we are unable to check if a value is finite */ #ifdef SWIG_isfinite # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X)) #else # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX)) #endif SWIGINTERN int SWIG_AsVal_float (PyObject * obj, float *val) { double v; int res = SWIG_AsVal_double (obj, &v); if (SWIG_IsOK(res)) { if (SWIG_Float_Overflow_Check(v)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< float >(v); } } return res; } SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr) { return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } SWIGINTERNINLINE PyObject * SWIG_From_char (char c) { return SWIG_FromCharPtrAndSize(&c,1); } SWIGINTERN int SWIG_AsCharArray(PyObject * obj, char *val, size_t size) { char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); if (SWIG_IsOK(res)) { /* special case of single char conversion when we don't need space for NUL */ if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; if (csize <= size) { if (val) { if (csize) memcpy(val, cptr, csize*sizeof(char)); if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); } if (alloc == SWIG_NEWOBJ) { delete[] cptr; res = SWIG_DelNewMask(res); } return res; } if (alloc == SWIG_NEWOBJ) delete[] cptr; } return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_char (PyObject * obj, char *val) { int res = SWIG_AsCharArray(obj, val, 1); if (!SWIG_IsOK(res)) { long v; res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); if (SWIG_IsOK(res)) { if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { if (val) *val = static_cast< char >(v); } else { res = SWIG_OverflowError; } } } return res; } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *Python_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "Python",SWIG_From_int(static_cast< int >(Python))); return SWIG_Py_Void(); } SWIGINTERN PyObject *C_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "C",SWIG_From_int(static_cast< int >(C))); return SWIG_Py_Void(); } SWIGINTERN PyObject *READ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "READ",SWIG_From_int(static_cast< int >(READ))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WRITE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WRITE",SWIG_From_int(static_cast< int >(WRITE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_gz_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_gz_file",0,0)) SWIG_fail; result = (gz_file *)new gz_file(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gz_file, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_gz_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *arg1 = (gz_file *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_gz_file",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gz_file, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gz_file" "', argument " "1"" of type '" "gz_file *""'"); } arg1 = reinterpret_cast< gz_file * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gz_file_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *arg1 = (gz_file *) 0 ; string *arg2 = 0 ; gz_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gz_file_open",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gz_file, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gz_file_open" "', argument " "1"" of type '" "gz_file *""'"); } arg1 = reinterpret_cast< gz_file * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gz_file_open" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gz_file_open" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gz_file_open" "', argument " "3"" of type '" "gz_type""'"); } arg3 = static_cast< gz_type >(val3); result = (bool)(arg1)->open((string const &)*arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_gz_file_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *arg1 = (gz_file *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gz_file_close",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gz_file, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gz_file_close" "', argument " "1"" of type '" "gz_file *""'"); } arg1 = reinterpret_cast< gz_file * >(argp1); (arg1)->close(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gz_file_is_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *arg1 = (gz_file *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gz_file_is_open",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gz_file, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gz_file_is_open" "', argument " "1"" of type '" "gz_file *""'"); } arg1 = reinterpret_cast< gz_file * >(argp1); result = (bool)(arg1)->is_open(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gz_file_eof(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gz_file *arg1 = (gz_file *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gz_file_eof",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gz_file, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gz_file_eof" "', argument " "1"" of type '" "gz_file *""'"); } arg1 = reinterpret_cast< gz_file * >(argp1); result = (bool)(arg1)->eof(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *gz_file_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_gz_file, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_igzstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_igzstream",0,0)) SWIG_fail; result = (igzstream *)new igzstream(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_igzstream, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_igzstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_igzstream",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_igzstream" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_open",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_open" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "igzstream_open" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "igzstream_open" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (bool)(arg1)->open((string const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *arg2 = (void *) 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_block",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_block" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "igzstream_get_block" "', argument " "2"" of type '" "void *""'"); } ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "igzstream_get_block" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = static_cast< unsigned int >(val3); (arg1)->get_block(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_bool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_bool",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_bool" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (bool)(arg1)->get_bool(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_uint8",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_uint8" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (unsigned char)(arg1)->get_uint8(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_sint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_sint8",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_sint8" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (signed char)(arg1)->get_sint8(); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_uint16",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_uint16" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (unsigned short)(arg1)->get_uint16(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_sint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_sint16",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_sint16" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (short)(arg1)->get_sint16(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_uint32",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_uint32" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (unsigned int)(arg1)->get_uint32(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_sint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_sint32",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_sint32" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (int)(arg1)->get_sint32(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_string",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_string" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (arg1)->get_string(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_igzstream_get_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = (igzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; float result; if(!PyArg_UnpackTuple(args,(char *)"igzstream_get_float",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_igzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "igzstream_get_float" "', argument " "1"" of type '" "igzstream *""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (float)(arg1)->get_float(); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *igzstream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_igzstream, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_ogzstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_ogzstream",0,0)) SWIG_fail; result = (ogzstream *)new ogzstream(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ogzstream, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_ogzstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_ogzstream",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ogzstream" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_open",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_open" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ogzstream_open" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ogzstream_open" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (bool)(arg1)->open((string const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; void *arg2 = (void *) 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_block",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_block" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ogzstream_put_block" "', argument " "2"" of type '" "void *""'"); } ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ogzstream_put_block" "', argument " "3"" of type '" "unsigned int""'"); } arg3 = static_cast< unsigned int >(val3); (arg1)->put_block(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_bool(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; bool *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; bool temp2 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_bool",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_bool" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_bool" "', argument " "2"" of type '" "bool""'"); } temp2 = static_cast< bool >(val2); arg2 = &temp2; (arg1)->put_bool((bool const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_uint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; unsigned char *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char temp2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_uint8",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_uint8" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_uint8" "', argument " "2"" of type '" "unsigned char""'"); } temp2 = static_cast< unsigned char >(val2); arg2 = &temp2; (arg1)->put_uint8((unsigned char const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_sint8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; signed char *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; signed char temp2 ; signed char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_sint8",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_sint8" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_sint8" "', argument " "2"" of type '" "signed char""'"); } temp2 = static_cast< signed char >(val2); arg2 = &temp2; (arg1)->put_sint8((signed char const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_uint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; unsigned short *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short temp2 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_uint16",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_uint16" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_uint16" "', argument " "2"" of type '" "unsigned short""'"); } temp2 = static_cast< unsigned short >(val2); arg2 = &temp2; (arg1)->put_uint16((unsigned short const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_sint16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; short *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; short temp2 ; short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_sint16",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_sint16" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_sint16" "', argument " "2"" of type '" "short""'"); } temp2 = static_cast< short >(val2); arg2 = &temp2; (arg1)->put_sint16((short const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_uint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; unsigned int *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int temp2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_uint32",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_uint32" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_uint32" "', argument " "2"" of type '" "unsigned int""'"); } temp2 = static_cast< unsigned int >(val2); arg2 = &temp2; (arg1)->put_uint32((unsigned int const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_sint32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; int *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_sint32",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_sint32" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_sint32" "', argument " "2"" of type '" "int""'"); } temp2 = static_cast< int >(val2); arg2 = &temp2; (arg1)->put_sint32((int const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_string",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_string" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ogzstream_put_string" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ogzstream_put_string" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->put_string((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_ogzstream_put_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = (ogzstream *) 0 ; float *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; float temp2 ; float val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"ogzstream_put_float",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ogzstream, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ogzstream_put_float" "', argument " "1"" of type '" "ogzstream *""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ogzstream_put_float" "', argument " "2"" of type '" "float""'"); } temp2 = static_cast< float >(val2); arg2 = &temp2; (arg1)->put_float((float const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *ogzstream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ogzstream, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_fileops_put_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"fileops_put_version",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fileops_put_version" "', argument " "1"" of type '" "ogzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fileops_put_version" "', argument " "1"" of type '" "ogzstream &""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fileops_put_version" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); fileops::put_version(*arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_fileops_get_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = 0 ; unsigned short arg2 ; unsigned short arg3 ; string arg4 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"fileops_get_version",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fileops_get_version" "', argument " "1"" of type '" "igzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fileops_get_version" "', argument " "1"" of type '" "igzstream &""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fileops_get_version" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fileops_get_version" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "fileops_get_version" "', argument " "4"" of type '" "string""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)fileops::get_version(*arg1,arg2,arg3,arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_fileops(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; fileops *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_fileops",0,0)) SWIG_fail; result = (fileops *)new fileops(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fileops, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_fileops(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; fileops *arg1 = (fileops *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_fileops",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_fileops, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_fileops" "', argument " "1"" of type '" "fileops *""'"); } arg1 = reinterpret_cast< fileops * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *fileops_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_fileops, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *EVENTS_DIR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "EVENTS_DIR",SWIG_FromCharPtr("game_events.")); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_event" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_clear" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"event_type",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_type" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); result = (unsigned char)((event const *)arg1)->type(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_id",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_id" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); result = (string *) &((event const *)arg1)->id(); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_set_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_set_id",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_set_id" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_set_id" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_set_id" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->set_id((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_event_registered(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_registered",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_registered" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); result = (bool)((event const *)arg1)->registered(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_repeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"event_repeat",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_repeat" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); result = (int)((event const *)arg1)->repeat(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_set_repeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_set_repeat",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_set_repeat" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "event_set_repeat" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); (arg1)->set_repeat(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"event_execute",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_execute" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_execute" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (int)(arg1)->execute((event const *)arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_equals",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_equals" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_equals" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (bool)(arg1)->equals((event const *)arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_set_script(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_set_script",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_set_script" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "event_set_script" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } (arg1)->set_script(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_set_callback",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_set_callback" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); { arg2 = obj1; } if (obj2) { { arg3 = obj2; } } (arg1)->set_callback(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_pause",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_pause" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); (arg1)->pause(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_resume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_resume",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_resume" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); (arg1)->resume(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_is_paused(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_is_paused",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_is_paused" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); result = (bool)((event const *)arg1)->is_paused(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_put_state" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); ((event const *)arg1)->put_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_get_state" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (bool)(arg1)->get_state(*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_event_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_event_list",0,0)) SWIG_fail; result = (event_list *)new event_list(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_event_list, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_event_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_event_list",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_event_list" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_clear" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_add_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_add_event",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_add_event" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_list_add_event" "', argument " "2"" of type '" "event *""'"); } arg2 = reinterpret_cast< event * >(argp2); (arg1)->add_event(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_remove_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_remove_event",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_remove_event" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_list_remove_event" "', argument " "2"" of type '" "event *""'"); } arg2 = reinterpret_cast< event * >(argp2); (arg1)->remove_event(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_get_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_get_event",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_get_event" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_list_get_event" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_list_get_event" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (event *)(arg1)->get_event((string const &)*arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_event, 0 | 0 ); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_event_list_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_pause",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_pause" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); (arg1)->pause(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_resume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_resume",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_resume" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); (arg1)->resume(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_is_paused(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_list_is_paused",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_is_paused" "', argument " "1"" of type '" "event_list const *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); result = (bool)((event_list const *)arg1)->is_paused(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_list_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_put_state" "', argument " "1"" of type '" "event_list const *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_list_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_list_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); ((event_list const *)arg1)->put_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_list_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_list *arg1 = (event_list *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"event_list_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_list, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_list_get_state" "', argument " "1"" of type '" "event_list *""'"); } arg1 = reinterpret_cast< event_list * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "event_list_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "event_list_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (bool)(arg1)->get_state(*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *event_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_event_list, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_time_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; bool arg2 = (bool) false ; int res1 = SWIG_OLDOBJ ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; time_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_time_event",1,2,&obj0,&obj1)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_time_event" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_time_event" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } if (obj1) { ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_time_event" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); } result = (time_event *)new time_event((string const &)*arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_time_event, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_time_event_set_repeat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; string *arg2 = 0 ; int arg3 = (int) -1 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"time_event_set_repeat",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_set_repeat" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_event_set_repeat" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "time_event_set_repeat" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (obj2) { ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "time_event_set_repeat" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); } (arg1)->set_repeat((string const &)*arg2,arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_time_event_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"time_event_equals",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_equals" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_event_equals" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (bool)(arg1)->equals((event const *)arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"time_event_execute",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_execute" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_event_execute" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (int)(arg1)->execute((event const *)arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"time_event_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_put_state" "', argument " "1"" of type '" "time_event const *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "time_event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); ((time_event const *)arg1)->put_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"time_event_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_get_state" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time_event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "time_event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (bool)(arg1)->get_state(*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"time_event_pause",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_pause" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); (arg1)->pause(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_resume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"time_event_resume",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_resume" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); (arg1)->resume(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_time_event_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"time_event_time",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_event_time" "', argument " "1"" of type '" "time_event const *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); result = (unsigned int)((time_event const *)arg1)->time(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_time_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; time_event *arg1 = (time_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_time_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_time_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_time_event" "', argument " "1"" of type '" "time_event *""'"); } arg1 = reinterpret_cast< time_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *time_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_time_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_map_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_map_event",0,0)) SWIG_fail; result = (map_event *)new map_event(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_map_event, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_put_state" "', argument " "1"" of type '" "map_event const *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "map_event_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); ((map_event const *)arg1)->put_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"map_event_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_get_state" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "map_event_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (bool)(arg1)->get_state(*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_submap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_submap_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_submap_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "map_event_submap_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->submap = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_submap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"map_event_submap_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_submap_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (int) ((arg1)->submap); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_x_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_x_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "map_event_x_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->x = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"map_event_x_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_x_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (int) ((arg1)->x); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_y_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_y_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "map_event_y_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->y = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"map_event_y_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_y_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (int) ((arg1)->y); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_dir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; signed char arg2 ; void *argp1 = 0 ; int res1 = 0 ; signed char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_dir_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_dir_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "map_event_dir_set" "', argument " "2"" of type '" "signed char""'"); } arg2 = static_cast< signed char >(val2); if (arg1) (arg1)->dir = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_dir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"map_event_dir_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_dir_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (signed char) ((arg1)->dir); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_map_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_map_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "map_event_map_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->map = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"map_event_map_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_map_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (int) ((arg1)->map); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_c_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; mapcharacter *arg2 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_c_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_c_set" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_mapcharacter, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_event_c_set" "', argument " "2"" of type '" "mapcharacter *""'"); } arg2 = reinterpret_cast< mapcharacter * >(argp2); if (arg1) (arg1)->c = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_c_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; mapcharacter *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"map_event_c_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_c_get" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); result = (mapcharacter *) ((arg1)->c); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapcharacter, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"map_event_equals",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_equals" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_event_equals" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (bool)(arg1)->equals((event const *)arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_map_event_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; event *arg2 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"map_event_execute",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_event_execute" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_event_execute" "', argument " "2"" of type '" "event const *""'"); } arg2 = reinterpret_cast< event * >(argp2); result = (int)(arg1)->execute((event const *)arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_map_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; map_event *arg1 = (map_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_map_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_map_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_event" "', argument " "1"" of type '" "map_event *""'"); } arg1 = reinterpret_cast< map_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *map_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_map_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_enter_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; enter_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_enter_event",0,0)) SWIG_fail; result = (enter_event *)new enter_event(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_enter_event, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_enter_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; enter_event *arg1 = (enter_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_enter_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_enter_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_enter_event" "', argument " "1"" of type '" "enter_event *""'"); } arg1 = reinterpret_cast< enter_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *enter_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_enter_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_leave_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; leave_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_leave_event",0,0)) SWIG_fail; result = (leave_event *)new leave_event(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_leave_event, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_leave_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; leave_event *arg1 = (leave_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_leave_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_leave_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_leave_event" "', argument " "1"" of type '" "leave_event *""'"); } arg1 = reinterpret_cast< leave_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *leave_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_leave_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_action_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; action_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_action_event",0,0)) SWIG_fail; result = (action_event *)new action_event(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_action_event, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_action_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; action_event *arg1 = (action_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_action_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_action_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_action_event" "', argument " "1"" of type '" "action_event *""'"); } arg1 = reinterpret_cast< action_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *action_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_action_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_event_handler_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"event_handler_init",0,0)) SWIG_fail; event_handler::init(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_handler_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"event_handler_cleanup",0,0)) SWIG_fail; event_handler::cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_handler_remove_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_handler_remove_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_handler_remove_event" "', argument " "1"" of type '" "event *""'"); } arg1 = reinterpret_cast< event * >(argp1); event_handler::remove_event(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_event_handler_raise_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event *arg1 = (event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"event_handler_raise_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "event_handler_raise_event" "', argument " "1"" of type '" "event const *""'"); } arg1 = reinterpret_cast< event * >(argp1); event_handler::raise_event((event const *)arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_event_handler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_handler *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_event_handler",0,0)) SWIG_fail; result = (event_handler *)new event_handler(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_event_handler, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_event_handler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; event_handler *arg1 = (event_handler *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_event_handler",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_event_handler, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_event_handler" "', argument " "1"" of type '" "event_handler *""'"); } arg1 = reinterpret_cast< event_handler * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *event_handler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_event_handler, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; storage *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_storage",0,0)) SWIG_fail; result = (storage *)new storage(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_storage, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_storage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; storage *arg1 = (storage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_storage",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_storage, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_storage" "', argument " "1"" of type '" "storage *""'"); } arg1 = reinterpret_cast< storage * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_storage_set_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; storage *arg1 = (storage *) 0 ; string arg2 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"storage_set_val",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_storage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "storage_set_val" "', argument " "1"" of type '" "storage *""'"); } arg1 = reinterpret_cast< storage * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "storage_set_val" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "storage_set_val" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); (arg1)->set_val(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_storage_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; storage *arg1 = (storage *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"storage_get_val",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_storage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "storage_get_val" "', argument " "1"" of type '" "storage *""'"); } arg1 = reinterpret_cast< storage * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "storage_get_val" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (int)(arg1)->get_val(arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_storage_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; storage *arg1 = (storage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; pair< string,int > result; if(!PyArg_UnpackTuple(args,(char *)"storage_next",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_storage, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "storage_next" "', argument " "1"" of type '" "storage *""'"); } arg1 = reinterpret_cast< storage * >(argp1); result = (arg1)->next(); resultobj = SWIG_NewPointerObj((new pair< string,int >(static_cast< const pair< string,int >& >(result))), SWIGTYPE_p_pairT_std__string_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *storage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_storage, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_objects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_objects",0,0)) SWIG_fail; result = (objects *)new objects(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_objects, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_objects_set_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *arg1 = (objects *) 0 ; char *arg2 = (char *) 0 ; storage *arg3 = (storage *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"objects_set_val",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_objects, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "objects_set_val" "', argument " "1"" of type '" "objects *""'"); } arg1 = reinterpret_cast< objects * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "objects_set_val" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_storage, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "objects_set_val" "', argument " "3"" of type '" "storage *""'"); } arg3 = reinterpret_cast< storage * >(argp3); (arg1)->set_val((char const *)arg2,arg3); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_objects_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *arg1 = (objects *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; storage *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"objects_get_val",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_objects, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "objects_get_val" "', argument " "1"" of type '" "objects *""'"); } arg1 = reinterpret_cast< objects * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "objects_get_val" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); result = (storage *)(arg1)->get_val((char const *)arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_storage, 0 | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_objects_erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *arg1 = (objects *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"objects_erase",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_objects, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "objects_erase" "', argument " "1"" of type '" "objects *""'"); } arg1 = reinterpret_cast< objects * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "objects_erase" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); (arg1)->erase((char const *)arg2); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_objects_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *arg1 = (objects *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; storage *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"objects_next",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_objects, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "objects_next" "', argument " "1"" of type '" "objects *""'"); } arg1 = reinterpret_cast< objects * >(argp1); result = (storage *)(arg1)->next(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_storage, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_objects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; objects *arg1 = (objects *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_objects",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_objects, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_objects" "', argument " "1"" of type '" "objects *""'"); } arg1 = reinterpret_cast< objects * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *objects_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_objects, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *CYCLE_LENGTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "CYCLE_LENGTH",SWIG_From_int(static_cast< int >(13))); return SWIG_Py_Void(); } SWIGINTERN PyObject *FRAME_RATE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "FRAME_RATE",SWIG_From_int(static_cast< int >(50))); return SWIG_Py_Void(); } SWIGINTERN PyObject *FTS_LIMIT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "FTS_LIMIT",SWIG_From_int(static_cast< int >(20))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_gametime_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short arg1 ; unsigned short val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gametime_init",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gametime_init" "', argument " "1"" of type '" "unsigned short""'"); } arg1 = static_cast< unsigned short >(val1); gametime::init(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gametime_minute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; double result; if(!PyArg_UnpackTuple(args,(char *)"gametime_minute",0,0)) SWIG_fail; result = (double)gametime::minute(); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gametime_start_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gametime_start_action",0,0)) SWIG_fail; gametime::start_action(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gametime_stop_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gametime_stop_action",0,0)) SWIG_fail; gametime::stop_action(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gametime_frames_to_skip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"gametime_frames_to_skip",0,0)) SWIG_fail; result = (unsigned char)gametime::frames_to_skip(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gametime_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gametime_update",0,0)) SWIG_fail; gametime::update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_gametime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gametime *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_gametime",0,0)) SWIG_fail; result = (gametime *)new gametime(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gametime, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_gametime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gametime *arg1 = (gametime *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_gametime",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gametime, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gametime" "', argument " "1"" of type '" "gametime *""'"); } arg1 = reinterpret_cast< gametime * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *gametime_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_gametime, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_gamedate_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gamedate_update",0,0)) SWIG_fail; gamedate::update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_time",0,0)) SWIG_fail; result = (unsigned int)gamedate::time(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_weekday(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_weekday",0,0)) SWIG_fail; result = (unsigned short)gamedate::weekday(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_day(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_day",0,0)) SWIG_fail; result = (unsigned short)gamedate::day(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_hour(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_hour",0,0)) SWIG_fail; result = (unsigned short)gamedate::hour(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_minute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_minute",0,0)) SWIG_fail; result = (unsigned short)gamedate::minute(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_parse_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_parse_time",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedate_parse_time" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gamedate_parse_time" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } result = (unsigned int)gamedate::parse_time((std::string const &)*arg1); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_gamedate_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedate_get_state",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedate_get_state" "', argument " "1"" of type '" "igzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gamedate_get_state" "', argument " "1"" of type '" "igzstream &""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (bool)gamedate::get_state(*arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedate_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedate_put_state",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedate_put_state" "', argument " "1"" of type '" "ogzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gamedate_put_state" "', argument " "1"" of type '" "ogzstream &""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); gamedate::put_state(*arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_gamedate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedate *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_gamedate",0,0)) SWIG_fail; result = (gamedate *)new gamedate(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gamedate, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_gamedate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedate *arg1 = (gamedate *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_gamedate",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedate, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gamedate" "', argument " "1"" of type '" "gamedate *""'"); } arg1 = reinterpret_cast< gamedate * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *gamedate_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_gamedate, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SCANCODE_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SCANCODE_MASK",SWIG_From_int(static_cast< int >((1 << 30)))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_UNKNOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_UNKNOWN",SWIG_From_int(static_cast< int >(SDLK_UNKNOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RETURN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RETURN",SWIG_From_char(static_cast< char >(SDLK_RETURN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_ESCAPE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_ESCAPE",SWIG_From_char(static_cast< char >(SDLK_ESCAPE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_BACKSPACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_BACKSPACE",SWIG_From_char(static_cast< char >(SDLK_BACKSPACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_TAB_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_TAB",SWIG_From_char(static_cast< char >(SDLK_TAB))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SPACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SPACE",SWIG_From_char(static_cast< char >(SDLK_SPACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_EXCLAIM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_EXCLAIM",SWIG_From_char(static_cast< char >(SDLK_EXCLAIM))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_QUOTEDBL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_QUOTEDBL",SWIG_From_char(static_cast< char >(SDLK_QUOTEDBL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_HASH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_HASH",SWIG_From_char(static_cast< char >(SDLK_HASH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PERCENT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PERCENT",SWIG_From_char(static_cast< char >(SDLK_PERCENT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_DOLLAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_DOLLAR",SWIG_From_char(static_cast< char >(SDLK_DOLLAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AMPERSAND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AMPERSAND",SWIG_From_char(static_cast< char >(SDLK_AMPERSAND))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_QUOTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_QUOTE",SWIG_From_char(static_cast< char >(SDLK_QUOTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LEFTPAREN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LEFTPAREN",SWIG_From_char(static_cast< char >(SDLK_LEFTPAREN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RIGHTPAREN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RIGHTPAREN",SWIG_From_char(static_cast< char >(SDLK_RIGHTPAREN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_ASTERISK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_ASTERISK",SWIG_From_char(static_cast< char >(SDLK_ASTERISK))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PLUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PLUS",SWIG_From_char(static_cast< char >(SDLK_PLUS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_COMMA_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_COMMA",SWIG_From_char(static_cast< char >(SDLK_COMMA))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MINUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MINUS",SWIG_From_char(static_cast< char >(SDLK_MINUS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PERIOD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PERIOD",SWIG_From_char(static_cast< char >(SDLK_PERIOD))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SLASH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SLASH",SWIG_From_char(static_cast< char >(SDLK_SLASH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_0_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_0",SWIG_From_char(static_cast< char >(SDLK_0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_1_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_1",SWIG_From_char(static_cast< char >(SDLK_1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_2",SWIG_From_char(static_cast< char >(SDLK_2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_3_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_3",SWIG_From_char(static_cast< char >(SDLK_3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_4_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_4",SWIG_From_char(static_cast< char >(SDLK_4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_5_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_5",SWIG_From_char(static_cast< char >(SDLK_5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_6_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_6",SWIG_From_char(static_cast< char >(SDLK_6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_7_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_7",SWIG_From_char(static_cast< char >(SDLK_7))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_8",SWIG_From_char(static_cast< char >(SDLK_8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_9_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_9",SWIG_From_char(static_cast< char >(SDLK_9))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_COLON_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_COLON",SWIG_From_char(static_cast< char >(SDLK_COLON))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SEMICOLON_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SEMICOLON",SWIG_From_char(static_cast< char >(SDLK_SEMICOLON))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LESS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LESS",SWIG_From_char(static_cast< char >(SDLK_LESS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_EQUALS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_EQUALS",SWIG_From_char(static_cast< char >(SDLK_EQUALS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_GREATER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_GREATER",SWIG_From_char(static_cast< char >(SDLK_GREATER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_QUESTION_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_QUESTION",SWIG_From_char(static_cast< char >(SDLK_QUESTION))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AT",SWIG_From_char(static_cast< char >(SDLK_AT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LEFTBRACKET_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LEFTBRACKET",SWIG_From_char(static_cast< char >(SDLK_LEFTBRACKET))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_BACKSLASH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_BACKSLASH",SWIG_From_char(static_cast< char >(SDLK_BACKSLASH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RIGHTBRACKET_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RIGHTBRACKET",SWIG_From_char(static_cast< char >(SDLK_RIGHTBRACKET))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CARET_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CARET",SWIG_From_char(static_cast< char >(SDLK_CARET))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_UNDERSCORE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_UNDERSCORE",SWIG_From_char(static_cast< char >(SDLK_UNDERSCORE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_BACKQUOTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_BACKQUOTE",SWIG_From_char(static_cast< char >(SDLK_BACKQUOTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_a_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_a",SWIG_From_char(static_cast< char >(SDLK_a))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_b_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_b",SWIG_From_char(static_cast< char >(SDLK_b))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_c_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_c",SWIG_From_char(static_cast< char >(SDLK_c))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_d_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_d",SWIG_From_char(static_cast< char >(SDLK_d))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_e_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_e",SWIG_From_char(static_cast< char >(SDLK_e))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_f_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_f",SWIG_From_char(static_cast< char >(SDLK_f))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_g_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_g",SWIG_From_char(static_cast< char >(SDLK_g))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_h_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_h",SWIG_From_char(static_cast< char >(SDLK_h))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_i_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_i",SWIG_From_char(static_cast< char >(SDLK_i))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_j_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_j",SWIG_From_char(static_cast< char >(SDLK_j))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_k_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_k",SWIG_From_char(static_cast< char >(SDLK_k))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_l_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_l",SWIG_From_char(static_cast< char >(SDLK_l))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_m_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_m",SWIG_From_char(static_cast< char >(SDLK_m))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_n_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_n",SWIG_From_char(static_cast< char >(SDLK_n))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_o_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_o",SWIG_From_char(static_cast< char >(SDLK_o))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_p_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_p",SWIG_From_char(static_cast< char >(SDLK_p))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_q_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_q",SWIG_From_char(static_cast< char >(SDLK_q))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_r_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_r",SWIG_From_char(static_cast< char >(SDLK_r))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_s_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_s",SWIG_From_char(static_cast< char >(SDLK_s))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_t_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_t",SWIG_From_char(static_cast< char >(SDLK_t))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_u_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_u",SWIG_From_char(static_cast< char >(SDLK_u))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_v_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_v",SWIG_From_char(static_cast< char >(SDLK_v))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_w_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_w",SWIG_From_char(static_cast< char >(SDLK_w))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_x_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_x",SWIG_From_char(static_cast< char >(SDLK_x))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_y_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_y",SWIG_From_char(static_cast< char >(SDLK_y))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_z_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_z",SWIG_From_char(static_cast< char >(SDLK_z))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CAPSLOCK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CAPSLOCK",SWIG_From_int(static_cast< int >(SDLK_CAPSLOCK))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F1_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F1",SWIG_From_int(static_cast< int >(SDLK_F1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F2",SWIG_From_int(static_cast< int >(SDLK_F2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F3_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F3",SWIG_From_int(static_cast< int >(SDLK_F3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F4_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F4",SWIG_From_int(static_cast< int >(SDLK_F4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F5_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F5",SWIG_From_int(static_cast< int >(SDLK_F5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F6_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F6",SWIG_From_int(static_cast< int >(SDLK_F6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F7_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F7",SWIG_From_int(static_cast< int >(SDLK_F7))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F8",SWIG_From_int(static_cast< int >(SDLK_F8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F9_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F9",SWIG_From_int(static_cast< int >(SDLK_F9))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F10_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F10",SWIG_From_int(static_cast< int >(SDLK_F10))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F11_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F11",SWIG_From_int(static_cast< int >(SDLK_F11))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F12_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F12",SWIG_From_int(static_cast< int >(SDLK_F12))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PRINTSCREEN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PRINTSCREEN",SWIG_From_int(static_cast< int >(SDLK_PRINTSCREEN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SCROLLLOCK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SCROLLLOCK",SWIG_From_int(static_cast< int >(SDLK_SCROLLLOCK))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PAUSE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PAUSE",SWIG_From_int(static_cast< int >(SDLK_PAUSE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_INSERT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_INSERT",SWIG_From_int(static_cast< int >(SDLK_INSERT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_HOME_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_HOME",SWIG_From_int(static_cast< int >(SDLK_HOME))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PAGEUP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PAGEUP",SWIG_From_int(static_cast< int >(SDLK_PAGEUP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_DELETE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_DELETE",SWIG_From_char(static_cast< char >(SDLK_DELETE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_END_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_END",SWIG_From_int(static_cast< int >(SDLK_END))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PAGEDOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PAGEDOWN",SWIG_From_int(static_cast< int >(SDLK_PAGEDOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RIGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RIGHT",SWIG_From_int(static_cast< int >(SDLK_RIGHT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LEFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LEFT",SWIG_From_int(static_cast< int >(SDLK_LEFT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_DOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_DOWN",SWIG_From_int(static_cast< int >(SDLK_DOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_UP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_UP",SWIG_From_int(static_cast< int >(SDLK_UP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_NUMLOCKCLEAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_NUMLOCKCLEAR",SWIG_From_int(static_cast< int >(SDLK_NUMLOCKCLEAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_DIVIDE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_DIVIDE",SWIG_From_int(static_cast< int >(SDLK_KP_DIVIDE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MULTIPLY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MULTIPLY",SWIG_From_int(static_cast< int >(SDLK_KP_MULTIPLY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MINUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MINUS",SWIG_From_int(static_cast< int >(SDLK_KP_MINUS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_PLUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_PLUS",SWIG_From_int(static_cast< int >(SDLK_KP_PLUS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_ENTER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_ENTER",SWIG_From_int(static_cast< int >(SDLK_KP_ENTER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_1_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_1",SWIG_From_int(static_cast< int >(SDLK_KP_1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_2",SWIG_From_int(static_cast< int >(SDLK_KP_2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_3_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_3",SWIG_From_int(static_cast< int >(SDLK_KP_3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_4_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_4",SWIG_From_int(static_cast< int >(SDLK_KP_4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_5_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_5",SWIG_From_int(static_cast< int >(SDLK_KP_5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_6_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_6",SWIG_From_int(static_cast< int >(SDLK_KP_6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_7_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_7",SWIG_From_int(static_cast< int >(SDLK_KP_7))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_8",SWIG_From_int(static_cast< int >(SDLK_KP_8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_9_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_9",SWIG_From_int(static_cast< int >(SDLK_KP_9))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_0_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_0",SWIG_From_int(static_cast< int >(SDLK_KP_0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_PERIOD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_PERIOD",SWIG_From_int(static_cast< int >(SDLK_KP_PERIOD))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_APPLICATION_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_APPLICATION",SWIG_From_int(static_cast< int >(SDLK_APPLICATION))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_POWER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_POWER",SWIG_From_int(static_cast< int >(SDLK_POWER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_EQUALS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_EQUALS",SWIG_From_int(static_cast< int >(SDLK_KP_EQUALS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F13_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F13",SWIG_From_int(static_cast< int >(SDLK_F13))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F14_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F14",SWIG_From_int(static_cast< int >(SDLK_F14))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F15_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F15",SWIG_From_int(static_cast< int >(SDLK_F15))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F16_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F16",SWIG_From_int(static_cast< int >(SDLK_F16))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F17_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F17",SWIG_From_int(static_cast< int >(SDLK_F17))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F18_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F18",SWIG_From_int(static_cast< int >(SDLK_F18))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F19_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F19",SWIG_From_int(static_cast< int >(SDLK_F19))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F20_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F20",SWIG_From_int(static_cast< int >(SDLK_F20))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F21_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F21",SWIG_From_int(static_cast< int >(SDLK_F21))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F22_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F22",SWIG_From_int(static_cast< int >(SDLK_F22))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F23_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F23",SWIG_From_int(static_cast< int >(SDLK_F23))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_F24_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_F24",SWIG_From_int(static_cast< int >(SDLK_F24))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_EXECUTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_EXECUTE",SWIG_From_int(static_cast< int >(SDLK_EXECUTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_HELP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_HELP",SWIG_From_int(static_cast< int >(SDLK_HELP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MENU_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MENU",SWIG_From_int(static_cast< int >(SDLK_MENU))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SELECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SELECT",SWIG_From_int(static_cast< int >(SDLK_SELECT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_STOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_STOP",SWIG_From_int(static_cast< int >(SDLK_STOP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AGAIN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AGAIN",SWIG_From_int(static_cast< int >(SDLK_AGAIN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_UNDO_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_UNDO",SWIG_From_int(static_cast< int >(SDLK_UNDO))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CUT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CUT",SWIG_From_int(static_cast< int >(SDLK_CUT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_COPY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_COPY",SWIG_From_int(static_cast< int >(SDLK_COPY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PASTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PASTE",SWIG_From_int(static_cast< int >(SDLK_PASTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_FIND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_FIND",SWIG_From_int(static_cast< int >(SDLK_FIND))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MUTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MUTE",SWIG_From_int(static_cast< int >(SDLK_MUTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_VOLUMEUP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_VOLUMEUP",SWIG_From_int(static_cast< int >(SDLK_VOLUMEUP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_VOLUMEDOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_VOLUMEDOWN",SWIG_From_int(static_cast< int >(SDLK_VOLUMEDOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_COMMA_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_COMMA",SWIG_From_int(static_cast< int >(SDLK_KP_COMMA))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_EQUALSAS400_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_EQUALSAS400",SWIG_From_int(static_cast< int >(SDLK_KP_EQUALSAS400))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_ALTERASE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_ALTERASE",SWIG_From_int(static_cast< int >(SDLK_ALTERASE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SYSREQ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SYSREQ",SWIG_From_int(static_cast< int >(SDLK_SYSREQ))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CANCEL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CANCEL",SWIG_From_int(static_cast< int >(SDLK_CANCEL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CLEAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CLEAR",SWIG_From_int(static_cast< int >(SDLK_CLEAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_PRIOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_PRIOR",SWIG_From_int(static_cast< int >(SDLK_PRIOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RETURN2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RETURN2",SWIG_From_int(static_cast< int >(SDLK_RETURN2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SEPARATOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SEPARATOR",SWIG_From_int(static_cast< int >(SDLK_SEPARATOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_OUT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_OUT",SWIG_From_int(static_cast< int >(SDLK_OUT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_OPER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_OPER",SWIG_From_int(static_cast< int >(SDLK_OPER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CLEARAGAIN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CLEARAGAIN",SWIG_From_int(static_cast< int >(SDLK_CLEARAGAIN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CRSEL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CRSEL",SWIG_From_int(static_cast< int >(SDLK_CRSEL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_EXSEL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_EXSEL",SWIG_From_int(static_cast< int >(SDLK_EXSEL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_00_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_00",SWIG_From_int(static_cast< int >(SDLK_KP_00))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_000_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_000",SWIG_From_int(static_cast< int >(SDLK_KP_000))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_THOUSANDSSEPARATOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_THOUSANDSSEPARATOR",SWIG_From_int(static_cast< int >(SDLK_THOUSANDSSEPARATOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_DECIMALSEPARATOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_DECIMALSEPARATOR",SWIG_From_int(static_cast< int >(SDLK_DECIMALSEPARATOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CURRENCYUNIT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CURRENCYUNIT",SWIG_From_int(static_cast< int >(SDLK_CURRENCYUNIT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CURRENCYSUBUNIT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CURRENCYSUBUNIT",SWIG_From_int(static_cast< int >(SDLK_CURRENCYSUBUNIT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_LEFTPAREN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_LEFTPAREN",SWIG_From_int(static_cast< int >(SDLK_KP_LEFTPAREN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_RIGHTPAREN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_RIGHTPAREN",SWIG_From_int(static_cast< int >(SDLK_KP_RIGHTPAREN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_LEFTBRACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_LEFTBRACE",SWIG_From_int(static_cast< int >(SDLK_KP_LEFTBRACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_RIGHTBRACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_RIGHTBRACE",SWIG_From_int(static_cast< int >(SDLK_KP_RIGHTBRACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_TAB_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_TAB",SWIG_From_int(static_cast< int >(SDLK_KP_TAB))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_BACKSPACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_BACKSPACE",SWIG_From_int(static_cast< int >(SDLK_KP_BACKSPACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_A_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_A",SWIG_From_int(static_cast< int >(SDLK_KP_A))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_B_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_B",SWIG_From_int(static_cast< int >(SDLK_KP_B))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_C_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_C",SWIG_From_int(static_cast< int >(SDLK_KP_C))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_D",SWIG_From_int(static_cast< int >(SDLK_KP_D))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_E_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_E",SWIG_From_int(static_cast< int >(SDLK_KP_E))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_F_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_F",SWIG_From_int(static_cast< int >(SDLK_KP_F))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_XOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_XOR",SWIG_From_int(static_cast< int >(SDLK_KP_XOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_POWER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_POWER",SWIG_From_int(static_cast< int >(SDLK_KP_POWER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_PERCENT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_PERCENT",SWIG_From_int(static_cast< int >(SDLK_KP_PERCENT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_LESS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_LESS",SWIG_From_int(static_cast< int >(SDLK_KP_LESS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_GREATER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_GREATER",SWIG_From_int(static_cast< int >(SDLK_KP_GREATER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_AMPERSAND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_AMPERSAND",SWIG_From_int(static_cast< int >(SDLK_KP_AMPERSAND))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_DBLAMPERSAND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_DBLAMPERSAND",SWIG_From_int(static_cast< int >(SDLK_KP_DBLAMPERSAND))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_VERTICALBAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_VERTICALBAR",SWIG_From_int(static_cast< int >(SDLK_KP_VERTICALBAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_DBLVERTICALBAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_DBLVERTICALBAR",SWIG_From_int(static_cast< int >(SDLK_KP_DBLVERTICALBAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_COLON_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_COLON",SWIG_From_int(static_cast< int >(SDLK_KP_COLON))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_HASH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_HASH",SWIG_From_int(static_cast< int >(SDLK_KP_HASH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_SPACE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_SPACE",SWIG_From_int(static_cast< int >(SDLK_KP_SPACE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_AT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_AT",SWIG_From_int(static_cast< int >(SDLK_KP_AT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_EXCLAM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_EXCLAM",SWIG_From_int(static_cast< int >(SDLK_KP_EXCLAM))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMSTORE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMSTORE",SWIG_From_int(static_cast< int >(SDLK_KP_MEMSTORE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMRECALL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMRECALL",SWIG_From_int(static_cast< int >(SDLK_KP_MEMRECALL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMCLEAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMCLEAR",SWIG_From_int(static_cast< int >(SDLK_KP_MEMCLEAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMADD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMADD",SWIG_From_int(static_cast< int >(SDLK_KP_MEMADD))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMSUBTRACT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMSUBTRACT",SWIG_From_int(static_cast< int >(SDLK_KP_MEMSUBTRACT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMMULTIPLY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMMULTIPLY",SWIG_From_int(static_cast< int >(SDLK_KP_MEMMULTIPLY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_MEMDIVIDE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_MEMDIVIDE",SWIG_From_int(static_cast< int >(SDLK_KP_MEMDIVIDE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_PLUSMINUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_PLUSMINUS",SWIG_From_int(static_cast< int >(SDLK_KP_PLUSMINUS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_CLEAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_CLEAR",SWIG_From_int(static_cast< int >(SDLK_KP_CLEAR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_CLEARENTRY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_CLEARENTRY",SWIG_From_int(static_cast< int >(SDLK_KP_CLEARENTRY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_BINARY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_BINARY",SWIG_From_int(static_cast< int >(SDLK_KP_BINARY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_OCTAL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_OCTAL",SWIG_From_int(static_cast< int >(SDLK_KP_OCTAL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_DECIMAL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_DECIMAL",SWIG_From_int(static_cast< int >(SDLK_KP_DECIMAL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KP_HEXADECIMAL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KP_HEXADECIMAL",SWIG_From_int(static_cast< int >(SDLK_KP_HEXADECIMAL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LCTRL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LCTRL",SWIG_From_int(static_cast< int >(SDLK_LCTRL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LSHIFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LSHIFT",SWIG_From_int(static_cast< int >(SDLK_LSHIFT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LALT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LALT",SWIG_From_int(static_cast< int >(SDLK_LALT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_LGUI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_LGUI",SWIG_From_int(static_cast< int >(SDLK_LGUI))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RCTRL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RCTRL",SWIG_From_int(static_cast< int >(SDLK_RCTRL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RSHIFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RSHIFT",SWIG_From_int(static_cast< int >(SDLK_RSHIFT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RALT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RALT",SWIG_From_int(static_cast< int >(SDLK_RALT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_RGUI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_RGUI",SWIG_From_int(static_cast< int >(SDLK_RGUI))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MODE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MODE",SWIG_From_int(static_cast< int >(SDLK_MODE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIONEXT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIONEXT",SWIG_From_int(static_cast< int >(SDLK_AUDIONEXT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOPREV_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOPREV",SWIG_From_int(static_cast< int >(SDLK_AUDIOPREV))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOSTOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOSTOP",SWIG_From_int(static_cast< int >(SDLK_AUDIOSTOP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOPLAY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOPLAY",SWIG_From_int(static_cast< int >(SDLK_AUDIOPLAY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOMUTE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOMUTE",SWIG_From_int(static_cast< int >(SDLK_AUDIOMUTE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MEDIASELECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MEDIASELECT",SWIG_From_int(static_cast< int >(SDLK_MEDIASELECT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_WWW_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_WWW",SWIG_From_int(static_cast< int >(SDLK_WWW))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_MAIL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_MAIL",SWIG_From_int(static_cast< int >(SDLK_MAIL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_CALCULATOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_CALCULATOR",SWIG_From_int(static_cast< int >(SDLK_CALCULATOR))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_COMPUTER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_COMPUTER",SWIG_From_int(static_cast< int >(SDLK_COMPUTER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_SEARCH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_SEARCH",SWIG_From_int(static_cast< int >(SDLK_AC_SEARCH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_HOME_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_HOME",SWIG_From_int(static_cast< int >(SDLK_AC_HOME))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_BACK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_BACK",SWIG_From_int(static_cast< int >(SDLK_AC_BACK))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_FORWARD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_FORWARD",SWIG_From_int(static_cast< int >(SDLK_AC_FORWARD))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_STOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_STOP",SWIG_From_int(static_cast< int >(SDLK_AC_STOP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_REFRESH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_REFRESH",SWIG_From_int(static_cast< int >(SDLK_AC_REFRESH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AC_BOOKMARKS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AC_BOOKMARKS",SWIG_From_int(static_cast< int >(SDLK_AC_BOOKMARKS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_BRIGHTNESSDOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_BRIGHTNESSDOWN",SWIG_From_int(static_cast< int >(SDLK_BRIGHTNESSDOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_BRIGHTNESSUP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_BRIGHTNESSUP",SWIG_From_int(static_cast< int >(SDLK_BRIGHTNESSUP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_DISPLAYSWITCH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_DISPLAYSWITCH",SWIG_From_int(static_cast< int >(SDLK_DISPLAYSWITCH))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KBDILLUMTOGGLE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KBDILLUMTOGGLE",SWIG_From_int(static_cast< int >(SDLK_KBDILLUMTOGGLE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KBDILLUMDOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KBDILLUMDOWN",SWIG_From_int(static_cast< int >(SDLK_KBDILLUMDOWN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_KBDILLUMUP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_KBDILLUMUP",SWIG_From_int(static_cast< int >(SDLK_KBDILLUMUP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_EJECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_EJECT",SWIG_From_int(static_cast< int >(SDLK_EJECT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_SLEEP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_SLEEP",SWIG_From_int(static_cast< int >(SDLK_SLEEP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_APP1_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_APP1",SWIG_From_int(static_cast< int >(SDLK_APP1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_APP2_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_APP2",SWIG_From_int(static_cast< int >(SDLK_APP2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOREWIND_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOREWIND",SWIG_From_int(static_cast< int >(SDLK_AUDIOREWIND))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SDLK_AUDIOFASTFORWARD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SDLK_AUDIOFASTFORWARD",SWIG_From_int(static_cast< int >(SDLK_AUDIOFASTFORWARD))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_NONE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_NONE",SWIG_From_int(static_cast< int >(KMOD_NONE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_LSHIFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_LSHIFT",SWIG_From_int(static_cast< int >(KMOD_LSHIFT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_RSHIFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_RSHIFT",SWIG_From_int(static_cast< int >(KMOD_RSHIFT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_LCTRL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_LCTRL",SWIG_From_int(static_cast< int >(KMOD_LCTRL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_RCTRL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_RCTRL",SWIG_From_int(static_cast< int >(KMOD_RCTRL))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_LALT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_LALT",SWIG_From_int(static_cast< int >(KMOD_LALT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_RALT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_RALT",SWIG_From_int(static_cast< int >(KMOD_RALT))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_LGUI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_LGUI",SWIG_From_int(static_cast< int >(KMOD_LGUI))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_RGUI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_RGUI",SWIG_From_int(static_cast< int >(KMOD_RGUI))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_NUM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_NUM",SWIG_From_int(static_cast< int >(KMOD_NUM))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_CAPS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_CAPS",SWIG_From_int(static_cast< int >(KMOD_CAPS))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_MODE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_MODE",SWIG_From_int(static_cast< int >(KMOD_MODE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *KMOD_RESERVED_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "KMOD_RESERVED",SWIG_From_int(static_cast< int >(KMOD_RESERVED))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_input_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_init",0,0)) SWIG_fail; input::init(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_shutdown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_shutdown",0,0)) SWIG_fail; input::shutdown(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_update",0,0)) SWIG_fail; input::update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_is_pushed__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SDL_Keycode arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"input_is_pushed",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "input_is_pushed" "', argument " "1"" of type '" "SDL_Keycode""'"); } arg1 = static_cast< SDL_Keycode >(val1); result = (bool)input::is_pushed(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_is_pushed__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char arg1 ; char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"input_is_pushed",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "input_is_pushed" "', argument " "1"" of type '" "char""'"); } arg1 = static_cast< char >(val1); result = (bool)input::is_pushed(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_is_pushed(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[2] = { 0 }; Py_ssize_t ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_input_is_pushed__SWIG_0(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_input_is_pushed__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'input_is_pushed'.\n" " Possible C/C++ prototypes are:\n" " input::is_pushed(SDL_Keycode)\n" " input::is_pushed(char)\n"); return 0; } SWIGINTERN PyObject *_wrap_input_has_been_pushed__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SDL_Keycode arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"input_has_been_pushed",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "input_has_been_pushed" "', argument " "1"" of type '" "SDL_Keycode""'"); } arg1 = static_cast< SDL_Keycode >(val1); result = (bool)input::has_been_pushed(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_has_been_pushed__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char arg1 ; char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"input_has_been_pushed",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "input_has_been_pushed" "', argument " "1"" of type '" "char""'"); } arg1 = static_cast< char >(val1); result = (bool)input::has_been_pushed(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_has_been_pushed(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[2] = { 0 }; Py_ssize_t ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? PyObject_Length(args) : 0; for (ii = 0; (ii < 1) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; { int res = SWIG_AsVal_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_input_has_been_pushed__SWIG_0(self, args); } } if (argc == 1) { int _v; { int res = SWIG_AsVal_char(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_input_has_been_pushed__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'input_has_been_pushed'.\n" " Possible C/C++ prototypes are:\n" " input::has_been_pushed(SDL_Keycode)\n" " input::has_been_pushed(char)\n"); return 0; } SWIGINTERN PyObject *_wrap_input_get_next_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SDL_Keycode result; if(!PyArg_UnpackTuple(args,(char *)"input_get_next_key",0,0)) SWIG_fail; result = (SDL_Keycode)input::get_next_key(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_get_next_unicode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string result; if(!PyArg_UnpackTuple(args,(char *)"input_get_next_unicode",0,0)) SWIG_fail; result = input::get_next_unicode(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_start_text_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_start_text_input",0,0)) SWIG_fail; input::start_text_input(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_stop_text_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_stop_text_input",0,0)) SWIG_fail; input::stop_text_input(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_is_text_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if(!PyArg_UnpackTuple(args,(char *)"input_is_text_input",0,0)) SWIG_fail; result = (bool)input::is_text_input(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_input_clear_keys_queue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"input_clear_keys_queue",0,0)) SWIG_fail; input::clear_keys_queue(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; input *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_input",0,0)) SWIG_fail; result = (input *)new input(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; input *arg1 = (input *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_input",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_input" "', argument " "1"" of type '" "input *""'"); } arg1 = reinterpret_cast< input * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *input_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_input, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *NUM_WAVES_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NUM_WAVES",SWIG_From_int(static_cast< int >(5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NUM_MUSIC_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NUM_MUSIC",SWIG_From_int(static_cast< int >(3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NUM_CHANNELS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NUM_CHANNELS",SWIG_From_int(static_cast< int >(4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_audio_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_init",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "audio_init" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); audio::init(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"audio_cleanup",0,0)) SWIG_fail; audio::cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ogzstream *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"audio_put_state",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "audio_put_state" "', argument " "1"" of type '" "ogzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "audio_put_state" "', argument " "1"" of type '" "ogzstream &""'"); } arg1 = reinterpret_cast< ogzstream * >(argp1); result = (signed char)audio::put_state(*arg1); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; igzstream *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"audio_get_state",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "audio_get_state" "', argument " "1"" of type '" "igzstream &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "audio_get_state" "', argument " "1"" of type '" "igzstream &""'"); } arg1 = reinterpret_cast< igzstream * >(argp1); result = (signed char)audio::get_state(*arg1); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_load_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"audio_load_background",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_load_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "audio_load_background" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); result = (int)audio::load_background(arg1,arg2); resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_audio_unload_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_unload_background",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_unload_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); audio::unload_background(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_set_background_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_set_background_volume",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_set_background_volume" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); audio::set_background_volume(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_pause_music(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"audio_pause_music",0,0)) SWIG_fail; audio::pause_music(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_unpause_music(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"audio_unpause_music",0,0)) SWIG_fail; audio::unpause_music(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_load_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; char *arg2 = (char *) 0 ; int val1 ; int ecode1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"audio_load_wave",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_load_wave" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "audio_load_wave" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); result = (int)audio::load_wave(arg1,arg2); resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_audio_unload_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_unload_wave",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_unload_wave" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); audio::unload_wave(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_play_wave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_play_wave",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_play_wave" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "audio_play_wave" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); audio::play_wave(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_play_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_play_background",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_play_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); audio::play_background(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_fade_in_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_fade_in_background",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_fade_in_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "audio_fade_in_background" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); audio::fade_in_background(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_fade_out_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_fade_out_background",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_fade_out_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); audio::fade_out_background(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_change_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int arg2 ; int val1 ; int ecode1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_change_background",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_change_background" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "audio_change_background" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); audio::change_background(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_is_initialized(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if(!PyArg_UnpackTuple(args,(char *)"audio_is_initialized",0,0)) SWIG_fail; result = (bool)audio::is_initialized(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_is_schedule_activated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if(!PyArg_UnpackTuple(args,(char *)"audio_is_schedule_activated",0,0)) SWIG_fail; result = (bool)audio::is_schedule_activated(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_is_background_finished(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if(!PyArg_UnpackTuple(args,(char *)"audio_is_background_finished",0,0)) SWIG_fail; result = (bool)audio::is_background_finished(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_set_schedule_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool arg1 ; bool val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_set_schedule_active",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_bool(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "audio_set_schedule_active" "', argument " "1"" of type '" "bool""'"); } arg1 = static_cast< bool >(val1); audio::set_schedule_active(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_set_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject *arg2 = (PyObject *) NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"audio_set_schedule",1,2,&obj0,&obj1)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "audio_set_schedule" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj1) { { arg2 = obj1; } } audio::set_schedule(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_audio_run_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"audio_run_schedule",0,0)) SWIG_fail; audio::run_schedule(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_audio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; audio *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_audio",0,0)) SWIG_fail; result = (audio *)new audio(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_audio, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_audio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; audio *arg1 = (audio *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_audio",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_audio, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_audio" "', argument " "1"" of type '" "audio *""'"); } arg1 = reinterpret_cast< audio * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *audio_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_audio, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *DIALOG_DIR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "DIALOG_DIR",SWIG_FromCharPtr("dialogues/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *DWARF_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "DWARF",SWIG_From_int(static_cast< int >(DWARF))); return SWIG_Py_Void(); } SWIGINTERN PyObject *ELF_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "ELF",SWIG_From_int(static_cast< int >(ELF))); return SWIG_Py_Void(); } SWIGINTERN PyObject *HALFELF_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "HALFELF",SWIG_From_int(static_cast< int >(HALFELF))); return SWIG_Py_Void(); } SWIGINTERN PyObject *HUMAN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "HUMAN",SWIG_From_int(static_cast< int >(HUMAN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *FEMALE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "FEMALE",SWIG_From_int(static_cast< int >(FEMALE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *MALE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "MALE",SWIG_From_int(static_cast< int >(MALE))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NPC_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NPC",SWIG_From_int(static_cast< int >(NPC))); return SWIG_Py_Void(); } SWIGINTERN PyObject *PLAYER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "PLAYER",SWIG_From_int(static_cast< int >(PLAYER))); return SWIG_Py_Void(); } SWIGINTERN PyObject *PARTY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "PARTY",SWIG_From_int(static_cast< int >(PARTY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_character_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_character_base",0,0)) SWIG_fail; result = (character_base *)new character_base(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_character_base, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_character_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_character_base",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_character_base" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_name",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_name" "', argument " "1"" of type '" "character_base const *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); result = ((character_base const *)arg1)->get_name(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_id",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_id" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); result = (arg1)->get_id(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_set_name",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_set_name" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "character_base_set_name" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_name(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_color",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_color" "', argument " "1"" of type '" "character_base const *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); result = (unsigned int)((character_base const *)arg1)->get_color(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_set_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_set_color",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_set_color" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "character_base_set_color" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); (arg1)->set_color(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_portrait(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_portrait",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_portrait" "', argument " "1"" of type '" "character_base const *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); result = ((character_base const *)arg1)->get_portrait(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_set_portrait(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_set_portrait",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_set_portrait" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "character_base_set_portrait" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_portrait(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_dialogue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_dialogue",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_dialogue" "', argument " "1"" of type '" "character_base const *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); result = ((character_base const *)arg1)->get_dialogue(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_set_dialogue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_set_dialogue",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_set_dialogue" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "character_base_set_dialogue" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_dialogue(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_get_state" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "character_base_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "character_base_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); (arg1)->get_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_character_base_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"character_base_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "character_base_put_state" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "character_base_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "character_base_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); (arg1)->put_state(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *character_base_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_character_base, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_py_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_py_object",0,0)) SWIG_fail; result = (py_object *)new py_object(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_py_object, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_py_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_py_object",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_py_object" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_clear" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_create_instance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string arg2 ; string arg3 ; PyObject *arg4 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"py_object_create_instance",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_create_instance" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "py_object_create_instance" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "py_object_create_instance" "', argument " "3"" of type '" "string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj3) { { arg4 = obj3; } } result = (bool)(arg1)->create_instance(arg2,arg3,arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_reload_instance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string arg2 ; string arg3 ; PyObject *arg4 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"py_object_reload_instance",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_reload_instance" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "py_object_reload_instance" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "py_object_reload_instance" "', argument " "3"" of type '" "string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj3) { { arg4 = obj3; } } result = (bool)(arg1)->reload_instance(arg2,arg3,arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_call_method_ret(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_call_method_ret",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_call_method_ret" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_call_method_ret" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_call_method_ret" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (obj2) { { arg3 = obj2; } } result = (PyObject *)((py_object const *)arg1)->call_method_ret((string const &)*arg2,arg3); resultobj = result; if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_call_method(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_call_method",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_call_method" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_call_method" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_call_method" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (obj2) { { arg3 = obj2; } } ((py_object const *)arg1)->call_method((string const &)*arg2,arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; PyObject *arg2 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_run",1,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_run" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); if (obj1) { { arg2 = obj1; } } (arg1)->run(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_has_attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; std::string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"py_object_has_attribute",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_has_attribute" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_has_attribute" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_has_attribute" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } result = (bool)(arg1)->has_attribute((std::string const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_get_attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_get_attribute",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_get_attribute" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_get_attribute" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_get_attribute" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (PyObject *)((py_object const *)arg1)->get_attribute((string const &)*arg2); resultobj = result; if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_get_attribute_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"py_object_get_attribute_int",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_get_attribute_int" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_get_attribute_int" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_get_attribute_int" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (int)(arg1)->get_attribute_int((string const &)*arg2); resultobj = SWIG_From_int(static_cast< int >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_get_attribute_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"py_object_get_attribute_string",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_get_attribute_string" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_get_attribute_string" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_get_attribute_string" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } result = (arg1)->get_attribute_string((string const &)*arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_set_attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_set_attribute",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_set_attribute" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_set_attribute" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_set_attribute" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } { arg3 = obj2; } (arg1)->set_attribute((string const &)*arg2,arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_set_attribute_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; int arg3 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_set_attribute_int",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_set_attribute_int" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_set_attribute_int" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_set_attribute_int" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "py_object_set_attribute_int" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); (arg1)->set_attribute_int((string const &)*arg2,arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_py_object_set_attribute_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; string *arg2 = 0 ; string *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; int res3 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_set_attribute_string",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_set_attribute_string" "', argument " "1"" of type '" "py_object *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "py_object_set_attribute_string" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_set_attribute_string" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } { std::string *ptr = (std::string *)0; res3 = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "py_object_set_attribute_string" "', argument " "3"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "py_object_set_attribute_string" "', argument " "3"" of type '" "string const &""'"); } arg3 = ptr; } (arg1)->set_attribute_string((string const &)*arg2,(string const &)*arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; return NULL; } SWIGINTERN PyObject *_wrap_py_object_get_instance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; bool arg2_defvalue = true ; bool *arg2 = (bool *) &arg2_defvalue ; void *argp1 = 0 ; int res1 = 0 ; bool temp2 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"py_object_get_instance",1,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_get_instance" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); if (obj1) { ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "py_object_get_instance" "', argument " "2"" of type '" "bool""'"); } temp2 = static_cast< bool >(val2); arg2 = &temp2; } result = (PyObject *)((py_object const *)arg1)->get_instance((bool const &)*arg2); resultobj = result; return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_class_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if(!PyArg_UnpackTuple(args,(char *)"py_object_class_name",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_class_name" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); result = ((py_object const *)arg1)->class_name(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_py_object_file_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; py_object *arg1 = (py_object *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; std::string result; if(!PyArg_UnpackTuple(args,(char *)"py_object_file_name",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_py_object, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "py_object_file_name" "', argument " "1"" of type '" "py_object const *""'"); } arg1 = reinterpret_cast< py_object * >(argp1); result = ((py_object const *)arg1)->file_name(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *py_object_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_py_object, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_drawing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_drawing_area",0,0)) SWIG_fail; result = (drawing_area *)new drawing_area(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_drawing_area, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_x" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = (short)((drawing_area const *)arg1)->x(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_y" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = (short)((drawing_area const *)arg1)->y(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_length",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_length" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = (unsigned short)((drawing_area const *)arg1)->length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_height",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_height" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = (unsigned short)((drawing_area const *)arg1)->height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_move(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; short arg2 ; short arg3 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_move",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_move" "', argument " "1"" of type '" "drawing_area *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "drawing_area_move" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "drawing_area_move" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); (arg1)->move(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_resize" "', argument " "1"" of type '" "drawing_area *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "drawing_area_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "drawing_area_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_assign_drawing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; drawing_area *arg2 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_assign_drawing_area",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_assign_drawing_area" "', argument " "1"" of type '" "drawing_area *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "drawing_area_assign_drawing_area" "', argument " "2"" of type '" "drawing_area const *""'"); } arg2 = reinterpret_cast< drawing_area * >(argp2); (arg1)->assign_drawing_area((drawing_area const *)arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_assigned_drawing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; drawing_area *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_assigned_drawing_area",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_assigned_drawing_area" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = (drawing_area *)((drawing_area const *)arg1)->assigned_drawing_area(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_drawing_area, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_detach_drawing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_detach_drawing_area",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_detach_drawing_area" "', argument " "1"" of type '" "drawing_area *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); (arg1)->detach_drawing_area(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawing_area_setup_rects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; SDL_Rect result; if(!PyArg_UnpackTuple(args,(char *)"drawing_area_setup_rects",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawing_area_setup_rects" "', argument " "1"" of type '" "drawing_area const *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); result = ((drawing_area const *)arg1)->setup_rects(); resultobj = SWIG_NewPointerObj((new SDL_Rect(static_cast< const SDL_Rect& >(result))), SWIGTYPE_p_SDL_Rect, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_drawing_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawing_area *arg1 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_drawing_area",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawing_area, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_drawing_area" "', argument " "1"" of type '" "drawing_area *""'"); } arg1 = reinterpret_cast< drawing_area * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *drawing_area_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_drawing_area, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_quest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; quest *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_quest",0,0)) SWIG_fail; result = (quest *)new quest(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quest, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_quest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; quest *arg1 = (quest *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_quest",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_quest, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_quest" "', argument " "1"" of type '" "quest *""'"); } arg1 = reinterpret_cast< quest * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *quest_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_quest, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_drawable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_drawable",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_drawable" "', argument " "1"" of type '" "drawable *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawable_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"drawable_length",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawable_length" "', argument " "1"" of type '" "drawable const *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); result = (unsigned short)((drawable const *)arg1)->length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawable_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"drawable_height",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawable_height" "', argument " "1"" of type '" "drawable const *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); result = (unsigned short)((drawable const *)arg1)->height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawable_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"drawable_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawable_update" "', argument " "1"" of type '" "drawable *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawable_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"drawable_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawable_input_update" "', argument " "1"" of type '" "drawable *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_drawable_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; drawable *arg1 = (drawable *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"drawable_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_drawable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "drawable_draw" "', argument " "1"" of type '" "drawable const *""'"); } arg1 = reinterpret_cast< drawable * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "drawable_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "drawable_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "drawable_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "drawable_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((drawable const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *drawable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_drawable, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *R_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "R_MASK",SWIG_From_int(static_cast< int >(0x000000ff))); return SWIG_Py_Void(); } SWIGINTERN PyObject *G_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "G_MASK",SWIG_From_int(static_cast< int >(0x0000ff00))); return SWIG_Py_Void(); } SWIGINTERN PyObject *B_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "B_MASK",SWIG_From_int(static_cast< int >(0x00ff0000))); return SWIG_Py_Void(); } SWIGINTERN PyObject *A_MASK_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "A_MASK",SWIG_From_int(static_cast< int >(0xff000000))); return SWIG_Py_Void(); } SWIGINTERN PyObject *BYTES_PER_PIXEL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "BYTES_PER_PIXEL",SWIG_From_int(static_cast< int >(4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_pixel_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_pixel_info",0,0)) SWIG_fail; result = (pixel_info *)new pixel_info(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pixel_info, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *arg2 = (void *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Pixels_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Pixels_set" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pixel_info_Pixels_set" "', argument " "2"" of type '" "void *""'"); } if (arg1) (arg1)->Pixels = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; void *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Pixels_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Pixels_get" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); result = (void *) ((arg1)->Pixels); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Pitch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Pitch_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Pitch_set" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pixel_info_Pitch_set" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); if (arg1) (arg1)->Pitch = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Pitch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; int result; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Pitch_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Pitch_get" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); result = (int) ((arg1)->Pitch); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Format_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Format_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Format_set" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pixel_info_Format_set" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); if (arg1) (arg1)->Format = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_Format_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_Format_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_Format_get" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); result = (unsigned int) ((arg1)->Format); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_BytesPerPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_BytesPerPixel_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_BytesPerPixel_set" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pixel_info_BytesPerPixel_set" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); if (arg1) (arg1)->BytesPerPixel = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_pixel_info_BytesPerPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"pixel_info_BytesPerPixel_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pixel_info_BytesPerPixel_get" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); result = (unsigned int) ((arg1)->BytesPerPixel); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_pixel_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; pixel_info *arg1 = (pixel_info *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_pixel_info",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pixel_info, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pixel_info" "', argument " "1"" of type '" "pixel_info *""'"); } arg1 = reinterpret_cast< pixel_info * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *pixel_info_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_pixel_info, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_surface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char arg1_defvalue = 1 ; unsigned char *arg1 = (unsigned char *) &arg1_defvalue ; unsigned char temp1 ; unsigned char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; surface *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_surface",0,1,&obj0)) SWIG_fail; if (obj0) { ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_surface" "', argument " "1"" of type '" "unsigned char""'"); } temp1 = static_cast< unsigned char >(val1); arg1 = &temp1; } result = (surface *)new surface((unsigned char const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_surface, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_surface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_surface",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_surface" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_is_masked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"surface_is_masked",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_is_masked" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); result = (bool)((surface const *)arg1)->is_masked(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_set_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_set_mask",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_set_mask" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_set_mask" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_mask(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_alpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"surface_alpha",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_alpha" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); result = (unsigned char)((surface const *)arg1)->alpha(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_set_alpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned char arg2 ; bool arg3_defvalue = false ; bool *arg3 = (bool *) &arg3_defvalue ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; bool temp3 ; bool val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_set_alpha",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_set_alpha" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_set_alpha" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_set_alpha" "', argument " "3"" of type '" "bool""'"); } temp3 = static_cast< bool >(val3); arg3 = &temp3; } (arg1)->set_alpha(arg2,(bool const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_has_alpha_channel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"surface_has_alpha_channel",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_has_alpha_channel" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); result = (bool)((surface const *)arg1)->has_alpha_channel(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"surface_scale",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_scale" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); result = (unsigned char)((surface const *)arg1)->scale(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_set_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned char *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char temp2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_set_scale",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_set_scale" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_set_scale" "', argument " "2"" of type '" "unsigned char""'"); } temp2 = static_cast< unsigned char >(val2); arg2 = &temp2; (arg1)->set_scale((unsigned char const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_draw" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "surface_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "surface_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((surface const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_draw_part(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; short arg2 ; short arg3 ; short arg4 ; short arg5 ; unsigned short arg6 ; unsigned short arg7 ; drawing_area *arg8 = (drawing_area *) NULL ; surface *arg9 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; short val4 ; int ecode4 = 0 ; short val5 ; int ecode5 = 0 ; unsigned short val6 ; int ecode6 = 0 ; unsigned short val7 ; int ecode7 = 0 ; void *argp8 = 0 ; int res8 = 0 ; void *argp9 = 0 ; int res9 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; PyObject * obj7 = 0 ; PyObject * obj8 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_draw_part",7,9,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_draw_part" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_draw_part" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_draw_part" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); ecode4 = SWIG_AsVal_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_draw_part" "', argument " "4"" of type '" "short""'"); } arg4 = static_cast< short >(val4); ecode5 = SWIG_AsVal_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "surface_draw_part" "', argument " "5"" of type '" "short""'"); } arg5 = static_cast< short >(val5); ecode6 = SWIG_AsVal_unsigned_SS_short(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "surface_draw_part" "', argument " "6"" of type '" "unsigned short""'"); } arg6 = static_cast< unsigned short >(val6); ecode7 = SWIG_AsVal_unsigned_SS_short(obj6, &val7); if (!SWIG_IsOK(ecode7)) { SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "surface_draw_part" "', argument " "7"" of type '" "unsigned short""'"); } arg7 = static_cast< unsigned short >(val7); if (obj7) { res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res8)) { SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "surface_draw_part" "', argument " "8"" of type '" "drawing_area const *""'"); } arg8 = reinterpret_cast< drawing_area * >(argp8); } if (obj8) { res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res9)) { SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "surface_draw_part" "', argument " "9"" of type '" "surface *""'"); } arg9 = reinterpret_cast< surface * >(argp9); } ((surface const *)arg1)->draw_part(arg2,arg3,arg4,arg5,arg6,arg7,(drawing_area const *)arg8,arg9); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_fillrect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; short arg2 ; short arg3 ; unsigned short arg4 ; unsigned short arg5 ; unsigned int arg6 ; drawing_area *arg7 = (drawing_area *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; unsigned int val6 ; int ecode6 = 0 ; void *argp7 = 0 ; int res7 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_fillrect",6,7,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_fillrect" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_fillrect" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_fillrect" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_fillrect" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "surface_fillrect" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "surface_fillrect" "', argument " "6"" of type '" "unsigned int""'"); } arg6 = static_cast< unsigned int >(val6); if (obj6) { res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res7)) { SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "surface_fillrect" "', argument " "7"" of type '" "drawing_area *""'"); } arg7 = reinterpret_cast< drawing_area * >(argp7); } (arg1)->fillrect(arg2,arg3,arg4,arg5,arg6,arg7); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_map_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned char *arg2 = 0 ; unsigned char *arg3 = 0 ; unsigned char *arg4 = 0 ; unsigned char arg5_defvalue = 255 ; unsigned char *arg5 = (unsigned char *) &arg5_defvalue ; void *argp1 = 0 ; int res1 = 0 ; unsigned char temp2 ; unsigned char val2 ; int ecode2 = 0 ; unsigned char temp3 ; unsigned char val3 ; int ecode3 = 0 ; unsigned char temp4 ; unsigned char val4 ; int ecode4 = 0 ; unsigned char temp5 ; unsigned char val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"surface_map_color",4,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_map_color" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_map_color" "', argument " "2"" of type '" "unsigned char""'"); } temp2 = static_cast< unsigned char >(val2); arg2 = &temp2; ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_map_color" "', argument " "3"" of type '" "unsigned char""'"); } temp3 = static_cast< unsigned char >(val3); arg3 = &temp3; ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_map_color" "', argument " "4"" of type '" "unsigned char""'"); } temp4 = static_cast< unsigned char >(val4); arg4 = &temp4; if (obj4) { ecode5 = SWIG_AsVal_unsigned_SS_char(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "surface_map_color" "', argument " "5"" of type '" "unsigned char""'"); } temp5 = static_cast< unsigned char >(val5); arg5 = &temp5; } result = (unsigned int)((surface const *)arg1)->map_color((unsigned char const &)*arg2,(unsigned char const &)*arg3,(unsigned char const &)*arg4,(unsigned char const &)*arg5); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_unmap_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned int arg2 ; unsigned char *arg3 = 0 ; unsigned char *arg4 = 0 ; unsigned char *arg5 = 0 ; unsigned char *arg6 = 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; void *argp6 = 0 ; int res6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_unmap_color",6,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_unmap_color" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_unmap_color" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_unsigned_char, 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "surface_unmap_color" "', argument " "3"" of type '" "unsigned char &""'"); } if (!argp3) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_unmap_color" "', argument " "3"" of type '" "unsigned char &""'"); } arg3 = reinterpret_cast< unsigned char * >(argp3); res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_unsigned_char, 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "surface_unmap_color" "', argument " "4"" of type '" "unsigned char &""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_unmap_color" "', argument " "4"" of type '" "unsigned char &""'"); } arg4 = reinterpret_cast< unsigned char * >(argp4); res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_unsigned_char, 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "surface_unmap_color" "', argument " "5"" of type '" "unsigned char &""'"); } if (!argp5) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_unmap_color" "', argument " "5"" of type '" "unsigned char &""'"); } arg5 = reinterpret_cast< unsigned char * >(argp5); res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_unsigned_char, 0 ); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "surface_unmap_color" "', argument " "6"" of type '" "unsigned char &""'"); } if (!argp6) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_unmap_color" "', argument " "6"" of type '" "unsigned char &""'"); } arg6 = reinterpret_cast< unsigned char * >(argp6); ((surface const *)arg1)->unmap_color(arg2,*arg3,*arg4,*arg5,*arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_lock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_lock",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_lock" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ((surface const *)arg1)->lock(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_unlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_unlock",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_unlock" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ((surface const *)arg1)->unlock(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_put_pix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned int arg4 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_put_pix",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_put_pix" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_put_pix" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_put_pix" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_put_pix" "', argument " "4"" of type '" "unsigned int""'"); } arg4 = static_cast< unsigned int >(val4); (arg1)->put_pix(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_put_pix_rgb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned char arg4 ; unsigned char arg5 ; unsigned char arg6 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned char val4 ; int ecode4 = 0 ; unsigned char val5 ; int ecode5 = 0 ; unsigned char val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_put_pix_rgb",6,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_put_pix_rgb" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_put_pix_rgb" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_put_pix_rgb" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_put_pix_rgb" "', argument " "4"" of type '" "unsigned char""'"); } arg4 = static_cast< unsigned char >(val4); ecode5 = SWIG_AsVal_unsigned_SS_char(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "surface_put_pix_rgb" "', argument " "5"" of type '" "unsigned char""'"); } arg5 = static_cast< unsigned char >(val5); ecode6 = SWIG_AsVal_unsigned_SS_char(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "surface_put_pix_rgb" "', argument " "6"" of type '" "unsigned char""'"); } arg6 = static_cast< unsigned char >(val6); (arg1)->put_pix_rgb(arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_get_pix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"surface_get_pix",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_get_pix" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_get_pix" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_get_pix" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (unsigned int)((surface const *)arg1)->get_pix(arg2,arg3); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_get_pix_rgb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned char arg4 ; unsigned char arg5 ; unsigned char arg6 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned char val4 ; int ecode4 = 0 ; unsigned char val5 ; int ecode5 = 0 ; unsigned char val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_get_pix_rgb",6,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_get_pix_rgb" "', argument " "1"" of type '" "surface const *""'"); } arg1 = reinterpret_cast< surface * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "surface_get_pix_rgb" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "surface_get_pix_rgb" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "surface_get_pix_rgb" "', argument " "4"" of type '" "unsigned char""'"); } arg4 = static_cast< unsigned char >(val4); ecode5 = SWIG_AsVal_unsigned_SS_char(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "surface_get_pix_rgb" "', argument " "5"" of type '" "unsigned char""'"); } arg5 = static_cast< unsigned char >(val5); ecode6 = SWIG_AsVal_unsigned_SS_char(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "surface_get_pix_rgb" "', argument " "6"" of type '" "unsigned char""'"); } arg6 = static_cast< unsigned char >(val6); ((surface const *)arg1)->get_pix_rgb(arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_surface_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; surface *arg1 = (surface *) 0 ; surface *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"surface_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "surface_copy" "', argument " "1"" of type '" "surface *""'"); } arg1 = reinterpret_cast< surface * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "surface_copy" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "surface_copy" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); (arg1)->copy((surface const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *surface_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_surface, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_screen_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"screen_cleanup",0,0)) SWIG_fail; screen::cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_get_renderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SDL_Renderer *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"screen_get_renderer",0,0)) SWIG_fail; result = (SDL_Renderer *)screen::get_renderer(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SDL_Renderer, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"screen_format",0,0)) SWIG_fail; result = (unsigned int)screen::format(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN int Swig_var_screen_display_set(PyObject *_val) { { void *argp = 0; int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res)) { SWIG_exception_fail(SWIG_ArgError(res), "in variable '""screen::display""' of type '""surface""'"); } if (!argp) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""screen::display""' of type '""surface""'"); } else { surface * temp; temp = reinterpret_cast< surface * >(argp); screen::display = *temp; if (SWIG_IsNewObj(res)) delete temp; } } return 0; fail: return 1; } SWIGINTERN PyObject *Swig_var_screen_display_get(void) { PyObject *pyobj = 0; pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&screen::display), SWIGTYPE_p_surface, 0 ); return pyobj; } SWIGINTERN PyObject *_wrap_screen_display_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) { return Swig_var_screen_display_get(); } SWIGINTERN PyObject *_wrap_screen_display_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { int res; PyObject *value; if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL; res = Swig_var_screen_display_set(value); return !res ? SWIG_Py_Void() : NULL; } SWIGINTERN PyObject *_wrap_screen_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short arg1 ; unsigned short arg2 ; unsigned char arg3 ; config *arg4 = 0 ; unsigned short val1 ; int ecode1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"screen_init",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "screen_init" "', argument " "1"" of type '" "unsigned short""'"); } arg1 = static_cast< unsigned short >(val1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "screen_init" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "screen_init" "', argument " "3"" of type '" "unsigned char""'"); } arg3 = static_cast< unsigned char >(val3); res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_config, 0 | 0); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "screen_init" "', argument " "4"" of type '" "config const &""'"); } if (!argp4) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "screen_init" "', argument " "4"" of type '" "config const &""'"); } arg4 = reinterpret_cast< config * >(argp4); result = (bool)screen::init(arg1,arg2,arg3,(config const &)*arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"screen_length",0,0)) SWIG_fail; result = (unsigned short)screen::length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"screen_height",0,0)) SWIG_fail; result = (unsigned short)screen::height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_bytes_per_pixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"screen_bytes_per_pixel",0,0)) SWIG_fail; result = (unsigned char)screen::bytes_per_pixel(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_trans_col(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"screen_trans_col",0,0)) SWIG_fail; result = (unsigned int)screen::trans_col(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"screen_scale",0,0)) SWIG_fail; result = (unsigned char)screen::scale(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_offset_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"screen_offset_x",0,0)) SWIG_fail; result = (unsigned short)screen::offset_x(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_offset_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"screen_offset_y",0,0)) SWIG_fail; result = (unsigned short)screen::offset_y(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"screen_clear",0,0)) SWIG_fail; screen::clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_show(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"screen_show",0,0)) SWIG_fail; screen::show(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_mode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"screen_mode",0,0)) SWIG_fail; result = (unsigned char)screen::mode(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_set_fullscreen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char *arg1 = 0 ; unsigned char temp1 ; unsigned char val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"screen_set_fullscreen",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "screen_set_fullscreen" "', argument " "1"" of type '" "unsigned char""'"); } temp1 = static_cast< unsigned char >(val1); arg1 = &temp1; result = (bool)screen::set_fullscreen((unsigned char const &)*arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"screen_info",0,0)) SWIG_fail; result = screen::info(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_screen_transition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned short arg1 ; unsigned short val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"screen_transition",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "screen_transition" "', argument " "1"" of type '" "unsigned short""'"); } arg1 = static_cast< unsigned short >(val1); screen::transition(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; screen *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_screen",0,0)) SWIG_fail; result = (screen *)new screen(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_screen, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; screen *arg1 = (screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_screen",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_screen, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_screen" "', argument " "1"" of type '" "screen *""'"); } arg1 = reinterpret_cast< screen * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *screen_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_screen, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_image",0,0)) SWIG_fail; result = (image *)new image(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_image, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_image",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_image" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_resize" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "image_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "image_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_clear" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_get" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_load" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_load" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_get_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_get_raw",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_get_raw" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_get_raw" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_get_raw" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_raw(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_load_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_load_raw",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_load_raw" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_load_raw" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load_raw(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_get_pnm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; SDL_RWops *arg2 = (SDL_RWops *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_get_pnm",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_get_pnm" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SDL_RWops, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_get_pnm" "', argument " "2"" of type '" "SDL_RWops *""'"); } arg2 = reinterpret_cast< SDL_RWops * >(argp2); result = (signed char)(arg1)->get_pnm(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_load_pnm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_load_pnm",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_load_pnm" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_load_pnm" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load_pnm(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_put" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((image const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_save",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_save" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((image const *)arg1)->save(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_put_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_put_raw",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_put_raw" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_put_raw" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_put_raw" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((image const *)arg1)->put_raw(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_save_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_save_raw",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_save_raw" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_save_raw" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((image const *)arg1)->save_raw(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_put_pnm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; SDL_RWops *arg2 = (SDL_RWops *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_put_pnm",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_put_pnm" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SDL_RWops, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_put_pnm" "', argument " "2"" of type '" "SDL_RWops *""'"); } arg2 = reinterpret_cast< SDL_RWops * >(argp2); result = (signed char)((image const *)arg1)->put_pnm(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_save_pnm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"image_save_pnm",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_save_pnm" "', argument " "1"" of type '" "image const *""'"); } arg1 = reinterpret_cast< image * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "image_save_pnm" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((image const *)arg1)->save_pnm(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_zoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; surface *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_zoom",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_zoom" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_zoom" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_zoom" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); (arg1)->zoom((surface const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_zoom_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; surface *arg2 = 0 ; unsigned short arg3 ; unsigned short arg4 ; unsigned short arg5 = (unsigned short) 0 ; unsigned short arg6 = (unsigned short) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; unsigned short val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_zoom_to",4,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_zoom_to" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_zoom_to" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_zoom_to" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "image_zoom_to" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "image_zoom_to" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); if (obj4) { ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "image_zoom_to" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); } if (obj5) { ecode6 = SWIG_AsVal_unsigned_SS_short(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "image_zoom_to" "', argument " "6"" of type '" "unsigned short""'"); } arg6 = static_cast< unsigned short >(val6); } (arg1)->zoom_to((surface const &)*arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_tile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; surface *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_tile",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_tile" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_tile" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_tile" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); (arg1)->tile((surface const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_tile_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; surface *arg2 = 0 ; unsigned short arg3 ; unsigned short arg4 ; unsigned short arg5 = (unsigned short) 0 ; unsigned short arg6 = (unsigned short) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; unsigned short val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_tile_to",4,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_tile_to" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_tile_to" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_tile_to" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "image_tile_to" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "image_tile_to" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); if (obj4) { ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "image_tile_to" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); } if (obj5) { ecode6 = SWIG_AsVal_unsigned_SS_short(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "image_tile_to" "', argument " "6"" of type '" "unsigned short""'"); } arg6 = static_cast< unsigned short >(val6); } (arg1)->tile_to((surface const &)*arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; surface *arg2 = 0 ; unsigned char arg3 ; bool arg4 = (bool) false ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; bool val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_brightness",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_brightness" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_surface, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_brightness" "', argument " "2"" of type '" "surface const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_brightness" "', argument " "2"" of type '" "surface const &""'"); } arg2 = reinterpret_cast< surface * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "image_brightness" "', argument " "3"" of type '" "unsigned char""'"); } arg3 = static_cast< unsigned char >(val3); if (obj3) { ecode4 = SWIG_AsVal_bool(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "image_brightness" "', argument " "4"" of type '" "bool""'"); } arg4 = static_cast< bool >(val4); } (arg1)->brightness((surface const &)*arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_image_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; image *arg1 = (image *) 0 ; image *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"image_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "image_copy" "', argument " "1"" of type '" "image *""'"); } arg1 = reinterpret_cast< image * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_image, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "image_copy" "', argument " "2"" of type '" "image const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "image_copy" "', argument " "2"" of type '" "image const &""'"); } arg2 = reinterpret_cast< image * >(argp2); (arg1)->copy((image const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *image_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_image, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_animationframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_animationframe",0,0)) SWIG_fail; result = (animationframe *)new animationframe(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_animationframe, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_animationframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_animationframe",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_animationframe" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_clear" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_is_masked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_is_masked",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_is_masked" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (bool)((animationframe const *)arg1)->is_masked(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_mask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_mask",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_mask" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_mask" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_mask(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_alpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_alpha",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_alpha" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned char)((animationframe const *)arg1)->alpha(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_alpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_alpha",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_alpha" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_alpha" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_alpha(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_image_nbr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_image_nbr",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_image_nbr" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned short)((animationframe const *)arg1)->image_nbr(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_image_nbr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_image_nbr",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_image_nbr" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_image_nbr" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_image_nbr(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_delay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_delay",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_delay" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned short)((animationframe const *)arg1)->delay(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_delay(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_delay",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_delay" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_delay" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_delay(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_nextframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_nextframe",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_nextframe" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned short)((animationframe const *)arg1)->nextframe(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_nextframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_nextframe",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_nextframe" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_nextframe" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_nextframe(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_offx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_offx",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_offx" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned short)((animationframe const *)arg1)->offx(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_offy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_offy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_offy" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); result = (unsigned short)((animationframe const *)arg1)->offy(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_set_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animationframe_set_offset",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_set_offset" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animationframe_set_offset" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animationframe_set_offset" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->set_offset(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_get" "', argument " "1"" of type '" "animationframe *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animationframe_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animationframe_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animationframe_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animationframe *arg1 = (animationframe *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animationframe_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animationframe, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animationframe_put" "', argument " "1"" of type '" "animationframe const *""'"); } arg1 = reinterpret_cast< animationframe * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animationframe_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animationframe_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((animationframe const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *animationframe_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_animationframe, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *PLAY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "PLAY",SWIG_From_bool(static_cast< bool >(PLAY))); return SWIG_Py_Void(); } SWIGINTERN PyObject *STOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "STOP",SWIG_From_bool(static_cast< bool >(STOP))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_animation",0,0)) SWIG_fail; result = (animation *)new animation(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_animation, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_animation",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_animation" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_clear" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_play(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_play",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_play" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); (arg1)->play(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_stop",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_stop" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); (arg1)->stop(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_playstate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; play_state result; if(!PyArg_UnpackTuple(args,(char *)"animation_playstate",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_playstate" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (play_state)((animation const *)arg1)->playstate(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_rewind(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_rewind",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_rewind" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); (arg1)->rewind(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_next_frame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_next_frame",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_next_frame" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); (arg1)->next_frame(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"animation_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_update" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_draw" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animation_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "animation_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "animation_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((animation const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_get" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animation_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animation_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_load" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "animation_load" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_put" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animation_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animation_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((animation const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_save",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_save" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "animation_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((animation const *)arg1)->save(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_nbr_of_frames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animation_nbr_of_frames",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_nbr_of_frames" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (unsigned short)((animation const *)arg1)->nbr_of_frames(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_nbr_of_images(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animation_nbr_of_images",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_nbr_of_images" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (unsigned short)((animation const *)arg1)->nbr_of_images(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_currentframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"animation_currentframe",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_currentframe" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (unsigned short)((animation const *)arg1)->currentframe(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_set_currentframe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_set_currentframe",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_set_currentframe" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_set_currentframe" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_currentframe(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_xoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"animation_xoffset",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_xoffset" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (short)((animation const *)arg1)->xoffset(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_yoffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"animation_yoffset",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_yoffset" "', argument " "1"" of type '" "animation const *""'"); } arg1 = reinterpret_cast< animation * >(argp1); result = (short)((animation const *)arg1)->yoffset(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_set_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; short arg2 ; short arg3 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_set_offset",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_set_offset" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_set_offset" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animation_set_offset" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); (arg1)->set_offset(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_get_frame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; animationframe *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_get_frame",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_get_frame" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_get_frame" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (animationframe *)(arg1)->get_frame(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_animationframe, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_get_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; image *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_get_image",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_get_image" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_get_image" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (image *)(arg1)->get_image(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_image, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_insert_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; image *arg2 = (image *) 0 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_insert_image",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_insert_image" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_image, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animation_insert_image" "', argument " "2"" of type '" "image const *""'"); } arg2 = reinterpret_cast< image * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animation_insert_image" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (signed char)(arg1)->insert_image((image const *)arg2,arg3); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_insert_frame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; animationframe arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_insert_frame",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_insert_frame" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_animationframe, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animation_insert_frame" "', argument " "2"" of type '" "animationframe const""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animation_insert_frame" "', argument " "2"" of type '" "animationframe const""'"); } else { animationframe * temp = reinterpret_cast< animationframe * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } } ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animation_insert_frame" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (signed char)(arg1)->insert_frame(arg2,arg3); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_delete_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_delete_image",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_delete_image" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_delete_image" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->delete_image(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_delete_frame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"animation_delete_frame",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_delete_frame" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_delete_frame" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->delete_frame(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_zoom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; unsigned short arg2 ; unsigned short arg3 ; animation *arg4 = (animation *) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_zoom",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_zoom" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "animation_zoom" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "animation_zoom" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "animation_zoom" "', argument " "4"" of type '" "animation const *""'"); } arg4 = reinterpret_cast< animation * >(argp4); (arg1)->zoom(arg2,arg3,(animation const *)arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_animation_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; animation *arg1 = (animation *) 0 ; animation *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"animation_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "animation_copy" "', argument " "1"" of type '" "animation *""'"); } arg1 = reinterpret_cast< animation * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_animation, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "animation_copy" "', argument " "2"" of type '" "animation const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "animation_copy" "', argument " "2"" of type '" "animation const &""'"); } arg2 = reinterpret_cast< animation * >(argp2); (arg1)->copy((animation const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *animation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_animation, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN int Swig_var_MAPSQUARE_SIZE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable MAPSQUARE_SIZE is read-only."); return 1; } SWIGINTERN PyObject *Swig_var_MAPSQUARE_SIZE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(MAPSQUARE_SIZE)); return pyobj; } SWIGINTERN PyObject *ALL_WALKABLE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "ALL_WALKABLE",SWIG_From_int(static_cast< int >(15))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALKABLE_SOUTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALKABLE_SOUTH",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALKABLE_NORTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALKABLE_NORTH",SWIG_From_int(static_cast< int >(2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALKABLE_EAST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALKABLE_EAST",SWIG_From_int(static_cast< int >(4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALKABLE_WEST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALKABLE_WEST",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NONE_WALKABLE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NONE_WALKABLE",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapsquare_walkable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapsquare_walkable",0,0)) SWIG_fail; result = (mapsquare_walkable *)new mapsquare_walkable(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_walkable, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_get" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_walkable_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapsquare_walkable_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_put" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_walkable_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapsquare_walkable_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((mapsquare_walkable const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_is_walkable_west(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_is_walkable_west",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_is_walkable_west" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); result = (bool)((mapsquare_walkable const *)arg1)->is_walkable_west(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_is_walkable_east(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_is_walkable_east",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_is_walkable_east" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); result = (bool)((mapsquare_walkable const *)arg1)->is_walkable_east(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_is_walkable_north(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_is_walkable_north",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_is_walkable_north" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); result = (bool)((mapsquare_walkable const *)arg1)->is_walkable_north(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_is_walkable_south(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_is_walkable_south",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_is_walkable_south" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); result = (bool)((mapsquare_walkable const *)arg1)->is_walkable_south(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_set_walkable_west(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_set_walkable_west",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_set_walkable_west" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_set_walkable_west" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_walkable_west(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_set_walkable_east(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_set_walkable_east",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_set_walkable_east" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_set_walkable_east" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_walkable_east(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_set_walkable_north(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_set_walkable_north",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_set_walkable_north" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_set_walkable_north" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_walkable_north(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_set_walkable_south(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_set_walkable_south",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_set_walkable_south" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_set_walkable_south" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_walkable_south(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_get_walkable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_get_walkable",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_get_walkable" "', argument " "1"" of type '" "mapsquare_walkable const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); result = (unsigned char)((mapsquare_walkable const *)arg1)->get_walkable(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_set_walkable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_set_walkable",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_set_walkable" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_set_walkable" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_walkable(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapsquare_walkable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable *arg1 = (mapsquare_walkable *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare_walkable",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare_walkable" "', argument " "1"" of type '" "mapsquare_walkable *""'"); } arg1 = reinterpret_cast< mapsquare_walkable * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_walkable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare_walkable, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_mapsquare_walkable_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare_walkable_area",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare_walkable_area" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_clear" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_draw" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_area_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_walkable_area_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapsquare_walkable_area_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapsquare_walkable_area_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapsquare_walkable_area const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_area_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_area_length",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_area_length" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); result = (unsigned short)((mapsquare_walkable_area const *)arg1)->area_length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_area_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_area_height",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_area_height" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); result = (unsigned short)((mapsquare_walkable_area const *)arg1)->area_height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_get_square(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; mapsquare_walkable *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_get_square",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_get_square" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_area_get_square" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_walkable_area_get_square" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (mapsquare_walkable *)((mapsquare_walkable_area const *)arg1)->get_square(arg2,arg3); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_walkable, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_resize_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_resize_area",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_resize_area" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_area_resize_area" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_walkable_area_resize_area" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize_area(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_base_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_base_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_base_x" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); result = (unsigned short)((mapsquare_walkable_area const *)arg1)->base_x(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_base_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_base_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_base_y" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); result = (unsigned short)((mapsquare_walkable_area const *)arg1)->base_y(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_set_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_set_base",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_set_base" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_walkable_area_set_base" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_walkable_area_set_base" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->set_base(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_get" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_walkable_area_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapsquare_walkable_area_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_put" "', argument " "1"" of type '" "mapsquare_walkable_area const *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_walkable_area_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapsquare_walkable_area_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((mapsquare_walkable_area const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_walkable_area_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_walkable_area *arg1 = (mapsquare_walkable_area *) 0 ; mapsquare_walkable_area *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_walkable_area_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_walkable_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_walkable_area_copy" "', argument " "1"" of type '" "mapsquare_walkable_area *""'"); } arg1 = reinterpret_cast< mapsquare_walkable_area * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_mapsquare_walkable_area, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_walkable_area_copy" "', argument " "2"" of type '" "mapsquare_walkable_area const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapsquare_walkable_area_copy" "', argument " "2"" of type '" "mapsquare_walkable_area const &""'"); } arg2 = reinterpret_cast< mapsquare_walkable_area * >(argp2); (arg1)->copy((mapsquare_walkable_area const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_walkable_area_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare_walkable_area, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapsquare_tile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_tile *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapsquare_tile",0,0)) SWIG_fail; result = (mapsquare_tile *)new mapsquare_tile(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_tile, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapsquare_tile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_tile *arg1 = (mapsquare_tile *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare_tile",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_tile, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare_tile" "', argument " "1"" of type '" "mapsquare_tile *""'"); } arg1 = reinterpret_cast< mapsquare_tile * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_tile_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare_tile, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapsquare_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapsquare_char",0,0)) SWIG_fail; result = (mapsquare_char *)new mapsquare_char(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_char, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapsquare_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_char *arg1 = (mapsquare_char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare_char",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_char, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare_char" "', argument " "1"" of type '" "mapsquare_char *""'"); } arg1 = reinterpret_cast< mapsquare_char * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_char_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare_char, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapsquare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapsquare",0,0)) SWIG_fail; result = (mapsquare *)new mapsquare(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapsquare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_x" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (unsigned short)(arg1)->x(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_y" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (unsigned short)(arg1)->y(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_is_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_is_free",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_is_free" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (bool)(arg1)->is_free(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_whoshere(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; mapcharacter *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_whoshere",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_whoshere" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (mapcharacter *)(arg1)->whoshere(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapcharacter, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_g_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_g_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_g_set" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_g_set" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); if (arg1) (arg1)->g = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_g_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_g_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_g_get" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (unsigned short) ((arg1)->g); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_h_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_h_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_h_set" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_h_set" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); if (arg1) (arg1)->h = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_h_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_h_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_h_get" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (unsigned short) ((arg1)->h); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_f_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_f_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_f_set" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_f_set" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); if (arg1) (arg1)->f = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_f_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_f_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_f_get" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (unsigned short) ((arg1)->f); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_parent_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; mapsquare *arg2 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_parent_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_parent_set" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_mapsquare, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapsquare_parent_set" "', argument " "2"" of type '" "mapsquare *""'"); } arg2 = reinterpret_cast< mapsquare * >(argp2); if (arg1) (arg1)->parent = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_parent_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; mapsquare *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_parent_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_parent_get" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (mapsquare *) ((arg1)->parent); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_can_use_for_pathfinding_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_can_use_for_pathfinding_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_can_use_for_pathfinding_set" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_can_use_for_pathfinding_set" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); if (arg1) (arg1)->can_use_for_pathfinding = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_can_use_for_pathfinding_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare *arg1 = (mapsquare *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_can_use_for_pathfinding_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_can_use_for_pathfinding_get" "', argument " "1"" of type '" "mapsquare *""'"); } arg1 = reinterpret_cast< mapsquare * >(argp1); result = (bool) ((arg1)->can_use_for_pathfinding); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapsquare_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapsquare_area",0,0)) SWIG_fail; result = (mapsquare_area *)new mapsquare_area(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_area, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapsquare_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapsquare_area",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapsquare_area" "', argument " "1"" of type '" "mapsquare_area *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_area_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_area_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_area_clear" "', argument " "1"" of type '" "mapsquare_area *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_area_area_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_area_area_length",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_area_area_length" "', argument " "1"" of type '" "mapsquare_area const *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); result = (unsigned short)((mapsquare_area const *)arg1)->area_length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_area_area_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_area_area_height",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_area_area_height" "', argument " "1"" of type '" "mapsquare_area const *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); result = (unsigned short)((mapsquare_area const *)arg1)->area_height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_area_get_square(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; mapsquare *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_area_get_square",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_area_get_square" "', argument " "1"" of type '" "mapsquare_area const *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_area_get_square" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_area_get_square" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (mapsquare *)((mapsquare_area const *)arg1)->get_square(arg2,arg3); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapsquare_area_resize_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapsquare_area *arg1 = (mapsquare_area *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapsquare_area_resize_area",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapsquare_area, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapsquare_area_resize_area" "', argument " "1"" of type '" "mapsquare_area *""'"); } arg1 = reinterpret_cast< mapsquare_area * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapsquare_area_resize_area" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapsquare_area_resize_area" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize_area(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapsquare_area_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapsquare_area, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *MAPOBJECTS_DIR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "MAPOBJECTS_DIR",SWIG_FromCharPtr("gfx/mapobjects/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapobject",0,0)) SWIG_fail; result = (mapobject *)new mapobject(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapobject, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapobject",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapobject" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapobject_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_clear" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_update" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapobject_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_draw" "', argument " "1"" of type '" "mapobject const *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapobject_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapobject_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapobject_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapobject_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapobject const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_draw_from_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapobject_draw_from_base",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_draw_from_base" "', argument " "1"" of type '" "mapobject const *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapobject_draw_from_base" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapobject_draw_from_base" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapobject_draw_from_base" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapobject_draw_from_base" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapobject const *)arg1)->draw_from_base(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_get" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapobject_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapobject_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_load" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapobject_load" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_put" "', argument " "1"" of type '" "mapobject const *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapobject_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapobject_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((mapobject const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_save",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_save" "', argument " "1"" of type '" "mapobject const *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapobject_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((mapobject const *)arg1)->save(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_nbr_of_animations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_nbr_of_animations",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_nbr_of_animations" "', argument " "1"" of type '" "mapobject const *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); result = (unsigned short)((mapobject const *)arg1)->nbr_of_animations(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_get_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; animation *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapobject_get_animation",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_get_animation" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapobject_get_animation" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (animation *)(arg1)->get_animation(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_animation, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_insert_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; animation *arg2 = (animation *) 0 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_insert_animation",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_insert_animation" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_animation, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapobject_insert_animation" "', argument " "2"" of type '" "animation *""'"); } arg2 = reinterpret_cast< animation * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapobject_insert_animation" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); result = (signed char)(arg1)->insert_animation(arg2,arg3); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_delete_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapobject_delete_animation",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_delete_animation" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapobject_delete_animation" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->delete_animation(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapobject_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapobject *arg1 = (mapobject *) 0 ; mapobject *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapobject_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapobject_copy" "', argument " "1"" of type '" "mapobject *""'"); } arg1 = reinterpret_cast< mapobject * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_mapobject, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapobject_copy" "', argument " "2"" of type '" "mapobject const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapobject_copy" "', argument " "2"" of type '" "mapobject const &""'"); } arg2 = reinterpret_cast< mapobject * >(argp2); (arg1)->copy((mapobject const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapobject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapobject, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *MAPCHAR_DIR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "MAPCHAR_DIR",SWIG_FromCharPtr("gfx/mapcharacters/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *STAND_NORTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "STAND_NORTH",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *STAND_SOUTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "STAND_SOUTH",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *STAND_WEST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "STAND_WEST",SWIG_From_int(static_cast< int >(2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *STAND_EAST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "STAND_EAST",SWIG_From_int(static_cast< int >(3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALK_NORTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALK_NORTH",SWIG_From_int(static_cast< int >(4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALK_SOUTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALK_SOUTH",SWIG_From_int(static_cast< int >(5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALK_WEST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALK_WEST",SWIG_From_int(static_cast< int >(6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WALK_EAST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WALK_EAST",SWIG_From_int(static_cast< int >(7))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NBR_MOVES_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NBR_MOVES",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *NO_MOVE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "NO_MOVE",SWIG_From_int(static_cast< int >(65535))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapcharacter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapcharacter",0,0)) SWIG_fail; result = (mapcharacter *)new mapcharacter(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapcharacter, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapcharacter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapcharacter",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapcharacter" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_clear" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_filename",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_filename" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = ((mapcharacter const *)arg1)->filename(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_update" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_draw" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapcharacter_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapcharacter_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapcharacter_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapcharacter const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_draw_bubble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_draw_bubble",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_draw_bubble" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_draw_bubble" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapcharacter_draw_bubble" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapcharacter_draw_bubble" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapcharacter_draw_bubble" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapcharacter const *)arg1)->draw_bubble(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_get" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_load" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_load" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_put" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((mapcharacter const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_save",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_save" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)((mapcharacter const *)arg1)->save(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_get_state" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_put_state" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((mapcharacter const *)arg1)->put_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; landmap *arg2 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_map",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_map" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_set_map" "', argument " "2"" of type '" "landmap *""'"); } arg2 = reinterpret_cast< landmap * >(argp2); (arg1)->set_map(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_remove_from_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_remove_from_map",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_remove_from_map" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->remove_from_map(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_mymap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; landmap *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_mymap",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_mymap" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (landmap *)((mapcharacter const *)arg1)->mymap(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_landmap, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stand_north(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stand_north",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stand_north" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stand_north(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stand_south(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stand_south",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stand_south" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stand_south(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stand_east(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stand_east",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stand_east" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stand_east(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stand_west(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stand_west",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stand_west" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stand_west(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stand",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stand" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stand(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_go_north(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_go_north",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_go_north" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->go_north(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_go_south(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_go_south",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_go_south" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->go_south(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_go_east(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_go_east",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_go_east" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->go_east(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_go_west(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_go_west",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_go_west" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->go_west(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_can_go_north(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_can_go_north",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_can_go_north" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->can_go_north(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_can_go_south(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_can_go_south",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_can_go_south" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->can_go_south(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_can_go_east(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_can_go_east",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_can_go_east" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->can_go_east(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_can_go_west(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_can_go_west",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_can_go_west" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->can_go_west(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_look_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_look_invert",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_look_invert" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_look_invert" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->look_invert(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_whosnext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; mapcharacter *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_whosnext",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_whosnext" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (mapcharacter *)((mapcharacter const *)arg1)->whosnext(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapcharacter, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_speak(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_speak",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_speak" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_speak" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_speak" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->speak((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_is_speaking(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_is_speaking",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_is_speaking" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->is_speaking(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_get_bubble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; text_bubble *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_get_bubble",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_get_bubble" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (text_bubble *)(arg1)->get_bubble(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_text_bubble, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; signed char arg2 ; signed char arg3 ; void *argp1 = 0 ; int res1 = 0 ; signed char val2 ; int ecode2 = 0 ; signed char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_offset",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_offset" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_signed_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_set_offset" "', argument " "2"" of type '" "signed char""'"); } arg2 = static_cast< signed char >(val2); ecode3 = SWIG_AsVal_signed_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapcharacter_set_offset" "', argument " "3"" of type '" "signed char""'"); } arg3 = static_cast< signed char >(val3); (arg1)->set_offset(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_remove_from_pos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_remove_from_pos",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_remove_from_pos" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->remove_from_pos(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_jump_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 ; unsigned short arg5 = (unsigned short) 65535 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_jump_to",4,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_jump_to" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_jump_to" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapcharacter_jump_to" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mapcharacter_jump_to" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); if (obj4) { ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "mapcharacter_jump_to" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); } (arg1)->jump_to(arg2,arg3,arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_submap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_submap",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_submap" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (unsigned short)((mapcharacter const *)arg1)->submap(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_posx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_posx",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_posx" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (unsigned short)((mapcharacter const *)arg1)->posx(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_posy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_posy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_posy" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (unsigned short)((mapcharacter const *)arg1)->posy(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_offx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_offx",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_offx" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (signed char)((mapcharacter const *)arg1)->offx(); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_offy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_offy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_offy" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (signed char)((mapcharacter const *)arg1)->offy(); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_currentmove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_currentmove",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_currentmove" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (unsigned short)((mapcharacter const *)arg1)->currentmove(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_goal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 = (unsigned short) 65535 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_goal",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_goal" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_set_goal" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapcharacter_set_goal" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); if (obj3) { ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mapcharacter_set_goal" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); } result = (bool)(arg1)->set_goal(arg2,arg3,arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; PyObject *arg2 = (PyObject *) 0 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_callback",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_callback" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { arg2 = obj1; } if (obj2) { { arg3 = obj2; } } (arg1)->set_callback(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_follow_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_follow_path",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_follow_path" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->follow_path(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_goal_reached(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_goal_reached",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_goal_reached" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)(arg1)->goal_reached(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_stop_moving(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_stop_moving",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_stop_moving" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); (arg1)->stop_moving(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_time_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) 0 ; PyObject *arg4 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_time_callback",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_time_callback" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_time_callback" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { arg3 = obj2; } if (obj3) { { arg4 = obj3; } } (arg1)->time_callback(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_time_callback_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; string arg3 ; PyObject *arg4 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_time_callback_string",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_time_callback_string" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_time_callback_string" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_time_callback_string" "', argument " "3"" of type '" "string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj3) { { arg4 = obj3; } } (arg1)->time_callback_string(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_schedule",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_schedule" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_set_schedule" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } (arg1)->set_schedule(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_schedule_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_schedule_file",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_schedule_file" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = ((mapcharacter const *)arg1)->schedule_file(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_is_schedule_activated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_is_schedule_activated",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_is_schedule_activated" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->is_schedule_activated(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_schedule_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_schedule_active",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_schedule_active" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_set_schedule_active" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_schedule_active(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_do_stuff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_do_stuff",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_do_stuff" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_do_stuff" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } result = (bool)(arg1)->do_stuff(arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_action",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_action" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapcharacter_set_action" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } (arg1)->set_action(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_action_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_action_file",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_action_file" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = ((mapcharacter const *)arg1)->action_file(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_is_action_activated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_is_action_activated",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_is_action_activated" "', argument " "1"" of type '" "mapcharacter const *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); result = (bool)((mapcharacter const *)arg1)->is_action_activated(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_set_action_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_set_action_active",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_set_action_active" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_set_action_active" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_action_active(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_launch_action(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; mapcharacter *arg2 = (mapcharacter *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_launch_action",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_launch_action" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_launch_action" "', argument " "2"" of type '" "mapcharacter *""'"); } arg2 = reinterpret_cast< mapcharacter * >(argp2); (arg1)->launch_action(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_get_animation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; animation *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_get_animation",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_get_animation" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapcharacter_get_animation" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (animation *)(arg1)->get_animation(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_animation, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapcharacter_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapcharacter *arg1 = (mapcharacter *) 0 ; mapcharacter *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapcharacter_copy",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapcharacter, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapcharacter_copy" "', argument " "1"" of type '" "mapcharacter *""'"); } arg1 = reinterpret_cast< mapcharacter * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_mapcharacter, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapcharacter_copy" "', argument " "2"" of type '" "mapcharacter const &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapcharacter_copy" "', argument " "2"" of type '" "mapcharacter const &""'"); } arg2 = reinterpret_cast< mapcharacter * >(argp2); (arg1)->copy((mapcharacter const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapcharacter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapcharacter, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_path_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"path_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_clear" "', argument " "1"" of type '" "path *""'"); } arg1 = reinterpret_cast< path * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_path_calculate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"path_calculate",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_calculate" "', argument " "1"" of type '" "path *""'"); } arg1 = reinterpret_cast< path * >(argp1); result = (bool)(arg1)->calculate(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_path_nbr_moves(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"path_nbr_moves",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_nbr_moves" "', argument " "1"" of type '" "path const *""'"); } arg1 = reinterpret_cast< path * >(argp1); result = (unsigned short)((path const *)arg1)->nbr_moves(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_path_get_move(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"path_get_move",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_get_move" "', argument " "1"" of type '" "path const *""'"); } arg1 = reinterpret_cast< path * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "path_get_move" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (unsigned short)((path const *)arg1)->get_move(arg2); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_path_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"path_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_get_state" "', argument " "1"" of type '" "path *""'"); } arg1 = reinterpret_cast< path * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "path_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "path_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_path_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"path_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "path_put_state" "', argument " "1"" of type '" "path const *""'"); } arg1 = reinterpret_cast< path * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "path_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "path_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((path const *)arg1)->put_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_path",0,0)) SWIG_fail; result = (path *)new path(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_path, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; path *arg1 = (path *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_path",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_path, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_path" "', argument " "1"" of type '" "path *""'"); } arg1 = reinterpret_cast< path * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *path_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_path, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_character",0,0)) SWIG_fail; result = (character *)new character(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_character, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character *arg1 = (character *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_character",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_character" "', argument " "1"" of type '" "character *""'"); } arg1 = reinterpret_cast< character * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *character_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_character, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *MAPS_DIR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "MAPS_DIR",SWIG_FromCharPtr("maps/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_landmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_landmap",0,0)) SWIG_fail; result = (landmap *)new landmap(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_landmap, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_landmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_landmap",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_landmap" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_clear",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_clear" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_nbr_of_mapobjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"landmap_nbr_of_mapobjects",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_nbr_of_mapobjects" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); result = (unsigned short)((landmap const *)arg1)->nbr_of_mapobjects(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_nbr_of_submaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"landmap_nbr_of_submaps",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_nbr_of_submaps" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); result = (unsigned short)((landmap const *)arg1)->nbr_of_submaps(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_nbr_of_mapcharacters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"landmap_nbr_of_mapcharacters",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_nbr_of_mapcharacters" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); result = (unsigned short)((landmap const *)arg1)->nbr_of_mapcharacters(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"landmap_filename",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_filename" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); result = ((landmap const *)arg1)->filename(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_get_mapcharacter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; mapcharacter *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_get_mapcharacter",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_get_mapcharacter" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_get_mapcharacter" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (mapcharacter *)(arg1)->get_mapcharacter(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapcharacter, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_get_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; mapobject *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_get_mapobject",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_get_mapobject" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_get_mapobject" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (mapobject *)(arg1)->get_mapobject(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapobject, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_get_submap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; mapsquare_area *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_get_submap",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_get_submap" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_get_submap" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (mapsquare_area *)(arg1)->get_submap(arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapsquare_area, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_update" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); (arg1)->update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_get" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "landmap_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "landmap_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_load" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "landmap_load" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->load(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_put" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "landmap_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "landmap_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((landmap const *)arg1)->put(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_save",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_save" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "landmap_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (signed char)(arg1)->save(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_get_state" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "landmap_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "landmap_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_put_state" "', argument " "1"" of type '" "landmap const *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "landmap_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "landmap_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)((landmap const *)arg1)->put_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_put_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 ; unsigned short arg5 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_put_mapobject",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_put_mapobject" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_put_mapobject" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "landmap_put_mapobject" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "landmap_put_mapobject" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "landmap_put_mapobject" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); result = (signed char)(arg1)->put_mapobject(arg2,arg3,arg4,arg5); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_remove_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 ; unsigned short arg5 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; unsigned short val5 ; int ecode5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"landmap_remove_mapobject",5,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_remove_mapobject" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_remove_mapobject" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "landmap_remove_mapobject" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "landmap_remove_mapobject" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); ecode5 = SWIG_AsVal_unsigned_SS_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "landmap_remove_mapobject" "', argument " "5"" of type '" "unsigned short""'"); } arg5 = static_cast< unsigned short >(val5); (arg1)->remove_mapobject(arg2,arg3,arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_insert_submap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_insert_submap",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_insert_submap" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_insert_submap" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->insert_submap(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_delete_submap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_delete_submap",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_delete_submap" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_delete_submap" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->delete_submap(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_insert_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; mapobject *arg2 = (mapobject *) 0 ; unsigned short arg3 ; string arg4 = (string) "" ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_insert_mapobject",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_insert_mapobject" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_mapobject, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "landmap_insert_mapobject" "', argument " "2"" of type '" "mapobject *""'"); } arg2 = reinterpret_cast< mapobject * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "landmap_insert_mapobject" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); if (obj3) { { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj3, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "landmap_insert_mapobject" "', argument " "4"" of type '" "string""'"); } arg4 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } } result = (signed char)(arg1)->insert_mapobject(arg2,arg3,arg4); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_landmap_delete_mapobject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; landmap *arg1 = (landmap *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"landmap_delete_mapobject",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "landmap_delete_mapobject" "', argument " "1"" of type '" "landmap *""'"); } arg1 = reinterpret_cast< landmap * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "landmap_delete_mapobject" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (signed char)(arg1)->delete_mapobject(arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *landmap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_landmap, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_mapview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_mapview",0,0)) SWIG_fail; result = (mapview *)new mapview(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapview, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_mapview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_mapview",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_mapview" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_attach_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; landmap *arg2 = (landmap *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_attach_map",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_attach_map" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_landmap, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapview_attach_map" "', argument " "2"" of type '" "landmap *""'"); } arg2 = reinterpret_cast< landmap * >(argp2); (arg1)->attach_map(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_detach_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_detach_map",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_detach_map" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); (arg1)->detach_map(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_set_pos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 ; short arg5 = (short) 0 ; short arg6 = (short) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; short val5 ; int ecode5 = 0 ; short val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapview_set_pos",4,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_set_pos" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapview_set_pos" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapview_set_pos" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mapview_set_pos" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); if (obj4) { ecode5 = SWIG_AsVal_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "mapview_set_pos" "', argument " "5"" of type '" "short""'"); } arg5 = static_cast< short >(val5); } if (obj5) { ecode6 = SWIG_AsVal_short(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "mapview_set_pos" "', argument " "6"" of type '" "short""'"); } arg6 = static_cast< short >(val6); } result = (signed char)(arg1)->set_pos(arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_center_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; unsigned short arg2 ; unsigned short arg3 ; unsigned short arg4 ; short arg5 = (short) 0 ; short arg6 = (short) 0 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; unsigned short val4 ; int ecode4 = 0 ; short val5 ; int ecode5 = 0 ; short val6 ; int ecode6 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapview_center_on",4,6,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_center_on" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapview_center_on" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapview_center_on" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "mapview_center_on" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); if (obj4) { ecode5 = SWIG_AsVal_short(obj4, &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "mapview_center_on" "', argument " "5"" of type '" "short""'"); } arg5 = static_cast< short >(val5); } if (obj5) { ecode6 = SWIG_AsVal_short(obj5, &val6); if (!SWIG_IsOK(ecode6)) { SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "mapview_center_on" "', argument " "6"" of type '" "short""'"); } arg6 = static_cast< short >(val6); } result = (signed char)(arg1)->center_on(arg2,arg3,arg4,arg5,arg6); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_currentsubmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapview_currentsubmap",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_currentsubmap" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (unsigned short)(arg1)->currentsubmap(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_posx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapview_posx",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_posx" "', argument " "1"" of type '" "mapview const *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (unsigned short)((mapview const *)arg1)->posx(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_posy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapview_posy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_posy" "', argument " "1"" of type '" "mapview const *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (unsigned short)((mapview const *)arg1)->posy(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_offx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapview_offx",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_offx" "', argument " "1"" of type '" "mapview const *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (unsigned short)((mapview const *)arg1)->offx(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_offy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"mapview_offy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_offy" "', argument " "1"" of type '" "mapview const *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (unsigned short)((mapview const *)arg1)->offy(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_can_scroll_right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapview_can_scroll_right",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_can_scroll_right" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (bool)(arg1)->can_scroll_right(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_can_scroll_left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapview_can_scroll_left",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_can_scroll_left" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (bool)(arg1)->can_scroll_left(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_can_scroll_up(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapview_can_scroll_up",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_can_scroll_up" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (bool)(arg1)->can_scroll_up(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_can_scroll_down(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapview_can_scroll_down",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_can_scroll_down" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (bool)(arg1)->can_scroll_down(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_scroll_right(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_scroll_right",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_scroll_right" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); (arg1)->scroll_right(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_scroll_left(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_scroll_left",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_scroll_left" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); (arg1)->scroll_left(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_scroll_down(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_scroll_down",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_scroll_down" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); (arg1)->scroll_down(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_scroll_up(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_scroll_up",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_scroll_up" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); (arg1)->scroll_up(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapview_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_get_state" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapview_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapview_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"mapview_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_put_state" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mapview_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mapview_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)(arg1)->put_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_resize" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapview_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapview_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_set_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_set_schedule",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_set_schedule" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "mapview_set_schedule" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } (arg1)->set_schedule(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_schedule_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"mapview_schedule_file",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_schedule_file" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (arg1)->schedule_file(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"mapview_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_update" "', argument " "1"" of type '" "mapview *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_mapview_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; mapview *arg1 = (mapview *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"mapview_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mapview_draw" "', argument " "1"" of type '" "mapview const *""'"); } arg1 = reinterpret_cast< mapview * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mapview_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "mapview_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "mapview_draw" "', argument " "4"" of type '" "drawing_area const *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "mapview_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } ((mapview const *)arg1)->draw(arg2,arg3,(drawing_area const *)arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *mapview_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_mapview, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_adonthell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_adonthell",0,0)) SWIG_fail; result = (adonthell *)new adonthell(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_adonthell, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_main(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; win_base *arg2 = (win_base *) NULL ; string arg3 = (string) (string)"" ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_main",1,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_main" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); if (obj1) { res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "adonthell_main" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); } if (obj2) { { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "adonthell_main" "', argument " "3"" of type '" "string const""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } } (arg1)->main(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_main_loop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_main_loop",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_main_loop" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->main_loop(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_main_quit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_main_quit",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_main_quit" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->main_quit(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_fade_out(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_fade_out",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_fade_out" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->fade_out(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_fade_in(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_fade_in",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_fade_in" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->fade_in(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_get_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"adonthell_get_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_get_state" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "adonthell_get_state" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "adonthell_get_state" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (signed char)(arg1)->get_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_put_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; signed char result; if(!PyArg_UnpackTuple(args,(char *)"adonthell_put_state",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_put_state" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "adonthell_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "adonthell_put_state" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); result = (signed char)(arg1)->put_state(*arg2); resultobj = SWIG_From_signed_SS_char(static_cast< signed char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_control_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"adonthell_control_active",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_control_active" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); result = (bool)(arg1)->control_active(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_set_control_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_set_control_active",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_set_control_active" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "adonthell_set_control_active" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_control_active(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_get_landmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; landmap *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_get_landmap",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_get_landmap" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); result = (landmap *)(arg1)->get_landmap(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_landmap, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_update_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"adonthell_update_map",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_update_map" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); result = (bool)(arg1)->update_map(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_set_update_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_set_update_map",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_set_update_map" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "adonthell_set_update_map" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_update_map(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_get_mapview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; mapview *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_get_mapview",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_get_mapview" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); result = (mapview *)(arg1)->get_mapview(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_mapview, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; short arg2 ; short arg3 ; drawing_area *arg4 = (drawing_area *) NULL ; surface *arg5 = (surface *) NULL ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; void *argp4 = 0 ; int res4 = 0 ; void *argp5 = 0 ; int res5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_draw",3,5,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_draw" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "adonthell_draw" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "adonthell_draw" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); if (obj3) { res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "adonthell_draw" "', argument " "4"" of type '" "drawing_area *""'"); } arg4 = reinterpret_cast< drawing_area * >(argp4); } if (obj4) { res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_surface, 0 | 0 ); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "adonthell_draw" "', argument " "5"" of type '" "surface *""'"); } arg5 = reinterpret_cast< surface * >(argp5); } (arg1)->draw(arg2,arg3,arg4,arg5); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_set_mapview_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; string arg2 ; PyObject *arg3 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_set_mapview_schedule",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_set_mapview_schedule" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "adonthell_set_mapview_schedule" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } if (obj2) { { arg3 = obj2; } } (arg1)->set_mapview_schedule(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_mapview_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_mapview_start",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_mapview_start" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->mapview_start(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_adonthell_mapview_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"adonthell_mapview_stop",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "adonthell_mapview_stop" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); (arg1)->mapview_stop(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_adonthell(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *arg1 = (adonthell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_adonthell",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_adonthell, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_adonthell" "', argument " "1"" of type '" "adonthell *""'"); } arg1 = reinterpret_cast< adonthell * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *adonthell_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_adonthell, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_NB_TABLE_CHAR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_NB_TABLE_CHAR",SWIG_From_int(static_cast< int >(127))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_TEXT_MAX_LENGTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_TEXT_MAX_LENGTH",SWIG_From_int(static_cast< int >(5000))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_HEIGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_HEIGHT",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_LENGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_LENGHT",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SPACE_LENGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SPACE_LENGHT",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_DIRECTORY",SWIG_FromCharPtr("gfx/window/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_DIRECTORY",SWIG_FromCharPtr("font/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BORDER_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BORDER_DIRECTORY",SWIG_FromCharPtr("border/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BACKGROUND_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BACKGROUND_DIRECTORY",SWIG_FromCharPtr("background/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_DIRECTORY",SWIG_FromCharPtr("scrollbar/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CURSOR_DIRECTORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CURSOR_DIRECTORY",SWIG_FromCharPtr("cursor/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_FILE_IDX_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_FILE_IDX",SWIG_FromCharPtr("font.idx")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_FILE_PIC_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_FILE_PIC",SWIG_FromCharPtr("font.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_FONT_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_FONT_FILE",SWIG_FromCharPtr("font.font")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_V_BORDER_TEMPLATE_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_V_BORDER_TEMPLATE_FILE",SWIG_FromCharPtr("v_border.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_H_BORDER_TEMPLATE_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_H_BORDER_TEMPLATE_FILE",SWIG_FromCharPtr("h_border.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CORNER_TOP_LEFT_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CORNER_TOP_LEFT_FILE",SWIG_FromCharPtr("corner_top_left.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CORNER_TOP_RIGHT_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CORNER_TOP_RIGHT_FILE",SWIG_FromCharPtr("corner_top_right.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CORNER_BOTTOM_LEFT_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CORNER_BOTTOM_LEFT_FILE",SWIG_FromCharPtr("corner_bottom_left.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CORNER_BOTTOM_RIGHT_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CORNER_BOTTOM_RIGHT_FILE",SWIG_FromCharPtr("corner_bottom_right.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BACKGROUND_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BACKGROUND_FILE",SWIG_FromCharPtr("background.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BAR_TOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BAR_TOP",SWIG_FromCharPtr("scroll_bar_top.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BAR_MID_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BAR_MID",SWIG_FromCharPtr("scroll_bar_mid.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BAR_BOT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BAR_BOT",SWIG_FromCharPtr("scroll_bar_bot.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BAR_FLEX_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BAR_FLEX",SWIG_FromCharPtr("scroll_bar_flex.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BACK_TOP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BACK_TOP",SWIG_FromCharPtr("scroll_back_top.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BACK_MID_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BACK_MID",SWIG_FromCharPtr("scroll_back_mid.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_SCROLLBAR_BACK_BOT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_SCROLLBAR_BACK_BOT",SWIG_FromCharPtr("scroll_back_bot.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_CURSOR_FILE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_CURSOR_FILE",SWIG_FromCharPtr("cursor.pnm")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BORDER_NORMAL_SIZE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BORDER_NORMAL_SIZE",SWIG_FromCharPtr("normal/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BORDER_MINI_SIZE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BORDER_MINI_SIZE",SWIG_FromCharPtr("mini/")); return SWIG_Py_Void(); } SWIGINTERN PyObject *WIN_BRIGHTNESS_LEVEL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "WIN_BRIGHTNESS_LEVEL",SWIG_From_int(static_cast< int >(180))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_manager",0,0)) SWIG_fail; result = (win_manager *)new win_manager(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_manager, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_manager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_manager",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_manager" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_add",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_add" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_manager_add" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->add(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_remove",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_remove" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_manager_remove" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->remove(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_update" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); (arg1)->update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_input_update" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); (arg1)->input_update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_draw" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); (arg1)->draw(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_set_focus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_set_focus",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_set_focus" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_manager_set_focus" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->set_focus(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *arg1 = (win_manager *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_manager, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_destroy" "', argument " "1"" of type '" "win_manager *""'"); } arg1 = reinterpret_cast< win_manager * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_get_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_manager *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_get_active",0,0)) SWIG_fail; result = (win_manager *)win_manager::get_active(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_manager, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_init",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_manager_init" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "win_manager_init" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } win_manager::init((std::string const &)*arg1); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_win_manager_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"win_manager_cleanup",0,0)) SWIG_fail; win_manager::cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_add_theme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_add_theme",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_add_theme" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } win_manager::add_theme(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_remove_theme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_manager_remove_theme",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_remove_theme" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)win_manager::remove_theme(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_get_theme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; win_theme *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_get_theme",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_get_theme" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (win_theme *)win_manager::get_theme(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_theme, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_add_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_add_font",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_add_font" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } win_manager::add_font(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_remove_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_manager_remove_font",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_remove_font" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)win_manager::remove_font(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_manager_get_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; win_font *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_manager_get_font",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "win_manager_get_font" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (win_font *)win_manager::get_font(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_font, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_manager_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_manager, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; win_font *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_font",1,1,&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_win_font" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (win_font *)new win_font(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_font, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_delete_win_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_font",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_font" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_font_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_font_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_load" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_font_load" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); (arg1)->load(arg2); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_win_font_in_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_font_in_table",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_in_table" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_font_in_table" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); result = (bool)(arg1)->in_table(arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_font_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_font_height",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_height" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); result = (unsigned short)(arg1)->height(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_font_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_font_length",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_length" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); result = (unsigned short)(arg1)->length(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_font_cursor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; image *arg2 = (image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_font_cursor_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_cursor_set" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_image, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_font_cursor_set" "', argument " "2"" of type '" "image *""'"); } arg2 = reinterpret_cast< image * >(argp2); if (arg1) (arg1)->cursor = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_font_cursor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_font *arg1 = (win_font *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; image *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_font_cursor_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_font, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_font_cursor_get" "', argument " "1"" of type '" "win_font *""'"); } arg1 = reinterpret_cast< win_font * >(argp1); result = (image *) ((arg1)->cursor); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_image, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_font_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_font, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_ACTIVATE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_ACTIVATE",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_UNACTIVATE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_UNACTIVATE",SWIG_From_int(static_cast< int >(2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_UPDATE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_UPDATE",SWIG_From_int(static_cast< int >(3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_DRAW_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_DRAW",SWIG_From_int(static_cast< int >(4))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_DRAW_ON_VISIBLE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_DRAW_ON_VISIBLE",SWIG_From_int(static_cast< int >(5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_ACTIVATE_KEY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_ACTIVATE_KEY",SWIG_From_int(static_cast< int >(6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_SELECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_SELECT",SWIG_From_int(static_cast< int >(7))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_UNSELECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_UNSELECT",SWIG_From_int(static_cast< int >(8))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_KEYBOARD_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_KEYBOARD",SWIG_From_int(static_cast< int >(9))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_SCROLL_UP_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_SCROLL_UP",SWIG_From_int(static_cast< int >(10))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_SCROLL_DOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_SCROLL_DOWN",SWIG_From_int(static_cast< int >(11))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_NEXT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_NEXT",SWIG_From_int(static_cast< int >(12))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_PREVIOUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_PREVIOUS",SWIG_From_int(static_cast< int >(13))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_CLOSE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_CLOSE",SWIG_From_int(static_cast< int >(14))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_event_DESTROY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_event_DESTROY",SWIG_From_int(static_cast< int >(15))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_event *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_event",0,0)) SWIG_fail; result = (win_event *)new win_event(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_event, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_event_set_return_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_event *arg1 = (win_event *) 0 ; int arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_event_set_return_code",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_event_set_return_code" "', argument " "1"" of type '" "win_event *""'"); } arg1 = reinterpret_cast< win_event * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_event_set_return_code" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); (arg1)->set_return_code(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_event_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_event *arg1 = (win_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_event_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_event_update" "', argument " "1"" of type '" "win_event *""'"); } arg1 = reinterpret_cast< win_event * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_event_py_signal_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_event *arg1 = (win_event *) 0 ; PyObject *arg2 = (PyObject *) 0 ; int arg3 ; PyObject *arg4 = (PyObject *) NULL ; void *argp1 = 0 ; int res1 = 0 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_event_py_signal_connect",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_event, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_event_py_signal_connect" "', argument " "1"" of type '" "win_event *""'"); } arg1 = reinterpret_cast< win_event * >(argp1); { if (!PyCallable_Check(obj1)) { PyErr_SetString (PyExc_TypeError, "Need a callable object!"); return NULL; } arg2 = obj1; } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_event_py_signal_connect" "', argument " "3"" of type '" "int""'"); } arg3 = static_cast< int >(val3); if (obj3) { { arg4 = obj3; } } (arg1)->py_signal_connect(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_event *arg1 = (win_event *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_event",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_event, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_event" "', argument " "1"" of type '" "win_event *""'"); } arg1 = reinterpret_cast< win_event * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_event, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_border_MINI_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_border_MINI",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_border_NORMAL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_border_NORMAL",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_border",0,0)) SWIG_fail; result = (win_border *)new win_border(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_border, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_border",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_load",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_load" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_border_load" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "win_border_load" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); (arg1)->load(arg2,arg3); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_win_border_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_update" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); (arg1)->update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_destroy" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; drawing_area *arg2 = (drawing_area *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_draw",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_draw" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_border_draw" "', argument " "2"" of type '" "drawing_area *""'"); } arg2 = reinterpret_cast< drawing_area * >(argp2); (arg1)->draw(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_set_visible_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_set_visible_border",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_set_visible_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_border_set_visible_border" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_visible_border(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_set_brightness_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_set_brightness_border",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_set_brightness_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_border_set_brightness_border" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness_border(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_set_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; win_theme *arg2 = 0 ; unsigned char arg3 = (unsigned char) win_border::NORMAL ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_set_border",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_set_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_win_theme, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_border_set_border" "', argument " "2"" of type '" "win_theme &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "win_border_set_border" "', argument " "2"" of type '" "win_theme &""'"); } arg2 = reinterpret_cast< win_theme * >(argp2); if (obj2) { ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_border_set_border" "', argument " "3"" of type '" "unsigned char""'"); } arg3 = static_cast< unsigned char >(val3); } (arg1)->set_border(*arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_set_trans_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_border_set_trans_border",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_set_trans_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_border_set_trans_border" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans_border(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_length_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_border_length_border",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_length_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); result = (unsigned short)(arg1)->length_border(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_border_height_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_border *arg1 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_border_height_border",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_border_height_border" "', argument " "1"" of type '" "win_border *""'"); } arg1 = reinterpret_cast< win_border * >(argp1); result = (unsigned short)(arg1)->height_border(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_border_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_border, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_background",0,0)) SWIG_fail; result = (win_background *)new win_background(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_background, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_background",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_background" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_load" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_background_load" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); (arg1)->load(arg2); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_win_background_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_update" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); (arg1)->update(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_destroy" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; drawing_area *arg2 = (drawing_area *) NULL ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_draw",1,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_draw" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); if (obj1) { res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_background_draw" "', argument " "2"" of type '" "drawing_area *""'"); } arg2 = reinterpret_cast< drawing_area * >(argp2); } (arg1)->draw(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_set_visible_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_set_visible_background",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_set_visible_background" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_background_set_visible_background" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_visible_background(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_set_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; win_theme *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_set_background",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_set_background" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_win_theme, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_background_set_background" "', argument " "2"" of type '" "win_theme &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "win_background_set_background" "', argument " "2"" of type '" "win_theme &""'"); } arg2 = reinterpret_cast< win_theme * >(argp2); (arg1)->set_background(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_set_brightness_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_set_brightness_background",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_set_brightness_background" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_background_set_brightness_background" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness_background(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_background_set_trans_background(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_background *arg1 = (win_background *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_background_set_trans_background",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_background, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_background_set_trans_background" "', argument " "1"" of type '" "win_background *""'"); } arg1 = reinterpret_cast< win_background * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_background_set_trans_background" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans_background(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_background_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_background, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_base_ALIGN_NONE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_base_ALIGN_NONE",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_base_ALIGN_LEFT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_base_ALIGN_LEFT",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_base_ALIGN_CENTER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_base_ALIGN_CENTER",SWIG_From_int(static_cast< int >(2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_base_ALIGN_RIGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_base_ALIGN_RIGHT",SWIG_From_int(static_cast< int >(3))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_base",0,0)) SWIG_fail; result = (win_base *)new win_base(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_base, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"win_base_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_x" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short)((win_base const *)arg1)->x(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"win_base_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_y" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short)((win_base const *)arg1)->y(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_pad_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_pad_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_pad_x" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short *) &(arg1)->pad_x(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_short, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_pad_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_pad_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_pad_y" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short *) &(arg1)->pad_y(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_short, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_real_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"win_base_real_x",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_real_x" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short)((win_base const *)arg1)->real_x(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_real_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; short result; if(!PyArg_UnpackTuple(args,(char *)"win_base_real_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_real_y" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (short)((win_base const *)arg1)->real_y(); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_move(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; short arg2 ; short arg3 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_move",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_move" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_move" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_base_move" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); (arg1)->move(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_resize" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_base_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_visible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_visible",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_visible" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_visible(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_visible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_visible",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_visible" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_visible" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_visible(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_activate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_activate",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_activate" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_activate(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_activate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_activate",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_activate" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_activate" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_activate(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_focus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_focus",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_focus" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_focus(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_focus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_focus",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_focus" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_focus" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_focus(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_trans",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_trans" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_trans(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_trans" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_brightness",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_brightness" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_brightness(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_brightness" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_align(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_align",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_align" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_align" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_align(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_align(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"win_base_align",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_align" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (unsigned char)((win_base const *)arg1)->align(); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_is_can_be_selected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_is_can_be_selected",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_is_can_be_selected" "', argument " "1"" of type '" "win_base const *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)((win_base const *)arg1)->is_can_be_selected(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_set_can_be_selected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_base_set_can_be_selected",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_set_can_be_selected" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_base_set_can_be_selected" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_can_be_selected(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_update" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_draw" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_base_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_base_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_base_input_update" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_base(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_base *arg1 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_base",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_base, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_base" "', argument " "1"" of type '" "win_base *""'"); } arg1 = reinterpret_cast< win_base * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_base_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_base, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_container_SPACE_WITH_BORDER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_container_SPACE_WITH_BORDER",SWIG_From_int(static_cast< int >(10))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_container_SPACE_WITH_OBJECT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_container_SPACE_WITH_OBJECT",SWIG_From_int(static_cast< int >(10))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_container_LIST_LAYOUT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_container_LIST_LAYOUT",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_container_NO_LAYOUT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_container_NO_LAYOUT",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_container(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_container",0,0)) SWIG_fail; result = (win_container *)new win_container(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_container, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_move(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; short arg2 ; short arg3 ; void *argp1 = 0 ; int res1 = 0 ; short val2 ; int ecode2 = 0 ; short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_move",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_move" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_move" "', argument " "2"" of type '" "short""'"); } arg2 = static_cast< short >(val2); ecode3 = SWIG_AsVal_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_container_move" "', argument " "3"" of type '" "short""'"); } arg3 = static_cast< short >(val3); (arg1)->move(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_resize" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_container_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_add",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_add" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_container_add" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->add(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_remove",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_remove" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_container_remove" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->remove(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_remove_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_remove_all",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_remove_all" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); (arg1)->remove_all(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_destroy" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_container(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_container",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_container" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_container_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_update" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_container_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_input_update" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_container_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_draw" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_visible_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_visible_all",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_visible_all" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_visible_all" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_visible_all(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_brightness" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_trans" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_space_with_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_space_with_border",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_space_with_border" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_space_with_border" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_space_with_border(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_space_with_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_space_with_object",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_space_with_object" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_space_with_object" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_space_with_object(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_space_with_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_container_space_with_border",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_space_with_border" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (unsigned short)(arg1)->space_with_border(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_space_with_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_container_space_with_object",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_space_with_object" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (unsigned short)(arg1)->space_with_object(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_layout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_layout",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_layout" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_container_set_layout" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_layout(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_set_focus_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_set_focus_object",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_set_focus_object" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_container_set_focus_object" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->set_focus_object(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_container_focus_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_container *arg1 = (win_container *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; win_base *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_container_focus_object",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_container, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_container_focus_object" "', argument " "1"" of type '" "win_container *""'"); } arg1 = reinterpret_cast< win_container * >(argp1); result = (win_base *)(arg1)->focus_object(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_base, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_container_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_container, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_delete_win_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_image",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_image" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_image_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_draw" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_image_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_update" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_image_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_input_update" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_image_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_set_brightness" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_image_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_image_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_set_trans" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_image_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_pack(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_image_pack",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_pack" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); (arg1)->pack(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_image_set_auto_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *arg1 = (win_image *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_image_set_auto_refresh",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_image, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_image_set_auto_refresh" "', argument " "1"" of type '" "win_image *""'"); } arg1 = reinterpret_cast< win_image * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_image_set_auto_refresh" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_refresh(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_win_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_image *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_image",0,0)) SWIG_fail; result = (win_image *)new win_image(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_image, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_image_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_image, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *label_NOTHING_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "label_NOTHING",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *label_AUTO_HEIGHT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "label_AUTO_HEIGHT",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *label_AUTO_SIZE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "label_AUTO_SIZE",SWIG_From_int(static_cast< int >(2))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_label(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_label",0,0)) SWIG_fail; result = (label *)new label(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_label, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_text_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_text_string",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_text_string" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); result = (string *) &(arg1)->text_string(); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_text_char(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_text_char",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_text_char" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); result = (char *)(arg1)->text_char(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_set_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_set_text",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_set_text" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "label_set_text" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_text(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_add_text(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_add_text",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_add_text" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "label_add_text" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "label_add_text" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->add_text((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_label_set_font(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; win_font *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_set_font",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_set_font" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_win_font, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "label_set_font" "', argument " "2"" of type '" "win_font &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "label_set_font" "', argument " "2"" of type '" "win_font &""'"); } arg2 = reinterpret_cast< win_font * >(argp2); (arg1)->set_font(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_set_form(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_set_form",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_set_form" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "label_set_form" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_form(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_set_cursor_visible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_set_cursor_visible",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_set_cursor_visible" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "label_set_cursor_visible" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_cursor_visible(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_set_cursor_moveable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_set_cursor_moveable",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_set_cursor_moveable" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "label_set_cursor_moveable" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_cursor_moveable(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"label_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_resize" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "label_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "label_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"label_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_update" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_label_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"label_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_input_update" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_label(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label *arg1 = (label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_label",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_label" "', argument " "1"" of type '" "label *""'"); } arg1 = reinterpret_cast< label * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *label_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_label, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_label(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_label",0,0)) SWIG_fail; result = (win_label *)new win_label(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_label, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_label(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_label",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_label" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_label_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_draw" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_label_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_update" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_label_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_input_update" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_label_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_set_brightness" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_label_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_label_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_set_trans" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_label_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_pack(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_label_pack",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_pack" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); (arg1)->pack(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_label_set_auto_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_label *arg1 = (win_label *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_label_set_auto_refresh",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_label, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_label_set_auto_refresh" "', argument " "1"" of type '" "win_label *""'"); } arg1 = reinterpret_cast< win_label * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_label_set_auto_refresh" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_refresh(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_label_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_label, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_label_input_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label_input *arg1 = (label_input *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"label_input_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label_input, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "label_input_input_update" "', argument " "1"" of type '" "label_input *""'"); } arg1 = reinterpret_cast< label_input * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_label_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label_input *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_label_input",0,0)) SWIG_fail; result = (label_input *)new label_input(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_label_input, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_label_input(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; label_input *arg1 = (label_input *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_label_input",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_label_input, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_label_input" "', argument " "1"" of type '" "label_input *""'"); } arg1 = reinterpret_cast< label_input * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *label_input_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_label_input, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_write",0,0)) SWIG_fail; result = (win_write *)new win_write(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_write, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_write",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_write" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_write_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_draw" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_write_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_update" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_write_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_input_update" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_write_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_set_brightness" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_write_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_write_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_set_trans" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_write_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_pack(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_write_pack",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_pack" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); (arg1)->pack(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_write_set_auto_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_write *arg1 = (win_write *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_write_set_auto_refresh",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_write, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_write_set_auto_refresh" "', argument " "1"" of type '" "win_write *""'"); } arg1 = reinterpret_cast< win_write * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_write_set_auto_refresh" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_refresh(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_write_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_write, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_mapview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_mapview",0,0)) SWIG_fail; result = (win_mapview *)new win_mapview(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_mapview, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_mapview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_mapview",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_mapview" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_draw" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_update" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_input_update" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_set_brightness" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_mapview_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_set_trans" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_mapview_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_pack(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_pack",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_pack" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); (arg1)->pack(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_mapview_set_auto_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_mapview *arg1 = (win_mapview *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_mapview_set_auto_refresh",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_mapview, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_mapview_set_auto_refresh" "', argument " "1"" of type '" "win_mapview *""'"); } arg1 = reinterpret_cast< win_mapview * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_mapview_set_auto_refresh" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_refresh(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_mapview_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_mapview, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; win_scrollbar *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_scrollbar",1,1,&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_win_scrollbar" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (win_scrollbar *)new win_scrollbar(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_scrollbar, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_delete_win_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_scrollbar",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_scrollbar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_update_bar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_update_bar",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_update_bar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); (arg1)->update_bar(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; char *arg2 = (char *) 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_load",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_load" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_scrollbar_load" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); (arg1)->load(arg2); resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_update_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_update_back",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_update_back" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); (arg1)->update_back(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_destroy" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_set_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; win_theme *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_set_scrollbar",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_set_scrollbar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_win_theme, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_scrollbar_set_scrollbar" "', argument " "2"" of type '" "win_theme &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "win_scrollbar_set_scrollbar" "', argument " "2"" of type '" "win_theme &""'"); } arg2 = reinterpret_cast< win_theme * >(argp2); (arg1)->set_scrollbar(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_set_visible_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_set_visible_scrollbar",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_set_visible_scrollbar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scrollbar_set_visible_scrollbar" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_visible_scrollbar(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_set_trans_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_set_trans_scrollbar",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_set_trans_scrollbar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scrollbar_set_trans_scrollbar" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans_scrollbar(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_set_brightness_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_set_brightness_scrollbar",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_set_brightness_scrollbar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scrollbar_set_brightness_scrollbar" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness_scrollbar(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; drawing_area *arg2 = (drawing_area *) NULL ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_draw",1,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_draw" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); if (obj1) { res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_drawing_area, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_scrollbar_draw" "', argument " "2"" of type '" "drawing_area *""'"); } arg2 = reinterpret_cast< drawing_area * >(argp2); } (arg1)->draw(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scrollbar_height_bar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scrollbar *arg1 = (win_scrollbar *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_scrollbar_height_bar",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scrollbar, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scrollbar_height_bar" "', argument " "1"" of type '" "win_scrollbar *""'"); } arg1 = reinterpret_cast< win_scrollbar * >(argp1); result = (unsigned short)(arg1)->height_bar(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_scrollbar_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_scrollbar, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_scroll_PAD_DEFAULT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_scroll_PAD_DEFAULT",SWIG_From_int(static_cast< int >(5))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_scroll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_scroll",0,0)) SWIG_fail; result = (win_scroll *)new win_scroll(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_scroll, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_amplitude(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_amplitude",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_amplitude" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); result = (unsigned short)(arg1)->amplitude(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_add",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_add" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_scroll_add" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->add(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_remove",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_remove" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_scroll_remove" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->remove(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_remove_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_remove_all",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_remove_all" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); (arg1)->remove_all(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; unsigned short arg2 ; unsigned short arg3 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; unsigned short val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_resize",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_resize" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_resize" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "win_scroll_resize" "', argument " "3"" of type '" "unsigned short""'"); } arg3 = static_cast< unsigned short >(val3); (arg1)->resize(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_destroy" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_draw",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_draw" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); result = (bool)(arg1)->draw(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_update" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_input_update" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_space_between_border(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_space_between_border",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_space_between_border" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_space_between_border" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_space_between_border(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_space_between_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_space_between_object",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_space_between_object" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_space_between_object" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_space_between_object(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_cursor_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_cursor_y",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_cursor_y" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); result = (unsigned short)(arg1)->cursor_y(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_auto_scrollbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_auto_scrollbar",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_auto_scrollbar" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_auto_scrollbar" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_scrollbar(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_auto_refresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_auto_refresh",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_auto_refresh" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_auto_refresh" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_auto_refresh(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_brightness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_brightness",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_brightness" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_brightness" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_brightness(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_scroll_set_trans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_scroll_set_trans",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_scroll_set_trans" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_scroll_set_trans" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_trans(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_scroll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_scroll *arg1 = (win_scroll *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_scroll",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_scroll, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_scroll" "', argument " "1"" of type '" "win_scroll *""'"); } arg1 = reinterpret_cast< win_scroll * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_scroll_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_scroll, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_select_MODE_BORDER_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_select_MODE_BORDER",SWIG_From_int(static_cast< int >(0))); return SWIG_Py_Void(); } SWIGINTERN PyObject *win_select_MODE_BRIGHTNESS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "win_select_MODE_BRIGHTNESS",SWIG_From_int(static_cast< int >(1))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_select",0,0)) SWIG_fail; result = (win_select *)new win_select(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_select, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_input_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_select_input_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_input_update" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); result = (bool)(arg1)->input_update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_add",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_add" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_select_add" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->add(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_remove",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_remove" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_select_remove" "', argument " "2"" of type '" "win_base *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->remove(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_remove_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_remove_all",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_remove_all" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); (arg1)->remove_all(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_mode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_mode",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_mode" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_select_set_mode" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); (arg1)->set_mode(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_border_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; win_border *arg2 = (win_border *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_border_select",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_border_select" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_border, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_select_set_border_select" "', argument " "2"" of type '" "win_border *""'"); } arg2 = reinterpret_cast< win_border * >(argp2); (arg1)->set_border_select(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_circle",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_circle" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_select_set_circle" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); (arg1)->set_circle(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_is_circle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"win_select_is_circle",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_is_circle" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); result = (bool)(arg1)->is_circle(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_default",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_default" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); (arg1)->set_default(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_default_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; win_base *arg2 = (win_base *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_default_object",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_default_object" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_win_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "win_select_set_default_object" "', argument " "2"" of type '" "win_base const *""'"); } arg2 = reinterpret_cast< win_base * >(argp2); (arg1)->set_default_object((win_base const *)arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_set_default_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; unsigned short arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_set_default_position",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_set_default_position" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "win_select_set_default_position" "', argument " "2"" of type '" "unsigned short""'"); } arg2 = static_cast< unsigned short >(val2); (arg1)->set_default_position(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_get_selected_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; win_base *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_select_get_selected_object",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_get_selected_object" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); result = (win_base *)(arg1)->get_selected_object(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_base, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_select_get_selected_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"win_select_get_selected_position",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_select_get_selected_position" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); result = (unsigned short)(arg1)->get_selected_position(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_win_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_select *arg1 = (win_select *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_select",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_select, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_select" "', argument " "1"" of type '" "win_select *""'"); } arg1 = reinterpret_cast< win_select * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_select_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_select, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_win_theme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; win_theme *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_win_theme",1,1,&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_win_theme" "', argument " "1"" of type '" "char *""'"); } arg1 = reinterpret_cast< char * >(buf1); result = (win_theme *)new win_theme(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_win_theme, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; return NULL; } SWIGINTERN PyObject *_wrap_delete_win_theme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_theme *arg1 = (win_theme *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_win_theme",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_theme, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_win_theme" "', argument " "1"" of type '" "win_theme *""'"); } arg1 = reinterpret_cast< win_theme * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_win_theme_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; win_theme *arg1 = (win_theme *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"win_theme_destroy",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_win_theme, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "win_theme_destroy" "', argument " "1"" of type '" "win_theme *""'"); } arg1 = reinterpret_cast< win_theme * >(argp1); (arg1)->destroy(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *win_theme_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_win_theme, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_text_bubble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; string *arg2 = 0 ; string *arg3 = 0 ; unsigned short arg4 = (unsigned short) 110 ; int res1 = SWIG_OLDOBJ ; int res2 = SWIG_OLDOBJ ; int res3 = SWIG_OLDOBJ ; unsigned short val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; text_bubble *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_text_bubble",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_text_bubble" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_text_bubble" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_text_bubble" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_text_bubble" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } { std::string *ptr = (std::string *)0; res3 = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_text_bubble" "', argument " "3"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_text_bubble" "', argument " "3"" of type '" "string const &""'"); } arg3 = ptr; } if (obj3) { ecode4 = SWIG_AsVal_unsigned_SS_short(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_text_bubble" "', argument " "4"" of type '" "unsigned short""'"); } arg4 = static_cast< unsigned short >(val4); } result = (text_bubble *)new text_bubble((string const &)*arg1,(string const &)*arg2,(string const &)*arg3,arg4); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_text_bubble, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; if (SWIG_IsNewObj(res2)) delete arg2; if (SWIG_IsNewObj(res3)) delete arg3; return NULL; } SWIGINTERN PyObject *_wrap_delete_text_bubble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; text_bubble *arg1 = (text_bubble *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_text_bubble",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_text_bubble, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_text_bubble" "', argument " "1"" of type '" "text_bubble *""'"); } arg1 = reinterpret_cast< text_bubble * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_text_bubble_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; text_bubble *arg1 = (text_bubble *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"text_bubble_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_text_bubble, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "text_bubble_update" "', argument " "1"" of type '" "text_bubble *""'"); } arg1 = reinterpret_cast< text_bubble * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_text_bubble_remaining(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; text_bubble *arg1 = (text_bubble *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned short result; if(!PyArg_UnpackTuple(args,(char *)"text_bubble_remaining",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_text_bubble, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "text_bubble_remaining" "', argument " "1"" of type '" "text_bubble *""'"); } arg1 = reinterpret_cast< text_bubble * >(argp1); result = (unsigned short)(arg1)->remaining(); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *text_bubble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_text_bubble, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *MAX_COLOR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "MAX_COLOR",SWIG_From_int(static_cast< int >(6))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_dialog_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character_base *arg1 = (character_base *) 0 ; char *arg2 = (char *) 0 ; unsigned char arg3 = (unsigned char) 1 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; unsigned char val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; dialog_screen *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_dialog_screen",2,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dialog_screen" "', argument " "1"" of type '" "character_base *""'"); } arg1 = reinterpret_cast< character_base * >(argp1); res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dialog_screen" "', argument " "2"" of type '" "char *""'"); } arg2 = reinterpret_cast< char * >(buf2); if (obj2) { ecode3 = SWIG_AsVal_unsigned_SS_char(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dialog_screen" "', argument " "3"" of type '" "unsigned char""'"); } arg3 = static_cast< unsigned char >(val3); } result = (dialog_screen *)new dialog_screen(arg1,arg2,arg3); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_dialog_screen, SWIG_POINTER_NEW | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return NULL; } SWIGINTERN PyObject *_wrap_delete_dialog_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_dialog_screen",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dialog_screen" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; character_base *arg2 = (character_base *) 0 ; char *arg3 = (char *) 0 ; unsigned char arg4 = (unsigned char) 1 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; unsigned char val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_init",3,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_init" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_character_base, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dialog_screen_init" "', argument " "2"" of type '" "character_base *""'"); } arg2 = reinterpret_cast< character_base * >(argp2); res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dialog_screen_init" "', argument " "3"" of type '" "char *""'"); } arg3 = reinterpret_cast< char * >(buf3); if (obj3) { ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dialog_screen_init" "', argument " "4"" of type '" "unsigned char""'"); } arg4 = static_cast< unsigned char >(val4); } (arg1)->init(arg2,arg3,arg4); resultobj = SWIG_Py_Void(); if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return resultobj; fail: if (alloc3 == SWIG_NEWOBJ) delete[] buf3; return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_set_portrait(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_set_portrait",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_set_portrait" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dialog_screen_set_portrait" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dialog_screen_set_portrait" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->set_portrait((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_set_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_set_name",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_set_name" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dialog_screen_set_name" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dialog_screen_set_name" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->set_name((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_set_npc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_set_npc",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_set_npc" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dialog_screen_set_npc" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dialog_screen_set_npc" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } (arg1)->set_npc((string const &)*arg2); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_update" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_dialog_screen_run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; dialog_screen *arg1 = (dialog_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"dialog_screen_run",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_dialog_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dialog_screen_run" "', argument " "1"" of type '" "dialog_screen *""'"); } arg1 = reinterpret_cast< dialog_screen * >(argp1); (arg1)->run(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *dialog_screen_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_dialog_screen, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *LOAD_SCREEN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "LOAD_SCREEN",SWIG_From_int(static_cast< int >(LOAD_SCREEN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *SAVE_SCREEN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "SAVE_SCREEN",SWIG_From_int(static_cast< int >(SAVE_SCREEN))); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_data_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; data_screen *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_data_screen",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_data_screen" "', argument " "1"" of type '" "int""'"); } arg1 = static_cast< int >(val1); result = (data_screen *)new data_screen(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_data_screen, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_data_screen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; data_screen *arg1 = (data_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_data_screen",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_data_screen, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_data_screen" "', argument " "1"" of type '" "data_screen *""'"); } arg1 = reinterpret_cast< data_screen * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_data_screen_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; data_screen *arg1 = (data_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"data_screen_update",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_data_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data_screen_update" "', argument " "1"" of type '" "data_screen *""'"); } arg1 = reinterpret_cast< data_screen * >(argp1); result = (bool)(arg1)->update(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_data_screen_get_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; data_screen *arg1 = (data_screen *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"data_screen_get_result",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_data_screen, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data_screen_get_result" "', argument " "1"" of type '" "data_screen *""'"); } arg1 = reinterpret_cast< data_screen * >(argp1); result = (bool)(arg1)->get_result(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *data_screen_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_data_screen, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_gamedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_gamedata",0,0)) SWIG_fail; result = (gamedata *)new gamedata(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gamedata, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_gamedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_gamedata",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gamedata" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_put(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; ogzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_put",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_put" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ogzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gamedata_put" "', argument " "2"" of type '" "ogzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gamedata_put" "', argument " "2"" of type '" "ogzstream &""'"); } arg2 = reinterpret_cast< ogzstream * >(argp2); (arg1)->put(*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; igzstream *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_get",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_get" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_igzstream, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gamedata_get" "', argument " "2"" of type '" "igzstream &""'"); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gamedata_get" "', argument " "2"" of type '" "igzstream &""'"); } arg2 = reinterpret_cast< igzstream * >(argp2); result = (bool)(arg1)->get(*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_directory",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_directory" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); result = (char *)(arg1)->directory(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_description",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_description" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); result = (char *)(arg1)->description(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_location",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_location" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); result = (char *)(arg1)->location(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_gametime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_gametime",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_gametime" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); result = (char *)(arg1)->gametime(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_timestamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned int result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_timestamp",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_timestamp" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); result = (unsigned int)(arg1)->timestamp(); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_set_description(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_set_description",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_set_description" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_set_description" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_description(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_set_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_set_directory",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_set_directory" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_set_directory" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_directory(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_set_gametime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *arg1 = (gamedata *) 0 ; string arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_set_gametime",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gamedata, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gamedata_set_gametime" "', argument " "1"" of type '" "gamedata *""'"); } arg1 = reinterpret_cast< gamedata * >(argp1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_set_gametime" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } (arg1)->set_gametime(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; string arg2 ; string arg3 ; unsigned char arg4 ; unsigned char val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_init",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_init" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_init" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_init" "', argument " "3"" of type '" "string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } ecode4 = SWIG_AsVal_unsigned_SS_char(obj3, &val4); if (!SWIG_IsOK(ecode4)) { SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gamedata_init" "', argument " "4"" of type '" "unsigned char""'"); } arg4 = static_cast< unsigned char >(val4); result = (bool)gamedata::init(arg1,arg2,arg3,arg4); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gamedata_cleanup",0,0)) SWIG_fail; gamedata::cleanup(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_characters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_characters",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load_characters" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load_characters(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_quests(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_quests",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load_quests" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load_quests(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_mapengine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_mapengine",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load_mapengine" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load_mapengine(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_audio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_audio",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load_audio" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load_audio(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_achievements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_achievements",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load_achievements" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load_achievements(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_load" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (bool)gamedata::load(arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_load_newest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_load_newest",0,0)) SWIG_fail; result = (bool)gamedata::load_newest(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; string arg2 ; string arg3 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_save",3,3,&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_save" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_save" "', argument " "2"" of type '" "string""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj2, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_save" "', argument " "3"" of type '" "string""'"); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (bool)gamedata::save(arg1,arg2,arg3); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_unload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; if(!PyArg_UnpackTuple(args,(char *)"gamedata_unload",0,0)) SWIG_fail; gamedata::unload(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_next_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; gamedata *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_next_save",0,0)) SWIG_fail; result = (gamedata *)gamedata::next_save(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gamedata, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_user_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_user_data_dir",0,0)) SWIG_fail; result = gamedata::user_data_dir(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_game_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_game_data_dir",0,0)) SWIG_fail; result = gamedata::game_data_dir(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_get_saved_game(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; gamedata *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_get_saved_game",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gamedata_get_saved_game" "', argument " "1"" of type '" "unsigned int""'"); } arg1 = static_cast< unsigned int >(val1); result = (gamedata *)gamedata::get_saved_game(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gamedata, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_quests(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SwigValueWrapper< dictionary< quest * > > result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_quests",0,0)) SWIG_fail; result = gamedata::quests(); resultobj = SWIG_NewPointerObj((new dictionary< quest * >(static_cast< const dictionary< quest * >& >(result))), SWIGTYPE_p_dictionaryT_quest_p_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_player(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; character *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_player",0,0)) SWIG_fail; result = (character *)gamedata::player(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_character, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_get_character(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; character *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_get_character",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_get_character" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (character *)gamedata::get_character(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_character, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_get_quest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; quest *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_get_quest",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "gamedata_get_quest" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } result = (quest *)gamedata::get_quest(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quest, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_characters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SwigValueWrapper< dictionary< character * > > result; if(!PyArg_UnpackTuple(args,(char *)"gamedata_characters",0,0)) SWIG_fail; result = gamedata::characters(); resultobj = SWIG_NewPointerObj((new dictionary< character * >(static_cast< const dictionary< character * >& >(result))), SWIGTYPE_p_dictionaryT_character_p_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_gamedata_engine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; adonthell *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"gamedata_engine",0,0)) SWIG_fail; result = (adonthell *)gamedata::engine(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_adonthell, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *gamedata_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_gamedata, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *CONFIG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "CONFIG",SWIG_From_int(static_cast< int >(CONFIG))); return SWIG_Py_Void(); } SWIGINTERN PyObject *USER_DATA_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *module; PyObject *d; if (!PyArg_UnpackTuple(args,(char*)"swigconstant", 1, 1,&module)) return NULL; d = PyModule_GetDict(module); if (!d) return NULL; SWIG_Python_SetConstant(d, "USER_DATA",SWIG_From_int(static_cast< int >(USER_DATA))); return SWIG_Py_Void(); } SWIGINTERN int Swig_var_game_User_data_dir_set(PyObject *_val) { { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(_val, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""game::User_data_dir""' of type '""string""'"); } game::User_data_dir = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } return 0; fail: return 1; } SWIGINTERN PyObject *Swig_var_game_User_data_dir_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_std_string(static_cast< std::string >(game::User_data_dir)); return pyobj; } SWIGINTERN PyObject *_wrap_game_User_data_dir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) { return Swig_var_game_User_data_dir_get(); } SWIGINTERN PyObject *_wrap_game_User_data_dir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { int res; PyObject *value; if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL; res = Swig_var_game_User_data_dir_set(value); return !res ? SWIG_Py_Void() : NULL; } SWIGINTERN int Swig_var_game_Global_data_dir_set(PyObject *_val) { { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(_val, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""game::Global_data_dir""' of type '""string""'"); } game::Global_data_dir = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } return 0; fail: return 1; } SWIGINTERN PyObject *Swig_var_game_Global_data_dir_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_std_string(static_cast< std::string >(game::Global_data_dir)); return pyobj; } SWIGINTERN PyObject *_wrap_game_Global_data_dir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) { return Swig_var_game_Global_data_dir_get(); } SWIGINTERN PyObject *_wrap_game_Global_data_dir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { int res; PyObject *value; if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL; res = Swig_var_game_Global_data_dir_set(value); return !res ? SWIG_Py_Void() : NULL; } SWIGINTERN int Swig_var_game_Game_data_dir_set(PyObject *_val) { { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(_val, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""game::Game_data_dir""' of type '""string""'"); } game::Game_data_dir = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } return 0; fail: return 1; } SWIGINTERN PyObject *Swig_var_game_Game_data_dir_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_std_string(static_cast< std::string >(game::Game_data_dir)); return pyobj; } SWIGINTERN PyObject *_wrap_game_Game_data_dir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) { return Swig_var_game_Game_data_dir_get(); } SWIGINTERN PyObject *_wrap_game_Game_data_dir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { int res; PyObject *value; if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL; res = Swig_var_game_Game_data_dir_set(value); return !res ? SWIG_Py_Void() : NULL; } SWIGINTERN PyObject *_wrap_game_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"game_init",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "game_init" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } game::init(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_game_set_game_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string arg1 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"game_set_game_data_dir",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; int res = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res) || !ptr) { SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "game_set_game_data_dir" "', argument " "1"" of type '" "string""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } game::set_game_data_dir(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_game_user_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"game_user_data_dir",0,0)) SWIG_fail; result = game::user_data_dir(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_game_global_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"game_global_data_dir",0,0)) SWIG_fail; result = game::global_data_dir(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_game_game_data_dir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string result; if(!PyArg_UnpackTuple(args,(char *)"game_game_data_dir",0,0)) SWIG_fail; result = game::game_data_dir(); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_game_find_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"game_find_file",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "game_find_file" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "game_find_file" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } result = game::find_file((std::string const &)*arg1); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_game_find_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"game_find_directory",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "game_find_directory" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "game_find_directory" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } result = game::find_directory((std::string const &)*arg1); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_new_game(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; game *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_game",0,0)) SWIG_fail; result = (game *)new game(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_game, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_game(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; game *arg1 = (game *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_game",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_game, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_game" "', argument " "1"" of type '" "game *""'"); } arg1 = reinterpret_cast< game * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *game_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_game, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_nls_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"nls_init",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_config, 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nls_init" "', argument " "1"" of type '" "config &""'"); } if (!argp1) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nls_init" "', argument " "1"" of type '" "config &""'"); } arg1 = reinterpret_cast< config * >(argp1); nls::init(*arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_nls_set_language(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"nls_set_language",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nls_set_language" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nls_set_language" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } nls::set_language((std::string const &)*arg1); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_nls_translate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; string result; if(!PyArg_UnpackTuple(args,(char *)"nls_translate",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nls_translate" "', argument " "1"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "nls_translate" "', argument " "1"" of type '" "string const &""'"); } arg1 = ptr; } result = nls::translate((std::string const &)*arg1); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_new_nls(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; nls *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_nls",0,0)) SWIG_fail; result = (nls *)new nls(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_nls, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_nls(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; nls *arg1 = (nls *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_nls",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_nls, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_nls" "', argument " "1"" of type '" "nls *""'"); } arg1 = reinterpret_cast< nls * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *nls_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_nls, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_config",0,0)) SWIG_fail; result = (config *)new config(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_config, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_parse_arguments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; int arg2 ; char **arg3 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_parse_arguments",3,3,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_parse_arguments" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_parse_arguments" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_char, 0 | 0 ); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "config_parse_arguments" "', argument " "3"" of type '" "char *[]""'"); } arg3 = reinterpret_cast< char ** >(argp3); (arg1)->parse_arguments(arg2,arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_write_adonthellrc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_write_adonthellrc",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_write_adonthellrc" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); (arg1)->write_adonthellrc(); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_read_adonthellrc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"config_read_adonthellrc",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_read_adonthellrc" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (bool)(arg1)->read_adonthellrc(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_get_adonthellrc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_get_adonthellrc",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_get_adonthellrc" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (char *)(arg1)->get_adonthellrc(); resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_language_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_language_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_language_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "config_language_set" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "config_language_set" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (arg1) (arg1)->language = *arg2; resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_config_language_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_language_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_language_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (string *) & ((arg1)->language); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_font_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_font_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_font_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "config_font_set" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "config_font_set" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (arg1) (arg1)->font = *arg2; resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_config_font_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_font_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_font_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (string *) & ((arg1)->font); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_game_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_game_name_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_game_name_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "config_game_name_set" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "config_game_name_set" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (arg1) (arg1)->game_name = *arg2; resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_config_game_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_game_name_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_game_name_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (string *) & ((arg1)->game_name); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_gamedir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; string *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_gamedir_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_gamedir_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); { std::string *ptr = (std::string *)0; res2 = SWIG_AsPtr_std_string(obj1, &ptr); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "config_gamedir_set" "', argument " "2"" of type '" "string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "config_gamedir_set" "', argument " "2"" of type '" "string const &""'"); } arg2 = ptr; } if (arg1) (arg1)->gamedir = *arg2; resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res2)) delete arg2; return resultobj; fail: if (SWIG_IsNewObj(res2)) delete arg2; return NULL; } SWIGINTERN PyObject *_wrap_config_gamedir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; string *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_gamedir_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_gamedir_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (string *) & ((arg1)->gamedir); resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_screen_mode_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_screen_mode_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_screen_mode_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_screen_mode_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->screen_mode = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_screen_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_screen_mode_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_screen_mode_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->screen_mode); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_display_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_display_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_display_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_display_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->display = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_display_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_display_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_display_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->display); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_quick_load_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_quick_load_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_quick_load_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_quick_load_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->quick_load = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_quick_load_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_quick_load_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_quick_load_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->quick_load); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_channels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_audio_channels_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_channels_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_audio_channels_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->audio_channels = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_channels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_audio_channels_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_channels_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->audio_channels); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_resolution_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_audio_resolution_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_resolution_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_audio_resolution_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->audio_resolution = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_resolution_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_audio_resolution_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_resolution_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->audio_resolution); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_sample_rate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_audio_sample_rate_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_sample_rate_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_audio_sample_rate_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->audio_sample_rate = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_sample_rate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_audio_sample_rate_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_sample_rate_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->audio_sample_rate); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_volume_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; unsigned char arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"config_audio_volume_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_volume_set" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "config_audio_volume_set" "', argument " "2"" of type '" "unsigned char""'"); } arg2 = static_cast< unsigned char >(val2); if (arg1) (arg1)->audio_volume = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_config_audio_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"config_audio_volume_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "config_audio_volume_get" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); result = (unsigned char) ((arg1)->audio_volume); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; config *arg1 = (config *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_config",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_config, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_config" "', argument " "1"" of type '" "config *""'"); } arg1 = reinterpret_cast< config * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *config_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_config, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_achievements_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char *arg1 = 0 ; unsigned int *arg2 = 0 ; unsigned char temp1 ; unsigned char val1 ; int ecode1 = 0 ; unsigned int temp2 ; unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"achievements_create",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "achievements_create" "', argument " "1"" of type '" "unsigned char""'"); } temp1 = static_cast< unsigned char >(val1); arg1 = &temp1; ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "achievements_create" "', argument " "2"" of type '" "unsigned int""'"); } temp2 = static_cast< unsigned int >(val2); arg2 = &temp2; result = (bool)achievements::create((unsigned char const &)*arg1,(unsigned int const &)*arg2); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned char *arg1 = 0 ; unsigned char *arg2 = 0 ; unsigned char temp1 ; unsigned char val1 ; int ecode1 = 0 ; unsigned char temp2 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"achievements_update",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_char(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "achievements_update" "', argument " "1"" of type '" "unsigned char""'"); } temp1 = static_cast< unsigned char >(val1); arg1 = &temp1; ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "achievements_update" "', argument " "2"" of type '" "unsigned char""'"); } temp2 = static_cast< unsigned char >(val2); arg2 = &temp2; achievements::update((unsigned char const &)*arg1,(unsigned char const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_num_achievements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if(!PyArg_UnpackTuple(args,(char *)"achievements_num_achievements",0,0)) SWIG_fail; result = (int)achievements::num_achievements(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_num_unlocked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int result; if(!PyArg_UnpackTuple(args,(char *)"achievements_num_unlocked",0,0)) SWIG_fail; result = (int)achievements::num_unlocked(); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_is_unlocked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int *arg1 = 0 ; unsigned int temp1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"achievements_is_unlocked",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "achievements_is_unlocked" "', argument " "1"" of type '" "unsigned int""'"); } temp1 = static_cast< unsigned int >(val1); arg1 = &temp1; result = (bool)achievements::is_unlocked((unsigned int const &)*arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_achievement_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; unsigned int *arg1 = 0 ; unsigned int temp1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; unsigned char result; if(!PyArg_UnpackTuple(args,(char *)"achievements_achievement_id",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "achievements_achievement_id" "', argument " "1"" of type '" "unsigned int""'"); } temp1 = static_cast< unsigned int >(val1); arg1 = &temp1; result = (unsigned char)achievements::achievement_id((unsigned int const &)*arg1); resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_achievements_py_signal_connect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; PyObject *arg2 = (PyObject *) NULL ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"achievements_py_signal_connect",1,2,&obj0,&obj1)) SWIG_fail; { if (!PyCallable_Check(obj0)) { PyErr_SetString (PyExc_TypeError, "Need a callable object!"); return NULL; } arg1 = obj0; } if (obj1) { { arg2 = obj1; } } achievements::py_signal_connect(arg1,arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *achievements_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_achievements, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"Python_swigconstant", Python_swigconstant, METH_VARARGS, NULL}, { (char *)"C_swigconstant", C_swigconstant, METH_VARARGS, NULL}, { (char *)"READ_swigconstant", READ_swigconstant, METH_VARARGS, NULL}, { (char *)"WRITE_swigconstant", WRITE_swigconstant, METH_VARARGS, NULL}, { (char *)"new_gz_file", _wrap_new_gz_file, METH_VARARGS, NULL}, { (char *)"delete_gz_file", _wrap_delete_gz_file, METH_VARARGS, NULL}, { (char *)"gz_file_open", _wrap_gz_file_open, METH_VARARGS, NULL}, { (char *)"gz_file_close", _wrap_gz_file_close, METH_VARARGS, NULL}, { (char *)"gz_file_is_open", _wrap_gz_file_is_open, METH_VARARGS, NULL}, { (char *)"gz_file_eof", _wrap_gz_file_eof, METH_VARARGS, NULL}, { (char *)"gz_file_swigregister", gz_file_swigregister, METH_VARARGS, NULL}, { (char *)"new_igzstream", _wrap_new_igzstream, METH_VARARGS, NULL}, { (char *)"delete_igzstream", _wrap_delete_igzstream, METH_VARARGS, NULL}, { (char *)"igzstream_open", _wrap_igzstream_open, METH_VARARGS, NULL}, { (char *)"igzstream_get_block", _wrap_igzstream_get_block, METH_VARARGS, NULL}, { (char *)"igzstream_get_bool", _wrap_igzstream_get_bool, METH_VARARGS, NULL}, { (char *)"igzstream_get_uint8", _wrap_igzstream_get_uint8, METH_VARARGS, NULL}, { (char *)"igzstream_get_sint8", _wrap_igzstream_get_sint8, METH_VARARGS, NULL}, { (char *)"igzstream_get_uint16", _wrap_igzstream_get_uint16, METH_VARARGS, NULL}, { (char *)"igzstream_get_sint16", _wrap_igzstream_get_sint16, METH_VARARGS, NULL}, { (char *)"igzstream_get_uint32", _wrap_igzstream_get_uint32, METH_VARARGS, NULL}, { (char *)"igzstream_get_sint32", _wrap_igzstream_get_sint32, METH_VARARGS, NULL}, { (char *)"igzstream_get_string", _wrap_igzstream_get_string, METH_VARARGS, NULL}, { (char *)"igzstream_get_float", _wrap_igzstream_get_float, METH_VARARGS, NULL}, { (char *)"igzstream_swigregister", igzstream_swigregister, METH_VARARGS, NULL}, { (char *)"new_ogzstream", _wrap_new_ogzstream, METH_VARARGS, NULL}, { (char *)"delete_ogzstream", _wrap_delete_ogzstream, METH_VARARGS, NULL}, { (char *)"ogzstream_open", _wrap_ogzstream_open, METH_VARARGS, NULL}, { (char *)"ogzstream_put_block", _wrap_ogzstream_put_block, METH_VARARGS, NULL}, { (char *)"ogzstream_put_bool", _wrap_ogzstream_put_bool, METH_VARARGS, NULL}, { (char *)"ogzstream_put_uint8", _wrap_ogzstream_put_uint8, METH_VARARGS, NULL}, { (char *)"ogzstream_put_sint8", _wrap_ogzstream_put_sint8, METH_VARARGS, NULL}, { (char *)"ogzstream_put_uint16", _wrap_ogzstream_put_uint16, METH_VARARGS, NULL}, { (char *)"ogzstream_put_sint16", _wrap_ogzstream_put_sint16, METH_VARARGS, NULL}, { (char *)"ogzstream_put_uint32", _wrap_ogzstream_put_uint32, METH_VARARGS, NULL}, { (char *)"ogzstream_put_sint32", _wrap_ogzstream_put_sint32, METH_VARARGS, NULL}, { (char *)"ogzstream_put_string", _wrap_ogzstream_put_string, METH_VARARGS, NULL}, { (char *)"ogzstream_put_float", _wrap_ogzstream_put_float, METH_VARARGS, NULL}, { (char *)"ogzstream_swigregister", ogzstream_swigregister, METH_VARARGS, NULL}, { (char *)"fileops_put_version", _wrap_fileops_put_version, METH_VARARGS, NULL}, { (char *)"fileops_get_version", _wrap_fileops_get_version, METH_VARARGS, NULL}, { (char *)"new_fileops", _wrap_new_fileops, METH_VARARGS, NULL}, { (char *)"delete_fileops", _wrap_delete_fileops, METH_VARARGS, NULL}, { (char *)"fileops_swigregister", fileops_swigregister, METH_VARARGS, NULL}, { (char *)"EVENTS_DIR_swigconstant", EVENTS_DIR_swigconstant, METH_VARARGS, NULL}, { (char *)"delete_event", _wrap_delete_event, METH_VARARGS, NULL}, { (char *)"event_clear", _wrap_event_clear, METH_VARARGS, NULL}, { (char *)"event_type", _wrap_event_type, METH_VARARGS, NULL}, { (char *)"event_id", _wrap_event_id, METH_VARARGS, NULL}, { (char *)"event_set_id", _wrap_event_set_id, METH_VARARGS, NULL}, { (char *)"event_registered", _wrap_event_registered, METH_VARARGS, NULL}, { (char *)"event_repeat", _wrap_event_repeat, METH_VARARGS, NULL}, { (char *)"event_set_repeat", _wrap_event_set_repeat, METH_VARARGS, NULL}, { (char *)"event_execute", _wrap_event_execute, METH_VARARGS, NULL}, { (char *)"event_equals", _wrap_event_equals, METH_VARARGS, NULL}, { (char *)"event_set_script", _wrap_event_set_script, METH_VARARGS, NULL}, { (char *)"event_set_callback", _wrap_event_set_callback, METH_VARARGS, NULL}, { (char *)"event_pause", _wrap_event_pause, METH_VARARGS, NULL}, { (char *)"event_resume", _wrap_event_resume, METH_VARARGS, NULL}, { (char *)"event_is_paused", _wrap_event_is_paused, METH_VARARGS, NULL}, { (char *)"event_put_state", _wrap_event_put_state, METH_VARARGS, NULL}, { (char *)"event_get_state", _wrap_event_get_state, METH_VARARGS, NULL}, { (char *)"event_swigregister", event_swigregister, METH_VARARGS, NULL}, { (char *)"new_event_list", _wrap_new_event_list, METH_VARARGS, NULL}, { (char *)"delete_event_list", _wrap_delete_event_list, METH_VARARGS, NULL}, { (char *)"event_list_clear", _wrap_event_list_clear, METH_VARARGS, NULL}, { (char *)"event_list_add_event", _wrap_event_list_add_event, METH_VARARGS, NULL}, { (char *)"event_list_remove_event", _wrap_event_list_remove_event, METH_VARARGS, NULL}, { (char *)"event_list_get_event", _wrap_event_list_get_event, METH_VARARGS, NULL}, { (char *)"event_list_pause", _wrap_event_list_pause, METH_VARARGS, NULL}, { (char *)"event_list_resume", _wrap_event_list_resume, METH_VARARGS, NULL}, { (char *)"event_list_is_paused", _wrap_event_list_is_paused, METH_VARARGS, NULL}, { (char *)"event_list_put_state", _wrap_event_list_put_state, METH_VARARGS, NULL}, { (char *)"event_list_get_state", _wrap_event_list_get_state, METH_VARARGS, NULL}, { (char *)"event_list_swigregister", event_list_swigregister, METH_VARARGS, NULL}, { (char *)"new_time_event", _wrap_new_time_event, METH_VARARGS, NULL}, { (char *)"time_event_set_repeat", _wrap_time_event_set_repeat, METH_VARARGS, NULL}, { (char *)"time_event_equals", _wrap_time_event_equals, METH_VARARGS, NULL}, { (char *)"time_event_execute", _wrap_time_event_execute, METH_VARARGS, NULL}, { (char *)"time_event_put_state", _wrap_time_event_put_state, METH_VARARGS, NULL}, { (char *)"time_event_get_state", _wrap_time_event_get_state, METH_VARARGS, NULL}, { (char *)"time_event_pause", _wrap_time_event_pause, METH_VARARGS, NULL}, { (char *)"time_event_resume", _wrap_time_event_resume, METH_VARARGS, NULL}, { (char *)"time_event_time", _wrap_time_event_time, METH_VARARGS, NULL}, { (char *)"delete_time_event", _wrap_delete_time_event, METH_VARARGS, NULL}, { (char *)"time_event_swigregister", time_event_swigregister, METH_VARARGS, NULL}, { (char *)"new_map_event", _wrap_new_map_event, METH_VARARGS, NULL}, { (char *)"map_event_put_state", _wrap_map_event_put_state, METH_VARARGS, NULL}, { (char *)"map_event_get_state", _wrap_map_event_get_state, METH_VARARGS, NULL}, { (char *)"map_event_submap_set", _wrap_map_event_submap_set, METH_VARARGS, NULL}, { (char *)"map_event_submap_get", _wrap_map_event_submap_get, METH_VARARGS, NULL}, { (char *)"map_event_x_set", _wrap_map_event_x_set, METH_VARARGS, NULL}, { (char *)"map_event_x_get", _wrap_map_event_x_get, METH_VARARGS, NULL}, { (char *)"map_event_y_set", _wrap_map_event_y_set, METH_VARARGS, NULL}, { (char *)"map_event_y_get", _wrap_map_event_y_get, METH_VARARGS, NULL}, { (char *)"map_event_dir_set", _wrap_map_event_dir_set, METH_VARARGS, NULL}, { (char *)"map_event_dir_get", _wrap_map_event_dir_get, METH_VARARGS, NULL}, { (char *)"map_event_map_set", _wrap_map_event_map_set, METH_VARARGS, NULL}, { (char *)"map_event_map_get", _wrap_map_event_map_get, METH_VARARGS, NULL}, { (char *)"map_event_c_set", _wrap_map_event_c_set, METH_VARARGS, NULL}, { (char *)"map_event_c_get", _wrap_map_event_c_get, METH_VARARGS, NULL}, { (char *)"map_event_equals", _wrap_map_event_equals, METH_VARARGS, NULL}, { (char *)"map_event_execute", _wrap_map_event_execute, METH_VARARGS, NULL}, { (char *)"delete_map_event", _wrap_delete_map_event, METH_VARARGS, NULL}, { (char *)"map_event_swigregister", map_event_swigregister, METH_VARARGS, NULL}, { (char *)"new_enter_event", _wrap_new_enter_event, METH_VARARGS, NULL}, { (char *)"delete_enter_event", _wrap_delete_enter_event, METH_VARARGS, NULL}, { (char *)"enter_event_swigregister", enter_event_swigregister, METH_VARARGS, NULL}, { (char *)"new_leave_event", _wrap_new_leave_event, METH_VARARGS, NULL}, { (char *)"delete_leave_event", _wrap_delete_leave_event, METH_VARARGS, NULL}, { (char *)"leave_event_swigregister", leave_event_swigregister, METH_VARARGS, NULL}, { (char *)"new_action_event", _wrap_new_action_event, METH_VARARGS, NULL}, { (char *)"delete_action_event", _wrap_delete_action_event, METH_VARARGS, NULL}, { (char *)"action_event_swigregister", action_event_swigregister, METH_VARARGS, NULL}, { (char *)"event_handler_init", _wrap_event_handler_init, METH_VARARGS, NULL}, { (char *)"event_handler_cleanup", _wrap_event_handler_cleanup, METH_VARARGS, NULL}, { (char *)"event_handler_remove_event", _wrap_event_handler_remove_event, METH_VARARGS, NULL}, { (char *)"event_handler_raise_event", _wrap_event_handler_raise_event, METH_VARARGS, NULL}, { (char *)"new_event_handler", _wrap_new_event_handler, METH_VARARGS, NULL}, { (char *)"delete_event_handler", _wrap_delete_event_handler, METH_VARARGS, NULL}, { (char *)"event_handler_swigregister", event_handler_swigregister, METH_VARARGS, NULL}, { (char *)"new_storage", _wrap_new_storage, METH_VARARGS, NULL}, { (char *)"delete_storage", _wrap_delete_storage, METH_VARARGS, NULL}, { (char *)"storage_set_val", _wrap_storage_set_val, METH_VARARGS, NULL}, { (char *)"storage_get_val", _wrap_storage_get_val, METH_VARARGS, NULL}, { (char *)"storage_next", _wrap_storage_next, METH_VARARGS, NULL}, { (char *)"storage_swigregister", storage_swigregister, METH_VARARGS, NULL}, { (char *)"new_objects", _wrap_new_objects, METH_VARARGS, NULL}, { (char *)"objects_set_val", _wrap_objects_set_val, METH_VARARGS, NULL}, { (char *)"objects_get_val", _wrap_objects_get_val, METH_VARARGS, NULL}, { (char *)"objects_erase", _wrap_objects_erase, METH_VARARGS, NULL}, { (char *)"objects_next", _wrap_objects_next, METH_VARARGS, NULL}, { (char *)"delete_objects", _wrap_delete_objects, METH_VARARGS, NULL}, { (char *)"objects_swigregister", objects_swigregister, METH_VARARGS, NULL}, { (char *)"CYCLE_LENGTH_swigconstant", CYCLE_LENGTH_swigconstant, METH_VARARGS, NULL}, { (char *)"FRAME_RATE_swigconstant", FRAME_RATE_swigconstant, METH_VARARGS, NULL}, { (char *)"FTS_LIMIT_swigconstant", FTS_LIMIT_swigconstant, METH_VARARGS, NULL}, { (char *)"gametime_init", _wrap_gametime_init, METH_VARARGS, NULL}, { (char *)"gametime_minute", _wrap_gametime_minute, METH_VARARGS, NULL}, { (char *)"gametime_start_action", _wrap_gametime_start_action, METH_VARARGS, NULL}, { (char *)"gametime_stop_action", _wrap_gametime_stop_action, METH_VARARGS, NULL}, { (char *)"gametime_frames_to_skip", _wrap_gametime_frames_to_skip, METH_VARARGS, NULL}, { (char *)"gametime_update", _wrap_gametime_update, METH_VARARGS, NULL}, { (char *)"new_gametime", _wrap_new_gametime, METH_VARARGS, NULL}, { (char *)"delete_gametime", _wrap_delete_gametime, METH_VARARGS, NULL}, { (char *)"gametime_swigregister", gametime_swigregister, METH_VARARGS, NULL}, { (char *)"gamedate_update", _wrap_gamedate_update, METH_VARARGS, NULL}, { (char *)"gamedate_time", _wrap_gamedate_time, METH_VARARGS, NULL}, { (char *)"gamedate_weekday", _wrap_gamedate_weekday, METH_VARARGS, NULL}, { (char *)"gamedate_day", _wrap_gamedate_day, METH_VARARGS, NULL}, { (char *)"gamedate_hour", _wrap_gamedate_hour, METH_VARARGS, NULL}, { (char *)"gamedate_minute", _wrap_gamedate_minute, METH_VARARGS, NULL}, { (char *)"gamedate_parse_time", _wrap_gamedate_parse_time, METH_VARARGS, NULL}, { (char *)"gamedate_get_state", _wrap_gamedate_get_state, METH_VARARGS, NULL}, { (char *)"gamedate_put_state", _wrap_gamedate_put_state, METH_VARARGS, NULL}, { (char *)"new_gamedate", _wrap_new_gamedate, METH_VARARGS, NULL}, { (char *)"delete_gamedate", _wrap_delete_gamedate, METH_VARARGS, NULL}, { (char *)"gamedate_swigregister", gamedate_swigregister, METH_VARARGS, NULL}, { (char *)"SDLK_SCANCODE_MASK_swigconstant", SDLK_SCANCODE_MASK_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_UNKNOWN_swigconstant", SDLK_UNKNOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RETURN_swigconstant", SDLK_RETURN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_ESCAPE_swigconstant", SDLK_ESCAPE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_BACKSPACE_swigconstant", SDLK_BACKSPACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_TAB_swigconstant", SDLK_TAB_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SPACE_swigconstant", SDLK_SPACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_EXCLAIM_swigconstant", SDLK_EXCLAIM_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_QUOTEDBL_swigconstant", SDLK_QUOTEDBL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_HASH_swigconstant", SDLK_HASH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PERCENT_swigconstant", SDLK_PERCENT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_DOLLAR_swigconstant", SDLK_DOLLAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AMPERSAND_swigconstant", SDLK_AMPERSAND_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_QUOTE_swigconstant", SDLK_QUOTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LEFTPAREN_swigconstant", SDLK_LEFTPAREN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RIGHTPAREN_swigconstant", SDLK_RIGHTPAREN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_ASTERISK_swigconstant", SDLK_ASTERISK_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PLUS_swigconstant", SDLK_PLUS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_COMMA_swigconstant", SDLK_COMMA_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MINUS_swigconstant", SDLK_MINUS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PERIOD_swigconstant", SDLK_PERIOD_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SLASH_swigconstant", SDLK_SLASH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_0_swigconstant", SDLK_0_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_1_swigconstant", SDLK_1_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_2_swigconstant", SDLK_2_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_3_swigconstant", SDLK_3_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_4_swigconstant", SDLK_4_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_5_swigconstant", SDLK_5_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_6_swigconstant", SDLK_6_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_7_swigconstant", SDLK_7_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_8_swigconstant", SDLK_8_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_9_swigconstant", SDLK_9_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_COLON_swigconstant", SDLK_COLON_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SEMICOLON_swigconstant", SDLK_SEMICOLON_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LESS_swigconstant", SDLK_LESS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_EQUALS_swigconstant", SDLK_EQUALS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_GREATER_swigconstant", SDLK_GREATER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_QUESTION_swigconstant", SDLK_QUESTION_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AT_swigconstant", SDLK_AT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LEFTBRACKET_swigconstant", SDLK_LEFTBRACKET_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_BACKSLASH_swigconstant", SDLK_BACKSLASH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RIGHTBRACKET_swigconstant", SDLK_RIGHTBRACKET_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CARET_swigconstant", SDLK_CARET_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_UNDERSCORE_swigconstant", SDLK_UNDERSCORE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_BACKQUOTE_swigconstant", SDLK_BACKQUOTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_a_swigconstant", SDLK_a_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_b_swigconstant", SDLK_b_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_c_swigconstant", SDLK_c_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_d_swigconstant", SDLK_d_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_e_swigconstant", SDLK_e_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_f_swigconstant", SDLK_f_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_g_swigconstant", SDLK_g_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_h_swigconstant", SDLK_h_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_i_swigconstant", SDLK_i_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_j_swigconstant", SDLK_j_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_k_swigconstant", SDLK_k_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_l_swigconstant", SDLK_l_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_m_swigconstant", SDLK_m_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_n_swigconstant", SDLK_n_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_o_swigconstant", SDLK_o_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_p_swigconstant", SDLK_p_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_q_swigconstant", SDLK_q_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_r_swigconstant", SDLK_r_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_s_swigconstant", SDLK_s_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_t_swigconstant", SDLK_t_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_u_swigconstant", SDLK_u_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_v_swigconstant", SDLK_v_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_w_swigconstant", SDLK_w_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_x_swigconstant", SDLK_x_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_y_swigconstant", SDLK_y_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_z_swigconstant", SDLK_z_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CAPSLOCK_swigconstant", SDLK_CAPSLOCK_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F1_swigconstant", SDLK_F1_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F2_swigconstant", SDLK_F2_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F3_swigconstant", SDLK_F3_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F4_swigconstant", SDLK_F4_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F5_swigconstant", SDLK_F5_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F6_swigconstant", SDLK_F6_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F7_swigconstant", SDLK_F7_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F8_swigconstant", SDLK_F8_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F9_swigconstant", SDLK_F9_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F10_swigconstant", SDLK_F10_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F11_swigconstant", SDLK_F11_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F12_swigconstant", SDLK_F12_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PRINTSCREEN_swigconstant", SDLK_PRINTSCREEN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SCROLLLOCK_swigconstant", SDLK_SCROLLLOCK_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PAUSE_swigconstant", SDLK_PAUSE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_INSERT_swigconstant", SDLK_INSERT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_HOME_swigconstant", SDLK_HOME_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PAGEUP_swigconstant", SDLK_PAGEUP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_DELETE_swigconstant", SDLK_DELETE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_END_swigconstant", SDLK_END_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PAGEDOWN_swigconstant", SDLK_PAGEDOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RIGHT_swigconstant", SDLK_RIGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LEFT_swigconstant", SDLK_LEFT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_DOWN_swigconstant", SDLK_DOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_UP_swigconstant", SDLK_UP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_NUMLOCKCLEAR_swigconstant", SDLK_NUMLOCKCLEAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_DIVIDE_swigconstant", SDLK_KP_DIVIDE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MULTIPLY_swigconstant", SDLK_KP_MULTIPLY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MINUS_swigconstant", SDLK_KP_MINUS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_PLUS_swigconstant", SDLK_KP_PLUS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_ENTER_swigconstant", SDLK_KP_ENTER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_1_swigconstant", SDLK_KP_1_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_2_swigconstant", SDLK_KP_2_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_3_swigconstant", SDLK_KP_3_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_4_swigconstant", SDLK_KP_4_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_5_swigconstant", SDLK_KP_5_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_6_swigconstant", SDLK_KP_6_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_7_swigconstant", SDLK_KP_7_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_8_swigconstant", SDLK_KP_8_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_9_swigconstant", SDLK_KP_9_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_0_swigconstant", SDLK_KP_0_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_PERIOD_swigconstant", SDLK_KP_PERIOD_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_APPLICATION_swigconstant", SDLK_APPLICATION_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_POWER_swigconstant", SDLK_POWER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_EQUALS_swigconstant", SDLK_KP_EQUALS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F13_swigconstant", SDLK_F13_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F14_swigconstant", SDLK_F14_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F15_swigconstant", SDLK_F15_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F16_swigconstant", SDLK_F16_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F17_swigconstant", SDLK_F17_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F18_swigconstant", SDLK_F18_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F19_swigconstant", SDLK_F19_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F20_swigconstant", SDLK_F20_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F21_swigconstant", SDLK_F21_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F22_swigconstant", SDLK_F22_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F23_swigconstant", SDLK_F23_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_F24_swigconstant", SDLK_F24_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_EXECUTE_swigconstant", SDLK_EXECUTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_HELP_swigconstant", SDLK_HELP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MENU_swigconstant", SDLK_MENU_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SELECT_swigconstant", SDLK_SELECT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_STOP_swigconstant", SDLK_STOP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AGAIN_swigconstant", SDLK_AGAIN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_UNDO_swigconstant", SDLK_UNDO_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CUT_swigconstant", SDLK_CUT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_COPY_swigconstant", SDLK_COPY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PASTE_swigconstant", SDLK_PASTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_FIND_swigconstant", SDLK_FIND_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MUTE_swigconstant", SDLK_MUTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_VOLUMEUP_swigconstant", SDLK_VOLUMEUP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_VOLUMEDOWN_swigconstant", SDLK_VOLUMEDOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_COMMA_swigconstant", SDLK_KP_COMMA_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_EQUALSAS400_swigconstant", SDLK_KP_EQUALSAS400_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_ALTERASE_swigconstant", SDLK_ALTERASE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SYSREQ_swigconstant", SDLK_SYSREQ_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CANCEL_swigconstant", SDLK_CANCEL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CLEAR_swigconstant", SDLK_CLEAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_PRIOR_swigconstant", SDLK_PRIOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RETURN2_swigconstant", SDLK_RETURN2_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SEPARATOR_swigconstant", SDLK_SEPARATOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_OUT_swigconstant", SDLK_OUT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_OPER_swigconstant", SDLK_OPER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CLEARAGAIN_swigconstant", SDLK_CLEARAGAIN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CRSEL_swigconstant", SDLK_CRSEL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_EXSEL_swigconstant", SDLK_EXSEL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_00_swigconstant", SDLK_KP_00_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_000_swigconstant", SDLK_KP_000_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_THOUSANDSSEPARATOR_swigconstant", SDLK_THOUSANDSSEPARATOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_DECIMALSEPARATOR_swigconstant", SDLK_DECIMALSEPARATOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CURRENCYUNIT_swigconstant", SDLK_CURRENCYUNIT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CURRENCYSUBUNIT_swigconstant", SDLK_CURRENCYSUBUNIT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_LEFTPAREN_swigconstant", SDLK_KP_LEFTPAREN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_RIGHTPAREN_swigconstant", SDLK_KP_RIGHTPAREN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_LEFTBRACE_swigconstant", SDLK_KP_LEFTBRACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_RIGHTBRACE_swigconstant", SDLK_KP_RIGHTBRACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_TAB_swigconstant", SDLK_KP_TAB_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_BACKSPACE_swigconstant", SDLK_KP_BACKSPACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_A_swigconstant", SDLK_KP_A_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_B_swigconstant", SDLK_KP_B_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_C_swigconstant", SDLK_KP_C_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_D_swigconstant", SDLK_KP_D_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_E_swigconstant", SDLK_KP_E_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_F_swigconstant", SDLK_KP_F_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_XOR_swigconstant", SDLK_KP_XOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_POWER_swigconstant", SDLK_KP_POWER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_PERCENT_swigconstant", SDLK_KP_PERCENT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_LESS_swigconstant", SDLK_KP_LESS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_GREATER_swigconstant", SDLK_KP_GREATER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_AMPERSAND_swigconstant", SDLK_KP_AMPERSAND_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_DBLAMPERSAND_swigconstant", SDLK_KP_DBLAMPERSAND_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_VERTICALBAR_swigconstant", SDLK_KP_VERTICALBAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_DBLVERTICALBAR_swigconstant", SDLK_KP_DBLVERTICALBAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_COLON_swigconstant", SDLK_KP_COLON_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_HASH_swigconstant", SDLK_KP_HASH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_SPACE_swigconstant", SDLK_KP_SPACE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_AT_swigconstant", SDLK_KP_AT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_EXCLAM_swigconstant", SDLK_KP_EXCLAM_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMSTORE_swigconstant", SDLK_KP_MEMSTORE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMRECALL_swigconstant", SDLK_KP_MEMRECALL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMCLEAR_swigconstant", SDLK_KP_MEMCLEAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMADD_swigconstant", SDLK_KP_MEMADD_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMSUBTRACT_swigconstant", SDLK_KP_MEMSUBTRACT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMMULTIPLY_swigconstant", SDLK_KP_MEMMULTIPLY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_MEMDIVIDE_swigconstant", SDLK_KP_MEMDIVIDE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_PLUSMINUS_swigconstant", SDLK_KP_PLUSMINUS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_CLEAR_swigconstant", SDLK_KP_CLEAR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_CLEARENTRY_swigconstant", SDLK_KP_CLEARENTRY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_BINARY_swigconstant", SDLK_KP_BINARY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_OCTAL_swigconstant", SDLK_KP_OCTAL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_DECIMAL_swigconstant", SDLK_KP_DECIMAL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KP_HEXADECIMAL_swigconstant", SDLK_KP_HEXADECIMAL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LCTRL_swigconstant", SDLK_LCTRL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LSHIFT_swigconstant", SDLK_LSHIFT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LALT_swigconstant", SDLK_LALT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_LGUI_swigconstant", SDLK_LGUI_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RCTRL_swigconstant", SDLK_RCTRL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RSHIFT_swigconstant", SDLK_RSHIFT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RALT_swigconstant", SDLK_RALT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_RGUI_swigconstant", SDLK_RGUI_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MODE_swigconstant", SDLK_MODE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIONEXT_swigconstant", SDLK_AUDIONEXT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOPREV_swigconstant", SDLK_AUDIOPREV_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOSTOP_swigconstant", SDLK_AUDIOSTOP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOPLAY_swigconstant", SDLK_AUDIOPLAY_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOMUTE_swigconstant", SDLK_AUDIOMUTE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MEDIASELECT_swigconstant", SDLK_MEDIASELECT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_WWW_swigconstant", SDLK_WWW_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_MAIL_swigconstant", SDLK_MAIL_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_CALCULATOR_swigconstant", SDLK_CALCULATOR_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_COMPUTER_swigconstant", SDLK_COMPUTER_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_SEARCH_swigconstant", SDLK_AC_SEARCH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_HOME_swigconstant", SDLK_AC_HOME_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_BACK_swigconstant", SDLK_AC_BACK_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_FORWARD_swigconstant", SDLK_AC_FORWARD_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_STOP_swigconstant", SDLK_AC_STOP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_REFRESH_swigconstant", SDLK_AC_REFRESH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AC_BOOKMARKS_swigconstant", SDLK_AC_BOOKMARKS_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_BRIGHTNESSDOWN_swigconstant", SDLK_BRIGHTNESSDOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_BRIGHTNESSUP_swigconstant", SDLK_BRIGHTNESSUP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_DISPLAYSWITCH_swigconstant", SDLK_DISPLAYSWITCH_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KBDILLUMTOGGLE_swigconstant", SDLK_KBDILLUMTOGGLE_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KBDILLUMDOWN_swigconstant", SDLK_KBDILLUMDOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_KBDILLUMUP_swigconstant", SDLK_KBDILLUMUP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_EJECT_swigconstant", SDLK_EJECT_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_SLEEP_swigconstant", SDLK_SLEEP_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_APP1_swigconstant", SDLK_APP1_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_APP2_swigconstant", SDLK_APP2_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOREWIND_swigconstant", SDLK_AUDIOREWIND_swigconstant, METH_VARARGS, NULL}, { (char *)"SDLK_AUDIOFASTFORWARD_swigconstant", SDLK_AUDIOFASTFORWARD_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_NONE_swigconstant", KMOD_NONE_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_LSHIFT_swigconstant", KMOD_LSHIFT_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_RSHIFT_swigconstant", KMOD_RSHIFT_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_LCTRL_swigconstant", KMOD_LCTRL_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_RCTRL_swigconstant", KMOD_RCTRL_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_LALT_swigconstant", KMOD_LALT_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_RALT_swigconstant", KMOD_RALT_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_LGUI_swigconstant", KMOD_LGUI_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_RGUI_swigconstant", KMOD_RGUI_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_NUM_swigconstant", KMOD_NUM_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_CAPS_swigconstant", KMOD_CAPS_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_MODE_swigconstant", KMOD_MODE_swigconstant, METH_VARARGS, NULL}, { (char *)"KMOD_RESERVED_swigconstant", KMOD_RESERVED_swigconstant, METH_VARARGS, NULL}, { (char *)"input_init", _wrap_input_init, METH_VARARGS, NULL}, { (char *)"input_shutdown", _wrap_input_shutdown, METH_VARARGS, NULL}, { (char *)"input_update", _wrap_input_update, METH_VARARGS, NULL}, { (char *)"input_is_pushed", _wrap_input_is_pushed, METH_VARARGS, NULL}, { (char *)"input_has_been_pushed", _wrap_input_has_been_pushed, METH_VARARGS, NULL}, { (char *)"input_get_next_key", _wrap_input_get_next_key, METH_VARARGS, NULL}, { (char *)"input_get_next_unicode", _wrap_input_get_next_unicode, METH_VARARGS, NULL}, { (char *)"input_start_text_input", _wrap_input_start_text_input, METH_VARARGS, NULL}, { (char *)"input_stop_text_input", _wrap_input_stop_text_input, METH_VARARGS, NULL}, { (char *)"input_is_text_input", _wrap_input_is_text_input, METH_VARARGS, NULL}, { (char *)"input_clear_keys_queue", _wrap_input_clear_keys_queue, METH_VARARGS, NULL}, { (char *)"new_input", _wrap_new_input, METH_VARARGS, NULL}, { (char *)"delete_input", _wrap_delete_input, METH_VARARGS, NULL}, { (char *)"input_swigregister", input_swigregister, METH_VARARGS, NULL}, { (char *)"NUM_WAVES_swigconstant", NUM_WAVES_swigconstant, METH_VARARGS, NULL}, { (char *)"NUM_MUSIC_swigconstant", NUM_MUSIC_swigconstant, METH_VARARGS, NULL}, { (char *)"NUM_CHANNELS_swigconstant", NUM_CHANNELS_swigconstant, METH_VARARGS, NULL}, { (char *)"audio_init", _wrap_audio_init, METH_VARARGS, NULL}, { (char *)"audio_cleanup", _wrap_audio_cleanup, METH_VARARGS, NULL}, { (char *)"audio_put_state", _wrap_audio_put_state, METH_VARARGS, NULL}, { (char *)"audio_get_state", _wrap_audio_get_state, METH_VARARGS, NULL}, { (char *)"audio_load_background", _wrap_audio_load_background, METH_VARARGS, NULL}, { (char *)"audio_unload_background", _wrap_audio_unload_background, METH_VARARGS, NULL}, { (char *)"audio_set_background_volume", _wrap_audio_set_background_volume, METH_VARARGS, NULL}, { (char *)"audio_pause_music", _wrap_audio_pause_music, METH_VARARGS, NULL}, { (char *)"audio_unpause_music", _wrap_audio_unpause_music, METH_VARARGS, NULL}, { (char *)"audio_load_wave", _wrap_audio_load_wave, METH_VARARGS, NULL}, { (char *)"audio_unload_wave", _wrap_audio_unload_wave, METH_VARARGS, NULL}, { (char *)"audio_play_wave", _wrap_audio_play_wave, METH_VARARGS, NULL}, { (char *)"audio_play_background", _wrap_audio_play_background, METH_VARARGS, NULL}, { (char *)"audio_fade_in_background", _wrap_audio_fade_in_background, METH_VARARGS, NULL}, { (char *)"audio_fade_out_background", _wrap_audio_fade_out_background, METH_VARARGS, NULL}, { (char *)"audio_change_background", _wrap_audio_change_background, METH_VARARGS, NULL}, { (char *)"audio_is_initialized", _wrap_audio_is_initialized, METH_VARARGS, NULL}, { (char *)"audio_is_schedule_activated", _wrap_audio_is_schedule_activated, METH_VARARGS, NULL}, { (char *)"audio_is_background_finished", _wrap_audio_is_background_finished, METH_VARARGS, NULL}, { (char *)"audio_set_schedule_active", _wrap_audio_set_schedule_active, METH_VARARGS, NULL}, { (char *)"audio_set_schedule", _wrap_audio_set_schedule, METH_VARARGS, NULL}, { (char *)"audio_run_schedule", _wrap_audio_run_schedule, METH_VARARGS, NULL}, { (char *)"new_audio", _wrap_new_audio, METH_VARARGS, NULL}, { (char *)"delete_audio", _wrap_delete_audio, METH_VARARGS, NULL}, { (char *)"audio_swigregister", audio_swigregister, METH_VARARGS, NULL}, { (char *)"DIALOG_DIR_swigconstant", DIALOG_DIR_swigconstant, METH_VARARGS, NULL}, { (char *)"DWARF_swigconstant", DWARF_swigconstant, METH_VARARGS, NULL}, { (char *)"ELF_swigconstant", ELF_swigconstant, METH_VARARGS, NULL}, { (char *)"HALFELF_swigconstant", HALFELF_swigconstant, METH_VARARGS, NULL}, { (char *)"HUMAN_swigconstant", HUMAN_swigconstant, METH_VARARGS, NULL}, { (char *)"FEMALE_swigconstant", FEMALE_swigconstant, METH_VARARGS, NULL}, { (char *)"MALE_swigconstant", MALE_swigconstant, METH_VARARGS, NULL}, { (char *)"NPC_swigconstant", NPC_swigconstant, METH_VARARGS, NULL}, { (char *)"PLAYER_swigconstant", PLAYER_swigconstant, METH_VARARGS, NULL}, { (char *)"PARTY_swigconstant", PARTY_swigconstant, METH_VARARGS, NULL}, { (char *)"new_character_base", _wrap_new_character_base, METH_VARARGS, NULL}, { (char *)"delete_character_base", _wrap_delete_character_base, METH_VARARGS, NULL}, { (char *)"character_base_get_name", _wrap_character_base_get_name, METH_VARARGS, NULL}, { (char *)"character_base_get_id", _wrap_character_base_get_id, METH_VARARGS, NULL}, { (char *)"character_base_set_name", _wrap_character_base_set_name, METH_VARARGS, NULL}, { (char *)"character_base_get_color", _wrap_character_base_get_color, METH_VARARGS, NULL}, { (char *)"character_base_set_color", _wrap_character_base_set_color, METH_VARARGS, NULL}, { (char *)"character_base_get_portrait", _wrap_character_base_get_portrait, METH_VARARGS, NULL}, { (char *)"character_base_set_portrait", _wrap_character_base_set_portrait, METH_VARARGS, NULL}, { (char *)"character_base_get_dialogue", _wrap_character_base_get_dialogue, METH_VARARGS, NULL}, { (char *)"character_base_set_dialogue", _wrap_character_base_set_dialogue, METH_VARARGS, NULL}, { (char *)"character_base_get_state", _wrap_character_base_get_state, METH_VARARGS, NULL}, { (char *)"character_base_put_state", _wrap_character_base_put_state, METH_VARARGS, NULL}, { (char *)"character_base_swigregister", character_base_swigregister, METH_VARARGS, NULL}, { (char *)"new_py_object", _wrap_new_py_object, METH_VARARGS, NULL}, { (char *)"delete_py_object", _wrap_delete_py_object, METH_VARARGS, NULL}, { (char *)"py_object_clear", _wrap_py_object_clear, METH_VARARGS, NULL}, { (char *)"py_object_create_instance", _wrap_py_object_create_instance, METH_VARARGS, NULL}, { (char *)"py_object_reload_instance", _wrap_py_object_reload_instance, METH_VARARGS, NULL}, { (char *)"py_object_call_method_ret", _wrap_py_object_call_method_ret, METH_VARARGS, NULL}, { (char *)"py_object_call_method", _wrap_py_object_call_method, METH_VARARGS, NULL}, { (char *)"py_object_run", _wrap_py_object_run, METH_VARARGS, NULL}, { (char *)"py_object_has_attribute", _wrap_py_object_has_attribute, METH_VARARGS, NULL}, { (char *)"py_object_get_attribute", _wrap_py_object_get_attribute, METH_VARARGS, NULL}, { (char *)"py_object_get_attribute_int", _wrap_py_object_get_attribute_int, METH_VARARGS, NULL}, { (char *)"py_object_get_attribute_string", _wrap_py_object_get_attribute_string, METH_VARARGS, NULL}, { (char *)"py_object_set_attribute", _wrap_py_object_set_attribute, METH_VARARGS, NULL}, { (char *)"py_object_set_attribute_int", _wrap_py_object_set_attribute_int, METH_VARARGS, NULL}, { (char *)"py_object_set_attribute_string", _wrap_py_object_set_attribute_string, METH_VARARGS, NULL}, { (char *)"py_object_get_instance", _wrap_py_object_get_instance, METH_VARARGS, NULL}, { (char *)"py_object_class_name", _wrap_py_object_class_name, METH_VARARGS, NULL}, { (char *)"py_object_file_name", _wrap_py_object_file_name, METH_VARARGS, NULL}, { (char *)"py_object_swigregister", py_object_swigregister, METH_VARARGS, NULL}, { (char *)"new_drawing_area", _wrap_new_drawing_area, METH_VARARGS, NULL}, { (char *)"drawing_area_x", _wrap_drawing_area_x, METH_VARARGS, NULL}, { (char *)"drawing_area_y", _wrap_drawing_area_y, METH_VARARGS, NULL}, { (char *)"drawing_area_length", _wrap_drawing_area_length, METH_VARARGS, NULL}, { (char *)"drawing_area_height", _wrap_drawing_area_height, METH_VARARGS, NULL}, { (char *)"drawing_area_move", _wrap_drawing_area_move, METH_VARARGS, NULL}, { (char *)"drawing_area_resize", _wrap_drawing_area_resize, METH_VARARGS, NULL}, { (char *)"drawing_area_assign_drawing_area", _wrap_drawing_area_assign_drawing_area, METH_VARARGS, NULL}, { (char *)"drawing_area_assigned_drawing_area", _wrap_drawing_area_assigned_drawing_area, METH_VARARGS, NULL}, { (char *)"drawing_area_detach_drawing_area", _wrap_drawing_area_detach_drawing_area, METH_VARARGS, NULL}, { (char *)"drawing_area_setup_rects", _wrap_drawing_area_setup_rects, METH_VARARGS, NULL}, { (char *)"delete_drawing_area", _wrap_delete_drawing_area, METH_VARARGS, NULL}, { (char *)"drawing_area_swigregister", drawing_area_swigregister, METH_VARARGS, NULL}, { (char *)"new_quest", _wrap_new_quest, METH_VARARGS, NULL}, { (char *)"delete_quest", _wrap_delete_quest, METH_VARARGS, NULL}, { (char *)"quest_swigregister", quest_swigregister, METH_VARARGS, NULL}, { (char *)"delete_drawable", _wrap_delete_drawable, METH_VARARGS, NULL}, { (char *)"drawable_length", _wrap_drawable_length, METH_VARARGS, NULL}, { (char *)"drawable_height", _wrap_drawable_height, METH_VARARGS, NULL}, { (char *)"drawable_update", _wrap_drawable_update, METH_VARARGS, NULL}, { (char *)"drawable_input_update", _wrap_drawable_input_update, METH_VARARGS, NULL}, { (char *)"drawable_draw", _wrap_drawable_draw, METH_VARARGS, NULL}, { (char *)"drawable_swigregister", drawable_swigregister, METH_VARARGS, NULL}, { (char *)"R_MASK_swigconstant", R_MASK_swigconstant, METH_VARARGS, NULL}, { (char *)"G_MASK_swigconstant", G_MASK_swigconstant, METH_VARARGS, NULL}, { (char *)"B_MASK_swigconstant", B_MASK_swigconstant, METH_VARARGS, NULL}, { (char *)"A_MASK_swigconstant", A_MASK_swigconstant, METH_VARARGS, NULL}, { (char *)"BYTES_PER_PIXEL_swigconstant", BYTES_PER_PIXEL_swigconstant, METH_VARARGS, NULL}, { (char *)"new_pixel_info", _wrap_new_pixel_info, METH_VARARGS, NULL}, { (char *)"pixel_info_Pixels_set", _wrap_pixel_info_Pixels_set, METH_VARARGS, NULL}, { (char *)"pixel_info_Pixels_get", _wrap_pixel_info_Pixels_get, METH_VARARGS, NULL}, { (char *)"pixel_info_Pitch_set", _wrap_pixel_info_Pitch_set, METH_VARARGS, NULL}, { (char *)"pixel_info_Pitch_get", _wrap_pixel_info_Pitch_get, METH_VARARGS, NULL}, { (char *)"pixel_info_Format_set", _wrap_pixel_info_Format_set, METH_VARARGS, NULL}, { (char *)"pixel_info_Format_get", _wrap_pixel_info_Format_get, METH_VARARGS, NULL}, { (char *)"pixel_info_BytesPerPixel_set", _wrap_pixel_info_BytesPerPixel_set, METH_VARARGS, NULL}, { (char *)"pixel_info_BytesPerPixel_get", _wrap_pixel_info_BytesPerPixel_get, METH_VARARGS, NULL}, { (char *)"delete_pixel_info", _wrap_delete_pixel_info, METH_VARARGS, NULL}, { (char *)"pixel_info_swigregister", pixel_info_swigregister, METH_VARARGS, NULL}, { (char *)"new_surface", _wrap_new_surface, METH_VARARGS, NULL}, { (char *)"delete_surface", _wrap_delete_surface, METH_VARARGS, NULL}, { (char *)"surface_is_masked", _wrap_surface_is_masked, METH_VARARGS, NULL}, { (char *)"surface_set_mask", _wrap_surface_set_mask, METH_VARARGS, NULL}, { (char *)"surface_alpha", _wrap_surface_alpha, METH_VARARGS, NULL}, { (char *)"surface_set_alpha", _wrap_surface_set_alpha, METH_VARARGS, NULL}, { (char *)"surface_has_alpha_channel", _wrap_surface_has_alpha_channel, METH_VARARGS, NULL}, { (char *)"surface_scale", _wrap_surface_scale, METH_VARARGS, NULL}, { (char *)"surface_set_scale", _wrap_surface_set_scale, METH_VARARGS, NULL}, { (char *)"surface_draw", _wrap_surface_draw, METH_VARARGS, NULL}, { (char *)"surface_draw_part", _wrap_surface_draw_part, METH_VARARGS, NULL}, { (char *)"surface_fillrect", _wrap_surface_fillrect, METH_VARARGS, NULL}, { (char *)"surface_map_color", _wrap_surface_map_color, METH_VARARGS, NULL}, { (char *)"surface_unmap_color", _wrap_surface_unmap_color, METH_VARARGS, NULL}, { (char *)"surface_lock", _wrap_surface_lock, METH_VARARGS, NULL}, { (char *)"surface_unlock", _wrap_surface_unlock, METH_VARARGS, NULL}, { (char *)"surface_put_pix", _wrap_surface_put_pix, METH_VARARGS, NULL}, { (char *)"surface_put_pix_rgb", _wrap_surface_put_pix_rgb, METH_VARARGS, NULL}, { (char *)"surface_get_pix", _wrap_surface_get_pix, METH_VARARGS, NULL}, { (char *)"surface_get_pix_rgb", _wrap_surface_get_pix_rgb, METH_VARARGS, NULL}, { (char *)"surface_copy", _wrap_surface_copy, METH_VARARGS, NULL}, { (char *)"surface_swigregister", surface_swigregister, METH_VARARGS, NULL}, { (char *)"screen_cleanup", _wrap_screen_cleanup, METH_VARARGS, NULL}, { (char *)"screen_get_renderer", _wrap_screen_get_renderer, METH_VARARGS, NULL}, { (char *)"screen_format", _wrap_screen_format, METH_VARARGS, NULL}, { (char *)"screen_display_get", _wrap_screen_display_get, METH_VARARGS, NULL}, { (char *)"screen_display_set", _wrap_screen_display_set, METH_VARARGS, NULL}, { (char *)"screen_init", _wrap_screen_init, METH_VARARGS, NULL}, { (char *)"screen_length", _wrap_screen_length, METH_VARARGS, NULL}, { (char *)"screen_height", _wrap_screen_height, METH_VARARGS, NULL}, { (char *)"screen_bytes_per_pixel", _wrap_screen_bytes_per_pixel, METH_VARARGS, NULL}, { (char *)"screen_trans_col", _wrap_screen_trans_col, METH_VARARGS, NULL}, { (char *)"screen_scale", _wrap_screen_scale, METH_VARARGS, NULL}, { (char *)"screen_offset_x", _wrap_screen_offset_x, METH_VARARGS, NULL}, { (char *)"screen_offset_y", _wrap_screen_offset_y, METH_VARARGS, NULL}, { (char *)"screen_clear", _wrap_screen_clear, METH_VARARGS, NULL}, { (char *)"screen_show", _wrap_screen_show, METH_VARARGS, NULL}, { (char *)"screen_mode", _wrap_screen_mode, METH_VARARGS, NULL}, { (char *)"screen_set_fullscreen", _wrap_screen_set_fullscreen, METH_VARARGS, NULL}, { (char *)"screen_info", _wrap_screen_info, METH_VARARGS, NULL}, { (char *)"screen_transition", _wrap_screen_transition, METH_VARARGS, NULL}, { (char *)"new_screen", _wrap_new_screen, METH_VARARGS, NULL}, { (char *)"delete_screen", _wrap_delete_screen, METH_VARARGS, NULL}, { (char *)"screen_swigregister", screen_swigregister, METH_VARARGS, NULL}, { (char *)"new_image", _wrap_new_image, METH_VARARGS, NULL}, { (char *)"delete_image", _wrap_delete_image, METH_VARARGS, NULL}, { (char *)"image_resize", _wrap_image_resize, METH_VARARGS, NULL}, { (char *)"image_clear", _wrap_image_clear, METH_VARARGS, NULL}, { (char *)"image_get", _wrap_image_get, METH_VARARGS, NULL}, { (char *)"image_load", _wrap_image_load, METH_VARARGS, NULL}, { (char *)"image_get_raw", _wrap_image_get_raw, METH_VARARGS, NULL}, { (char *)"image_load_raw", _wrap_image_load_raw, METH_VARARGS, NULL}, { (char *)"image_get_pnm", _wrap_image_get_pnm, METH_VARARGS, NULL}, { (char *)"image_load_pnm", _wrap_image_load_pnm, METH_VARARGS, NULL}, { (char *)"image_put", _wrap_image_put, METH_VARARGS, NULL}, { (char *)"image_save", _wrap_image_save, METH_VARARGS, NULL}, { (char *)"image_put_raw", _wrap_image_put_raw, METH_VARARGS, NULL}, { (char *)"image_save_raw", _wrap_image_save_raw, METH_VARARGS, NULL}, { (char *)"image_put_pnm", _wrap_image_put_pnm, METH_VARARGS, NULL}, { (char *)"image_save_pnm", _wrap_image_save_pnm, METH_VARARGS, NULL}, { (char *)"image_zoom", _wrap_image_zoom, METH_VARARGS, NULL}, { (char *)"image_zoom_to", _wrap_image_zoom_to, METH_VARARGS, NULL}, { (char *)"image_tile", _wrap_image_tile, METH_VARARGS, NULL}, { (char *)"image_tile_to", _wrap_image_tile_to, METH_VARARGS, NULL}, { (char *)"image_brightness", _wrap_image_brightness, METH_VARARGS, NULL}, { (char *)"image_copy", _wrap_image_copy, METH_VARARGS, NULL}, { (char *)"image_swigregister", image_swigregister, METH_VARARGS, NULL}, { (char *)"new_animationframe", _wrap_new_animationframe, METH_VARARGS, NULL}, { (char *)"delete_animationframe", _wrap_delete_animationframe, METH_VARARGS, NULL}, { (char *)"animationframe_clear", _wrap_animationframe_clear, METH_VARARGS, NULL}, { (char *)"animationframe_is_masked", _wrap_animationframe_is_masked, METH_VARARGS, NULL}, { (char *)"animationframe_set_mask", _wrap_animationframe_set_mask, METH_VARARGS, NULL}, { (char *)"animationframe_alpha", _wrap_animationframe_alpha, METH_VARARGS, NULL}, { (char *)"animationframe_set_alpha", _wrap_animationframe_set_alpha, METH_VARARGS, NULL}, { (char *)"animationframe_image_nbr", _wrap_animationframe_image_nbr, METH_VARARGS, NULL}, { (char *)"animationframe_set_image_nbr", _wrap_animationframe_set_image_nbr, METH_VARARGS, NULL}, { (char *)"animationframe_delay", _wrap_animationframe_delay, METH_VARARGS, NULL}, { (char *)"animationframe_set_delay", _wrap_animationframe_set_delay, METH_VARARGS, NULL}, { (char *)"animationframe_nextframe", _wrap_animationframe_nextframe, METH_VARARGS, NULL}, { (char *)"animationframe_set_nextframe", _wrap_animationframe_set_nextframe, METH_VARARGS, NULL}, { (char *)"animationframe_offx", _wrap_animationframe_offx, METH_VARARGS, NULL}, { (char *)"animationframe_offy", _wrap_animationframe_offy, METH_VARARGS, NULL}, { (char *)"animationframe_set_offset", _wrap_animationframe_set_offset, METH_VARARGS, NULL}, { (char *)"animationframe_get", _wrap_animationframe_get, METH_VARARGS, NULL}, { (char *)"animationframe_put", _wrap_animationframe_put, METH_VARARGS, NULL}, { (char *)"animationframe_swigregister", animationframe_swigregister, METH_VARARGS, NULL}, { (char *)"PLAY_swigconstant", PLAY_swigconstant, METH_VARARGS, NULL}, { (char *)"STOP_swigconstant", STOP_swigconstant, METH_VARARGS, NULL}, { (char *)"new_animation", _wrap_new_animation, METH_VARARGS, NULL}, { (char *)"delete_animation", _wrap_delete_animation, METH_VARARGS, NULL}, { (char *)"animation_clear", _wrap_animation_clear, METH_VARARGS, NULL}, { (char *)"animation_play", _wrap_animation_play, METH_VARARGS, NULL}, { (char *)"animation_stop", _wrap_animation_stop, METH_VARARGS, NULL}, { (char *)"animation_playstate", _wrap_animation_playstate, METH_VARARGS, NULL}, { (char *)"animation_rewind", _wrap_animation_rewind, METH_VARARGS, NULL}, { (char *)"animation_next_frame", _wrap_animation_next_frame, METH_VARARGS, NULL}, { (char *)"animation_update", _wrap_animation_update, METH_VARARGS, NULL}, { (char *)"animation_draw", _wrap_animation_draw, METH_VARARGS, NULL}, { (char *)"animation_get", _wrap_animation_get, METH_VARARGS, NULL}, { (char *)"animation_load", _wrap_animation_load, METH_VARARGS, NULL}, { (char *)"animation_put", _wrap_animation_put, METH_VARARGS, NULL}, { (char *)"animation_save", _wrap_animation_save, METH_VARARGS, NULL}, { (char *)"animation_nbr_of_frames", _wrap_animation_nbr_of_frames, METH_VARARGS, NULL}, { (char *)"animation_nbr_of_images", _wrap_animation_nbr_of_images, METH_VARARGS, NULL}, { (char *)"animation_currentframe", _wrap_animation_currentframe, METH_VARARGS, NULL}, { (char *)"animation_set_currentframe", _wrap_animation_set_currentframe, METH_VARARGS, NULL}, { (char *)"animation_xoffset", _wrap_animation_xoffset, METH_VARARGS, NULL}, { (char *)"animation_yoffset", _wrap_animation_yoffset, METH_VARARGS, NULL}, { (char *)"animation_set_offset", _wrap_animation_set_offset, METH_VARARGS, NULL}, { (char *)"animation_get_frame", _wrap_animation_get_frame, METH_VARARGS, NULL}, { (char *)"animation_get_image", _wrap_animation_get_image, METH_VARARGS, NULL}, { (char *)"animation_insert_image", _wrap_animation_insert_image, METH_VARARGS, NULL}, { (char *)"animation_insert_frame", _wrap_animation_insert_frame, METH_VARARGS, NULL}, { (char *)"animation_delete_image", _wrap_animation_delete_image, METH_VARARGS, NULL}, { (char *)"animation_delete_frame", _wrap_animation_delete_frame, METH_VARARGS, NULL}, { (char *)"animation_zoom", _wrap_animation_zoom, METH_VARARGS, NULL}, { (char *)"animation_copy", _wrap_animation_copy, METH_VARARGS, NULL}, { (char *)"animation_swigregister", animation_swigregister, METH_VARARGS, NULL}, { (char *)"ALL_WALKABLE_swigconstant", ALL_WALKABLE_swigconstant, METH_VARARGS, NULL}, { (char *)"WALKABLE_SOUTH_swigconstant", WALKABLE_SOUTH_swigconstant, METH_VARARGS, NULL}, { (char *)"WALKABLE_NORTH_swigconstant", WALKABLE_NORTH_swigconstant, METH_VARARGS, NULL}, { (char *)"WALKABLE_EAST_swigconstant", WALKABLE_EAST_swigconstant, METH_VARARGS, NULL}, { (char *)"WALKABLE_WEST_swigconstant", WALKABLE_WEST_swigconstant, METH_VARARGS, NULL}, { (char *)"NONE_WALKABLE_swigconstant", NONE_WALKABLE_swigconstant, METH_VARARGS, NULL}, { (char *)"new_mapsquare_walkable", _wrap_new_mapsquare_walkable, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_get", _wrap_mapsquare_walkable_get, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_put", _wrap_mapsquare_walkable_put, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_is_walkable_west", _wrap_mapsquare_walkable_is_walkable_west, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_is_walkable_east", _wrap_mapsquare_walkable_is_walkable_east, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_is_walkable_north", _wrap_mapsquare_walkable_is_walkable_north, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_is_walkable_south", _wrap_mapsquare_walkable_is_walkable_south, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_set_walkable_west", _wrap_mapsquare_walkable_set_walkable_west, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_set_walkable_east", _wrap_mapsquare_walkable_set_walkable_east, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_set_walkable_north", _wrap_mapsquare_walkable_set_walkable_north, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_set_walkable_south", _wrap_mapsquare_walkable_set_walkable_south, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_get_walkable", _wrap_mapsquare_walkable_get_walkable, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_set_walkable", _wrap_mapsquare_walkable_set_walkable, METH_VARARGS, NULL}, { (char *)"delete_mapsquare_walkable", _wrap_delete_mapsquare_walkable, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_swigregister", mapsquare_walkable_swigregister, METH_VARARGS, NULL}, { (char *)"delete_mapsquare_walkable_area", _wrap_delete_mapsquare_walkable_area, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_clear", _wrap_mapsquare_walkable_area_clear, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_draw", _wrap_mapsquare_walkable_area_draw, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_area_length", _wrap_mapsquare_walkable_area_area_length, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_area_height", _wrap_mapsquare_walkable_area_area_height, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_get_square", _wrap_mapsquare_walkable_area_get_square, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_resize_area", _wrap_mapsquare_walkable_area_resize_area, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_base_x", _wrap_mapsquare_walkable_area_base_x, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_base_y", _wrap_mapsquare_walkable_area_base_y, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_set_base", _wrap_mapsquare_walkable_area_set_base, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_get", _wrap_mapsquare_walkable_area_get, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_put", _wrap_mapsquare_walkable_area_put, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_copy", _wrap_mapsquare_walkable_area_copy, METH_VARARGS, NULL}, { (char *)"mapsquare_walkable_area_swigregister", mapsquare_walkable_area_swigregister, METH_VARARGS, NULL}, { (char *)"new_mapsquare_tile", _wrap_new_mapsquare_tile, METH_VARARGS, NULL}, { (char *)"delete_mapsquare_tile", _wrap_delete_mapsquare_tile, METH_VARARGS, NULL}, { (char *)"mapsquare_tile_swigregister", mapsquare_tile_swigregister, METH_VARARGS, NULL}, { (char *)"new_mapsquare_char", _wrap_new_mapsquare_char, METH_VARARGS, NULL}, { (char *)"delete_mapsquare_char", _wrap_delete_mapsquare_char, METH_VARARGS, NULL}, { (char *)"mapsquare_char_swigregister", mapsquare_char_swigregister, METH_VARARGS, NULL}, { (char *)"new_mapsquare", _wrap_new_mapsquare, METH_VARARGS, NULL}, { (char *)"delete_mapsquare", _wrap_delete_mapsquare, METH_VARARGS, NULL}, { (char *)"mapsquare_x", _wrap_mapsquare_x, METH_VARARGS, NULL}, { (char *)"mapsquare_y", _wrap_mapsquare_y, METH_VARARGS, NULL}, { (char *)"mapsquare_is_free", _wrap_mapsquare_is_free, METH_VARARGS, NULL}, { (char *)"mapsquare_whoshere", _wrap_mapsquare_whoshere, METH_VARARGS, NULL}, { (char *)"mapsquare_g_set", _wrap_mapsquare_g_set, METH_VARARGS, NULL}, { (char *)"mapsquare_g_get", _wrap_mapsquare_g_get, METH_VARARGS, NULL}, { (char *)"mapsquare_h_set", _wrap_mapsquare_h_set, METH_VARARGS, NULL}, { (char *)"mapsquare_h_get", _wrap_mapsquare_h_get, METH_VARARGS, NULL}, { (char *)"mapsquare_f_set", _wrap_mapsquare_f_set, METH_VARARGS, NULL}, { (char *)"mapsquare_f_get", _wrap_mapsquare_f_get, METH_VARARGS, NULL}, { (char *)"mapsquare_parent_set", _wrap_mapsquare_parent_set, METH_VARARGS, NULL}, { (char *)"mapsquare_parent_get", _wrap_mapsquare_parent_get, METH_VARARGS, NULL}, { (char *)"mapsquare_can_use_for_pathfinding_set", _wrap_mapsquare_can_use_for_pathfinding_set, METH_VARARGS, NULL}, { (char *)"mapsquare_can_use_for_pathfinding_get", _wrap_mapsquare_can_use_for_pathfinding_get, METH_VARARGS, NULL}, { (char *)"mapsquare_swigregister", mapsquare_swigregister, METH_VARARGS, NULL}, { (char *)"new_mapsquare_area", _wrap_new_mapsquare_area, METH_VARARGS, NULL}, { (char *)"delete_mapsquare_area", _wrap_delete_mapsquare_area, METH_VARARGS, NULL}, { (char *)"mapsquare_area_clear", _wrap_mapsquare_area_clear, METH_VARARGS, NULL}, { (char *)"mapsquare_area_area_length", _wrap_mapsquare_area_area_length, METH_VARARGS, NULL}, { (char *)"mapsquare_area_area_height", _wrap_mapsquare_area_area_height, METH_VARARGS, NULL}, { (char *)"mapsquare_area_get_square", _wrap_mapsquare_area_get_square, METH_VARARGS, NULL}, { (char *)"mapsquare_area_resize_area", _wrap_mapsquare_area_resize_area, METH_VARARGS, NULL}, { (char *)"mapsquare_area_swigregister", mapsquare_area_swigregister, METH_VARARGS, NULL}, { (char *)"MAPOBJECTS_DIR_swigconstant", MAPOBJECTS_DIR_swigconstant, METH_VARARGS, NULL}, { (char *)"new_mapobject", _wrap_new_mapobject, METH_VARARGS, NULL}, { (char *)"delete_mapobject", _wrap_delete_mapobject, METH_VARARGS, NULL}, { (char *)"mapobject_clear", _wrap_mapobject_clear, METH_VARARGS, NULL}, { (char *)"mapobject_update", _wrap_mapobject_update, METH_VARARGS, NULL}, { (char *)"mapobject_draw", _wrap_mapobject_draw, METH_VARARGS, NULL}, { (char *)"mapobject_draw_from_base", _wrap_mapobject_draw_from_base, METH_VARARGS, NULL}, { (char *)"mapobject_get", _wrap_mapobject_get, METH_VARARGS, NULL}, { (char *)"mapobject_load", _wrap_mapobject_load, METH_VARARGS, NULL}, { (char *)"mapobject_put", _wrap_mapobject_put, METH_VARARGS, NULL}, { (char *)"mapobject_save", _wrap_mapobject_save, METH_VARARGS, NULL}, { (char *)"mapobject_nbr_of_animations", _wrap_mapobject_nbr_of_animations, METH_VARARGS, NULL}, { (char *)"mapobject_get_animation", _wrap_mapobject_get_animation, METH_VARARGS, NULL}, { (char *)"mapobject_insert_animation", _wrap_mapobject_insert_animation, METH_VARARGS, NULL}, { (char *)"mapobject_delete_animation", _wrap_mapobject_delete_animation, METH_VARARGS, NULL}, { (char *)"mapobject_copy", _wrap_mapobject_copy, METH_VARARGS, NULL}, { (char *)"mapobject_swigregister", mapobject_swigregister, METH_VARARGS, NULL}, { (char *)"MAPCHAR_DIR_swigconstant", MAPCHAR_DIR_swigconstant, METH_VARARGS, NULL}, { (char *)"STAND_NORTH_swigconstant", STAND_NORTH_swigconstant, METH_VARARGS, NULL}, { (char *)"STAND_SOUTH_swigconstant", STAND_SOUTH_swigconstant, METH_VARARGS, NULL}, { (char *)"STAND_WEST_swigconstant", STAND_WEST_swigconstant, METH_VARARGS, NULL}, { (char *)"STAND_EAST_swigconstant", STAND_EAST_swigconstant, METH_VARARGS, NULL}, { (char *)"WALK_NORTH_swigconstant", WALK_NORTH_swigconstant, METH_VARARGS, NULL}, { (char *)"WALK_SOUTH_swigconstant", WALK_SOUTH_swigconstant, METH_VARARGS, NULL}, { (char *)"WALK_WEST_swigconstant", WALK_WEST_swigconstant, METH_VARARGS, NULL}, { (char *)"WALK_EAST_swigconstant", WALK_EAST_swigconstant, METH_VARARGS, NULL}, { (char *)"NBR_MOVES_swigconstant", NBR_MOVES_swigconstant, METH_VARARGS, NULL}, { (char *)"NO_MOVE_swigconstant", NO_MOVE_swigconstant, METH_VARARGS, NULL}, { (char *)"new_mapcharacter", _wrap_new_mapcharacter, METH_VARARGS, NULL}, { (char *)"delete_mapcharacter", _wrap_delete_mapcharacter, METH_VARARGS, NULL}, { (char *)"mapcharacter_clear", _wrap_mapcharacter_clear, METH_VARARGS, NULL}, { (char *)"mapcharacter_filename", _wrap_mapcharacter_filename, METH_VARARGS, NULL}, { (char *)"mapcharacter_update", _wrap_mapcharacter_update, METH_VARARGS, NULL}, { (char *)"mapcharacter_draw", _wrap_mapcharacter_draw, METH_VARARGS, NULL}, { (char *)"mapcharacter_draw_bubble", _wrap_mapcharacter_draw_bubble, METH_VARARGS, NULL}, { (char *)"mapcharacter_get", _wrap_mapcharacter_get, METH_VARARGS, NULL}, { (char *)"mapcharacter_load", _wrap_mapcharacter_load, METH_VARARGS, NULL}, { (char *)"mapcharacter_put", _wrap_mapcharacter_put, METH_VARARGS, NULL}, { (char *)"mapcharacter_save", _wrap_mapcharacter_save, METH_VARARGS, NULL}, { (char *)"mapcharacter_get_state", _wrap_mapcharacter_get_state, METH_VARARGS, NULL}, { (char *)"mapcharacter_put_state", _wrap_mapcharacter_put_state, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_map", _wrap_mapcharacter_set_map, METH_VARARGS, NULL}, { (char *)"mapcharacter_remove_from_map", _wrap_mapcharacter_remove_from_map, METH_VARARGS, NULL}, { (char *)"mapcharacter_mymap", _wrap_mapcharacter_mymap, METH_VARARGS, NULL}, { (char *)"mapcharacter_stand_north", _wrap_mapcharacter_stand_north, METH_VARARGS, NULL}, { (char *)"mapcharacter_stand_south", _wrap_mapcharacter_stand_south, METH_VARARGS, NULL}, { (char *)"mapcharacter_stand_east", _wrap_mapcharacter_stand_east, METH_VARARGS, NULL}, { (char *)"mapcharacter_stand_west", _wrap_mapcharacter_stand_west, METH_VARARGS, NULL}, { (char *)"mapcharacter_stand", _wrap_mapcharacter_stand, METH_VARARGS, NULL}, { (char *)"mapcharacter_go_north", _wrap_mapcharacter_go_north, METH_VARARGS, NULL}, { (char *)"mapcharacter_go_south", _wrap_mapcharacter_go_south, METH_VARARGS, NULL}, { (char *)"mapcharacter_go_east", _wrap_mapcharacter_go_east, METH_VARARGS, NULL}, { (char *)"mapcharacter_go_west", _wrap_mapcharacter_go_west, METH_VARARGS, NULL}, { (char *)"mapcharacter_can_go_north", _wrap_mapcharacter_can_go_north, METH_VARARGS, NULL}, { (char *)"mapcharacter_can_go_south", _wrap_mapcharacter_can_go_south, METH_VARARGS, NULL}, { (char *)"mapcharacter_can_go_east", _wrap_mapcharacter_can_go_east, METH_VARARGS, NULL}, { (char *)"mapcharacter_can_go_west", _wrap_mapcharacter_can_go_west, METH_VARARGS, NULL}, { (char *)"mapcharacter_look_invert", _wrap_mapcharacter_look_invert, METH_VARARGS, NULL}, { (char *)"mapcharacter_whosnext", _wrap_mapcharacter_whosnext, METH_VARARGS, NULL}, { (char *)"mapcharacter_speak", _wrap_mapcharacter_speak, METH_VARARGS, NULL}, { (char *)"mapcharacter_is_speaking", _wrap_mapcharacter_is_speaking, METH_VARARGS, NULL}, { (char *)"mapcharacter_get_bubble", _wrap_mapcharacter_get_bubble, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_offset", _wrap_mapcharacter_set_offset, METH_VARARGS, NULL}, { (char *)"mapcharacter_remove_from_pos", _wrap_mapcharacter_remove_from_pos, METH_VARARGS, NULL}, { (char *)"mapcharacter_jump_to", _wrap_mapcharacter_jump_to, METH_VARARGS, NULL}, { (char *)"mapcharacter_submap", _wrap_mapcharacter_submap, METH_VARARGS, NULL}, { (char *)"mapcharacter_posx", _wrap_mapcharacter_posx, METH_VARARGS, NULL}, { (char *)"mapcharacter_posy", _wrap_mapcharacter_posy, METH_VARARGS, NULL}, { (char *)"mapcharacter_offx", _wrap_mapcharacter_offx, METH_VARARGS, NULL}, { (char *)"mapcharacter_offy", _wrap_mapcharacter_offy, METH_VARARGS, NULL}, { (char *)"mapcharacter_currentmove", _wrap_mapcharacter_currentmove, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_goal", _wrap_mapcharacter_set_goal, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_callback", _wrap_mapcharacter_set_callback, METH_VARARGS, NULL}, { (char *)"mapcharacter_follow_path", _wrap_mapcharacter_follow_path, METH_VARARGS, NULL}, { (char *)"mapcharacter_goal_reached", _wrap_mapcharacter_goal_reached, METH_VARARGS, NULL}, { (char *)"mapcharacter_stop_moving", _wrap_mapcharacter_stop_moving, METH_VARARGS, NULL}, { (char *)"mapcharacter_time_callback", _wrap_mapcharacter_time_callback, METH_VARARGS, NULL}, { (char *)"mapcharacter_time_callback_string", _wrap_mapcharacter_time_callback_string, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_schedule", _wrap_mapcharacter_set_schedule, METH_VARARGS, NULL}, { (char *)"mapcharacter_schedule_file", _wrap_mapcharacter_schedule_file, METH_VARARGS, NULL}, { (char *)"mapcharacter_is_schedule_activated", _wrap_mapcharacter_is_schedule_activated, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_schedule_active", _wrap_mapcharacter_set_schedule_active, METH_VARARGS, NULL}, { (char *)"mapcharacter_do_stuff", _wrap_mapcharacter_do_stuff, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_action", _wrap_mapcharacter_set_action, METH_VARARGS, NULL}, { (char *)"mapcharacter_action_file", _wrap_mapcharacter_action_file, METH_VARARGS, NULL}, { (char *)"mapcharacter_is_action_activated", _wrap_mapcharacter_is_action_activated, METH_VARARGS, NULL}, { (char *)"mapcharacter_set_action_active", _wrap_mapcharacter_set_action_active, METH_VARARGS, NULL}, { (char *)"mapcharacter_launch_action", _wrap_mapcharacter_launch_action, METH_VARARGS, NULL}, { (char *)"mapcharacter_get_animation", _wrap_mapcharacter_get_animation, METH_VARARGS, NULL}, { (char *)"mapcharacter_copy", _wrap_mapcharacter_copy, METH_VARARGS, NULL}, { (char *)"mapcharacter_swigregister", mapcharacter_swigregister, METH_VARARGS, NULL}, { (char *)"path_clear", _wrap_path_clear, METH_VARARGS, NULL}, { (char *)"path_calculate", _wrap_path_calculate, METH_VARARGS, NULL}, { (char *)"path_nbr_moves", _wrap_path_nbr_moves, METH_VARARGS, NULL}, { (char *)"path_get_move", _wrap_path_get_move, METH_VARARGS, NULL}, { (char *)"path_get_state", _wrap_path_get_state, METH_VARARGS, NULL}, { (char *)"path_put_state", _wrap_path_put_state, METH_VARARGS, NULL}, { (char *)"new_path", _wrap_new_path, METH_VARARGS, NULL}, { (char *)"delete_path", _wrap_delete_path, METH_VARARGS, NULL}, { (char *)"path_swigregister", path_swigregister, METH_VARARGS, NULL}, { (char *)"new_character", _wrap_new_character, METH_VARARGS, NULL}, { (char *)"delete_character", _wrap_delete_character, METH_VARARGS, NULL}, { (char *)"character_swigregister", character_swigregister, METH_VARARGS, NULL}, { (char *)"MAPS_DIR_swigconstant", MAPS_DIR_swigconstant, METH_VARARGS, NULL}, { (char *)"new_landmap", _wrap_new_landmap, METH_VARARGS, NULL}, { (char *)"delete_landmap", _wrap_delete_landmap, METH_VARARGS, NULL}, { (char *)"landmap_clear", _wrap_landmap_clear, METH_VARARGS, NULL}, { (char *)"landmap_nbr_of_mapobjects", _wrap_landmap_nbr_of_mapobjects, METH_VARARGS, NULL}, { (char *)"landmap_nbr_of_submaps", _wrap_landmap_nbr_of_submaps, METH_VARARGS, NULL}, { (char *)"landmap_nbr_of_mapcharacters", _wrap_landmap_nbr_of_mapcharacters, METH_VARARGS, NULL}, { (char *)"landmap_filename", _wrap_landmap_filename, METH_VARARGS, NULL}, { (char *)"landmap_get_mapcharacter", _wrap_landmap_get_mapcharacter, METH_VARARGS, NULL}, { (char *)"landmap_get_mapobject", _wrap_landmap_get_mapobject, METH_VARARGS, NULL}, { (char *)"landmap_get_submap", _wrap_landmap_get_submap, METH_VARARGS, NULL}, { (char *)"landmap_update", _wrap_landmap_update, METH_VARARGS, NULL}, { (char *)"landmap_get", _wrap_landmap_get, METH_VARARGS, NULL}, { (char *)"landmap_load", _wrap_landmap_load, METH_VARARGS, NULL}, { (char *)"landmap_put", _wrap_landmap_put, METH_VARARGS, NULL}, { (char *)"landmap_save", _wrap_landmap_save, METH_VARARGS, NULL}, { (char *)"landmap_get_state", _wrap_landmap_get_state, METH_VARARGS, NULL}, { (char *)"landmap_put_state", _wrap_landmap_put_state, METH_VARARGS, NULL}, { (char *)"landmap_put_mapobject", _wrap_landmap_put_mapobject, METH_VARARGS, NULL}, { (char *)"landmap_remove_mapobject", _wrap_landmap_remove_mapobject, METH_VARARGS, NULL}, { (char *)"landmap_insert_submap", _wrap_landmap_insert_submap, METH_VARARGS, NULL}, { (char *)"landmap_delete_submap", _wrap_landmap_delete_submap, METH_VARARGS, NULL}, { (char *)"landmap_insert_mapobject", _wrap_landmap_insert_mapobject, METH_VARARGS, NULL}, { (char *)"landmap_delete_mapobject", _wrap_landmap_delete_mapobject, METH_VARARGS, NULL}, { (char *)"landmap_swigregister", landmap_swigregister, METH_VARARGS, NULL}, { (char *)"new_mapview", _wrap_new_mapview, METH_VARARGS, NULL}, { (char *)"delete_mapview", _wrap_delete_mapview, METH_VARARGS, NULL}, { (char *)"mapview_attach_map", _wrap_mapview_attach_map, METH_VARARGS, NULL}, { (char *)"mapview_detach_map", _wrap_mapview_detach_map, METH_VARARGS, NULL}, { (char *)"mapview_set_pos", _wrap_mapview_set_pos, METH_VARARGS, NULL}, { (char *)"mapview_center_on", _wrap_mapview_center_on, METH_VARARGS, NULL}, { (char *)"mapview_currentsubmap", _wrap_mapview_currentsubmap, METH_VARARGS, NULL}, { (char *)"mapview_posx", _wrap_mapview_posx, METH_VARARGS, NULL}, { (char *)"mapview_posy", _wrap_mapview_posy, METH_VARARGS, NULL}, { (char *)"mapview_offx", _wrap_mapview_offx, METH_VARARGS, NULL}, { (char *)"mapview_offy", _wrap_mapview_offy, METH_VARARGS, NULL}, { (char *)"mapview_can_scroll_right", _wrap_mapview_can_scroll_right, METH_VARARGS, NULL}, { (char *)"mapview_can_scroll_left", _wrap_mapview_can_scroll_left, METH_VARARGS, NULL}, { (char *)"mapview_can_scroll_up", _wrap_mapview_can_scroll_up, METH_VARARGS, NULL}, { (char *)"mapview_can_scroll_down", _wrap_mapview_can_scroll_down, METH_VARARGS, NULL}, { (char *)"mapview_scroll_right", _wrap_mapview_scroll_right, METH_VARARGS, NULL}, { (char *)"mapview_scroll_left", _wrap_mapview_scroll_left, METH_VARARGS, NULL}, { (char *)"mapview_scroll_down", _wrap_mapview_scroll_down, METH_VARARGS, NULL}, { (char *)"mapview_scroll_up", _wrap_mapview_scroll_up, METH_VARARGS, NULL}, { (char *)"mapview_get_state", _wrap_mapview_get_state, METH_VARARGS, NULL}, { (char *)"mapview_put_state", _wrap_mapview_put_state, METH_VARARGS, NULL}, { (char *)"mapview_resize", _wrap_mapview_resize, METH_VARARGS, NULL}, { (char *)"mapview_set_schedule", _wrap_mapview_set_schedule, METH_VARARGS, NULL}, { (char *)"mapview_schedule_file", _wrap_mapview_schedule_file, METH_VARARGS, NULL}, { (char *)"mapview_update", _wrap_mapview_update, METH_VARARGS, NULL}, { (char *)"mapview_draw", _wrap_mapview_draw, METH_VARARGS, NULL}, { (char *)"mapview_swigregister", mapview_swigregister, METH_VARARGS, NULL}, { (char *)"new_adonthell", _wrap_new_adonthell, METH_VARARGS, NULL}, { (char *)"adonthell_main", _wrap_adonthell_main, METH_VARARGS, NULL}, { (char *)"adonthell_main_loop", _wrap_adonthell_main_loop, METH_VARARGS, NULL}, { (char *)"adonthell_main_quit", _wrap_adonthell_main_quit, METH_VARARGS, NULL}, { (char *)"adonthell_fade_out", _wrap_adonthell_fade_out, METH_VARARGS, NULL}, { (char *)"adonthell_fade_in", _wrap_adonthell_fade_in, METH_VARARGS, NULL}, { (char *)"adonthell_get_state", _wrap_adonthell_get_state, METH_VARARGS, NULL}, { (char *)"adonthell_put_state", _wrap_adonthell_put_state, METH_VARARGS, NULL}, { (char *)"adonthell_control_active", _wrap_adonthell_control_active, METH_VARARGS, NULL}, { (char *)"adonthell_set_control_active", _wrap_adonthell_set_control_active, METH_VARARGS, NULL}, { (char *)"adonthell_get_landmap", _wrap_adonthell_get_landmap, METH_VARARGS, NULL}, { (char *)"adonthell_update_map", _wrap_adonthell_update_map, METH_VARARGS, NULL}, { (char *)"adonthell_set_update_map", _wrap_adonthell_set_update_map, METH_VARARGS, NULL}, { (char *)"adonthell_get_mapview", _wrap_adonthell_get_mapview, METH_VARARGS, NULL}, { (char *)"adonthell_draw", _wrap_adonthell_draw, METH_VARARGS, NULL}, { (char *)"adonthell_set_mapview_schedule", _wrap_adonthell_set_mapview_schedule, METH_VARARGS, NULL}, { (char *)"adonthell_mapview_start", _wrap_adonthell_mapview_start, METH_VARARGS, NULL}, { (char *)"adonthell_mapview_stop", _wrap_adonthell_mapview_stop, METH_VARARGS, NULL}, { (char *)"delete_adonthell", _wrap_delete_adonthell, METH_VARARGS, NULL}, { (char *)"adonthell_swigregister", adonthell_swigregister, METH_VARARGS, NULL}, { (char *)"WIN_NB_TABLE_CHAR_swigconstant", WIN_NB_TABLE_CHAR_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_TEXT_MAX_LENGTH_swigconstant", WIN_TEXT_MAX_LENGTH_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_HEIGHT_swigconstant", WIN_FONT_HEIGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_LENGHT_swigconstant", WIN_FONT_LENGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SPACE_LENGHT_swigconstant", WIN_SPACE_LENGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_DIRECTORY_swigconstant", WIN_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_DIRECTORY_swigconstant", WIN_FONT_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BORDER_DIRECTORY_swigconstant", WIN_BORDER_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BACKGROUND_DIRECTORY_swigconstant", WIN_BACKGROUND_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_DIRECTORY_swigconstant", WIN_SCROLLBAR_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CURSOR_DIRECTORY_swigconstant", WIN_CURSOR_DIRECTORY_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_FILE_IDX_swigconstant", WIN_FONT_FILE_IDX_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_FILE_PIC_swigconstant", WIN_FONT_FILE_PIC_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_FONT_FILE_swigconstant", WIN_FONT_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_V_BORDER_TEMPLATE_FILE_swigconstant", WIN_V_BORDER_TEMPLATE_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_H_BORDER_TEMPLATE_FILE_swigconstant", WIN_H_BORDER_TEMPLATE_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CORNER_TOP_LEFT_FILE_swigconstant", WIN_CORNER_TOP_LEFT_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CORNER_TOP_RIGHT_FILE_swigconstant", WIN_CORNER_TOP_RIGHT_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CORNER_BOTTOM_LEFT_FILE_swigconstant", WIN_CORNER_BOTTOM_LEFT_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CORNER_BOTTOM_RIGHT_FILE_swigconstant", WIN_CORNER_BOTTOM_RIGHT_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BACKGROUND_FILE_swigconstant", WIN_BACKGROUND_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BAR_TOP_swigconstant", WIN_SCROLLBAR_BAR_TOP_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BAR_MID_swigconstant", WIN_SCROLLBAR_BAR_MID_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BAR_BOT_swigconstant", WIN_SCROLLBAR_BAR_BOT_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BAR_FLEX_swigconstant", WIN_SCROLLBAR_BAR_FLEX_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BACK_TOP_swigconstant", WIN_SCROLLBAR_BACK_TOP_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BACK_MID_swigconstant", WIN_SCROLLBAR_BACK_MID_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_SCROLLBAR_BACK_BOT_swigconstant", WIN_SCROLLBAR_BACK_BOT_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_CURSOR_FILE_swigconstant", WIN_CURSOR_FILE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BORDER_NORMAL_SIZE_swigconstant", WIN_BORDER_NORMAL_SIZE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BORDER_MINI_SIZE_swigconstant", WIN_BORDER_MINI_SIZE_swigconstant, METH_VARARGS, NULL}, { (char *)"WIN_BRIGHTNESS_LEVEL_swigconstant", WIN_BRIGHTNESS_LEVEL_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_manager", _wrap_new_win_manager, METH_VARARGS, NULL}, { (char *)"delete_win_manager", _wrap_delete_win_manager, METH_VARARGS, NULL}, { (char *)"win_manager_add", _wrap_win_manager_add, METH_VARARGS, NULL}, { (char *)"win_manager_remove", _wrap_win_manager_remove, METH_VARARGS, NULL}, { (char *)"win_manager_update", _wrap_win_manager_update, METH_VARARGS, NULL}, { (char *)"win_manager_input_update", _wrap_win_manager_input_update, METH_VARARGS, NULL}, { (char *)"win_manager_draw", _wrap_win_manager_draw, METH_VARARGS, NULL}, { (char *)"win_manager_set_focus", _wrap_win_manager_set_focus, METH_VARARGS, NULL}, { (char *)"win_manager_destroy", _wrap_win_manager_destroy, METH_VARARGS, NULL}, { (char *)"win_manager_get_active", _wrap_win_manager_get_active, METH_VARARGS, NULL}, { (char *)"win_manager_init", _wrap_win_manager_init, METH_VARARGS, NULL}, { (char *)"win_manager_cleanup", _wrap_win_manager_cleanup, METH_VARARGS, NULL}, { (char *)"win_manager_add_theme", _wrap_win_manager_add_theme, METH_VARARGS, NULL}, { (char *)"win_manager_remove_theme", _wrap_win_manager_remove_theme, METH_VARARGS, NULL}, { (char *)"win_manager_get_theme", _wrap_win_manager_get_theme, METH_VARARGS, NULL}, { (char *)"win_manager_add_font", _wrap_win_manager_add_font, METH_VARARGS, NULL}, { (char *)"win_manager_remove_font", _wrap_win_manager_remove_font, METH_VARARGS, NULL}, { (char *)"win_manager_get_font", _wrap_win_manager_get_font, METH_VARARGS, NULL}, { (char *)"win_manager_swigregister", win_manager_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_font", _wrap_new_win_font, METH_VARARGS, NULL}, { (char *)"delete_win_font", _wrap_delete_win_font, METH_VARARGS, NULL}, { (char *)"win_font_load", _wrap_win_font_load, METH_VARARGS, NULL}, { (char *)"win_font_in_table", _wrap_win_font_in_table, METH_VARARGS, NULL}, { (char *)"win_font_height", _wrap_win_font_height, METH_VARARGS, NULL}, { (char *)"win_font_length", _wrap_win_font_length, METH_VARARGS, NULL}, { (char *)"win_font_cursor_set", _wrap_win_font_cursor_set, METH_VARARGS, NULL}, { (char *)"win_font_cursor_get", _wrap_win_font_cursor_get, METH_VARARGS, NULL}, { (char *)"win_font_swigregister", win_font_swigregister, METH_VARARGS, NULL}, { (char *)"win_event_ACTIVATE_swigconstant", win_event_ACTIVATE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_UNACTIVATE_swigconstant", win_event_UNACTIVATE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_UPDATE_swigconstant", win_event_UPDATE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_DRAW_swigconstant", win_event_DRAW_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_DRAW_ON_VISIBLE_swigconstant", win_event_DRAW_ON_VISIBLE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_ACTIVATE_KEY_swigconstant", win_event_ACTIVATE_KEY_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_SELECT_swigconstant", win_event_SELECT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_UNSELECT_swigconstant", win_event_UNSELECT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_KEYBOARD_swigconstant", win_event_KEYBOARD_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_SCROLL_UP_swigconstant", win_event_SCROLL_UP_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_SCROLL_DOWN_swigconstant", win_event_SCROLL_DOWN_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_NEXT_swigconstant", win_event_NEXT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_PREVIOUS_swigconstant", win_event_PREVIOUS_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_CLOSE_swigconstant", win_event_CLOSE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_event_DESTROY_swigconstant", win_event_DESTROY_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_event", _wrap_new_win_event, METH_VARARGS, NULL}, { (char *)"win_event_set_return_code", _wrap_win_event_set_return_code, METH_VARARGS, NULL}, { (char *)"win_event_update", _wrap_win_event_update, METH_VARARGS, NULL}, { (char *)"win_event_py_signal_connect", _wrap_win_event_py_signal_connect, METH_VARARGS, NULL}, { (char *)"delete_win_event", _wrap_delete_win_event, METH_VARARGS, NULL}, { (char *)"win_event_swigregister", win_event_swigregister, METH_VARARGS, NULL}, { (char *)"win_border_MINI_swigconstant", win_border_MINI_swigconstant, METH_VARARGS, NULL}, { (char *)"win_border_NORMAL_swigconstant", win_border_NORMAL_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_border", _wrap_new_win_border, METH_VARARGS, NULL}, { (char *)"delete_win_border", _wrap_delete_win_border, METH_VARARGS, NULL}, { (char *)"win_border_load", _wrap_win_border_load, METH_VARARGS, NULL}, { (char *)"win_border_update", _wrap_win_border_update, METH_VARARGS, NULL}, { (char *)"win_border_destroy", _wrap_win_border_destroy, METH_VARARGS, NULL}, { (char *)"win_border_draw", _wrap_win_border_draw, METH_VARARGS, NULL}, { (char *)"win_border_set_visible_border", _wrap_win_border_set_visible_border, METH_VARARGS, NULL}, { (char *)"win_border_set_brightness_border", _wrap_win_border_set_brightness_border, METH_VARARGS, NULL}, { (char *)"win_border_set_border", _wrap_win_border_set_border, METH_VARARGS, NULL}, { (char *)"win_border_set_trans_border", _wrap_win_border_set_trans_border, METH_VARARGS, NULL}, { (char *)"win_border_length_border", _wrap_win_border_length_border, METH_VARARGS, NULL}, { (char *)"win_border_height_border", _wrap_win_border_height_border, METH_VARARGS, NULL}, { (char *)"win_border_swigregister", win_border_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_background", _wrap_new_win_background, METH_VARARGS, NULL}, { (char *)"delete_win_background", _wrap_delete_win_background, METH_VARARGS, NULL}, { (char *)"win_background_load", _wrap_win_background_load, METH_VARARGS, NULL}, { (char *)"win_background_update", _wrap_win_background_update, METH_VARARGS, NULL}, { (char *)"win_background_destroy", _wrap_win_background_destroy, METH_VARARGS, NULL}, { (char *)"win_background_draw", _wrap_win_background_draw, METH_VARARGS, NULL}, { (char *)"win_background_set_visible_background", _wrap_win_background_set_visible_background, METH_VARARGS, NULL}, { (char *)"win_background_set_background", _wrap_win_background_set_background, METH_VARARGS, NULL}, { (char *)"win_background_set_brightness_background", _wrap_win_background_set_brightness_background, METH_VARARGS, NULL}, { (char *)"win_background_set_trans_background", _wrap_win_background_set_trans_background, METH_VARARGS, NULL}, { (char *)"win_background_swigregister", win_background_swigregister, METH_VARARGS, NULL}, { (char *)"win_base_ALIGN_NONE_swigconstant", win_base_ALIGN_NONE_swigconstant, METH_VARARGS, NULL}, { (char *)"win_base_ALIGN_LEFT_swigconstant", win_base_ALIGN_LEFT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_base_ALIGN_CENTER_swigconstant", win_base_ALIGN_CENTER_swigconstant, METH_VARARGS, NULL}, { (char *)"win_base_ALIGN_RIGHT_swigconstant", win_base_ALIGN_RIGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_base", _wrap_new_win_base, METH_VARARGS, NULL}, { (char *)"win_base_x", _wrap_win_base_x, METH_VARARGS, NULL}, { (char *)"win_base_y", _wrap_win_base_y, METH_VARARGS, NULL}, { (char *)"win_base_pad_x", _wrap_win_base_pad_x, METH_VARARGS, NULL}, { (char *)"win_base_pad_y", _wrap_win_base_pad_y, METH_VARARGS, NULL}, { (char *)"win_base_real_x", _wrap_win_base_real_x, METH_VARARGS, NULL}, { (char *)"win_base_real_y", _wrap_win_base_real_y, METH_VARARGS, NULL}, { (char *)"win_base_move", _wrap_win_base_move, METH_VARARGS, NULL}, { (char *)"win_base_resize", _wrap_win_base_resize, METH_VARARGS, NULL}, { (char *)"win_base_is_visible", _wrap_win_base_is_visible, METH_VARARGS, NULL}, { (char *)"win_base_set_visible", _wrap_win_base_set_visible, METH_VARARGS, NULL}, { (char *)"win_base_is_activate", _wrap_win_base_is_activate, METH_VARARGS, NULL}, { (char *)"win_base_set_activate", _wrap_win_base_set_activate, METH_VARARGS, NULL}, { (char *)"win_base_is_focus", _wrap_win_base_is_focus, METH_VARARGS, NULL}, { (char *)"win_base_set_focus", _wrap_win_base_set_focus, METH_VARARGS, NULL}, { (char *)"win_base_is_trans", _wrap_win_base_is_trans, METH_VARARGS, NULL}, { (char *)"win_base_set_trans", _wrap_win_base_set_trans, METH_VARARGS, NULL}, { (char *)"win_base_is_brightness", _wrap_win_base_is_brightness, METH_VARARGS, NULL}, { (char *)"win_base_set_brightness", _wrap_win_base_set_brightness, METH_VARARGS, NULL}, { (char *)"win_base_set_align", _wrap_win_base_set_align, METH_VARARGS, NULL}, { (char *)"win_base_align", _wrap_win_base_align, METH_VARARGS, NULL}, { (char *)"win_base_is_can_be_selected", _wrap_win_base_is_can_be_selected, METH_VARARGS, NULL}, { (char *)"win_base_set_can_be_selected", _wrap_win_base_set_can_be_selected, METH_VARARGS, NULL}, { (char *)"win_base_update", _wrap_win_base_update, METH_VARARGS, NULL}, { (char *)"win_base_draw", _wrap_win_base_draw, METH_VARARGS, NULL}, { (char *)"win_base_input_update", _wrap_win_base_input_update, METH_VARARGS, NULL}, { (char *)"delete_win_base", _wrap_delete_win_base, METH_VARARGS, NULL}, { (char *)"win_base_swigregister", win_base_swigregister, METH_VARARGS, NULL}, { (char *)"win_container_SPACE_WITH_BORDER_swigconstant", win_container_SPACE_WITH_BORDER_swigconstant, METH_VARARGS, NULL}, { (char *)"win_container_SPACE_WITH_OBJECT_swigconstant", win_container_SPACE_WITH_OBJECT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_container_LIST_LAYOUT_swigconstant", win_container_LIST_LAYOUT_swigconstant, METH_VARARGS, NULL}, { (char *)"win_container_NO_LAYOUT_swigconstant", win_container_NO_LAYOUT_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_container", _wrap_new_win_container, METH_VARARGS, NULL}, { (char *)"win_container_move", _wrap_win_container_move, METH_VARARGS, NULL}, { (char *)"win_container_resize", _wrap_win_container_resize, METH_VARARGS, NULL}, { (char *)"win_container_add", _wrap_win_container_add, METH_VARARGS, NULL}, { (char *)"win_container_remove", _wrap_win_container_remove, METH_VARARGS, NULL}, { (char *)"win_container_remove_all", _wrap_win_container_remove_all, METH_VARARGS, NULL}, { (char *)"win_container_destroy", _wrap_win_container_destroy, METH_VARARGS, NULL}, { (char *)"delete_win_container", _wrap_delete_win_container, METH_VARARGS, NULL}, { (char *)"win_container_update", _wrap_win_container_update, METH_VARARGS, NULL}, { (char *)"win_container_input_update", _wrap_win_container_input_update, METH_VARARGS, NULL}, { (char *)"win_container_draw", _wrap_win_container_draw, METH_VARARGS, NULL}, { (char *)"win_container_set_visible_all", _wrap_win_container_set_visible_all, METH_VARARGS, NULL}, { (char *)"win_container_set_brightness", _wrap_win_container_set_brightness, METH_VARARGS, NULL}, { (char *)"win_container_set_trans", _wrap_win_container_set_trans, METH_VARARGS, NULL}, { (char *)"win_container_set_space_with_border", _wrap_win_container_set_space_with_border, METH_VARARGS, NULL}, { (char *)"win_container_set_space_with_object", _wrap_win_container_set_space_with_object, METH_VARARGS, NULL}, { (char *)"win_container_space_with_border", _wrap_win_container_space_with_border, METH_VARARGS, NULL}, { (char *)"win_container_space_with_object", _wrap_win_container_space_with_object, METH_VARARGS, NULL}, { (char *)"win_container_set_layout", _wrap_win_container_set_layout, METH_VARARGS, NULL}, { (char *)"win_container_set_focus_object", _wrap_win_container_set_focus_object, METH_VARARGS, NULL}, { (char *)"win_container_focus_object", _wrap_win_container_focus_object, METH_VARARGS, NULL}, { (char *)"win_container_swigregister", win_container_swigregister, METH_VARARGS, NULL}, { (char *)"delete_win_image", _wrap_delete_win_image, METH_VARARGS, NULL}, { (char *)"win_image_draw", _wrap_win_image_draw, METH_VARARGS, NULL}, { (char *)"win_image_update", _wrap_win_image_update, METH_VARARGS, NULL}, { (char *)"win_image_input_update", _wrap_win_image_input_update, METH_VARARGS, NULL}, { (char *)"win_image_set_brightness", _wrap_win_image_set_brightness, METH_VARARGS, NULL}, { (char *)"win_image_set_trans", _wrap_win_image_set_trans, METH_VARARGS, NULL}, { (char *)"win_image_pack", _wrap_win_image_pack, METH_VARARGS, NULL}, { (char *)"win_image_set_auto_refresh", _wrap_win_image_set_auto_refresh, METH_VARARGS, NULL}, { (char *)"new_win_image", _wrap_new_win_image, METH_VARARGS, NULL}, { (char *)"win_image_swigregister", win_image_swigregister, METH_VARARGS, NULL}, { (char *)"label_NOTHING_swigconstant", label_NOTHING_swigconstant, METH_VARARGS, NULL}, { (char *)"label_AUTO_HEIGHT_swigconstant", label_AUTO_HEIGHT_swigconstant, METH_VARARGS, NULL}, { (char *)"label_AUTO_SIZE_swigconstant", label_AUTO_SIZE_swigconstant, METH_VARARGS, NULL}, { (char *)"new_label", _wrap_new_label, METH_VARARGS, NULL}, { (char *)"label_text_string", _wrap_label_text_string, METH_VARARGS, NULL}, { (char *)"label_text_char", _wrap_label_text_char, METH_VARARGS, NULL}, { (char *)"label_set_text", _wrap_label_set_text, METH_VARARGS, NULL}, { (char *)"label_add_text", _wrap_label_add_text, METH_VARARGS, NULL}, { (char *)"label_set_font", _wrap_label_set_font, METH_VARARGS, NULL}, { (char *)"label_set_form", _wrap_label_set_form, METH_VARARGS, NULL}, { (char *)"label_set_cursor_visible", _wrap_label_set_cursor_visible, METH_VARARGS, NULL}, { (char *)"label_set_cursor_moveable", _wrap_label_set_cursor_moveable, METH_VARARGS, NULL}, { (char *)"label_resize", _wrap_label_resize, METH_VARARGS, NULL}, { (char *)"label_update", _wrap_label_update, METH_VARARGS, NULL}, { (char *)"label_input_update", _wrap_label_input_update, METH_VARARGS, NULL}, { (char *)"delete_label", _wrap_delete_label, METH_VARARGS, NULL}, { (char *)"label_swigregister", label_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_label", _wrap_new_win_label, METH_VARARGS, NULL}, { (char *)"delete_win_label", _wrap_delete_win_label, METH_VARARGS, NULL}, { (char *)"win_label_draw", _wrap_win_label_draw, METH_VARARGS, NULL}, { (char *)"win_label_update", _wrap_win_label_update, METH_VARARGS, NULL}, { (char *)"win_label_input_update", _wrap_win_label_input_update, METH_VARARGS, NULL}, { (char *)"win_label_set_brightness", _wrap_win_label_set_brightness, METH_VARARGS, NULL}, { (char *)"win_label_set_trans", _wrap_win_label_set_trans, METH_VARARGS, NULL}, { (char *)"win_label_pack", _wrap_win_label_pack, METH_VARARGS, NULL}, { (char *)"win_label_set_auto_refresh", _wrap_win_label_set_auto_refresh, METH_VARARGS, NULL}, { (char *)"win_label_swigregister", win_label_swigregister, METH_VARARGS, NULL}, { (char *)"label_input_input_update", _wrap_label_input_input_update, METH_VARARGS, NULL}, { (char *)"new_label_input", _wrap_new_label_input, METH_VARARGS, NULL}, { (char *)"delete_label_input", _wrap_delete_label_input, METH_VARARGS, NULL}, { (char *)"label_input_swigregister", label_input_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_write", _wrap_new_win_write, METH_VARARGS, NULL}, { (char *)"delete_win_write", _wrap_delete_win_write, METH_VARARGS, NULL}, { (char *)"win_write_draw", _wrap_win_write_draw, METH_VARARGS, NULL}, { (char *)"win_write_update", _wrap_win_write_update, METH_VARARGS, NULL}, { (char *)"win_write_input_update", _wrap_win_write_input_update, METH_VARARGS, NULL}, { (char *)"win_write_set_brightness", _wrap_win_write_set_brightness, METH_VARARGS, NULL}, { (char *)"win_write_set_trans", _wrap_win_write_set_trans, METH_VARARGS, NULL}, { (char *)"win_write_pack", _wrap_win_write_pack, METH_VARARGS, NULL}, { (char *)"win_write_set_auto_refresh", _wrap_win_write_set_auto_refresh, METH_VARARGS, NULL}, { (char *)"win_write_swigregister", win_write_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_mapview", _wrap_new_win_mapview, METH_VARARGS, NULL}, { (char *)"delete_win_mapview", _wrap_delete_win_mapview, METH_VARARGS, NULL}, { (char *)"win_mapview_draw", _wrap_win_mapview_draw, METH_VARARGS, NULL}, { (char *)"win_mapview_update", _wrap_win_mapview_update, METH_VARARGS, NULL}, { (char *)"win_mapview_input_update", _wrap_win_mapview_input_update, METH_VARARGS, NULL}, { (char *)"win_mapview_set_brightness", _wrap_win_mapview_set_brightness, METH_VARARGS, NULL}, { (char *)"win_mapview_set_trans", _wrap_win_mapview_set_trans, METH_VARARGS, NULL}, { (char *)"win_mapview_pack", _wrap_win_mapview_pack, METH_VARARGS, NULL}, { (char *)"win_mapview_set_auto_refresh", _wrap_win_mapview_set_auto_refresh, METH_VARARGS, NULL}, { (char *)"win_mapview_swigregister", win_mapview_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_scrollbar", _wrap_new_win_scrollbar, METH_VARARGS, NULL}, { (char *)"delete_win_scrollbar", _wrap_delete_win_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_update_bar", _wrap_win_scrollbar_update_bar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_load", _wrap_win_scrollbar_load, METH_VARARGS, NULL}, { (char *)"win_scrollbar_update_back", _wrap_win_scrollbar_update_back, METH_VARARGS, NULL}, { (char *)"win_scrollbar_destroy", _wrap_win_scrollbar_destroy, METH_VARARGS, NULL}, { (char *)"win_scrollbar_set_scrollbar", _wrap_win_scrollbar_set_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_set_visible_scrollbar", _wrap_win_scrollbar_set_visible_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_set_trans_scrollbar", _wrap_win_scrollbar_set_trans_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_set_brightness_scrollbar", _wrap_win_scrollbar_set_brightness_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_draw", _wrap_win_scrollbar_draw, METH_VARARGS, NULL}, { (char *)"win_scrollbar_height_bar", _wrap_win_scrollbar_height_bar, METH_VARARGS, NULL}, { (char *)"win_scrollbar_swigregister", win_scrollbar_swigregister, METH_VARARGS, NULL}, { (char *)"win_scroll_PAD_DEFAULT_swigconstant", win_scroll_PAD_DEFAULT_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_scroll", _wrap_new_win_scroll, METH_VARARGS, NULL}, { (char *)"win_scroll_amplitude", _wrap_win_scroll_amplitude, METH_VARARGS, NULL}, { (char *)"win_scroll_add", _wrap_win_scroll_add, METH_VARARGS, NULL}, { (char *)"win_scroll_remove", _wrap_win_scroll_remove, METH_VARARGS, NULL}, { (char *)"win_scroll_remove_all", _wrap_win_scroll_remove_all, METH_VARARGS, NULL}, { (char *)"win_scroll_resize", _wrap_win_scroll_resize, METH_VARARGS, NULL}, { (char *)"win_scroll_destroy", _wrap_win_scroll_destroy, METH_VARARGS, NULL}, { (char *)"win_scroll_draw", _wrap_win_scroll_draw, METH_VARARGS, NULL}, { (char *)"win_scroll_update", _wrap_win_scroll_update, METH_VARARGS, NULL}, { (char *)"win_scroll_input_update", _wrap_win_scroll_input_update, METH_VARARGS, NULL}, { (char *)"win_scroll_set_space_between_border", _wrap_win_scroll_set_space_between_border, METH_VARARGS, NULL}, { (char *)"win_scroll_set_space_between_object", _wrap_win_scroll_set_space_between_object, METH_VARARGS, NULL}, { (char *)"win_scroll_cursor_y", _wrap_win_scroll_cursor_y, METH_VARARGS, NULL}, { (char *)"win_scroll_set_auto_scrollbar", _wrap_win_scroll_set_auto_scrollbar, METH_VARARGS, NULL}, { (char *)"win_scroll_set_auto_refresh", _wrap_win_scroll_set_auto_refresh, METH_VARARGS, NULL}, { (char *)"win_scroll_set_brightness", _wrap_win_scroll_set_brightness, METH_VARARGS, NULL}, { (char *)"win_scroll_set_trans", _wrap_win_scroll_set_trans, METH_VARARGS, NULL}, { (char *)"delete_win_scroll", _wrap_delete_win_scroll, METH_VARARGS, NULL}, { (char *)"win_scroll_swigregister", win_scroll_swigregister, METH_VARARGS, NULL}, { (char *)"win_select_MODE_BORDER_swigconstant", win_select_MODE_BORDER_swigconstant, METH_VARARGS, NULL}, { (char *)"win_select_MODE_BRIGHTNESS_swigconstant", win_select_MODE_BRIGHTNESS_swigconstant, METH_VARARGS, NULL}, { (char *)"new_win_select", _wrap_new_win_select, METH_VARARGS, NULL}, { (char *)"win_select_input_update", _wrap_win_select_input_update, METH_VARARGS, NULL}, { (char *)"win_select_add", _wrap_win_select_add, METH_VARARGS, NULL}, { (char *)"win_select_remove", _wrap_win_select_remove, METH_VARARGS, NULL}, { (char *)"win_select_remove_all", _wrap_win_select_remove_all, METH_VARARGS, NULL}, { (char *)"win_select_set_mode", _wrap_win_select_set_mode, METH_VARARGS, NULL}, { (char *)"win_select_set_border_select", _wrap_win_select_set_border_select, METH_VARARGS, NULL}, { (char *)"win_select_set_circle", _wrap_win_select_set_circle, METH_VARARGS, NULL}, { (char *)"win_select_is_circle", _wrap_win_select_is_circle, METH_VARARGS, NULL}, { (char *)"win_select_set_default", _wrap_win_select_set_default, METH_VARARGS, NULL}, { (char *)"win_select_set_default_object", _wrap_win_select_set_default_object, METH_VARARGS, NULL}, { (char *)"win_select_set_default_position", _wrap_win_select_set_default_position, METH_VARARGS, NULL}, { (char *)"win_select_get_selected_object", _wrap_win_select_get_selected_object, METH_VARARGS, NULL}, { (char *)"win_select_get_selected_position", _wrap_win_select_get_selected_position, METH_VARARGS, NULL}, { (char *)"delete_win_select", _wrap_delete_win_select, METH_VARARGS, NULL}, { (char *)"win_select_swigregister", win_select_swigregister, METH_VARARGS, NULL}, { (char *)"new_win_theme", _wrap_new_win_theme, METH_VARARGS, NULL}, { (char *)"delete_win_theme", _wrap_delete_win_theme, METH_VARARGS, NULL}, { (char *)"win_theme_destroy", _wrap_win_theme_destroy, METH_VARARGS, NULL}, { (char *)"win_theme_swigregister", win_theme_swigregister, METH_VARARGS, NULL}, { (char *)"new_text_bubble", _wrap_new_text_bubble, METH_VARARGS, NULL}, { (char *)"delete_text_bubble", _wrap_delete_text_bubble, METH_VARARGS, NULL}, { (char *)"text_bubble_update", _wrap_text_bubble_update, METH_VARARGS, NULL}, { (char *)"text_bubble_remaining", _wrap_text_bubble_remaining, METH_VARARGS, NULL}, { (char *)"text_bubble_swigregister", text_bubble_swigregister, METH_VARARGS, NULL}, { (char *)"MAX_COLOR_swigconstant", MAX_COLOR_swigconstant, METH_VARARGS, NULL}, { (char *)"new_dialog_screen", _wrap_new_dialog_screen, METH_VARARGS, NULL}, { (char *)"delete_dialog_screen", _wrap_delete_dialog_screen, METH_VARARGS, NULL}, { (char *)"dialog_screen_init", _wrap_dialog_screen_init, METH_VARARGS, NULL}, { (char *)"dialog_screen_set_portrait", _wrap_dialog_screen_set_portrait, METH_VARARGS, NULL}, { (char *)"dialog_screen_set_name", _wrap_dialog_screen_set_name, METH_VARARGS, NULL}, { (char *)"dialog_screen_set_npc", _wrap_dialog_screen_set_npc, METH_VARARGS, NULL}, { (char *)"dialog_screen_update", _wrap_dialog_screen_update, METH_VARARGS, NULL}, { (char *)"dialog_screen_run", _wrap_dialog_screen_run, METH_VARARGS, NULL}, { (char *)"dialog_screen_swigregister", dialog_screen_swigregister, METH_VARARGS, NULL}, { (char *)"LOAD_SCREEN_swigconstant", LOAD_SCREEN_swigconstant, METH_VARARGS, NULL}, { (char *)"SAVE_SCREEN_swigconstant", SAVE_SCREEN_swigconstant, METH_VARARGS, NULL}, { (char *)"new_data_screen", _wrap_new_data_screen, METH_VARARGS, NULL}, { (char *)"delete_data_screen", _wrap_delete_data_screen, METH_VARARGS, NULL}, { (char *)"data_screen_update", _wrap_data_screen_update, METH_VARARGS, NULL}, { (char *)"data_screen_get_result", _wrap_data_screen_get_result, METH_VARARGS, NULL}, { (char *)"data_screen_swigregister", data_screen_swigregister, METH_VARARGS, NULL}, { (char *)"new_gamedata", _wrap_new_gamedata, METH_VARARGS, NULL}, { (char *)"delete_gamedata", _wrap_delete_gamedata, METH_VARARGS, NULL}, { (char *)"gamedata_put", _wrap_gamedata_put, METH_VARARGS, NULL}, { (char *)"gamedata_get", _wrap_gamedata_get, METH_VARARGS, NULL}, { (char *)"gamedata_directory", _wrap_gamedata_directory, METH_VARARGS, NULL}, { (char *)"gamedata_description", _wrap_gamedata_description, METH_VARARGS, NULL}, { (char *)"gamedata_location", _wrap_gamedata_location, METH_VARARGS, NULL}, { (char *)"gamedata_gametime", _wrap_gamedata_gametime, METH_VARARGS, NULL}, { (char *)"gamedata_timestamp", _wrap_gamedata_timestamp, METH_VARARGS, NULL}, { (char *)"gamedata_set_description", _wrap_gamedata_set_description, METH_VARARGS, NULL}, { (char *)"gamedata_set_directory", _wrap_gamedata_set_directory, METH_VARARGS, NULL}, { (char *)"gamedata_set_gametime", _wrap_gamedata_set_gametime, METH_VARARGS, NULL}, { (char *)"gamedata_init", _wrap_gamedata_init, METH_VARARGS, NULL}, { (char *)"gamedata_cleanup", _wrap_gamedata_cleanup, METH_VARARGS, NULL}, { (char *)"gamedata_load_characters", _wrap_gamedata_load_characters, METH_VARARGS, NULL}, { (char *)"gamedata_load_quests", _wrap_gamedata_load_quests, METH_VARARGS, NULL}, { (char *)"gamedata_load_mapengine", _wrap_gamedata_load_mapengine, METH_VARARGS, NULL}, { (char *)"gamedata_load_audio", _wrap_gamedata_load_audio, METH_VARARGS, NULL}, { (char *)"gamedata_load_achievements", _wrap_gamedata_load_achievements, METH_VARARGS, NULL}, { (char *)"gamedata_load", _wrap_gamedata_load, METH_VARARGS, NULL}, { (char *)"gamedata_load_newest", _wrap_gamedata_load_newest, METH_VARARGS, NULL}, { (char *)"gamedata_save", _wrap_gamedata_save, METH_VARARGS, NULL}, { (char *)"gamedata_unload", _wrap_gamedata_unload, METH_VARARGS, NULL}, { (char *)"gamedata_next_save", _wrap_gamedata_next_save, METH_VARARGS, NULL}, { (char *)"gamedata_user_data_dir", _wrap_gamedata_user_data_dir, METH_VARARGS, NULL}, { (char *)"gamedata_game_data_dir", _wrap_gamedata_game_data_dir, METH_VARARGS, NULL}, { (char *)"gamedata_get_saved_game", _wrap_gamedata_get_saved_game, METH_VARARGS, NULL}, { (char *)"gamedata_quests", _wrap_gamedata_quests, METH_VARARGS, NULL}, { (char *)"gamedata_player", _wrap_gamedata_player, METH_VARARGS, NULL}, { (char *)"gamedata_get_character", _wrap_gamedata_get_character, METH_VARARGS, NULL}, { (char *)"gamedata_get_quest", _wrap_gamedata_get_quest, METH_VARARGS, NULL}, { (char *)"gamedata_characters", _wrap_gamedata_characters, METH_VARARGS, NULL}, { (char *)"gamedata_engine", _wrap_gamedata_engine, METH_VARARGS, NULL}, { (char *)"gamedata_swigregister", gamedata_swigregister, METH_VARARGS, NULL}, { (char *)"CONFIG_swigconstant", CONFIG_swigconstant, METH_VARARGS, NULL}, { (char *)"USER_DATA_swigconstant", USER_DATA_swigconstant, METH_VARARGS, NULL}, { (char *)"game_User_data_dir_get", _wrap_game_User_data_dir_get, METH_VARARGS, NULL}, { (char *)"game_User_data_dir_set", _wrap_game_User_data_dir_set, METH_VARARGS, NULL}, { (char *)"game_Global_data_dir_get", _wrap_game_Global_data_dir_get, METH_VARARGS, NULL}, { (char *)"game_Global_data_dir_set", _wrap_game_Global_data_dir_set, METH_VARARGS, NULL}, { (char *)"game_Game_data_dir_get", _wrap_game_Game_data_dir_get, METH_VARARGS, NULL}, { (char *)"game_Game_data_dir_set", _wrap_game_Game_data_dir_set, METH_VARARGS, NULL}, { (char *)"game_init", _wrap_game_init, METH_VARARGS, NULL}, { (char *)"game_set_game_data_dir", _wrap_game_set_game_data_dir, METH_VARARGS, NULL}, { (char *)"game_user_data_dir", _wrap_game_user_data_dir, METH_VARARGS, NULL}, { (char *)"game_global_data_dir", _wrap_game_global_data_dir, METH_VARARGS, NULL}, { (char *)"game_game_data_dir", _wrap_game_game_data_dir, METH_VARARGS, NULL}, { (char *)"game_find_file", _wrap_game_find_file, METH_VARARGS, NULL}, { (char *)"game_find_directory", _wrap_game_find_directory, METH_VARARGS, NULL}, { (char *)"new_game", _wrap_new_game, METH_VARARGS, NULL}, { (char *)"delete_game", _wrap_delete_game, METH_VARARGS, NULL}, { (char *)"game_swigregister", game_swigregister, METH_VARARGS, NULL}, { (char *)"nls_init", _wrap_nls_init, METH_VARARGS, NULL}, { (char *)"nls_set_language", _wrap_nls_set_language, METH_VARARGS, NULL}, { (char *)"nls_translate", _wrap_nls_translate, METH_VARARGS, NULL}, { (char *)"new_nls", _wrap_new_nls, METH_VARARGS, NULL}, { (char *)"delete_nls", _wrap_delete_nls, METH_VARARGS, NULL}, { (char *)"nls_swigregister", nls_swigregister, METH_VARARGS, NULL}, { (char *)"new_config", _wrap_new_config, METH_VARARGS, NULL}, { (char *)"config_parse_arguments", _wrap_config_parse_arguments, METH_VARARGS, NULL}, { (char *)"config_write_adonthellrc", _wrap_config_write_adonthellrc, METH_VARARGS, NULL}, { (char *)"config_read_adonthellrc", _wrap_config_read_adonthellrc, METH_VARARGS, NULL}, { (char *)"config_get_adonthellrc", _wrap_config_get_adonthellrc, METH_VARARGS, NULL}, { (char *)"config_language_set", _wrap_config_language_set, METH_VARARGS, NULL}, { (char *)"config_language_get", _wrap_config_language_get, METH_VARARGS, NULL}, { (char *)"config_font_set", _wrap_config_font_set, METH_VARARGS, NULL}, { (char *)"config_font_get", _wrap_config_font_get, METH_VARARGS, NULL}, { (char *)"config_game_name_set", _wrap_config_game_name_set, METH_VARARGS, NULL}, { (char *)"config_game_name_get", _wrap_config_game_name_get, METH_VARARGS, NULL}, { (char *)"config_gamedir_set", _wrap_config_gamedir_set, METH_VARARGS, NULL}, { (char *)"config_gamedir_get", _wrap_config_gamedir_get, METH_VARARGS, NULL}, { (char *)"config_screen_mode_set", _wrap_config_screen_mode_set, METH_VARARGS, NULL}, { (char *)"config_screen_mode_get", _wrap_config_screen_mode_get, METH_VARARGS, NULL}, { (char *)"config_display_set", _wrap_config_display_set, METH_VARARGS, NULL}, { (char *)"config_display_get", _wrap_config_display_get, METH_VARARGS, NULL}, { (char *)"config_quick_load_set", _wrap_config_quick_load_set, METH_VARARGS, NULL}, { (char *)"config_quick_load_get", _wrap_config_quick_load_get, METH_VARARGS, NULL}, { (char *)"config_audio_channels_set", _wrap_config_audio_channels_set, METH_VARARGS, NULL}, { (char *)"config_audio_channels_get", _wrap_config_audio_channels_get, METH_VARARGS, NULL}, { (char *)"config_audio_resolution_set", _wrap_config_audio_resolution_set, METH_VARARGS, NULL}, { (char *)"config_audio_resolution_get", _wrap_config_audio_resolution_get, METH_VARARGS, NULL}, { (char *)"config_audio_sample_rate_set", _wrap_config_audio_sample_rate_set, METH_VARARGS, NULL}, { (char *)"config_audio_sample_rate_get", _wrap_config_audio_sample_rate_get, METH_VARARGS, NULL}, { (char *)"config_audio_volume_set", _wrap_config_audio_volume_set, METH_VARARGS, NULL}, { (char *)"config_audio_volume_get", _wrap_config_audio_volume_get, METH_VARARGS, NULL}, { (char *)"delete_config", _wrap_delete_config, METH_VARARGS, NULL}, { (char *)"config_swigregister", config_swigregister, METH_VARARGS, NULL}, { (char *)"achievements_create", _wrap_achievements_create, METH_VARARGS, NULL}, { (char *)"achievements_update", _wrap_achievements_update, METH_VARARGS, NULL}, { (char *)"achievements_num_achievements", _wrap_achievements_num_achievements, METH_VARARGS, NULL}, { (char *)"achievements_num_unlocked", _wrap_achievements_num_unlocked, METH_VARARGS, NULL}, { (char *)"achievements_is_unlocked", _wrap_achievements_is_unlocked, METH_VARARGS, NULL}, { (char *)"achievements_achievement_id", _wrap_achievements_achievement_id, METH_VARARGS, NULL}, { (char *)"achievements_py_signal_connect", _wrap_achievements_py_signal_connect, METH_VARARGS, NULL}, { (char *)"achievements_swigregister", achievements_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_text_bubbleTo_p_win_label(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_label *) ((text_bubble *) x)); } static void *_p_time_eventTo_p_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event *) ((time_event *) x)); } static void *_p_leave_eventTo_p_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event *) (map_event *) ((leave_event *) x)); } static void *_p_map_eventTo_p_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event *) ((map_event *) x)); } static void *_p_enter_eventTo_p_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event *) (map_event *) ((enter_event *) x)); } static void *_p_action_eventTo_p_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event *) (map_event *) ((action_event *) x)); } static void *_p_win_baseTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) ((win_base *) x)); } static void *_p_win_scrollTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *)(win_container *) ((win_scroll *) x)); } static void *_p_win_imageTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *) ((win_image *) x)); } static void *_p_win_labelTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *) ((win_label *) x)); } static void *_p_win_selectTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *)(win_container *)(win_scroll *) ((win_select *) x)); } static void *_p_text_bubbleTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *)(win_label *) ((text_bubble *) x)); } static void *_p_dialog_screenTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *)(win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *)(win_container *) ((data_screen *) x)); } static void *_p_win_containerTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *) ((win_container *) x)); } static void *_p_win_writeTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *) ((win_write *) x)); } static void *_p_win_mapviewTo_p_win_background(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_background *) (win_base *) ((win_mapview *) x)); } static void *_p_win_scrollTo_p_win_container(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_container *) ((win_scroll *) x)); } static void *_p_win_selectTo_p_win_container(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_container *) (win_scroll *) ((win_select *) x)); } static void *_p_dialog_screenTo_p_win_container(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_win_container(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_container *) ((data_screen *) x)); } static void *_p_landmapTo_p_event_list(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event_list *) ((landmap *) x)); } static void *_p_mapcharacterTo_p_event_list(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event_list *) ((mapcharacter *) x)); } static void *_p_characterTo_p_event_list(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((event_list *) (mapcharacter *) ((character *) x)); } static void *_p_win_writeTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *)(label *)(label_input *) ((win_write *) x)); } static void *_p_label_inputTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *)(label *) ((label_input *) x)); } static void *_p_win_labelTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *)(label *) ((win_label *) x)); } static void *_p_imageTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *) ((image *) x)); } static void *_p_animationTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) ((animation *) x)); } static void *_p_labelTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *) ((label *) x)); } static void *_p_text_bubbleTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *)(label *)(win_label *) ((text_bubble *) x)); } static void *_p_mapsquare_walkable_areaTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) ((mapsquare_walkable_area *) x)); } static void *_p_win_mapviewTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (mapview *) ((win_mapview *) x)); } static void *_p_mapviewTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) ((mapview *) x)); } static void *_p_mapobjectTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (mapsquare_walkable_area *) ((mapobject *) x)); } static void *_p_win_imageTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (surface *)(image *) ((win_image *) x)); } static void *_p_surfaceTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) ((surface *) x)); } static void *_p_characterTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (mapsquare_walkable_area *)(mapcharacter *) ((character *) x)); } static void *_p_mapcharacterTo_p_drawable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawable *) (mapsquare_walkable_area *) ((mapcharacter *) x)); } static void *_p_label_inputTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *)(label *) ((label_input *) x)); } static void *_p_win_imageTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *) ((win_image *) x)); } static void *_p_imageTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) ((image *) x)); } static void *_p_win_labelTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *)(label *) ((win_label *) x)); } static void *_p_text_bubbleTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *)(label *)(win_label *) ((text_bubble *) x)); } static void *_p_labelTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *) ((label *) x)); } static void *_p_win_writeTo_p_surface(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((surface *) (image *)(label *)(label_input *) ((win_write *) x)); } static void *_p_win_baseTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) ((win_base *) x)); } static void *_p_win_scrollTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *)(win_container *) ((win_scroll *) x)); } static void *_p_win_imageTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *) ((win_image *) x)); } static void *_p_win_labelTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *) ((win_label *) x)); } static void *_p_win_selectTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *)(win_container *)(win_scroll *) ((win_select *) x)); } static void *_p_text_bubbleTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *)(win_label *) ((text_bubble *) x)); } static void *_p_dialog_screenTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *)(win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *)(win_container *) ((data_screen *) x)); } static void *_p_win_containerTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *) ((win_container *) x)); } static void *_p_win_writeTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *) ((win_write *) x)); } static void *_p_win_mapviewTo_p_win_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_event *) (win_base *) ((win_mapview *) x)); } static void *_p_leave_eventTo_p_map_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((map_event *) ((leave_event *) x)); } static void *_p_enter_eventTo_p_map_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((map_event *) ((enter_event *) x)); } static void *_p_action_eventTo_p_map_event(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((map_event *) ((action_event *) x)); } static void *_p_characterTo_p_mapcharacter(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapcharacter *) ((character *) x)); } static void *_p_character_baseTo_p_storage(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((storage *) ((character_base *) x)); } static void *_p_questTo_p_storage(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((storage *) ((quest *) x)); } static void *_p_mapcharacterTo_p_storage(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((storage *) (character_base *) ((mapcharacter *) x)); } static void *_p_characterTo_p_storage(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((storage *) (character_base *)(mapcharacter *) ((character *) x)); } static void *_p_mapsquareTo_p_mapsquare_walkable(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapsquare_walkable *) ((mapsquare *) x)); } static void *_p_win_scrollTo_p_win_scrollbar(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_scrollbar *) ((win_scroll *) x)); } static void *_p_win_selectTo_p_win_scrollbar(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_scrollbar *) (win_scroll *) ((win_select *) x)); } static void *_p_win_mapviewTo_p_mapview(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapview *) ((win_mapview *) x)); } static void *_p_label_inputTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) (label *) ((label_input *) x)); } static void *_p_win_imageTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) ((win_image *) x)); } static void *_p_win_labelTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) (label *) ((win_label *) x)); } static void *_p_text_bubbleTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) (label *)(win_label *) ((text_bubble *) x)); } static void *_p_labelTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) ((label *) x)); } static void *_p_win_writeTo_p_image(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((image *) (label *)(label_input *) ((win_write *) x)); } static void *_p_mapcharacterTo_p_character_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((character_base *) ((mapcharacter *) x)); } static void *_p_characterTo_p_character_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((character_base *) (mapcharacter *) ((character *) x)); } static void *_p_mapobjectTo_p_mapsquare_walkable_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapsquare_walkable_area *) ((mapobject *) x)); } static void *_p_mapcharacterTo_p_mapsquare_walkable_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapsquare_walkable_area *) ((mapcharacter *) x)); } static void *_p_characterTo_p_mapsquare_walkable_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((mapsquare_walkable_area *) (mapcharacter *) ((character *) x)); } static void *_p_label_inputTo_p_label(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((label *) ((label_input *) x)); } static void *_p_win_labelTo_p_label(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((label *) ((win_label *) x)); } static void *_p_text_bubbleTo_p_label(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((label *) (win_label *) ((text_bubble *) x)); } static void *_p_win_writeTo_p_label(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((label *) (label_input *) ((win_write *) x)); } static void *_p_igzstreamTo_p_gz_file(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((gz_file *) ((igzstream *) x)); } static void *_p_ogzstreamTo_p_gz_file(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((gz_file *) ((ogzstream *) x)); } static void *_p_win_writeTo_p_label_input(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((label_input *) ((win_write *) x)); } static void *_p_win_selectTo_p_win_scroll(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_scroll *) ((win_select *) x)); } static void *_p_win_baseTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) ((win_base *) x)); } static void *_p_win_scrollTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *)(win_container *) ((win_scroll *) x)); } static void *_p_win_imageTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *) ((win_image *) x)); } static void *_p_win_labelTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *) ((win_label *) x)); } static void *_p_win_selectTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *)(win_container *)(win_scroll *) ((win_select *) x)); } static void *_p_text_bubbleTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *)(win_label *) ((text_bubble *) x)); } static void *_p_dialog_screenTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *)(win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *)(win_container *) ((data_screen *) x)); } static void *_p_win_containerTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *) ((win_container *) x)); } static void *_p_win_writeTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *) ((win_write *) x)); } static void *_p_win_mapviewTo_p_drawing_area(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((drawing_area *) (win_base *) ((win_mapview *) x)); } static void *_p_win_scrollTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) (win_container *) ((win_scroll *) x)); } static void *_p_win_imageTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) ((win_image *) x)); } static void *_p_win_labelTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) ((win_label *) x)); } static void *_p_win_selectTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) (win_container *)(win_scroll *) ((win_select *) x)); } static void *_p_text_bubbleTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) (win_label *) ((text_bubble *) x)); } static void *_p_dialog_screenTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) (win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) (win_container *) ((data_screen *) x)); } static void *_p_win_containerTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) ((win_container *) x)); } static void *_p_win_writeTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) ((win_write *) x)); } static void *_p_win_mapviewTo_p_win_base(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_base *) ((win_mapview *) x)); } static void *_p_win_baseTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) ((win_base *) x)); } static void *_p_win_scrollTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *)(win_container *) ((win_scroll *) x)); } static void *_p_win_imageTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *) ((win_image *) x)); } static void *_p_win_labelTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *) ((win_label *) x)); } static void *_p_win_selectTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *)(win_container *)(win_scroll *) ((win_select *) x)); } static void *_p_text_bubbleTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *)(win_label *) ((text_bubble *) x)); } static void *_p_dialog_screenTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *)(win_container *) ((dialog_screen *) x)); } static void *_p_data_screenTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *)(win_container *) ((data_screen *) x)); } static void *_p_win_containerTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *) ((win_container *) x)); } static void *_p_win_writeTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *) ((win_write *) x)); } static void *_p_win_mapviewTo_p_win_border(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((win_border *) (win_base *) ((win_mapview *) x)); } static swig_type_info _swigt__p_SDL_Keymod = {"_p_SDL_Keymod", "enum SDL_Keymod *|SDL_Keymod *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SDL_RWops = {"_p_SDL_RWops", "SDL_RWops *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SDL_Rect = {"_p_SDL_Rect", "SDL_Rect *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SDL_Renderer = {"_p_SDL_Renderer", "SDL_Renderer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_achievements = {"_p_achievements", "achievements *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_action_event = {"_p_action_event", "action_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_adonthell = {"_p_adonthell", "adonthell *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_animation = {"_p_animation", "animation *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_animationframe = {"_p_animationframe", "animationframe *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_audio = {"_p_audio", "audio *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_character = {"_p_character", "character *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_character_base = {"_p_character_base", "character_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_config = {"_p_config", "config *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_data_screen = {"_p_data_screen", "data_screen *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_dialog_screen = {"_p_dialog_screen", "dialog_screen *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_dictionaryT_character_p_t = {"_p_dictionaryT_character_p_t", "dictionary< character * > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_dictionaryT_quest_p_t = {"_p_dictionaryT_quest_p_t", "dictionary< quest * > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_drawable = {"_p_drawable", "drawable *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_drawing_area = {"_p_drawing_area", "drawing_area *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_enter_event = {"_p_enter_event", "enter_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_event = {"_p_event", "event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_event_handler = {"_p_event_handler", "event_handler *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_event_list = {"_p_event_list", "event_list *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fileops = {"_p_fileops", "fileops *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_game = {"_p_game", "game *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gamedata = {"_p_gamedata", "gamedata *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gamedate = {"_p_gamedate", "gamedate *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gametime = {"_p_gametime", "gametime *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gz_file = {"_p_gz_file", "gz_file *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_gz_type = {"_p_gz_type", "enum gz_type *|gz_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_igzstream = {"_p_igzstream", "igzstream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_image = {"_p_image", "image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_input = {"_p_input", "input *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *|SDL_Keycode *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_label = {"_p_label", "label *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_label_input = {"_p_label_input", "label_input *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_landmap = {"_p_landmap", "landmap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_leave_event = {"_p_leave_event", "leave_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_map_event = {"_p_map_event", "map_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapcharacter = {"_p_mapcharacter", "mapcharacter *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapobject = {"_p_mapobject", "mapobject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare = {"_p_mapsquare", "mapsquare *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare_area = {"_p_mapsquare_area", "mapsquare_area *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare_char = {"_p_mapsquare_char", "mapsquare_char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare_tile = {"_p_mapsquare_tile", "mapsquare_tile *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare_walkable = {"_p_mapsquare_walkable", "mapsquare_walkable *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsquare_walkable_area = {"_p_mapsquare_walkable_area", "mapsquare_walkable_area *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapview = {"_p_mapview", "mapview *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_nls = {"_p_nls", "nls *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_objects = {"_p_objects", "objects *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ogzstream = {"_p_ogzstream", "ogzstream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pairT_std__string_int_t = {"_p_pairT_std__string_int_t", "pair< std::string,int > *|pair< string,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_path = {"_p_path", "path *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_pixel_info = {"_p_pixel_info", "pixel_info *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_play_state = {"_p_play_state", "enum play_state *|play_state *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_py_object = {"_p_py_object", "py_object *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_quest = {"_p_quest", "quest *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_screen = {"_p_screen", "screen *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_storage = {"_p_storage", "storage *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_surface = {"_p_surface", "surface *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_sys_dir_type = {"_p_sys_dir_type", "enum sys_dir_type *|sys_dir_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_text_bubble = {"_p_text_bubble", "text_bubble *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_time_event = {"_p_time_event", "time_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_background = {"_p_win_background", "win_background *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_base = {"_p_win_base", "win_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_border = {"_p_win_border", "win_border *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_container = {"_p_win_container", "win_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_event = {"_p_win_event", "win_event *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_font = {"_p_win_font", "win_font *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_image = {"_p_win_image", "win_image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_label = {"_p_win_label", "win_label *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_manager = {"_p_win_manager", "win_manager *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_mapview = {"_p_win_mapview", "win_mapview *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_scroll = {"_p_win_scroll", "win_scroll *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_scrollbar = {"_p_win_scrollbar", "win_scrollbar *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_select = {"_p_win_select", "win_select *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_theme = {"_p_win_theme", "win_theme *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_win_write = {"_p_win_write", "win_write *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_SDL_Keymod, &_swigt__p_SDL_RWops, &_swigt__p_SDL_Rect, &_swigt__p_SDL_Renderer, &_swigt__p_achievements, &_swigt__p_action_event, &_swigt__p_adonthell, &_swigt__p_animation, &_swigt__p_animationframe, &_swigt__p_audio, &_swigt__p_char, &_swigt__p_character, &_swigt__p_character_base, &_swigt__p_config, &_swigt__p_data_screen, &_swigt__p_dialog_screen, &_swigt__p_dictionaryT_character_p_t, &_swigt__p_dictionaryT_quest_p_t, &_swigt__p_drawable, &_swigt__p_drawing_area, &_swigt__p_enter_event, &_swigt__p_event, &_swigt__p_event_handler, &_swigt__p_event_list, &_swigt__p_fileops, &_swigt__p_game, &_swigt__p_gamedata, &_swigt__p_gamedate, &_swigt__p_gametime, &_swigt__p_gz_file, &_swigt__p_gz_type, &_swigt__p_igzstream, &_swigt__p_image, &_swigt__p_input, &_swigt__p_int, &_swigt__p_label, &_swigt__p_label_input, &_swigt__p_landmap, &_swigt__p_leave_event, &_swigt__p_map_event, &_swigt__p_mapcharacter, &_swigt__p_mapobject, &_swigt__p_mapsquare, &_swigt__p_mapsquare_area, &_swigt__p_mapsquare_char, &_swigt__p_mapsquare_tile, &_swigt__p_mapsquare_walkable, &_swigt__p_mapsquare_walkable_area, &_swigt__p_mapview, &_swigt__p_nls, &_swigt__p_objects, &_swigt__p_ogzstream, &_swigt__p_p_char, &_swigt__p_pairT_std__string_int_t, &_swigt__p_path, &_swigt__p_pixel_info, &_swigt__p_play_state, &_swigt__p_py_object, &_swigt__p_quest, &_swigt__p_screen, &_swigt__p_short, &_swigt__p_storage, &_swigt__p_surface, &_swigt__p_sys_dir_type, &_swigt__p_text_bubble, &_swigt__p_time_event, &_swigt__p_unsigned_char, &_swigt__p_void, &_swigt__p_win_background, &_swigt__p_win_base, &_swigt__p_win_border, &_swigt__p_win_container, &_swigt__p_win_event, &_swigt__p_win_font, &_swigt__p_win_image, &_swigt__p_win_label, &_swigt__p_win_manager, &_swigt__p_win_mapview, &_swigt__p_win_scroll, &_swigt__p_win_scrollbar, &_swigt__p_win_select, &_swigt__p_win_theme, &_swigt__p_win_write, }; static swig_cast_info _swigc__p_SDL_Keymod[] = { {&_swigt__p_SDL_Keymod, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SDL_RWops[] = { {&_swigt__p_SDL_RWops, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SDL_Rect[] = { {&_swigt__p_SDL_Rect, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SDL_Renderer[] = { {&_swigt__p_SDL_Renderer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_achievements[] = { {&_swigt__p_achievements, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_action_event[] = { {&_swigt__p_action_event, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_adonthell[] = { {&_swigt__p_adonthell, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_animation[] = { {&_swigt__p_animation, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_animationframe[] = { {&_swigt__p_animationframe, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_audio[] = { {&_swigt__p_audio, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_character[] = { {&_swigt__p_character, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_character_base[] = { {&_swigt__p_character_base, 0, 0, 0}, {&_swigt__p_mapcharacter, _p_mapcharacterTo_p_character_base, 0, 0}, {&_swigt__p_character, _p_characterTo_p_character_base, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_config[] = { {&_swigt__p_config, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_data_screen[] = { {&_swigt__p_data_screen, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_dialog_screen[] = { {&_swigt__p_dialog_screen, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_dictionaryT_character_p_t[] = { {&_swigt__p_dictionaryT_character_p_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_dictionaryT_quest_p_t[] = { {&_swigt__p_dictionaryT_quest_p_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_drawable[] = { {&_swigt__p_win_write, _p_win_writeTo_p_drawable, 0, 0}, {&_swigt__p_label_input, _p_label_inputTo_p_drawable, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_drawable, 0, 0}, {&_swigt__p_label, _p_labelTo_p_drawable, 0, 0}, {&_swigt__p_animation, _p_animationTo_p_drawable, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_drawable, 0, 0}, {&_swigt__p_drawable, 0, 0, 0}, {&_swigt__p_mapsquare_walkable_area, _p_mapsquare_walkable_areaTo_p_drawable, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_drawable, 0, 0}, {&_swigt__p_mapview, _p_mapviewTo_p_drawable, 0, 0}, {&_swigt__p_mapobject, _p_mapobjectTo_p_drawable, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_drawable, 0, 0}, {&_swigt__p_image, _p_imageTo_p_drawable, 0, 0}, {&_swigt__p_surface, _p_surfaceTo_p_drawable, 0, 0}, {&_swigt__p_character, _p_characterTo_p_drawable, 0, 0}, {&_swigt__p_mapcharacter, _p_mapcharacterTo_p_drawable, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_drawing_area[] = { {&_swigt__p_win_base, _p_win_baseTo_p_drawing_area, 0, 0}, {&_swigt__p_win_scroll, _p_win_scrollTo_p_drawing_area, 0, 0}, {&_swigt__p_drawing_area, 0, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_drawing_area, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_drawing_area, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_drawing_area, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_drawing_area, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_drawing_area, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_drawing_area, 0, 0}, {&_swigt__p_win_container, _p_win_containerTo_p_drawing_area, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_drawing_area, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_drawing_area, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_enter_event[] = { {&_swigt__p_enter_event, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_event[] = { {&_swigt__p_time_event, _p_time_eventTo_p_event, 0, 0}, {&_swigt__p_leave_event, _p_leave_eventTo_p_event, 0, 0}, {&_swigt__p_event, 0, 0, 0}, {&_swigt__p_map_event, _p_map_eventTo_p_event, 0, 0}, {&_swigt__p_enter_event, _p_enter_eventTo_p_event, 0, 0}, {&_swigt__p_action_event, _p_action_eventTo_p_event, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_event_handler[] = { {&_swigt__p_event_handler, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_event_list[] = { {&_swigt__p_landmap, _p_landmapTo_p_event_list, 0, 0}, {&_swigt__p_event_list, 0, 0, 0}, {&_swigt__p_mapcharacter, _p_mapcharacterTo_p_event_list, 0, 0}, {&_swigt__p_character, _p_characterTo_p_event_list, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_fileops[] = { {&_swigt__p_fileops, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_game[] = { {&_swigt__p_game, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gamedata[] = { {&_swigt__p_gamedata, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gamedate[] = { {&_swigt__p_gamedate, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gametime[] = { {&_swigt__p_gametime, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gz_file[] = { {&_swigt__p_igzstream, _p_igzstreamTo_p_gz_file, 0, 0}, {&_swigt__p_ogzstream, _p_ogzstreamTo_p_gz_file, 0, 0}, {&_swigt__p_gz_file, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_gz_type[] = { {&_swigt__p_gz_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_igzstream[] = { {&_swigt__p_igzstream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_image[] = { {&_swigt__p_label_input, _p_label_inputTo_p_image, 0, 0}, {&_swigt__p_image, 0, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_image, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_image, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_image, 0, 0}, {&_swigt__p_label, _p_labelTo_p_image, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_image, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_input[] = { {&_swigt__p_input, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_label[] = { {&_swigt__p_label_input, _p_label_inputTo_p_label, 0, 0}, {&_swigt__p_label, 0, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_label, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_label, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_label, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_label_input[] = { {&_swigt__p_label_input, 0, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_label_input, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_landmap[] = { {&_swigt__p_landmap, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_leave_event[] = { {&_swigt__p_leave_event, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_map_event[] = { {&_swigt__p_leave_event, _p_leave_eventTo_p_map_event, 0, 0}, {&_swigt__p_map_event, 0, 0, 0}, {&_swigt__p_enter_event, _p_enter_eventTo_p_map_event, 0, 0}, {&_swigt__p_action_event, _p_action_eventTo_p_map_event, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapcharacter[] = { {&_swigt__p_mapcharacter, 0, 0, 0}, {&_swigt__p_character, _p_characterTo_p_mapcharacter, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapobject[] = { {&_swigt__p_mapobject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare[] = { {&_swigt__p_mapsquare, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare_area[] = { {&_swigt__p_mapsquare_area, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare_char[] = { {&_swigt__p_mapsquare_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare_tile[] = { {&_swigt__p_mapsquare_tile, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare_walkable[] = { {&_swigt__p_mapsquare, _p_mapsquareTo_p_mapsquare_walkable, 0, 0}, {&_swigt__p_mapsquare_walkable, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapsquare_walkable_area[] = { {&_swigt__p_mapobject, _p_mapobjectTo_p_mapsquare_walkable_area, 0, 0}, {&_swigt__p_mapsquare_walkable_area, 0, 0, 0}, {&_swigt__p_mapcharacter, _p_mapcharacterTo_p_mapsquare_walkable_area, 0, 0}, {&_swigt__p_character, _p_characterTo_p_mapsquare_walkable_area, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_mapview[] = { {&_swigt__p_mapview, 0, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_mapview, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_nls[] = { {&_swigt__p_nls, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_objects[] = { {&_swigt__p_objects, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ogzstream[] = { {&_swigt__p_ogzstream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pairT_std__string_int_t[] = { {&_swigt__p_pairT_std__string_int_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_path[] = { {&_swigt__p_path, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_pixel_info[] = { {&_swigt__p_pixel_info, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_play_state[] = { {&_swigt__p_play_state, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_py_object[] = { {&_swigt__p_py_object, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_quest[] = { {&_swigt__p_quest, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_screen[] = { {&_swigt__p_screen, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_storage[] = { {&_swigt__p_character_base, _p_character_baseTo_p_storage, 0, 0}, {&_swigt__p_quest, _p_questTo_p_storage, 0, 0}, {&_swigt__p_storage, 0, 0, 0}, {&_swigt__p_mapcharacter, _p_mapcharacterTo_p_storage, 0, 0}, {&_swigt__p_character, _p_characterTo_p_storage, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_surface[] = { {&_swigt__p_label_input, _p_label_inputTo_p_surface, 0, 0}, {&_swigt__p_surface, 0, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_surface, 0, 0}, {&_swigt__p_image, _p_imageTo_p_surface, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_surface, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_surface, 0, 0}, {&_swigt__p_label, _p_labelTo_p_surface, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_surface, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_sys_dir_type[] = { {&_swigt__p_sys_dir_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_text_bubble[] = { {&_swigt__p_text_bubble, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_time_event[] = { {&_swigt__p_time_event, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_background[] = { {&_swigt__p_win_base, _p_win_baseTo_p_win_background, 0, 0}, {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_background, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_win_background, 0, 0}, {&_swigt__p_win_background, 0, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_background, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_win_background, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_win_background, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_win_background, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_win_background, 0, 0}, {&_swigt__p_win_container, _p_win_containerTo_p_win_background, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_win_background, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_win_background, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_base[] = { {&_swigt__p_win_base, 0, 0, 0}, {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_base, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_win_base, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_base, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_win_base, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_win_base, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_win_base, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_win_base, 0, 0}, {&_swigt__p_win_container, _p_win_containerTo_p_win_base, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_win_base, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_win_base, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_border[] = { {&_swigt__p_win_base, _p_win_baseTo_p_win_border, 0, 0}, {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_border, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_win_border, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_border, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_win_border, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_win_border, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_win_border, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_win_border, 0, 0}, {&_swigt__p_win_container, _p_win_containerTo_p_win_border, 0, 0}, {&_swigt__p_win_border, 0, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_win_border, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_win_border, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_container[] = { {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_container, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_container, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_win_container, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_win_container, 0, 0}, {&_swigt__p_win_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_event[] = { {&_swigt__p_win_base, _p_win_baseTo_p_win_event, 0, 0}, {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_event, 0, 0}, {&_swigt__p_win_image, _p_win_imageTo_p_win_event, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_event, 0, 0}, {&_swigt__p_win_label, _p_win_labelTo_p_win_event, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_win_event, 0, 0}, {&_swigt__p_dialog_screen, _p_dialog_screenTo_p_win_event, 0, 0}, {&_swigt__p_data_screen, _p_data_screenTo_p_win_event, 0, 0}, {&_swigt__p_win_event, 0, 0, 0}, {&_swigt__p_win_container, _p_win_containerTo_p_win_event, 0, 0}, {&_swigt__p_win_write, _p_win_writeTo_p_win_event, 0, 0}, {&_swigt__p_win_mapview, _p_win_mapviewTo_p_win_event, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_font[] = { {&_swigt__p_win_font, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_image[] = { {&_swigt__p_win_image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_label[] = { {&_swigt__p_win_label, 0, 0, 0}, {&_swigt__p_text_bubble, _p_text_bubbleTo_p_win_label, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_manager[] = { {&_swigt__p_win_manager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_mapview[] = { {&_swigt__p_win_mapview, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_scroll[] = { {&_swigt__p_win_scroll, 0, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_scroll, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_scrollbar[] = { {&_swigt__p_win_scroll, _p_win_scrollTo_p_win_scrollbar, 0, 0}, {&_swigt__p_win_scrollbar, 0, 0, 0}, {&_swigt__p_win_select, _p_win_selectTo_p_win_scrollbar, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_select[] = { {&_swigt__p_win_select, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_theme[] = { {&_swigt__p_win_theme, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_win_write[] = { {&_swigt__p_win_write, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_SDL_Keymod, _swigc__p_SDL_RWops, _swigc__p_SDL_Rect, _swigc__p_SDL_Renderer, _swigc__p_achievements, _swigc__p_action_event, _swigc__p_adonthell, _swigc__p_animation, _swigc__p_animationframe, _swigc__p_audio, _swigc__p_char, _swigc__p_character, _swigc__p_character_base, _swigc__p_config, _swigc__p_data_screen, _swigc__p_dialog_screen, _swigc__p_dictionaryT_character_p_t, _swigc__p_dictionaryT_quest_p_t, _swigc__p_drawable, _swigc__p_drawing_area, _swigc__p_enter_event, _swigc__p_event, _swigc__p_event_handler, _swigc__p_event_list, _swigc__p_fileops, _swigc__p_game, _swigc__p_gamedata, _swigc__p_gamedate, _swigc__p_gametime, _swigc__p_gz_file, _swigc__p_gz_type, _swigc__p_igzstream, _swigc__p_image, _swigc__p_input, _swigc__p_int, _swigc__p_label, _swigc__p_label_input, _swigc__p_landmap, _swigc__p_leave_event, _swigc__p_map_event, _swigc__p_mapcharacter, _swigc__p_mapobject, _swigc__p_mapsquare, _swigc__p_mapsquare_area, _swigc__p_mapsquare_char, _swigc__p_mapsquare_tile, _swigc__p_mapsquare_walkable, _swigc__p_mapsquare_walkable_area, _swigc__p_mapview, _swigc__p_nls, _swigc__p_objects, _swigc__p_ogzstream, _swigc__p_p_char, _swigc__p_pairT_std__string_int_t, _swigc__p_path, _swigc__p_pixel_info, _swigc__p_play_state, _swigc__p_py_object, _swigc__p_quest, _swigc__p_screen, _swigc__p_short, _swigc__p_storage, _swigc__p_surface, _swigc__p_sys_dir_type, _swigc__p_text_bubble, _swigc__p_time_event, _swigc__p_unsigned_char, _swigc__p_void, _swigc__p_win_background, _swigc__p_win_base, _swigc__p_win_border, _swigc__p_win_container, _swigc__p_win_event, _swigc__p_win_font, _swigc__p_win_image, _swigc__p_win_label, _swigc__p_win_manager, _swigc__p_win_mapview, _swigc__p_win_scroll, _swigc__p_win_scrollbar, _swigc__p_win_select, _swigc__p_win_theme, _swigc__p_win_write, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned statically to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int init; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ iter=module_head; do { if (iter==&swig_module) { /* Our module is already in the list, so there's nothing more to do. */ return; } iter=iter->next; } while (iter!= module_head); /* otherwise we must add our module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpreters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString(""); #else return PyString_FromString(""); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"swigvarlink", /* tp_name */ sizeof(swig_varlinkobject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ (printfunc) swig_varlink_print, /* tp_print */ (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ #endif #if PY_VERSION_HEX >= 0x03040000 0, /* tp_finalize */ #endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ 0, /* tp_maxalloc */ #if PY_VERSION_HEX >= 0x02050000 0, /* tp_prev */ #endif 0 /* tp_next */ #endif }; varlink_type = tmp; type_init = 1; #if PY_VERSION_HEX < 0x02020000 varlink_type.ob_type = &PyType_Type; #else if (PyType_Ready(&varlink_type) < 0) return NULL; #endif } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (!c) continue; c = strstr(c, "swig_ptr: "); if (c) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d, *md; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { # if PY_VERSION_HEX >= 0x03020000 PyModuleDef_HEAD_INIT, # else { PyObject_HEAD_INIT(NULL) NULL, /* m_init */ 0, /* m_index */ NULL, /* m_copy */ }, # endif (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif #if defined(SWIGPYTHON_BUILTIN) static SwigPyClientData SwigPyObject_clientdata = { 0, 0, 0, 0, 0, 0, 0 }; static PyGetSetDef this_getset_def = { (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL }; static SwigPyGetSet thisown_getset_closure = { (PyCFunction) SwigPyObject_own, (PyCFunction) SwigPyObject_own }; static PyGetSetDef thisown_getset_def = { (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure }; PyObject *metatype_args; PyTypeObject *builtin_pytype; int builtin_base_count; swig_type_info *builtin_basetype; PyObject *tuple; PyGetSetDescrObject *static_getset; PyTypeObject *metatype; SwigPyClientData *cd; PyObject *public_interface, *public_symbol; PyObject *this_descr; PyObject *thisown_descr; PyObject *self = 0; int i; (void)builtin_pytype; (void)builtin_base_count; (void)builtin_basetype; (void)tuple; (void)static_getset; (void)self; /* metatype is used to implement static member variables. */ metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); assert(metatype_args); metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); assert(metatype); Py_DECREF(metatype_args); metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; assert(PyType_Ready(metatype) >= 0); #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif md = d = PyModule_GetDict(m); (void)md; SWIG_InitializeModule(0); #ifdef SWIGPYTHON_BUILTIN SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } /* All objects have a 'this' attribute */ this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); (void)this_descr; /* All objects have a 'thisown' attribute */ thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); (void)thisown_descr; public_interface = PyList_New(0); public_symbol = 0; (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); #endif SWIG_InstallConstants(d,swig_const_table); PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); SWIG_addvarlink(SWIG_globals(),(char*)"screen_display",Swig_var_screen_display_get, Swig_var_screen_display_set); SWIG_addvarlink(SWIG_globals(),(char*)"MAPSQUARE_SIZE",Swig_var_MAPSQUARE_SIZE_get, Swig_var_MAPSQUARE_SIZE_set); SWIG_addvarlink(SWIG_globals(),(char*)"game_User_data_dir",Swig_var_game_User_data_dir_get, Swig_var_game_User_data_dir_set); SWIG_addvarlink(SWIG_globals(),(char*)"game_Global_data_dir",Swig_var_game_Global_data_dir_get, Swig_var_game_Global_data_dir_set); SWIG_addvarlink(SWIG_globals(),(char*)"game_Game_data_dir",Swig_var_game_Game_data_dir_get, Swig_var_game_Game_data_dir_set); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif } adonthell-0.3.8/src/win_base.h0000644000175000017500000001473012756052641013161 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file win_base.h * @author Vennin Jo�l * * brief Declares the win_bases class. * * */ #ifndef _WIN_BASE_H_ #define _WIN_BASE_H_ #include "win_event.h" #include "win_border.h" #include "win_background.h" #include "win_keys.h" class win_container; class win_scroll; class win_select; class win_manager; /** * Common properties for each win_base's object * * @bug It's currently impossible to render a windowed object * anywhere else than the screen. Windows should be capable * of being assigned a target parameter, which is a pointer * to the surface they should be drawn. */ class win_base: public win_event, public win_border, public drawing_area, public win_background { public: /** * Default constructor: * - not visible * - x,y equals to 0 * - not focus * - not activate * - not brightness * - not transluency * - can be selected * - alignement is ALIGN_NONE */ win_base(); /** * Return the relative horizontal position of the win_*. * @return horizontal position of the win_*. */ s_int16 x() const {return x_;} /** * Return the relative vertical position of the win_*. * @return vertical position of the win_*. */ s_int16 y() const {return y_;} /** * Return the pad horizontal position of the win_*. * @return the pad horizontal position of the win_*. */ s_int16 & pad_x() {return pad_x_;} /** * Return the pad vertical position of the win_*. * @return the pad vertical position of the win_*. */ s_int16 & pad_y() {return pad_y_;} /** * Return the horizontal position of the win_*. * @return the horizontal position of the win_*. */ s_int16 real_x() const {return drawing_area::x();} /** * Return the vertical position of the win_*. * @return the vertical position of the win_*. */ s_int16 real_y() const {return drawing_area::y();} /** Move the win_*. * @param tx new horizontal position. * @param ty new vertical position. */ virtual void move(s_int16 tx,s_int16 ty); /** Rezise the win_*. * @param tl new horizontal position. * @param th new vertical position. */ virtual void resize(u_int16 tl, u_int16 th); /** Test if win_* is visible * @return true if visible else false */ bool is_visible() const {return visible_;} /** Set the visible parameter * @param b true if the win_* should be visible, false otherwise */ void set_visible(const bool b) {visible_=b;} /** Test if win_* is activated * @return true if activate else false */ bool is_activate() const {return activate_;} /** Set the activate parameter * When a win_* is setup on, the keys queue is cleared * * @param b true if the win_* should be visible, false otherwise */ void set_activate(const bool b) {if((activate_=b)) {on_activate();input::clear_keys_queue();}else on_unactivate();} /** Test if win_* has focus on * @return true if focus on else false */ bool is_focus()const {return focus_;} /** Set the focus parameter * @param b true if the win_* should be focus on, false otherwise */ void set_focus(const bool b) {focus_=b;} /** Test if win_* has focus on * @return true if focus on else false */ bool is_trans() const {return trans_;} /** Set the transluency parameter * @param b true if the win_* should be ins transluency, false otherwise */ virtual void set_trans(const bool b) {set_trans_border(trans_ = b);set_trans_background(b);} /** Test if win_* is in brightness * @return true if in brightness else false */ bool is_brightness() const {return brightness_;} /** Set the transluency parameter * @param b true if the win_* should be in transluency, false otherwise */ virtual void set_brightness(const bool b) {set_brightness_border(brightness_ = b);set_brightness_background(b);} /** Set alignement of win_* * @param a can be, ALIGN_NONE, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT */ void set_align(const u_int8 a) {align_=a;update_align();} /** Return alignment of win_* * @return align_ parameter */ u_int8 align() const {return align_;} /** Test if win_* can be selected * @return true if it can be selected, false otherwise */ bool is_can_be_selected() const {return can_be_selected_;} /** Set the object to be selected * A win_obj can be selectable or not when it is inside a win_select * @param b true if the object can be selected inside a win_select., false otherwise */ void set_can_be_selected(const bool b) {can_be_selected_ = b;} /** Update process * @return true if update is successful, false otherwise */ virtual bool update(); /** Draw process * @return true if draw is successful, false otherwise */ virtual bool draw(); /** Input Update process * @ */ virtual bool input_update(); virtual ~win_base(); void set_manager (win_manager*); static const u_int8 ALIGN_NONE = 0; static const u_int8 ALIGN_LEFT = 1; static const u_int8 ALIGN_CENTER = 2; static const u_int8 ALIGN_RIGHT = 3; protected: friend class win_container; friend class win_scroll; friend class win_select; virtual void update_position(); void update_align(); void set_container(win_container * wc); s_int16 x_; s_int16 y_; s_int16 pad_x_; s_int16 pad_y_; u_int8 align_; bool visible_; bool focus_; bool activate_; bool brightness_; bool trans_; bool can_be_selected_; win_container * wb_father_; win_manager * manager_; }; #endif adonthell-0.3.8/src/surface.h0000644000175000017500000003170312756052416013021 00000000000000/* Copyright (C) 1999/2000/2001/2004 Alexandre Courbot Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file surface.h * @author Alexandre Courbot * @author Kai Sterker * * @brief Declares the surface class. * * */ #ifndef SURFACE_H_ #define SURFACE_H_ #include "drawable.h" #ifdef __BIG_ENDIAN__ # define R_MASK 0x00ff0000 # define G_MASK 0x0000ff00 # define B_MASK 0x000000ff # define A_MASK 0xff000000 #else # define R_MASK 0x000000ff # define G_MASK 0x0000ff00 # define B_MASK 0x00ff0000 # define A_MASK 0xff000000 #endif #define BYTES_PER_PIXEL 4 class pixel_info { public: pixel_info() : Pixels(NULL), Pitch(0), Format(0), BytesPerPixel(0) { } /// the pixel data of the locked Surface void *Pixels; /// the pitch of the locked Surface int Pitch; /// the format of the surface u_int32 Format; /// number of bytes used to represent the format u_int32 BytesPerPixel; }; /** * Class where drawables can actually be drawn to. * Another name for a surface could eventually be "pixmap". A surface * is nothing more than an array of pixels where drawables can put their * %image to. This class has only two purposes: to group methods shared by * image and screen, and to ensure that every drawing operation can be performed * on the screen or on an image. * * Every surface has two special parameters: * @li a mask parameter, indicating whether the transparent color (which hex * triplet is 0xFF00FF, and you can get with screen::trans_col ()) should * be drawn or not. * @li an alpha parameter, indicating the level of translucency of the surface. * it's range go from 0 to 255, 0 being totally invisible and 255 totally * opaque. * */ class surface : public drawable { public: /** * Default constructor. * The surface will be totally empty, that is * (0, 0) sized, no mask, alpha value of 255 (opaque). * */ surface (const u_int8 & scale = 1); /** * Destructor. * */ virtual ~surface (); /** * @name Settings. * These methods sets the parameters of the surface. * */ //@{ /** * * Returns whether a surface is masked or not. * * @return true if the surface is masked, false if it isn't. */ bool is_masked () const { return is_masked_; } /** * Sets the mask parameter of the surface. * * @param m true if the surface should be masked, false otherwise. */ void set_mask (bool m); /** * Returns the alpha value of the surface. * * * @return the alpha value of the surface. */ u_int8 alpha () const { return alpha_; } /** * Sets the alpha value of the surface. If alpha_channel is set to true, * then the surface_alpha value will be silently ignored. Needs to * be called before surface::resize to take effect. * * @param surface_alpha The new alpha value for this surface. * @param alpha_channel Whether to enable per-pixel alpha for the surface. */ void set_alpha (u_int8 a, const bool & alpha_channel = false); /** * Returns whether the surface has an alpha channel. * @return true if it has an alpha channel, false otherwise. */ bool has_alpha_channel () const { return alpha_channel_; } /** * Get the surfaces current scaling factor. */ u_int8 scale () const { return scale_; } /** * Change the scale of the surface to the given value, * resizing the internal texture appropriately. * @param scale the new scale to set. */ void set_scale (const u_int8 & scale); //@} /** * @name Drawing Methods. * */ //@{ /** * Draw the surface. * * @param x X position where to draw. * @param y Y position where to draw. * @param da_opt optional drawing_area to use during the drawing operation. * @param target pointer to the surface where to draw the drawable. If NULL, draw on the screen. */ void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const { draw (x, y, 0, 0, length (), height (), da_opt, target); } #ifndef SWIG /** * Draw a part of the surface. * * @param x X position where to draw. * @param y Y position where to draw. * @param sx X position where to start drawing from this image. * @param sy Y position where to start drawing from this image. * @param sl length of the part of this image to draw. * @param sh height of the part of this image to draw. * @param da_opt optional drawing_area to use during the drawing operation. * @param target pointer to the surface where to draw the drawable. If NULL, draw on the screen. * * @attention Not accessible from Python. Use draw_part () from Python instead. * @sa draw_part () * */ void draw (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area * da_opt = NULL, surface * target = NULL) const; #endif /** * Synonym of draw () to guarantee its access from Python. * * @sa draw () * */ void draw_part (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area * da_opt = NULL, surface * target = NULL) const { draw (x, y, sx, sy, sl, sh, da_opt, target); } /** * Fills an area of the surface with a given color. * * The color you pass to this function MUST come from a game's function * (like surface::get_pix () or screen::trans_col ()), because of the * screen depth dependant value of the col argument. * * @param x X position where to fill. * @param y Y position where to fill. * @param l length of the area to fill. * @param h height of the area to fill. * @param col color to fill the surface with. * @param da_opt optionnal drawing_area to use during the fill operation. * */ void fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area * da_opt = NULL); //@} /** * @name Pixel manipulation Methods. * Use these methods to directly and quickly manipulate * pixels from a surface. * */ //@{ u_int32 map_color(const u_int8 & r, const u_int8 & g, const u_int8 & b, const u_int8 & a = 255) const; void unmap_color(u_int32 col, u_int8 & r, u_int8 & g, u_int8 & b, u_int8 & a) const; /** * Locks the surface. * Sometimes you may want to access directly the pixels of a surface. This * can be done with the get_pix () and put_pix () methods, thus you must * ABSOLUTELY lock the surface before doing so. This function is made for * that. Note that using get_pix () or put_pix () without locking the surface * may result in unpredictable behavior, crashes included. * */ void lock () const { lock(NULL); } /** * Unlock the surface after you've worked on it's pixels with the * get_pix () and put_pix () methods. * */ void unlock () const; /** * Puts a pixel of a given color. * * The col parameter is specific to the current screen depth, * and must come from a game's function like get_pix or * screen::trans_col (). * * @param x X position of the pixel to change. * @param y Y position of the pixel to change. * @param col color to put. */ void put_pix (u_int16 x, u_int16 y, u_int32 col); #ifndef SWIG /** * Puts a pixel of a given color. * * The r, g and b parameters are the hex triplets of the color * to put. * * @param x X position of the pixel to change. * @param y Y position of the pixel to change. * @param r red value of the color to put. * @param g green value of the color to put. * @param b blue value of the color to put. * * @attention Not accessible from Python. Use put_pix_rgb from Python instead. * @sa put_pix_rgb () * */ void put_pix (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) { #ifdef __BIG_ENDIAN__ put_pix (x, y, map_color(b, SDL_ALPHA_OPAQUE, g, r)); #else put_pix (x, y, map_color(r, g, b, SDL_ALPHA_OPAQUE)); #endif } #endif /** * Synonym of put_pix () to guarantee its access from Python. * * @sa put_pix () */ void put_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) { put_pix (x, y, r, g, b); } /** * Gets a pixel from the surface. * * The col parameter is specific to the current screen depth, * and can be used with functions like put_pix (). * * @param x X position of the pixel to change. * @param y Y position of the pixel to change. * @returnl returned color. */ u_int32 get_pix (u_int16 x, u_int16 y) const; #ifndef SWIG /** * Gets a pixel from a surface. * * The returned r, g and b values are the hex triplets of the color. * * @param x X position of the pixel to change. * @param y Y position of the pixel to change. * @param r red value of the color. * @param g green value of the color. * @param b blue value of the color. * * @attention Not accessible from Python. Use get_pix_rgb from Python instead. * @sa get_pix_rgb () */ void get_pix (u_int16 x, u_int16 y, u_int8& r, u_int8& g, u_int8& b) const { u_int8 a; u_int32 col = get_pix(x, y); #ifdef __BIG_ENDIAN__ unmap_color(col, g, r, a, b); #else unmap_color(col, r, g, b, a); #endif } #endif /** * Synonym of get_pix () to guarantee its access from Python. * * @sa get_pix () */ void get_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) const { get_pix (x, y, r, g, b); } //@} #ifndef SWIG /** * Surface copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ surface& operator = (const surface& src); #endif /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const surface& src) { *this = src; } protected: /** * Resize this surface. All the content will be lost. * * @param l new length. * @param h new height. */ void resize (u_int16 l, u_int16 h); /** * Resets the surface to it's initial state, that is totally * empty. * */ void clear (); void set_data (void * data, u_int16 l, u_int16 h, u_int8 bytes_per_pixel = BYTES_PER_PIXEL, u_int32 red_mask = R_MASK, u_int32 green_mask = G_MASK, u_int32 blue_mask = B_MASK, u_int32 alpha_mask = 0); void * get_data (u_int8 bytes_per_pixel, u_int32 red_mask, u_int32 green_mask, u_int32 blue_mask, u_int32 alpha_mask) const; /// Create a software surface backed by the (streaming) texture data. SDL_Surface *to_sw_surface(SDL_Rect *rect = NULL) const; /// lock part of the surface specified by rect void lock (SDL_Rect *rect) const; /// the surface SDL_Texture *Surface; /// current scale u_int8 scale_; /// sub-pixel offset s_int16 offset_x_; private: /** * Forbid copy construction. * */ surface (const surface & src); /// some meta-information about the surface pixel_info *Info; /// Mask bool is_masked_; /// Whether mask has been requested, but not yet set bool mask_changed_; /// Per-Surface Alpha value u_int8 alpha_; /// Whether Per-Pixel alpha is enabled bool alpha_channel_; /// SDL_Rects used in every blitting function. static SDL_Rect srcrect, dstrect; /// Used internally for blitting operations with drawing_areas. void setup_rects (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area * draw_to) const; #ifndef SWIG friend class screen; #endif }; #endif adonthell-0.3.8/src/gametime.cc0000644000175000017500000000467412756050177013330 00000000000000/* Copyright (C) 2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gametime.cc * * @author Kai Sterker * @brief Implements the gametime class. */ #include "gametime.h" #include double gametime::Minute; u_int32 gametime::timer1; u_int32 gametime::timer2; u_int8 gametime::fts; bool gametime::running; // initialize the gametime class void gametime::init (u_int16 rt_minutes) { fts = 0; timer1 = 0; timer2 = 0; running = false; // Number of game cycles during rt_minutes realtime minutes double cycles = (60000 * rt_minutes) / (double) CYCLE_LENGTH; // Calculate how many game cycles make one gametime minute, // so that one gametime day lasts rt_minutes realtime minutes. Minute = cycles / 1440; } // Synchronize the game's speed to the machine it's running on. void gametime::update () { // We declare this variable as static to avoid having to // perform the division every time. // Its value corresponds to the minimum delay between // two displayed frames (see FRAME_RATE). static u_int16 gfx_cycle_length = 1000 / FRAME_RATE; // Wait a bit if our machine performed too fast! while (1) { timer2 = SDL_GetTicks () - timer1; // if the mainloop was performed faster than one frame // should take, we sleep for the time remaining if (timer2 >= gfx_cycle_length) break; else SDL_Delay (50); } timer1 = SDL_GetTicks () - (timer2 % CYCLE_LENGTH); // Calculate the number of frames to skip (if the mainloop // takes longer than allowed, we drop frames (up to a certain // limit) to keep the game's speed constant.) fts = timer2 / CYCLE_LENGTH; if (fts > FTS_LIMIT) fts = FTS_LIMIT; } adonthell-0.3.8/src/window.h0000644000175000017500000000150012756053367012676 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_label.h" #include "win_write.h" #include "win_image.h" #include "win_mapview.h" adonthell-0.3.8/src/data_screen.cc0000644000175000017500000002346612756050014013776 00000000000000/* Copyright (C) 2001/2002 by Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file data_screen.cc * @author Kai Sterker * * @brief Defines the data_screen class. * * */ #include #include "pnm.h" #include "gamedata.h" #include "gamedate.h" #include "image.h" #include "input.h" #include "window.h" #include "data_screen.h" #include "gametime.h" #include "win_manager.h" data_screen::data_screen (int m) { mode = m; aborted = false; entry = NULL; //Init Position and Size win_container::move (30, 15); win_container::resize (260, 210); // Create GUI font = win_manager::get_font ("original"); theme = win_manager::get_theme ("original"); //Set features used set_border(*theme); set_background(*theme); //Set special Features set_trans_background(true); //Create a win_select image_list = new win_select(); image_list->move (10, 0); image_list->resize (250, 210); image_list->set_mode (win_select::MODE_BRIGHTNESS); image_list->set_layout (win_container::LIST_LAYOUT); image_list->set_circle (true); image_list->set_space_with_border (9); image_list->set_space_with_object (9); image_list->set_scrollbar (*theme); image_list->set_visible_scrollbar (true); // activate the list image_list->set_activate (true); // give focus to the list set_focus_object (image_list); image_list->set_signal_connect ( makeFunctor (*this, &data_screen::on_select), win_event::ACTIVATE_KEY); // add the win_select to *this add (image_list); // add all the saved games to the list init (); // show everything set_visible_background (true); set_visible_border (true); set_visible_all (true); } data_screen::~data_screen () { // fade in from black after loading a game if (mode == LOAD_SCREEN && !aborted && data::engine->update_map()) data::engine->fade_in (); } void data_screen::init () { string filepath; u_int16 num = 0; win_image *shot; win_write *entry; win_label *date; win_container *box = NULL; win_font *yellow = win_manager::get_font ("yellow"); gamedata *gdata; // display all the available saved games while ((gdata = gamedata::next_save ()) != NULL) { filepath = gdata->directory (); filepath += "/preview.pnm"; shot = new win_image (); shot->image::load_pnm (filepath); shot->move (5, 2); shot->set_border (*theme, win_border::MINI); shot->set_visible_border (true); shot->pack(); date = new win_label (); date->move (100, 2); ((label*)date)->resize (130, 14); date->set_font (*yellow); date->set_text (gdata->gametime ()); date->set_cursor_visible (false); date->pack(); entry = new win_write (); entry->move (100, 18); ((label_input*)entry)->resize (130, 40); entry->set_font (*font); entry->set_text (gdata->description ()); entry->set_cursor_visible (false); entry->pack(); entry_list.push_back (entry); box = new win_container (); box->move (0, 0); box->resize (230, 58); box->add (shot); box->add (date); box->add (entry); box->set_visible_all (true); // when the box is activated, we set the entry as // focus object of the box box->set_focus_object (entry); image_list->add (box); num++; } // If we're saving the game, add "Empty Slot" if (mode == SAVE_SCREEN) { sprintf (gametime, "Day %i - %02i:%02i", gamedate::day (), gamedate::hour (), gamedate::minute ()); shot = new win_image (); shot->move (5, 2); shot->load_pnm ("gfx/empty_slot.pnm"); shot->set_border (*theme, win_border::MINI); shot->set_visible_border (true); shot->pack (); date = new win_label (); date->move (100, 2); ((label*)date)->resize (130, 14); date->set_font (*yellow); date->set_text (gametime); date->set_cursor_visible (false); date->pack(); entry = new win_write (); entry->set_font (*font); entry->move (100, 18); ((label_input*) entry)->resize (130, 40); entry->set_text ("Empty Slot"); entry->set_cursor_visible (false); entry->pack (); entry_list.push_back (entry); box = new win_container (); box->move (0, 0); box->resize (230, 58); box->add (shot); box->add (date); box->add (entry); box->set_visible_all (true); // when the box is activated, we set the entry as // focus object of the box box->set_focus_object(entry); image_list->add (box); image_list->set_default_object (box); num++; } else image_list->set_default_position (0); // If there are no saved games, display a message. if (!num) { box = new win_container (); box->move(0, 0); box->resize(230, 150); win_label * mess = new win_label (); mess->set_font (*font); mess->move (0, 65); mess->set_form (label::AUTO_SIZE); mess->set_text ("You have no saved games yet!"); mess->set_align (win_base::ALIGN_CENTER); mess->pack (); box->add (mess); mess = new win_label (); mess->set_font (*font); mess->move (0, 115); mess->set_form (label::AUTO_SIZE); mess->set_text ("Press ESC."); mess->set_align (win_base::ALIGN_CENTER); mess->pack (); box->add (mess); box->set_visible_all (true); box->set_can_be_selected (false); image_list->add (box); } } bool data_screen::update () { if (!win_container::update() || input::has_been_pushed (SDLK_ESCAPE)) { aborted = true; data::engine->main_quit (); } return true; } // Select a game void data_screen::on_select () { int pos = image_list->get_selected_position (); // loading if (mode == LOAD_SCREEN) { // fade to black before doing the actual work data::engine->fade_out (); set_visible (false); if (!gamedata::load (pos)) aborted = true; data::engine->main_quit (); } // saving else { win_container * tmp = (win_container*)image_list->get_selected_object(); image_list->set_focus_object(tmp); entry = (win_write*) tmp->focus_object(); entry->set_cursor_visible (true); entry->set_cursor_moveable (true); const char *txt = entry->text_char (); if (txt && !strncmp (txt, "Empty Slot", 10)) entry->set_text (""); entry->set_signal_connect (makeFunctor (*this, &data_screen::on_save), win_event::ACTIVATE_KEY); entry->set_activate (true); input::clear_keys_queue (); } } void data_screen::on_save () { const char* description = entry->text_char (); int pos = image_list->get_selected_position (); gamedata::save (pos, description, gametime); gamedata *gdata = gamedata::get_saved_game (pos); // save sucessful --> save preview if (gdata != NULL) { string filepath = gdata->directory (); filepath += "/preview.pnm"; save_preview (filepath); } data::engine->main_quit (); } // Save the small thumbnail image void data_screen::save_preview (string path) { drawing_area da (0, 0, screen::length () >> 1, screen::height () >> 1); image temp (da.length (), da.height()); image preview (72, 54); mapview *view = data::engine->get_mapview (); mapsquare_area *area = data::engine->get_landmap ()->get_submap (data::the_player->submap ()); u_int16 offx = 0; u_int16 offy = 0; // In those cases where the mapview is smaller than the physical screen, // it will be centered on the screen -> get the offset if (area->area_length () * MAPSQUARE_SIZE < view->length ()) offx = (view->length () - area->area_length () * MAPSQUARE_SIZE) >> 1; if (area->area_height () * MAPSQUARE_SIZE < view->height ()) offy = (view->height () - area->area_height () * MAPSQUARE_SIZE) >> 1; // Calculate the player's absolute position on the screen s_int16 x = (data::the_player->posx () - view->posx ()) * MAPSQUARE_SIZE + offx; s_int16 y = (data::the_player->posy () - view->posy ()) * MAPSQUARE_SIZE + offy; // this is a quarter of the screen's size. u_int16 length = da.length() >> 1; u_int16 height = da.height() >> 1; // If the player is too close to the border, make sure we still stay // within the screen if (x + length > screen::length ()) x = -da.length (); else if (x - length < 0) x = 0; else x = length - x; if (y + height > screen::height ()) y = -da.height (); else if (y - height < 0) y = 0; else y = height - y; data::engine->draw (x, y, &da, &temp); preview.zoom (temp); preview.save_pnm (path); } adonthell-0.3.8/src/input.h0000644000175000017500000000634713163774040012533 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot. Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file input.h * @author Alexandre Courbot * @author Kai Sterker * * @brief Declares the input class. * * */ #ifndef INPUT_H__ #define INPUT_H__ #include "types.h" #include #include #include /** * Handles keyboard and mouse input. * * @todo Rewrite it! * */ class input { public: /** * Initialise the input system. * */ static void init(); /** * Free resources occupied by the input system. * */ static void shutdown(); /** * Update the input state. * */ static void update(); /** * Returns whether a key is currently pushed or not. * * @param key key to test. * * @return true if key is currently pushed, false otherwise. */ static bool is_pushed(SDL_Keycode key); #ifdef SWIG static bool is_pushed(char key) { is_pushed((SDL_Keycode)key); } #endif /** * Returns whether a key has been pushed since last function call, false otherwise. * * @param key key to test. * * @return true if the key has been pushed since last call, false otherwise. */ static bool has_been_pushed(SDL_Keycode key); #ifdef SWIG static bool has_been_pushed(char key) { has_been_pushed((SDL_Keycode)key); } #endif /** * Returns the code of the next key on the input queue. * * * @return Code of the next key that has been pushed. */ static SDL_Keycode get_next_key(); /** * Returns the next text input on the input queue encoded as utf8. * * * @return utf8 representation of the next character that has been input. */ static std::string get_next_unicode(); static void start_text_input(); static void stop_text_input(); static bool is_text_input() { return text_input; } /** * Totally clears the key queue. * */ static void clear_keys_queue(); private: static SDL_GameController *init_controller(); static SDL_Scancode map_controller_button(const SDL_GameControllerButton & button); static bool text_input; static u_int16 mouse_posx, mouse_posy; static u_int8 * keystate; static u_int8 * p_keystate; static s_int32 keystatelength; #ifndef SWIG static bool mouse_button[3]; static SDL_GameController *controller; #endif static std::queue input_queue; }; #endif adonthell-0.3.8/src/python_class.h0000644000175000017500000000775713000720370014073 00000000000000/* Copyright (C) 2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file python_class.h * @author Kai Sterker * * @brief Defines the python class. This file is named this way * so it doesn't conflicts with Python.h Python's include * file on non-case aware systems. * * */ #ifndef PYTHON_CLASS_H__ #define PYTHON_CLASS_H__ #include #include "Python.h" #include "compile.h" #include "eval.h" #include "node.h" #include "fileops.h" #ifndef SWIG #if PY_MAJOR_VERSION >= 3 #ifndef PyInt_AsLong #define PyInt_AsLong PyLong_AsLong #endif #ifndef PyInt_Check #define PyInt_Check PyLong_Check #endif #ifndef PyInt_FromLong #define PyInt_FromLong PyLong_FromLong #endif #ifndef PyString_Check #define PyString_Check PyUnicode_Check #endif #ifndef PyString_FromString #define PyString_FromString PyUnicode_FromString #endif #endif #endif /** * Grant simplified access to the Python interpreter. * */ class python { public: /** * Initialise Python and insert the Adonthell include paths. * * * @return true in case of success, false otherwise. */ static void init (); /** * Cleanup Python. * */ static void cleanup (); /** * Adds a directory to Python's include path. * * @param name directory to add to Python's include path. */ static void insert_path( char * name); /** * Execute Python statements contained in a string. * * @param s string containing Python statements to execute. */ static void exec_string(const char * s); /** * Executes a Python script. * * @param filename name of the file to execute. * * @return true in case of success, false otherwise. */ static bool exec_file (string filename); /** * Imports a Python module. * * @param filename file name of the module to import. * * @return pointer to the imported module. */ static PyObject *import_module (string filename); /** * Dumps any error information to stderr. * */ static void show_traceback( void ); /** * Magic function that makes any C object available to Python! * * @param instance pointer to the instance to pass. * @param class_name name of the class of the passed instance. * * @return pointer to the passed %object. */ static PyObject *pass_instance (void* instance, const char* class_name); /** * Loads a Python tuple previously saved with put_tuple (). * * @param file Opened file where to load the tuple from. * * @return Restored Python tuple. */ static PyObject * get_tuple (igzstream & file); /** * Save a Python tuple into a file. * * @warning The Python tuple MUST ONLY be composed of Python strings * or integers! * * @param tuple Python tuple to save. * @param file Opened file where to save the tuple to. */ static void put_tuple (PyObject * tuple, ogzstream & file); static PyObject *module; static string as_string(PyObject *s); }; #ifndef SWIG namespace data { /** * Global namespace to use in scripts. * */ extern PyObject *globals; } #endif #endif // PYTHON_CLASS_H__ adonthell-0.3.8/src/gamedata.h0000644000175000017500000002361012756050134013125 00000000000000/* Copyright (C) 2001/2002 by Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gamedata.h * @author Kai Sterker * * @brief Declares the gamedata and data classes. * * */ #ifndef GAMEDATA_H__ #define GAMEDATA_H__ #include "quest.h" #include "character.h" #include "adonthell.h" /** * Contains all the attributes related to a saved %game and the * high level methods for loading/saving the %game. * * A word about saved games: all games are stored inside * $HOME/.adonthell/ into a individual subdirectory, consisting * of the %game's name (e.g. wastesedge) with the appendix "-save-xxx" * where "xxx" is a number between 001 and 999. All %data that belongs * to a saved %game is contained in that directory, thus allowing * to copy individual games to another machine and/or user. * * The numbering of the %game directories has no special meaning. Saved * games are recognized by the first part of their name, and saving a * new %game will never overwrite an existing. */ class gamedata { public: /** * Default constructor. * */ gamedata (); #ifndef SWIG /** * Alternate constructor. * * @attention not available from %Python! * * @param desc description of the saved %game. * @param dir directory of the saved %game. * @param time Textual representation of in-game time. */ gamedata (string desc, string dir, string time); #endif /** * Destructor. * */ ~gamedata (); /** * Save a record to an opened file. * * @param ogzstream& opened file to save to. */ void put (ogzstream&); /** * Load a record from an opened file. * * @param igzstream& opened file to load from. * * @return true in case of success, false otherwise. */ bool get (igzstream&); /** * A bunch of methods to access the private attributes. * */ //@{ /** * Returns the directory where the saved %game lies. * * @return Directory where the saved %game lies. */ const char* directory () { return Directory.c_str (); } /** * Returns the description of the saved %game. * * @return Description of the saved %game. */ const char* description () { return Description.c_str (); } /** * Returns the location of the saved %game. * * @return Location of the saved %game. */ const char* location () { return Location.c_str (); } /** * Returns the in-game time of the saved %game. * * @return In-game time of the saved %game. */ const char* gametime () { return Gametime.c_str (); } /** * Returns the (real) time when this game has been saved * * @return (Real) time when this game has been saved */ u_int32 timestamp () { return Timestamp; } /** * Sets the description for this %game. * * @param string New description for this %game. */ void set_description (string); /** * Sets the directory for this %game. * * @param string New directory for this %game. */ void set_directory (string); /** * Set the in-game time of the saved %game. * * @param string In-game time of the saved %game. */ void set_gametime (string); //@} /** * Initialise the saved games array. Searches the user directory * for available save games and loads their description. * * @param udir The user directory, usually $HOME/.adonthell * @param gdir The %game data directory, usually /usr/local/share/adonthell * @param gname The name of the %game we are running, e.g. wastesedge * @param qload Whether quick-loading should be enabled or disabled * * @return \e true in case of success, false otherwise. */ static bool init (string udir, string gdir, string gname, u_int8 qload); /** * Cleanup the saved %game array. * */ static void cleanup (); /** * Load the characters state from a saved %game. * * @param pos Slot number to load. * * @return \e true in case of success, \e false otherwise. */ static bool load_characters (u_int32 pos); /** * Load the quests state from a saved %game. * * @param pos Slot number to load. * * @return \e true in case of success, \e false otherwise. */ static bool load_quests (u_int32 pos); /** * Load the mapengine state from a saved %game. * * @param pos Slot number to load. * * @return \e true in case of success, \e false otherwise. */ static bool load_mapengine (u_int32 pos); /** * Load the audio system state from a saved %game. * * @param pos Slot number to load. * * @return \e true in case of success, \e false otherwise. */ static bool load_audio (u_int32 pos); static bool load_achievements (u_int32 pos); /** * Loads a previously saved %game. Slot 0 points to the * initial %game %data and needs to be loaded when starting * a fresh %game. * * @param pos Slot number to load. * * @return \e true in case of success, \e false otherwise. */ static bool load (u_int32 pos); /** * Loads the most recent saved %game. This method only takes * games created by the player into account, not the initial * saved %game. * * @return \e true in case of success, \e false otherwise. */ static bool load_newest (); /** * Save a %game. When given a slot number in the range of * the available saved games, the according %game will be * overwritten, otherwise a new saved %game is created. * Saving to slot 0 is not possible, as it contains the * initial %game %data. * * @param pos Slot number where to save to. * @param desc Description of the %game to be saved. * @param time Textual representation of in-game time. * * @return \e true in case of success, false otherwise. */ static bool save (u_int32 pos, string desc, string time); /** * Unloads the current %game, resetting the engine to it's * initial state. * */ static void unload (); /** * Returns a pointer to the next saved %game. * * * @return Next saved %game. */ static gamedata* next_save (); /** * Returns the user %data directory ($HOME/.adonthell). * * * @return user %data directory. */ static string user_data_dir () { return user_data_dir_; } /** * Returns the %game %data directory. * * * @return %game %data directory. */ static string game_data_dir () { return game_data_dir_; } /** * Returns a pointer to a saved %game. * * @param pos Slot number to return. * * @return Pointer to the saved %game at position \pos. */ static gamedata * get_saved_game (u_int32 pos) { return saves[pos]; } /** * Returns the global quests dictionary. * * * @return Global quests dictionary. */ static dictionary quests () { return data::quests; } /** * Returns the player %character. * * * @return Player %character. */ static character* player () { return data::the_player; } /** * Returns a certain NPC when given the name. Use player () to get * the player %character, as his/her name will be set at runtime. * * @param name The name of the %character to return * * @return a %character. */ static character* get_character (string name) { return data::characters [name]; } /** * Returns a certain quest when given the name. * * @param name The name of the %quest to return * * @return a %quest */ static quest* get_quest (string name) { return data::quests [name]; } /** * Returns the characters dictionary * * * @return Characters dictionary. */ static dictionary characters () { return data::characters; } /** * Returns a pointer to the global game engine. * * * @return Pointer to the global game engine. */ static adonthell* engine () { return data::engine; } private: #ifndef SWIG string Directory; // the game's location on the harddisk string Description; // user supplied description of the game string Location; // the map or area the player is on string Gametime; // the gametime of the saved game u_int32 Timestamp; // time of last save to this file static string game_name; static u_int8 quick_load; /** * Keeps track of available saved games. * */ static vector saves; /** * $HOME/.adonthell * */ static string user_data_dir_; /** * Game data directory. * */ static string game_data_dir_; #endif }; #endif // GAMEDATA_H__ adonthell-0.3.8/src/text_bubble.cc0000644000175000017500000000366412756052470014033 00000000000000/* Copyright (C) 2001/2002/2016 Kai Sterker Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file text_bubble.cc * @author Kai Sterker * @author Alexandre Courbot * * @brief Defines the text_bubble class. * * */ #include "nls.h" #include "text_bubble.h" #include "win_manager.h" text_bubble::text_bubble (const string & text, const string & textcolor, const string & themename, u_int16 len) : win_label () { remain = 75 + text.length () * 4; win_font * font = win_manager::get_font (textcolor); win_theme * theme = win_manager::get_theme (themename); set_font (*font); set_background (*theme); set_border (*theme, win_border::MINI); label::resize (len, 0); set_form (label::AUTO_HEIGHT); set_text (nls::translate (text)); fit_text_width(); set_visible_border (true); set_visible_background (true); set_trans_background (true); set_visible (true); pack (); } text_bubble::~text_bubble () { } bool text_bubble::update () { if (win_label::update ()) { remain--; if (!remain) return false; } return true; } adonthell-0.3.8/src/win_wrappers.h0000644000175000017500000004166312756053361014117 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /* %include "win_font.h" %include "win_theme.h" %include "win_base.h" %include "win_container.h" %include "win_label.h" %include "win_image.h" %include "win_scrolled.h" %include "win_select.h" */ %include "win_manager.h" class win_font{ private: void erase(); void init_in_table(); bool table_core[WIN_NB_TABLE_CHAR]; image * table; u_int8 height_; u_int8 length_; //just for space bar public: win_font(char *); ~win_font(); void load(char *); bool in_table(u_int16 tmp); //win_font & operator=(win_font &); u_int16 height(){return height_;} u_int16 length(){return length_;} image * cursor; }; #define win_event_ACTIVATE 1 #define win_event_UNACTIVATE 2 #define win_event_UPDATE 3 #define win_event_DRAW 4 #define win_event_DRAW_ON_VISIBLE 5 #define win_event_ACTIVATE_KEY 6 #define win_event_SELECT 7 #define win_event_UNSELECT 8 #define win_event_KEYBOARD 9 #define win_event_SCROLL_UP 10 #define win_event_SCROLL_DOWN 11 #define win_event_NEXT 12 #define win_event_PREVIOUS 13 #define win_event_CLOSE 14 #define win_event_DESTROY 15 class win_event { public: win_event(){return_code_=0;} //Use this function to set a callback function void set_return_code (int rc) { return_code_ = rc; } bool update(); void py_signal_connect (PyObject *pyfunc, int signal, PyObject *args = NULL); /*****************************************************/ /*****************************************************/ //DESTRUCTOR virtual ~win_event(); protected: // the python callbacks connected to the window vector py_callbacks; Functor0 callback_[20]; Functor0wRet callback_destroy_; Functor1 callback_quit_; int return_code_; //execute the callback function virtual void on_activate(){ if(callback_[ACTIVATE]) (callback_[ACTIVATE])();} virtual void on_unactivate(){ if(callback_[UNACTIVATE]) (callback_[UNACTIVATE])();} virtual void on_update() { if(callback_[UPDATE]) (callback_[UPDATE])();} virtual void on_draw_visible(){ if(callback_[DRAW_ON_VISIBLE]) (callback_[DRAW_ON_VISIBLE])();} virtual void on_draw(){ if(callback_[DRAW]) (callback_[DRAW])();} virtual void on_activate_key(){ if(callback_[ACTIVATE_KEY]) (callback_[ACTIVATE_KEY])();} virtual void on_select(){ if(callback_[SELECT]) (callback_[SELECT])();} virtual void on_unselect(){ if(callback_[UNSELECT]) (callback_[UNSELECT])();} virtual void on_up(){if(callback_[SCROLL_UP]) (callback_[SCROLL_UP])();} virtual void on_down(){if(callback_[SCROLL_DOWN]) (callback_[SCROLL_DOWN])();} virtual void on_next(){if(callback_[NEXT]) (callback_[NEXT])();} virtual void on_previous(){if(callback_[PREVIOUS]) (callback_[PREVIOUS])(); } }; #define win_border_MINI 0 #define win_border_NORMAL 1 class win_border { public: win_border(); ~win_border(); void load(char *,char *); void update(); void destroy(); void draw(drawing_area * da); void set_visible_border(bool b){visible_border_=b;} void set_brightness_border(bool b); void set_border(win_theme & wth, u_int8 size = win_border::NORMAL); void set_trans_border(bool b);//{trans_=b;} u_int16 length_border(); u_int16 height_border(); private: void init(); void refresh(); image * h_border_template_; image * v_border_template_; image * border_[NB_BORDER_IMAGE]; image * border_brightness_[NB_BORDER_IMAGE]; image ** border_draw_; bool visible_border_; bool brightness_; u_int8 trans_; win_base * wb_; }; class win_background { public: win_background(); ~win_background(); void load(char *); void update(); void destroy(); void draw(drawing_area * da =NULL); void set_visible_background(bool b){visible_=b;} void set_background(win_theme &); void set_brightness_background(bool b); void set_trans_background(bool b);//{trans_=b;} private: void refresh(); void init(); image * background_template_; image * background_; image * background_brightness_; image * background_draw_; win_base * wb_; bool visible_; bool brightness_; bool trans_; }; #define win_base_ALIGN_NONE 0 #define win_base_ALIGN_LEFT 1 #define win_base_ALIGN_CENTER 2 #define win_base_ALIGN_RIGHT 3 class win_base: public win_event, public win_border, public drawing_area, public win_background { public: /** * Default constructor: * - not visible * - x,y equals to 0 * - not focus * - not activate * - not brightness * - not transluency * - can be selected * - alignement is ALIGN_NONE */ win_base(); /** * Return the relative horizontal position of the win_*. * @return horizontal position of the win_*. */ s_int16 x() const {return x_;} /** * Return the relative vertical position of the win_*. * @return vertical position of the win_*. */ s_int16 y() const {return y_;} /** * Return the pad horizontal position of the win_*. * @return the pad horizontal position of the win_*. */ s_int16 & pad_x() {return pad_x_;} /** * Return the pad vertical position of the win_*. * @return the pad vertical position of the win_*. */ s_int16 & pad_y() {return pad_y_;} /** * Return the horizontal position of the win_*. * @return the horizontal position of the win_*. */ s_int16 real_x() const {return drawing_area::x();} /** * Return the vertical position of the win_*. * @return the vertical position of the win_*. */ s_int16 real_y() const {return drawing_area::y();} /** Move the win_*. * @param tx new horizontal position. * @param ty new vertical position. */ virtual void move(s_int16 tx,s_int16 ty); /** Rezise the win_*. * @param tl new horizontal position. * @param th new vertical position. */ virtual void resize(u_int16 tl, u_int16 th); /** Test if win_* is visible * @return true if visible else false */ bool is_visible() const {return visible_;} /** Set the visible parameter * @param b true if the win_* should be visible, false otherwise */ void set_visible(const bool b) {visible_=b;} /** Test if win_* is activated * @return true if activate else false */ bool is_activate() const {return activate_;} /** Set the activate parameter * When a win_* is setup on, the keys queue is cleared * * @param b true if the win_* should be visible, false otherwise */ void set_activate(const bool b) {if(activate_=b) {on_activate();input::clear_keys_queue();}else on_unactivate();} /** Test if win_* has focus on * @return true if focus on else false */ bool is_focus()const {return focus_;} /** Set the focus parameter * @param b true if the win_* should be focus on, false otherwise */ void set_focus(const bool b) {focus_=b;} /** Test if win_* has focus on * @return true if focus on else false */ bool is_trans() const {return trans_;} /** Set the transluency parameter * @param b true if the win_* should be ins transluency, false otherwise */ virtual void set_trans(const bool b) {set_trans_border(trans_ = b);set_trans_background(b);} /** Test if win_* is in brightness * @return true if in brightness else false */ bool is_brightness() const {return brightness_;} /** Set the transluency parameter * @param b true if the win_* should be in transluency, false otherwise */ virtual void set_brightness(const bool b) {set_brightness_border(brightness_ = b);set_brightness_background(b);} /** Set alignement of win_* * @param a can be, ALIGN_NONE, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT */ void set_align(const u_int8 a) {align_=a;update_align();} /** Return alignment of win_* * @return align_ parameter */ u_int8 align() const {return align_;} /** Test if win_* can be selected * @return true if it can be selected, false otherwise */ bool is_can_be_selected() const {return can_be_selected_;} /** Set the object to be selected * A win_obj can be selectable or not when it is inside a win_select * @param b true if the object can be selected inside a win_select., false otherwise */ void set_can_be_selected(const bool b) {can_be_selected_ = b;} /** Update process * @return true if update is successful, false otherwise */ virtual bool update(); /** Draw process * @return true if draw is successful, false otherwise */ virtual bool draw(); /** Input Update process * @ */ virtual bool input_update(); virtual ~win_base(); protected: virtual void update_position(); void update_align(); void set_container(win_container * wc); s_int16 x_; s_int16 y_; s_int16 pad_x_; s_int16 pad_y_; u_int8 align_; bool visible_; bool focus_; bool activate_; bool brightness_; bool trans_; bool can_be_selected_; win_container * wb_father_; }; #define win_container_SPACE_WITH_BORDER 10 #define win_container_SPACE_WITH_OBJECT 10 #define win_container_LIST_LAYOUT 1 #define win_container_NO_LAYOUT 0 class win_container : public win_base { public: win_container(); void move(s_int16, s_int16); void resize(u_int16, u_int16); virtual void add(win_base *); virtual void remove(win_base *); virtual void remove_all(); virtual void destroy(); virtual ~win_container(); virtual bool update(); virtual bool input_update(); virtual bool draw(); void set_visible_all(bool b); virtual void set_brightness(bool b); virtual void set_trans(bool b); virtual void set_space_with_border(u_int16 b){space_with_border_=b;update_layout();} virtual void set_space_with_object(u_int16 o){space_with_object_=o;update_layout();} u_int16 space_with_border(){return space_with_border_;} u_int16 space_with_object(){return space_with_object_;} void set_layout(u_int8 l){layout_=l;update_layout();} void set_focus_object(win_base * f); win_base * focus_object(){return focus_object_;} protected: void update_position(); void update_layout(); u_int16 space_with_object_; u_int16 space_with_border_; u_int8 layout_; lwb list_wb_; win_base * focus_object_; }; class win_image : public image, public win_base { public: // win_image(); ~win_image(); bool draw(); bool update(); bool input_update(); void set_brightness(bool b); void set_trans(bool b); void pack(); void set_auto_refresh(bool b); }; #define label_NOTHING 0 #define label_AUTO_HEIGHT 1 #define label_AUTO_SIZE 2 #define label_KEY_CURSOR_NEXT SDLK_RIGHT #define label_KEY_CURSOR_PREVIOUS SDLK_LEFT class label: public image { public: label(); const string & text_string(){return text_;} const char * text_char(){return text_.c_str();} void set_text(string str); void add_text(const string & str); void set_font(win_font & font); void set_form(const u_int8); void set_cursor_visible (const bool b){cursor_ = b;} void set_cursor_moveable(const bool b){cursor_moveable_ = b;} void resize(const u_int16 l,const u_int16 h); bool update(); bool input_update(); protected: void check_form(); void form_auto_size(); void form_auto_height(); void form_nothing(); void cursor_next(); void cursor_previous(); u_int8 word_place( u_int16 & cur_line_size, u_int16 & word_size ); void find_word(u_int16 & begin,u_int16 &length, u_int16 & size_pix); //the text string text_; //the size of text u_int16 text_size_; //start to begin at the index u_int16 text_index_begin_; //it's the last letter which was drawing u_int16 text_index_end_; u_int16 cursor_pos_; bool cursor_; //set cursor visible bool cursor_visible_; //set cursor moveable bool cursor_moveable_; static u_int16 cursor_blink_speed_; u_int16 cursor_blink_cur_; bool text_eot_; //the font win_font * font_; //the style text displayed u_int8 form_; private: }; class win_label : public label, public win_base { public: win_label(); ~win_label(); bool draw(); bool update(); bool input_update(); void set_brightness(bool b); void set_trans(bool b); void pack(); void set_auto_refresh(bool b); }; class label_input : public label { public: bool input_update(); protected: void insert(const u_int16 pos, const char * letter); }; class win_write : public label_input, public win_base { public: win_write(); ~win_write(); bool draw(); bool update(); bool input_update(); void set_brightness(bool b); void set_trans(bool b); void pack(); void set_auto_refresh(bool b); }; class win_mapview : public mapview, public win_base { public: win_mapview(); ~win_mapview(); bool draw(); bool update(); bool input_update(); void set_brightness(bool b); void set_trans(bool b); void pack(); void set_auto_refresh(bool b); }; class win_scrollbar { public: win_scrollbar(char *rep); ~win_scrollbar(); void update_bar(); void load(char *); void update_back(); void destroy(); void set_scrollbar(win_theme & wt); void set_visible_scrollbar(bool b) {visible_=b;} void set_trans_scrollbar(bool b) { if(!bar_draw_) return; if(trans_=b){ bar_draw_->set_alpha(130);back_draw_->set_alpha(130); } else{bar_draw_->set_alpha(255);back_draw_->set_alpha(255); } } void set_brightness_scrollbar(bool b){brightness_=b;refresh();} void draw(drawing_area * da= NULL); u_int16 height_bar(){if(bar_) return bar_->height();return 0;} private: void init(); void refresh(); image * back_bot_; image * back_mid_; image * back_top_; image * bar_top_; image * bar_bot_; image * bar_mid_; image * bar_flex_; image * bar_; image * back_; image * bar_brightness_; image * back_brightness_; image * bar_draw_; image * back_draw_; bool visible_; bool brightness_; bool trans_; win_scroll * wsc_; }; #define win_scroll_PAD_DEFAULT 5 class win_scroll : public win_container, public win_scrollbar { public: //constructor x,y,length,height,and a theme win_scroll(); //return difference between the last object and the visual height, I think you don't understand, but i know you never use thisfunction just me u_int16 amplitude(){return max_amplitude_;} virtual void add(win_base *); virtual void remove(win_base *); virtual void remove_all(); void resize(u_int16 tl,u_int16 th); void destroy(); bool draw(); bool update(); bool input_update(); void set_space_between_border(u_int16 ); void set_space_between_object(u_int16 ); u_int16 cursor_y(){return cursor_y_;} void set_auto_scrollbar(bool b){auto_scrollbar_=b;} void set_auto_refresh(bool b){auto_refresh_=b;} void set_brightness(bool b) {win_container::set_brightness(b);set_brightness_scrollbar(b);} void set_trans(bool b) {win_container::set_trans(b); set_trans_scrollbar(b);} protected: bool up(); bool down(); void find_amplitude(); void update_amplitude(); u_int16 max_amplitude_; u_int16 cur_amplitude_; u_int16 index_pad_; u_int16 cursor_y_; bool auto_scrollbar_; bool auto_refresh_; }; #define win_select_MODE_BORDER 0 #define win_select_MODE_BRIGHTNESS 1 class win_select : public win_scroll { public: win_select(); bool input_update(); void add(win_base * w); void remove(win_base * w); void remove_all(); void set_mode(const u_int8 mode){mode_ = mode;} void set_border_select(win_border * border){border_select_ = border;} void set_circle(const bool b) {circle_ = b;} bool is_circle(){return circle_;} void set_default(); void set_default_object(const win_base * wb); void set_default_position(const u_int16 pos); win_base * get_selected_object(); u_int16 get_selected_position(); }; class win_theme { public: win_theme(char *); ~win_theme(); void destroy(); }; adonthell-0.3.8/src/drawable.h0000644000175000017500000000714012756047534013155 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file drawable.h * @author Alexandre Courbot * * @brief Declares the drawable class. * */ #ifndef DRAWABLE_H_ #define DRAWABLE_H_ #include "drawing_area.h" class surface; /** * Abstract class for drawable %objects manipulation. * * This class is designed to allow flexibility in * drawable %objects manipulation. It also serves as * a template when creating your own classes. * * It defines the basic virtual methods every drawable * object is required to have. When you design such drawable * object, make it inherit from this class and overload the virtual * functions you wish to use. * * The main advantage of this class is that it allows you to manipulate * any drawable object (image, animation, mapview...) without caring * about it's type, at the little cost of having to use virtual methods. * * There are a few methods that are required to be overloaded * in your class. The draw method is a must-have. Your object must also * take care to set the size of the drawable correctly (the best thing * being that it should use the drawable's size as it's own and don't * overload the length () and height () methods). * */ class drawable { public: /** * Default constructor. * */ drawable (); /** * Destructor. */ virtual ~drawable (); /** * Returns the length of the drawable. * * * @return length of the drawable. */ u_int16 length () const { return length_; } /** * Returns the height of the drawable. * * * @return height of the drawable. */ u_int16 height () const { return height_; } /** * Virtual update function, provided for %objects which * doesn't need one. * */ virtual bool update (); /** * Virtual input update function, provided for %objects which * doesn't need one. * */ virtual bool input_update (); /** * Draw the object on the %screen. * * @param x X position where to draw. * @param y Y position where to draw. * @param da_opt optional drawing_area to use during the drawing operation. * @param target pointer to the surface where to draw the drawable. If NULL, * draw on the screen. */ virtual void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const = 0; protected: /** * Sets the length of the drawable. * * @param l new length. */ void set_length (u_int16 l) { length_ = l; } /** * Sets the height of the drawable. * * @param h new height. */ void set_height (u_int16 h) { height_ = h; } private: u_int16 length_; u_int16 height_; }; #endif adonthell-0.3.8/src/win_write.h0000644000175000017500000000157312756053311013375 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_WRITE_H_ #define WIN_WRITE_H_ #include "win_object.h" #include "label_input.h" typedef win_object win_write; #endif adonthell-0.3.8/src/Makefile.am0000664000175000017500000000636712742773625013275 00000000000000## Process this file with automake to produce Makefile.in if BUILD_DLGEDIT TOOLS_DIR = tools endif SUBDIRS = . modules $(TOOLS_DIR) bin_PROGRAMS = adonthell-0.3 EXTRA_DIST = .indent.pro prefs.l py_adonthell.i AM_CPPFLAGS =$(SDL_DEFS) $(OGG_DEFS) $(SDL_CFLAGS) $(OGG_CFLAGS) $(PY_CFLAGS) $(FT2_CFLAGS) noinst_LIBRARIES = libadonthell.a CLEANFILES = $(moddata_SCRIPTS) headers = \ achievements.h \ adonthell.h \ animation.h \ audio.h \ callback.h \ character_base.h \ character.h \ data_screen.h \ dialog.h \ dialog_screen.h \ drawable.h \ drawing_area.h \ event.h \ event_handler.h \ event_handler_base.h \ event_list.h \ fileops.h \ game.h \ gamedata.h \ gamedate.h \ gametime.h \ gettext.h \ image.h \ input.h \ label.h \ label_input.h \ landmap.h \ map_event.h \ map_event_handler.h \ mapsquare.h \ mapsquare_walkable.h \ nls.h \ mapcharacter.h \ mapobject.h \ mapview.h \ path.h \ pnm.h \ prefs.h \ python_class.h \ py_callback.h \ py_object.h \ quest.h \ screen.h \ surface.h \ storage.h \ str_hash.h \ types.h \ text_bubble.h \ time_event.h \ time_event_handler.h \ win_background.h \ win_base.h \ win_border.h \ win_container.h \ win_event.h \ win_font.h \ win_image.h \ win_keys.h \ win_label.h \ win_manager.h \ win_mapview.h \ win_object.h \ win_scrollbar.h \ win_scroll.h \ win_select.h \ win_theme.h \ win_ttf.h \ win_types.h \ win_wrappers.h \ win_write.h \ window.h \ yarg.h libadonthell_a_SOURCES = \ achievements.cc \ adonthell.cc \ animation.cc \ audio.cc \ character_base.cc \ character.cc \ data_screen.cc \ dialog.cc \ dialog_screen.cc \ drawable.cc \ drawing_area.cc \ event.cc \ event_handler.cc \ event_list.cc \ fileops.cc \ game.cc \ gamedata.cc \ gamedate.cc \ gametime.cc \ image.cc \ input.cc \ label.cc \ label_input.cc \ landmap.cc \ lex.prefs.cc \ map_event.cc \ map_event_handler.cc \ mapsquare_walkable.cc \ mapcharacter.cc \ mapsquare.cc \ mapobject.cc \ mapview.cc \ nls.cc \ path.cc \ pnm.cc \ prefs.cc \ python_class.cc \ py_adonthell_wrap.cc \ py_callback.cc \ py_object.cc \ quest.cc \ screen.cc \ surface.cc \ storage.cc \ text_bubble.cc \ time_event.cc \ time_event_handler.cc \ win_background.cc \ win_base.cc \ win_border.cc \ win_container.cc \ win_event.cc \ win_font.cc \ win_keys.cc \ win_manager.cc \ win_scrollbar.cc \ win_scroll.cc \ win_select.cc \ win_theme.cc \ win_ttf.cc \ yarg.cc \ $(headers) libadonthell_LDADD = $(SDL_LIBS) $(OGG_LIBS) $(PY_LIBS) $(INTLLIBS) $(FT2_LIBS) adonthell_0_3_LDADD = libadonthell.a $(libadonthell_LDADD) adonthell_0_3_SOURCES = main.cc # Note: adonthell.py is also built by this target. py_adonthell_wrap.cc : py_adonthell.i $(headers) @if test "${SWIG}" != "no" ; then \ echo ${SWIG} -python -modern -shadow ${SDL_CFLAGS} -I$(srcdir) -I$(top_srcdir) -c++ -makedefault -o $(srcdir)/$*.cc $(srcdir)/py_adonthell.i; \ ${SWIG} -python -modern -shadow ${SDL_CFLAGS} -I$(srcdir) -I$(top_srcdir) -c++ -makedefault -o $(srcdir)/$*.cc $(srcdir)/py_adonthell.i; \ mv $(srcdir)/adonthell.py $(srcdir)/modules/adonthell.py; \ else \ echo "You need swig >= ${SWIG_MINVER} in order to re-build this file."; \ exit 1; \ fi; lex.prefs.cc : prefs.l flex -olex.prefs.cc $< adonthell-0.3.8/src/gamedate.cc0000644000175000017500000001003012756050151013256 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gamedate.cc * * @author Kai Sterker * @brief Implements the gamedate class. */ #include #include #include "gamedate.h" #include "gametime.h" #include "time_event.h" #include "event_handler.h" // gametime minutes spent in the gameworld so far u_int32 gamedate::Time = 0; // number of game cycles since the last gametime minute passed double gamedate::Ticks = 0.0; // Increase gametime void gamedate::update () { static double tenth_minute = gametime::minute () / 10.0; // fts contains the number of cycles that passed since the last // call to gamedate::update Ticks += gametime::frames_to_skip (); // check whether an in-game minute has passed while (Ticks >= tenth_minute) { Ticks -= tenth_minute; Time++; // raise time event time_event evt (Time); event_handler::raise_event (&evt); } } // load state from disk bool gamedate::get_state (igzstream &in) { // read the current date as (gametime) minutes since start of the game Time << in; return true; } // save state to disk void gamedate::put_state (ogzstream &out) { // write the time to disk Time >> out; } // calculate the current weekday u_int16 gamedate::weekday () { return day () % DAYS_PER_WEEK; } // calculate the current day u_int16 gamedate::day () { // how many minutes make one day static u_int16 day_in_minutes = 600 * HOURS_PER_DAY; return Time / day_in_minutes; } // calculate the hour of the current day u_int16 gamedate::hour () { return (Time / 600) % HOURS_PER_DAY; } // calculate minute of the hour u_int16 gamedate::minute () { return (Time / 10) % 60; } // convert the time string to gametime minutes u_int32 gamedate::parse_time (const std::string & time) { u_int32 t_minutes = 0, number = 0; char num[2] = "0"; for (u_int32 i = 0; i < time.length (); i++) { // got a number if (isdigit (time[i])) { num[0] = time[i]; number = 10 * number + atoi (num); } // got a letter else if (isalpha (time[i])) { switch (time[i]) { // weeks case 'w': { t_minutes += number * DAYS_PER_WEEK * HOURS_PER_DAY * 600; break; } // days case 'd': { t_minutes += number * HOURS_PER_DAY * 600; break; } // hours case 'h': { t_minutes += number * 600; break; } // minutes case 'm': { t_minutes += number * 10; break; } // 1/10 minutes case 't': { t_minutes += number; break; } // error default: { fprintf (stderr, "*** gamedate::parse_time: Unknown time specifier '%c'\n", time[i]); break; } } number = 0; } } return t_minutes; } adonthell-0.3.8/src/pnm.h0000644000175000017500000000416012756051567012166 00000000000000/* Copyright (C) 1999/2000/2001 The Adonthell Project Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file pnm.h * @author Alexandre Courbot * * @brief Declares the pnm static class. * * */ #include "types.h" /** * Allow reading and writing PNM files. * */ class pnm { public: /** * Reads a PNM %image from an opened file. * * @warning * The returned pointer is allocated by this function with calloc (). * Don't forget to free () it when you don't need it anymore! * * @param file opened file from which to read. * @param length pointer to the integer which will contain the %image's length. * @param height pointer to the integer which will contain the %image's height. * * @return allocated pointer containing the PNM %image. */ static void *get (SDL_RWops * file, u_int16 * length, u_int16 * height); /** * Saves a PNM %image into an opened file. * * @param file the opened file to write the PNM %image to. * @param image the PNM %image data. * @param length the length of the %image to write. * @param height the height of the %image to write. */ static void put (SDL_RWops * file, void *image, u_int16 length, u_int16 height); private: /// Go to the next file's line. static void pnm_gotonextline (SDL_RWops * file); /// Skip PNM comments. static int pnm_checkforcomment (SDL_RWops * file); }; adonthell-0.3.8/src/achievements.cc0000644000175000017500000001411312756046702014177 00000000000000/* Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file achievements.cc * * @author Kai Sterker * @brief Manages in-game achievements */ #include "achievements.h" #include "game.h" #include "gamedata.h" py_callback* achievements::_callback = NULL; vector achievements::_achievements; achievements::achievements() { } achievements::~achievements() { } bool achievements::create(const u_int8 & achievement, const u_int32 & bitmask) { if (achievement == 0 || achievement == 255) return false; for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { if (i->id() == achievement) { *i = achievement_data(achievement, bitmask); return true; } } _achievements.push_back(achievement_data(achievement, bitmask)); return true; } void achievements::update(const u_int8 & achievement, const u_int8 & bit) { for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { if (i->id() == achievement) { bool unlocked = i->update(bit); if (unlocked) { // immediately update global achievement cache make_persistent(); // notify listener that achievement was unlocked if (_callback) { _callback->callback_func1 (i->id()); } } break; } } } int achievements::num_unlocked () { int result = 0; for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { if (i->is_unlocked()) { result++; } } return result; } bool achievements::is_unlocked (const u_int32 & index) { if (index < _achievements.size()) { return _achievements[index].is_unlocked(); } return false; } u_int8 achievements::achievement_id(const u_int32 & index) { if (index < _achievements.size()) { return _achievements[index].id(); } return 0; } bool achievements::get_state (igzstream& file) { // if achievements are loaded already, only update current value bool update_only = _achievements.size() > 0; u_int8 id; u_int32 j, expected, current; j << file; for (u_int32 i = 0; i < j; i++) { id << file; expected << file; if (update_only) { current << file; for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { if (i->id() == id) { i->_current = current; break; } } } else { _achievements.push_back(achievement_data(id, expected)); _achievements[i]._current << file; } } return true; } void achievements::put_state (ogzstream& file) { u_int32 j; j = _achievements.size (); j >> file; for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { i->_id >> file; i->_expected >> file; i->_current >> file; } } void achievements::init() { igzstream in; string filepath; // initialize achievements data from game data directory if (_achievements.size() == 0) { if (!gamedata::load_achievements(0)) return; } // Load global achievement state filepath = game::user_data_dir(); filepath += "/achievement.data"; // initially, global achievement data does not exist if (!in.open (filepath)) { // --> try to create it in that case make_persistent(); return; } u_int8 id; u_int32 j, global; Bytef buffer[5]; uLong checksum = adler32(0L, Z_NULL, 0); j << in; for (u_int32 i = 0; i < j; i++) { id << in; global << in; for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { if (i->id() == id) { i->_persistent = global; break; } } // update checksum buffer[4] = id; memcpy(buffer, &global, 4); checksum = adler32(checksum, buffer, 5); } u_int32 previous_checksum; previous_checksum << in; if (previous_checksum != checksum) { cout << "Checksum error: " << previous_checksum << " != " << checksum << endl; _achievements.clear(); _achievements.push_back(achievement_data(255, 0x50554e4b)); _achievements[0]._persistent = _achievements[0]._expected; } in.close (); } void achievements::make_persistent() { ogzstream file; string filepath; filepath = game::user_data_dir(); filepath += "/achievement.data"; // initially, global achievement data does not exist if (!file.open (filepath)) { cerr << "Failed writing " << filepath << endl; return; } num_achievements() >> file; Bytef buffer[5]; uLong checksum = adler32(0L, Z_NULL, 0); for (vector::iterator i = _achievements.begin(); i != _achievements.end(); i++) { i->_id >> file; i->_persistent >> file; // update checksum buffer[4] = i->_id; memcpy(buffer, &i->_persistent, 4); checksum = adler32(checksum, buffer, 5); } ((u_int32) checksum) >> file; file.close(); } void achievements::py_signal_connect (PyObject *pyfunc, PyObject *args) { if (_callback) { delete _callback; } _callback = new py_callback (pyfunc, args); } achievement_data::achievement_data(const u_int8 & id, const u_int32 & expected) : _id(id), _expected(expected) { _current = 0; _persistent = 0; } achievement_data::~achievement_data() { } bool achievement_data::update(const u_int8 & bit) { // only ever unlock achievement once if (!is_unlocked() && bit < 32) { _current |= (1 << bit); // unlock achievement if expected value is reached if (_current == _expected) { _persistent = _current; return true; } } return false; } adonthell-0.3.8/src/py_object.cc0000644000175000017500000001255212756051670013507 00000000000000/* Copyright (C) 1999/2000/2001/2003 Kai Sterker Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file py_object.cc * @author Kai Sterker * @author Alexandre Courbot * * @brief Defines the py_object class. * * */ #include "py_object.h" py_object::py_object () { Instance = NULL; Filename = ""; Classname = ""; } py_object::~py_object () { clear (); } // Cleanup (and re-initialisation) void py_object::clear () { // Delete our Instance Py_XDECREF (Instance); Instance = NULL; Filename = ""; Classname = ""; } // Pass a (new) Python module to be used bool py_object::create_instance (string file, string classname, PyObject * args) { // Try to import the given script PyObject *module = python::import_module (file); if (!module) return false; // Instanciate! return instanciate (module, file, classname, args); } // Reload a python module in case it has changed on disk bool py_object::reload_instance (string file, string classname, PyObject * args) { // Try to import the given script PyObject *module = python::import_module (file); if (!module) return false; // Now Reload PyObject *reload = PyImport_ReloadModule (module); Py_DECREF (module); if (!reload) return false; return instanciate (reload, file, classname, args); } // Instanciate the given class from the module bool py_object::instanciate (PyObject *module, string file, string classname, PyObject * args) { // Cleanup clear (); PyObject * classobj = PyObject_GetAttrString (module, (char *) classname.c_str ()); Py_DECREF (module); if (!classobj) { python::show_traceback (); return false; } // Create the Instance Instance = PyObject_CallObject (classobj, args); Py_DECREF (classobj); if (!Instance) { python::show_traceback (); return false; } Filename = file; Classname = classname; return true; } // Execute a method of the script PyObject* py_object::call_method_ret (const string &name, PyObject *args) const { PyObject *result = NULL; if (Instance) { PyObject *tocall = PyObject_GetAttrString (Instance, (char *) name.c_str ()); if (PyCallable_Check (tocall) == 1) { result = PyObject_CallObject (tocall, args); Py_DECREF (tocall); } #ifdef PY_DEBUG python::show_traceback (); #endif } return result; } // check for a certain attribute bool py_object::has_attribute (const std::string & name) { if (Instance) return PyObject_HasAttrString (Instance, (char *) name.c_str ()); else return false; } // Get an attribute of the instance PyObject *py_object::get_attribute (const string &name) const { if (Instance) return PyObject_GetAttrString (Instance, (char *) name.c_str ()); else return NULL; } // Get an int attribute of the instance s_int32 py_object::get_attribute_int (const string &name) { if (Instance) { PyObject *attribute = PyObject_GetAttrString (Instance, (char *) name.c_str ()); if (!attribute) return 0; s_int32 value = PyInt_AsLong (attribute); Py_DECREF (attribute); return value; } else return 0; } // Get a string attribute of the instance string py_object::get_attribute_string (const string &name) { if (Instance) { PyObject *attribute = PyObject_GetAttrString (Instance, (char *) name.c_str ()); if (!attribute) return 0; string value = python::as_string (attribute); Py_DECREF (attribute); return value; } else return string (""); } // Set an attribute of the instance void py_object::set_attribute (const string &name, PyObject *value) { if (Instance) if (PyObject_SetAttrString (Instance, (char *) name.c_str (), value) == -1) python::show_traceback (); } // Set an int attribute of the instance void py_object::set_attribute_int (const string &name, int value) { if (Instance) { PyObject *val = PyInt_FromLong (value); if (PyObject_SetAttrString (Instance, (char *) name.c_str (), val) == -1) python::show_traceback (); Py_DECREF (val); } else return; } // Set a string attribute of the instance void py_object::set_attribute_string (const string &name, const string & value) { if (Instance) { PyObject *val = PyString_FromString (value.c_str ()); if (PyObject_SetAttrString (Instance, (char *) name.c_str (), val) == -1) python::show_traceback (); Py_DECREF (val); } else return; } adonthell-0.3.8/src/py_callback.h0000644000175000017500000000630713000720356013623 00000000000000/* Copyright (C) 2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef PY_CALLBACK_H__ #define PY_CALLBACK_H__ /** * @file py_callback.h * @author Kai Sterker * * @brief Declares the py_callback class. * * */ #include #include "Python.h" #include "fileops.h" /** * Stores the C++ <-> Python callback binding * */ class py_callback { public: /** * Default ctor, */ py_callback (); /** * Constructor that assigns a function and its arguments to the callback. * * @param func function assigned to this callback. * @param args Arguments passed to the function. */ py_callback (PyObject * func, PyObject * args); /** * Destructor. */ ~py_callback (); /** * @name Executing the callback */ //@{ /** * Calls the python function without arguments. */ void callback_func0 (); /** * Calls the python function and returns bool. */ bool callback_func0ret (); /** * Calls the python function with an integer. * * @param arg Integer value to pass to the callback */ void callback_func1 (int arg); //@} /** * @name Loading / Saving */ //@{ /** * Saves the callback and it's arguments to file. * @note Currently, arguments have to be a tuple containing only * integers and/or strings. * * @param out file where to save the callback. */ void put_state (ogzstream& out) const; /** * Restores the callback from a file. For that to work, the static * py_callback::instance member has to point to the python instance * containing the callback. * * @param in file to load the callback from. * * @return \e true if the callback could be restored, \e false otherwise * * @sa instance */ bool get_state (igzstream& in); /** * When restoring a callback from file, instance has to point to the * python instance (module or class) containing the callback. * * @sa get_state */ static PyObject *instance; //@} private: /** * The actual function call. * * @param args The arguments passed to the callback. */ PyObject *make_call (PyObject *args); /** * The function to be called. */ PyObject *function; /** * Additional arguments passed to the function. */ PyObject *arguments; }; #endif // PY_CALLBACK_H__ adonthell-0.3.8/src/win_scrollbar.h0000644000175000017500000000416012756053114014222 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_SCROLLBAR_H_ #define WIN_SCROLLBAR_H_ #include "image.h" #include "win_types.h" class win_theme; class win_scroll; class win_scrollbar { public: win_scrollbar(); win_scrollbar(win_scroll * ); win_scrollbar(win_scrollbar &); win_scrollbar(char *rep); ~win_scrollbar(); void update_bar(); void load(char *); void update_back(); void destroy(); void set_scrollbar(win_scrollbar &); void set_scrollbar(win_theme & wt); void set_visible_scrollbar(bool b) {visible_=b;} void set_trans_scrollbar(bool b) { if(!bar_draw_) return; if((trans_=b)){ bar_draw_->set_alpha(130);back_draw_->set_alpha(130); } else{bar_draw_->set_alpha(255);back_draw_->set_alpha(255); } } void set_brightness_scrollbar(bool b){brightness_=b;refresh();} void draw(drawing_area * da= NULL); u_int16 height_bar(){if(bar_) return bar_->height();return 0;} private: void init(); void refresh(); win_scrollbar & operator=(win_scrollbar &); image * back_bot_; image * back_mid_; image * back_top_; image * bar_top_; image * bar_bot_; image * bar_mid_; image * bar_flex_; image * bar_; image * back_; image * bar_brightness_; image * back_brightness_; image * bar_draw_; image * back_draw_; bool visible_; bool brightness_; bool trans_; win_scroll * wsc_; }; #endif adonthell-0.3.8/src/audio.cc0000664000175000017500000002277413264653651012645 00000000000000/* Copyright (C) 2000 Andrew Henderson Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include #include #include #include #include "audio.h" // #include "audio_loop.h" bool audio::audio_initialized = false; int audio::background_volume; int audio::effects_volume; #ifdef OGG_MUSIC // loop_info *audio::loop[NUM_MUSIC]; #endif Mix_Music *audio::music[NUM_MUSIC]; string audio::music_file[NUM_MUSIC]; Mix_Chunk *audio::sounds[NUM_WAVES]; int audio::current_background; int audio::last_background; bool audio::background_paused; int audio::audio_rate; Uint16 audio::buffer_size; Uint16 audio::audio_format; int audio::audio_channels; // python schedule stuff py_object audio::schedule; bool audio::schedule_active = 0; PyObject *audio::schedule_args = NULL; void audio::init (config *myconfig) { int i; // Generic counter variable // Sample rate: 11025, 22050 or 44100 Hz switch( myconfig->audio_sample_rate ) { case 0: { audio_rate = 11025; break; } case 1: { audio_rate = 22050; break; } default: { audio_rate = 44100; break; } } // Output in signed 8/16-bit form audio_format = myconfig->audio_resolution == 0 ? AUDIO_S8 : AUDIO_S16SYS; // 1 is mono, 2 is stereo audio_channels = myconfig->audio_channels == 0 ? 1 : 2; // 100... scales to percentages ;> background_volume = myconfig->audio_volume; buffer_size = 4096; // Audio buffer size effects_volume = 128; // Still figuring this one out... current_background = -1; // No song currently playing last_background = -1; // No song played so far background_paused = false; // Music isn't paused audio_initialized = false; // No audio connection yet schedule_active = false; // No schedule file yet // Mark all slots in sound and music arrays as empty for (i = 0; i < NUM_WAVES; i++) sounds[i] = NULL; for (i = 0; i < NUM_MUSIC; i++) { music[i] = NULL; music_file[i] = ""; } // Check if we can playback music if (!Mix_Init(MIX_INIT_OGG)) { fprintf(stderr, "Unable to init Ogg Vorbis: %s\n", SDL_GetError()); fprintf(stderr, "Music will not be available.\n"); } // Try opening the audio device at our defaults i = Mix_OpenAudio(audio_rate, audio_format, audio_channels, buffer_size); // Now see what we got when opening the audio device // If we COULDN'T open the audio... if ( i < 0 ) { fprintf(stderr, "Unable to open audio: %s\n", SDL_GetError()); fprintf(stderr, "Audio will not be used.\n"); // If we COULD open the audio... } else { audio_initialized = true; Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); set_background_volume (background_volume); } } void audio::cleanup(void) { int i; // No music is queued to play current_background = -1; // Null out those tunes and sound effects for (i = 0; i < NUM_WAVES; i++) { unload_wave(i); sounds[i] = NULL; } for (i = 0; i < NUM_MUSIC; i++) { unload_background(i); music[i] = NULL; music_file[i] = ""; } // Clean audio schedule schedule.clear (); // Close out audio connection if (audio_initialized == true) { Mix_CloseAudio(); audio_initialized = false; } } int audio::load_background(int slot, char *filename) { if (!audio_initialized) return (0); // Check for bad input if ((slot >= NUM_MUSIC) || (slot < 0)) { fprintf(stderr, "Error: Tried to put music in invalid slot.\n"); return(0); } // Check if the file exists at all... FILE *f = fopen (filename, "r"); if (!f) { fprintf(stderr, "Error: No such file: %s.\n", filename); return 0; } fclose (f); // Music already occupies that slot if (music[slot] != NULL) unload_background (slot); // No music in slot, load new tune in, ... music[slot] = Mix_LoadMUS(filename); music_file[slot] = filename; #ifdef OGG_MUSIC // read loop points and ... // loop[slot] = new loop_info (&music[slot]->ogg_data.ogg->vf); // ... enable looping // music[slot]->ogg_data.ogg->vf.callbacks.read_func = &ogg_read_callback; #endif return(1); } void audio::unload_background (int slot) { if (music[slot] == NULL) return; // If we are unloading background music from the slot // the current background music is in... if (current_background == slot) { last_background = current_background; current_background = -1; // Just a precaution Mix_HaltMusic(); Mix_ResumeMusic (); } Mix_FreeMusic (music[slot]); music[slot] = NULL; music_file[slot] = ""; #ifdef OGG_MUSIC // delete loop[slot]; #endif } void audio::pause_music(void) { Mix_PauseMusic(); } void audio::unpause_music(void) { Mix_ResumeMusic(); } // Accepts a percentage of the maximum volume level // and clips out of bounds values to 0-100. void audio::set_background_volume(int volume) { // Check for bad input if (volume < 0) { background_volume = 0; } else if (volume > 100) { background_volume = 100; } else background_volume = volume; // Scales 0-100% to 0-128 Mix_Volume(-1, int(background_volume * 1.28)); Mix_VolumeMusic(int(background_volume * 1.28)); } // This should be done better, but I'll wait until // I have enough sound effects to play with ;> int audio::load_wave(int slot, char *filename) { if (!audio_initialized) return(1); // Check for bad input if ((slot >= NUM_WAVES) || (slot < 0)) { fprintf(stderr, "Error: Tried to put wave in invalid slot.\n"); return(1); } else { // Check if the file exists at all... FILE *f = fopen (filename, "r"); if (!f) { sounds[slot] = NULL; return 1; } fclose (f); sounds[slot] = Mix_LoadWAV(filename); } return(0); } void audio::unload_wave(int wave) { if (sounds[wave] != NULL) { Mix_FreeChunk(sounds[wave]); sounds[wave] = NULL; } } void audio::play_wave(int channel, int slot) { if ((slot > -1) && (slot < NUM_CHANNELS)) if (sounds[slot] != NULL) Mix_PlayChannel(channel, sounds[slot], 0); } void audio::play_background(int slot) { if (music[slot] != NULL) { current_background = slot; Mix_PlayMusic(music[current_background], 0); } } void audio::fade_out_background(int time) { if (Mix_PlayingMusic ()) { Mix_FadeOutMusic(time); last_background = current_background; current_background = -1; } #ifdef OGG_MUSIC // music[current_background]->ogg_data.ogg->vf.callbacks.read_func = &fread_wrap; #endif } void audio::fade_in_background(int slot, int time) { if (music[slot] != NULL) { current_background = slot; Mix_FadeInMusic(music[slot], 0, time); } } // Temporary convience function for testing void audio::change_background(int slot, int time) { fade_out_background(time); fade_in_background(slot, time); } #ifdef OGG_MUSIC // OggVorbis_File* audio::get_vorbisfile () // { // return &music[current_background]->ogg_data.ogg->vf; // } #endif // set audio schedule void audio::set_schedule (string file, PyObject * args) { // Clears the schedule schedule.clear (); Py_XDECREF (schedule_args); schedule_args = NULL; // Set new schedule if (file != "") { schedule_args = args; Py_XINCREF (schedule_args); schedule.create_instance ("schedules.audio." + file, file, args); } } // run the audio control schedule void audio::run_schedule () { PyObject *song = Py_BuildValue ("(i)", last_background); if (schedule_active) schedule.call_method ("music_finished", song); Py_DECREF (song); } // save state s_int8 audio::put_state (ogzstream& file) { // currently playing current_background >> file; // music file if (current_background != -1) music_file[current_background] >> file; // Save the schedule script state schedule.class_name () >> file; if (schedule_args) { true >> file; python::put_tuple (schedule_args, file); } else false >> file; is_schedule_activated () >> file; return 1; } // get state s_int8 audio::get_state (igzstream& file) { string song, script; bool have_args; // current background last_background << file; // if song was playing, see which it is if (last_background != -1) { song << file; // ... and resume playing if (load_background (last_background, (char *) song.c_str ())) play_background (last_background); } // Restore the schedule script state PyObject * args = NULL; script << file; have_args << file; if (have_args) args = python::get_tuple (file); set_schedule (script, args); Py_XDECREF (args); schedule_active << file; return 1; } adonthell-0.3.8/src/path.cc0000644000175000017500000002472212756051535012467 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file path.cc * @author Alexandre Courbot * * @brief Defines the path class. * * */ #include "path.h" #include "landmap.h" #include #include u_int16 path::goal_estimate (u_int16 x, u_int16 y) { u_int16 est; if (x > goal.x) est = x - goal.x; else est = goal.x - x; if (y > goal.y) est += y - goal.y; else est += goal.y - y; return est; } bool path::calculate () { // Sorted Open nodes. priority_queue , compare_squarecost> sorted_nodes; // Open nodes. vector opened_nodes; // Closed nodes. vector closed_nodes; moves_to_goal.clear (); mapsquare_area * smap = refmap->get_submap (submap); mapsquare * n = smap->get_square (start.x, start.y); // Origin node n->g = 0; n->h = goal_estimate (n->x (), n->y ()); n->f = n->g + n->h; n->parent = NULL; sorted_nodes.push (n); opened_nodes.push_back (n); while (!sorted_nodes.empty ()) { n = sorted_nodes.top (); sorted_nodes.pop (); opened_nodes.erase (find (opened_nodes.begin (), opened_nodes.end (), n)); // Have we reached the goal? if (n->x () == goal.x && n->y () == goal.y) { while (n->parent != NULL) { // Vertical move if (n->x () == n->parent->x ()) { // Go to north if (n->y () - n->parent->y () < 0) moves_to_goal.push_back (WALK_NORTH); // Go to south else moves_to_goal.push_back (WALK_SOUTH); } // Horizontal move else { // Go to west if (n->x () - n->parent->x () < 0) moves_to_goal.push_back (WALK_WEST); // Go to east else moves_to_goal.push_back (WALK_EAST); } n = n->parent; } return true; } // Now proceeding with the successors of n mapsquare * np; // East square // Make sure that the square is not at the edge of the submap // and is directly reachable. // If so, add it to the opened nodes list. if (n->x () + 1 < smap->area_length ()) { np = smap->get_square (n->x () + 1, n->y ()); if (n->is_walkable_east () && np->is_walkable_west () && np->is_free () && (np->can_use_for_pathfinding || (np->x () == goal.x && np->y () == goal.y))) { u_int16 newg = n->g + 1; bool in_opened, in_closed; in_opened = (find (opened_nodes.begin (), opened_nodes.end (), np) != opened_nodes.end ()); in_closed = (find (closed_nodes.begin (), closed_nodes.end (), np) != closed_nodes.end ()); // If np is in opened_nodes or closed_nodes and np->g <= newg, don't do anything. if (!((in_opened || in_closed) && np->g <= newg)) // else add the node to the opened nodes list (if necessary) { np->g = newg; np->h = goal_estimate (np->x (), np->y ()); np->f = np->g + np->h; np->parent = n; // if np is in closed_nodes, remove it if (in_closed) closed_nodes.erase (find (closed_nodes.begin (), closed_nodes.end (), np)); // if np is not in opened_nodes yet, add it if (!in_opened) { sorted_nodes.push (np); opened_nodes.push_back (np); } } } } // West square // Make sure that the square is not at the edge of the submap // and is directly reachable. // If so, add it to the opened nodes list. if (n->x () > 0) { np = smap->get_square (n->x () - 1, n->y ()); if (n->is_walkable_west () && np->is_walkable_east () && np->is_free () && (np->can_use_for_pathfinding || (np->x () == goal.x && np->y () == goal.y))) { u_int16 newg = n->g + 1; bool in_opened, in_closed; in_opened = (find (opened_nodes.begin (), opened_nodes.end (), np) != opened_nodes.end ()); in_closed = (find (closed_nodes.begin (), closed_nodes.end (), np) != closed_nodes.end ()); // If np is in opened_nodes or closed_nodes and np->g <= newg, don't do anything. if (!((in_opened || in_closed) && np->g <= newg)) // else add the node to the opened nodes list (if necessary) { np->g = newg; np->h = goal_estimate (np->x (), np->y ()); np->f = np->g + np->h; np->parent = n; // if np is in closed_nodes, remove it if (in_closed) closed_nodes.erase (find (closed_nodes.begin (), closed_nodes.end (), np)); // if np is not in opened_nodes yet, add it if (!in_opened) { sorted_nodes.push (np); opened_nodes.push_back (np); } } } } // North square // Make sure that the square is not at the edge of the submap // and is directly reachable. // If so, add it to the opened nodes list. if (n->y () > 0) { np = smap->get_square (n->x (), n->y () - 1); if (n->is_walkable_north () && np->is_walkable_south () && np->is_free () && (np->can_use_for_pathfinding || (np->x () == goal.x && np->y () == goal.y))) { u_int16 newg = n->g + 1; bool in_opened, in_closed; in_opened = (find (opened_nodes.begin (), opened_nodes.end (), np) != opened_nodes.end ()); in_closed = (find (closed_nodes.begin (), closed_nodes.end (), np) != closed_nodes.end ()); // If np is in opened_nodes or closed_nodes and np->g <= newg, don't do anything. if (!((in_opened || in_closed) && np->g <= newg)) // else add the node to the opened nodes list (if necessary) { np->g = newg; np->h = goal_estimate (np->x (), np->y ()); np->f = np->g + np->h; np->parent = n; // if np is in closed_nodes, remove it if (in_closed) closed_nodes.erase (find (closed_nodes.begin (), closed_nodes.end (), np)); // if np is not in opened_nodes yet, add it if (!in_opened) { sorted_nodes.push (np); opened_nodes.push_back (np); } } } } // South square // Make sure that the square is not at the edge of the submap // and is directly reachable. // If so, add it to the opened nodes list. if (n->y () + 1 < smap->area_height ()) { np = smap->get_square (n->x (), n->y () + 1); if (n->is_walkable_south () && np->is_walkable_north () && np->is_free () && (np->can_use_for_pathfinding || (np->x () == goal.x && np->y () == goal.y))) { u_int16 newg = n->g + 1; bool in_opened, in_closed; in_opened = (find (opened_nodes.begin (), opened_nodes.end (), np) != opened_nodes.end ()); in_closed = (find (closed_nodes.begin (), closed_nodes.end (), np) != closed_nodes.end ()); // If np is in opened_nodes or closed_nodes and np->g <= newg, don't do anything. if (!((in_opened || in_closed) && np->g <= newg)) // else add the node to the opened nodes list (if necessary) { np->g = newg; np->h = goal_estimate (np->x (), np->y ()); np->f = np->g + np->h; np->parent = n; // if np is in closed_nodes, remove it if (in_closed) closed_nodes.erase (find (closed_nodes.begin (), closed_nodes.end (), np)); // if np is not in opened_nodes yet, add it if (!in_opened) { sorted_nodes.push (np); opened_nodes.push_back (np); } } } } closed_nodes.push_back (n); } return false; } s_int8 path::get_state (igzstream & file) { u_int16 nb_moves; clear (); submap << file; dir << file; start.x << file; start.y << file; goal.x << file; goal.y << file; nb_moves << file; for (u_int16 i = 0; i < nb_moves; i++) { u_int16 t; t << file; moves_to_goal.push_back (t); } return 0; } s_int8 path::put_state (ogzstream & file) const { submap >> file; dir >> file; start.x >> file; start.y >> file; goal.x >> file; goal.y >> file; nbr_moves () >> file; for (u_int16 i = 0; i < nbr_moves (); i++) { get_move (i) >> file; } return 0; } adonthell-0.3.8/src/python_class.cc0000644000175000017500000001077312756051712014237 00000000000000/* Copyright (C) 2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file python_class.cc * @author Kai Sterker * * @brief Declares the python class. * * */ #include "python_class.h" #include "game.h" #include PyObject *data::globals; PyObject *python::module; // defined in py_adonthell_wrap.cc PyObject *get_py_obj (void *instance, const char* class_name); using namespace std; /* * Start Python */ void python::init () { Py_Initialize (); } /** * Stop Python */ void python::cleanup () { // Cleanup the global namespace of python interpreter // Note that we don't have to DECREF data::globals, because they're a // borrowed reference of py_module. Py_XDECREF (module); Py_Finalize (); } /* * Insert a string into the module search path. */ void python::insert_path( char *name ) { char buf[256]; sprintf ( buf, "import sys ; sys.path.insert(0, \"%s\")", name ); PyRun_SimpleString ( buf ); } /* * Some convenience functions */ /* * Executes the Python statements in the string */ void python::exec_string(const char * s) { PyRun_SimpleString(s); } /* * Execute the file given by 'filename' */ bool python::exec_file (string filename) { PyObject *mod = python::import_module (filename); if (!mod) { cerr << "exec_file: " << filename << " load failed: " << endl; show_traceback (); return false; } Py_DECREF (mod); return true; } /* * Dump any error information to stderr */ void python::show_traceback(void) { if ( PyErr_Occurred() ) { PyErr_Print(); fflush (stderr); } } /* Import a module, return module ptr */ PyObject *python::import_module (string filename) { PyObject *result = PyImport_ImportModule ((char *) filename.c_str ()); #ifdef PY_DEBUG show_traceback (); #endif return result; } // Make a C++ instance available to Python PyObject *python::pass_instance (void *instance, const char *class_name) { string class_ptr = string(class_name) + "*"; return get_py_obj (instance, class_ptr.c_str()); } PyObject * python::get_tuple (igzstream & file) { PyObject * tuple; u_int32 l; l << file; tuple = PyTuple_New (l); for (u_int32 i = 0; i < l; i++) { string ms; u_int32 j; char c; c << file; switch (c) { case 's': ms << file; // Stolen reference PyTuple_SetItem (tuple, i, PyString_FromString (ms.c_str ())); break; case 'i': j << file; // Stolen reference PyTuple_SetItem (tuple, i, PyInt_FromLong (j)); break; } } return tuple; } void python::put_tuple (PyObject * tuple, ogzstream & file) { u_int32 l = PyTuple_Size (tuple); l >> file; for (u_int32 i = 0; i < l; i++) { // Borrowed reference PyObject * item = PyTuple_GetItem (tuple, i); // Check for the type of this object // String? if (PyString_Check (item)) { 's' >> file; string s = python::as_string (item); s >> file; } // Integer? else if (PyInt_Check (item)) { 'i' >> file; u_int32 li = PyInt_AsLong (item); li >> file; } } } string python::as_string(PyObject *s) { #if PY_MAJOR_VERSION >= 3 PyObject *byteArr = PyUnicode_AsUTF8String(s); char* str = PyBytes_AsString(byteArr); #else char* str = PyString_AsString(s); #endif if (str) { string result(str); #if PY_MAJOR_VERSION >= 3 Py_DECREF(byteArr); #endif return result; } #if PY_MAJOR_VERSION >= 3 Py_DECREF(byteArr); #endif return string(""); } adonthell-0.3.8/src/mapview.cc0000644000175000017500000004215412756051366013204 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapview.cc * @author Alexandre Courbot * * @brief Defines the mapview class. * * */ #include "mapview.h" #include mapview::mapview () : da () { drawable::set_length (0); drawable::set_height (0); d_length = d_height = currentsubmap_ = posx_ = posy_ = 0; m_map = NULL; offx_ = offy_ = 0; schedule_args = NULL; } mapview::~mapview () { detach_map (); Py_XDECREF (schedule_args); } void mapview::attach_map (landmap * m) { m_map = m; set_pos (0, 0, 0); } void mapview::detach_map () { if (!m_map) return; m_map = NULL; } s_int8 mapview::set_pos (u_int16 sm, u_int16 px, u_int16 py, s_int16 ox, s_int16 oy) { currentsubmap_ = sm; mapsquare_area * ms = m_map->submap[sm]; s_int32 tpx = px * MAPSQUARE_SIZE + ox; s_int32 tpy = py * MAPSQUARE_SIZE + oy; if (tpx + length () > ms->area_length () * MAPSQUARE_SIZE) tpx = ms->area_length () * MAPSQUARE_SIZE - length (); if (tpy + height () > ms->area_height () * MAPSQUARE_SIZE) tpy = ms->area_height () * MAPSQUARE_SIZE - height (); if (tpx < 0) tpx = 0; if (tpy < 0) tpy = 0; px = tpx / MAPSQUARE_SIZE; py = tpy / MAPSQUARE_SIZE; ox = tpx % MAPSQUARE_SIZE; oy = tpy % MAPSQUARE_SIZE; posx_ = px; posy_ = py; offx_ = ox; offy_ = oy; return 0; } s_int8 mapview::center_on (u_int16 sm, u_int16 px, u_int16 py, s_int16 ox, s_int16 oy) { s_int32 tpx = px * MAPSQUARE_SIZE + ox - ((length () - MAPSQUARE_SIZE) >> 1); s_int32 tpy = py * MAPSQUARE_SIZE + oy - ((height () - MAPSQUARE_SIZE) >> 1); if (tpx < 0) tpx = 0; if (tpy < 0) tpy = 0; s_int16 npx = tpx / MAPSQUARE_SIZE; s_int16 npy = tpy / MAPSQUARE_SIZE; s_int16 nox = tpx % MAPSQUARE_SIZE; s_int16 noy = tpy % MAPSQUARE_SIZE; return set_pos (sm, npx, npy, nox, noy); } void mapview::scroll_right () { if (!can_scroll_right ()) return; if (offx_ == MAPSQUARE_SIZE - 1) { offx_ = 0; posx_++; } else offx_++; } void mapview::scroll_left () { if (!can_scroll_left ()) return; if (offx_ == 0) { offx_ = MAPSQUARE_SIZE - 1; posx_--; } else offx_--; } void mapview::scroll_down () { if (!can_scroll_down ()) return; if (offy_ == MAPSQUARE_SIZE - 1) { offy_ = 0; posy_++; } else offy_++; } void mapview::scroll_up () { if (!can_scroll_up ()) return; if (offy_ == 0) { offy_ = MAPSQUARE_SIZE - 1; posy_--; } else offy_--; } void mapview::resize (u_int16 l, u_int16 h) { drawable::set_length (l); drawable::set_height (h); d_length = (l / MAPSQUARE_SIZE) + (l % MAPSQUARE_SIZE != 0); d_height = (h / MAPSQUARE_SIZE) + (h % MAPSQUARE_SIZE != 0); da.resize (length (), height ()); } s_int8 mapview::get_state (igzstream& file) { u_int16 a, b, c, d, sm; string t; bool bo; // Read the mapview's dimensions // Length and height a << file; b << file; resize (a, b); // Currentsubmap sm << file; // Position on map a << file; b << file; c << file; d << file; set_pos (sm, a, b, c, d); // Schedule state PyObject * args = NULL; t << file; bo << file; if (bo) args = python::get_tuple (file); set_schedule (t, args); Py_XDECREF (args); return 0; } s_int8 mapview::put_state (ogzstream& file) { u_int16 b; // Write the mapview's dimensions b = length (); b >> file; b = height (); b >> file; currentsubmap_ >> file; // Position posx_ >> file; posy_ >> file; offx_ >> file; offy_ >> file; // Write the mapview's schedule state schedule_file () >> file; if (schedule_args) { true >> file; python::put_tuple (schedule_args, file); } else false >> file; return 0; } void mapview::set_schedule (string file, PyObject * args) { if (file == "") { schedule.clear (); Py_XDECREF (schedule_args); schedule_args = NULL; } else { Py_XINCREF (args); schedule_args = args; u_int16 argssize = args == NULL ? 1 : PyTuple_Size (args) + 1; PyObject * theargs; theargs = PyTuple_New (argssize); // We can pass_instance directly 'cause PyTuple_SetItem steals a // reference to the result of pass_instance. PyTuple_SetItem (theargs, 0, python::pass_instance (this, "mapview")); for (u_int16 i = 1; i < argssize; i++) { PyObject * intref = PyTuple_GetItem (args, i - 1); Py_INCREF (intref); PyTuple_SetItem (theargs, i, intref); } schedule.create_instance ("schedules.mapviews." + file, file, theargs); Py_DECREF (theargs); } schedule_file_ = file; } bool mapview::update () { schedule.run (); return true; } void mapview::draw (s_int16 x, s_int16 y, const drawing_area * da_opt, surface *target) const { static u_int16 i, j; static u_int16 i0, j0, ie, je; static list ::iterator it; static list ::iterator itc; static list ::iterator itb; static mapsquare_area *l; static u_int16 offx, offy; static list critical_draw; static list characters_draw; static list bubbles_draw; if (!m_map) return; static SDL_Rect trect; static drawing_area tda; da.move (x, y); if (da_opt) da.assign_drawing_area (da_opt); trect = da.setup_rects (); tda = trect; l = m_map->submap[currentsubmap_]; if (!l->area_length () || !l->area_height ()) return; i0 = posx_; j0 = posy_; ie = i0 + d_length + (offx_ != 0) < l->area_length () ? i0 + d_length + (offx_ != 0) : l->area_length (); je = j0 + d_height + (offy_ != 0) < l->area_height () ? j0 + d_height + (offy_ != 0) : l->area_height (); offx = l->area_length () * MAPSQUARE_SIZE < length () ? (length () - l->area_length () * MAPSQUARE_SIZE) >> 1 : 0; offy = l->area_height () * MAPSQUARE_SIZE < height () ? (height () - l->area_height () * MAPSQUARE_SIZE) >> 1 : 0; x += offx; y += offy; // 1st horizontal parse to check top overflows // Top-left corner for (it = l->area[i0][j0].tiles.begin (); it != l->area[i0][j0].tiles.end () && *(it->base_tile) < *it; it++) if (it->x > it->base_tile->x && it->y > it->base_tile->y) critical_draw.push_back (*(it->base_tile)); for (itc = l->area[i0][j0].mapchars.begin (); itc != l->area[i0][j0].mapchars.end (); itc++) if (itc->x > itc->base_tile->x && itc->y > itc->base_tile->y) characters_draw.push_back (*itc); // Top line for (i = i0; i < ie && i < l->area_length (); i++) { for (it = l->area[i][j0].tiles.begin (); it != l->area[i][j0].tiles.end (); it++) if (it->x == it->base_tile->x && it->y > it->base_tile->y) critical_draw.push_back (*(it->base_tile)); for (itc = l->area[i][j0].mapchars.begin (); itc != l->area[i][j0].mapchars.end (); itc++) if (itc->x == itc->base_tile->x && itc->y > itc->base_tile->y) characters_draw.push_back (*itc); } // Top right corner for (it = l->area[ie - 1][j0].tiles.begin (); it != l->area[ie - 1][j0].tiles.end (); it++) if (it->x < it->base_tile->x && it->y > it->base_tile->y) critical_draw.push_back (*(it->base_tile)); for (itc = l->area[ie - 1][j0].mapchars.begin (); itc != l->area[ie - 1][j0].mapchars.end (); itc++) if (itc->x < itc->base_tile->x && itc->y > itc->base_tile->y) characters_draw.push_back (*itc); // Drawing characters and top overflowing gfx critical_draw.sort (); characters_draw.sort (); it = critical_draw.begin (); itc = characters_draw.begin (); while (itc != characters_draw.end () || it != critical_draw.end ()) { if (itc != characters_draw.end ()) { if (it != critical_draw.end ()) { if (it->base_tile->y <= itc->base_tile->y) { draw_tile (x, y, &tda, target, it); it++; } else { draw_mapchar (x, y, &tda, target, itc); if (itc->mchar->is_speaking ()) bubbles_draw.push_back (itc->mchar); itc++; } } else { draw_mapchar (x, y, &tda, target, itc); if (itc->mchar->is_speaking ()) bubbles_draw.push_back (itc->mchar); itc++; } } else { draw_tile (x, y, &tda, target, it); it++; } } critical_draw.clear (); characters_draw.clear (); // Now drawing objects without any top or bottom overflow for (j = j0; j < je; j++) { // Left overflow for (it = l->area[i0][j].tiles.begin (); it != l->area[i0][j].tiles.end () && *(it->base_tile) <= *it; it++) if (it->y == it->base_tile->y && it->x > it->base_tile->x) draw_tile (x, y, &tda, target, it); for (itc = l->area[i0][j].mapchars.begin (); itc != l->area[i0][j].mapchars.end (); itc++) if (itc->y == itc->base_tile->y && itc->x > itc->base_tile->x) characters_draw.push_back (*itc); // Objects which base tile is visible on the map view for (i = i0; i < ie; i++) { for (it = l->area[i][j].base_begin; it != l->area[i][j].tiles.end () && *(it->base_tile) < *it; it++); for (; it != l->area[i][j].tiles.end () && *(it->base_tile) == *it; it++) draw_tile (x, y, &tda, target, it); for (itc = l->area[i][j].mapchars.begin (); itc != l->area[i][j].mapchars.end (); itc++) if (*itc == *(itc->base_tile) && itc->x == itc->mchar->posx () && itc->y == itc->mchar->posy ()) characters_draw.push_back (*itc); } // Right overflow for (it = l->area[ie - 1][j].tiles.begin (); it != l->area[ie - 1][j].tiles.end (); it++) if (it->y == it->base_tile->y && it->x < it->base_tile->x) draw_tile (x, y, &tda, target, it); for (itc = l->area[ie - 1][j].mapchars.begin (); itc != l->area[ie - 1][j].mapchars.end (); itc++) if (itc->y == itc->base_tile->y && itc->x < itc->base_tile->x) characters_draw.push_back (*itc); // Drawing characters for (itc = characters_draw.begin (); itc != characters_draw.end (); itc++) { draw_mapchar (x, y, &tda, target, itc); if (itc->mchar->is_speaking ()) bubbles_draw.push_back (itc->mchar); } characters_draw.clear (); } // Last horizontal parse to check bottom overflows // Bottom left overflow if (!l->area[i0][je - 1].tiles.empty ()) for (it = --l->area[i0][je - 1].tiles.end (); it->y < it->base_tile->y; it--) { if (it->x > it->base_tile->x && it->y < it->base_tile->y) critical_draw.push_front (*(it->base_tile)); if (it == l->area[i0][je - 1].tiles.begin ()) break; } for (itc = l->area[i0][je - 1].mapchars.begin (); itc != l->area[i0][je - 1].mapchars.end (); itc++) if (itc->x > itc->base_tile->x && itc->y < itc->base_tile->y) characters_draw.push_back (*itc); // Bottom line for (i = i0; i < ie && i < l->area_length (); i++) { if (!l->area[i][je - 1].tiles.empty ()) for (it = --l->area[i][je - 1].tiles.end (); it->y < it->base_tile->y; it--) { if (it->x == it->base_tile->x && it->y < it->base_tile->y) critical_draw.push_front (*(it->base_tile)); if (it == l->area[i][je - 1].tiles.begin ()) break; } for (itc = l->area[i][je - 1].mapchars.begin (); itc != l->area[i][je - 1].mapchars.end (); itc++) { if (itc->x == itc->base_tile->x && itc->y < itc->base_tile->y) { characters_draw.push_back (*itc); } } } // Bottom right corner if (!l->area[ie - 1][je - 1].tiles.empty ()) for (it = --l->area[ie - 1][je - 1].tiles.end (); it->y < it->base_tile->y; it--) { if (it->x < it->base_tile->x && it->y < it->base_tile->y) critical_draw.push_front (*(it->base_tile)); if (it == l->area[ie - 1][je - 1].tiles.begin ()) break; } for (itc = l->area[ie - 1][je - 1].mapchars.begin (); itc != l->area[ie - 1][je - 1].mapchars.end (); itc++) if (itc->x < itc->base_tile->x && itc->y < itc->base_tile->y) characters_draw.push_back (*itc); // Drawing characters and bottom overflowing gfx critical_draw.sort (); characters_draw.sort (); it = critical_draw.begin (); itc = characters_draw.begin (); while (itc != characters_draw.end () || it != critical_draw.end ()) { if (itc != characters_draw.end ()) { if (it != critical_draw.end ()) { if (it->base_tile->y <= itc->base_tile->y) { draw_tile (x, y, &tda, target, it); it++; } else { draw_mapchar (x, y, &tda, target, itc); if (itc->mchar->is_speaking ()) bubbles_draw.push_back (itc->mchar); itc++; } } else { draw_mapchar (x, y, &tda, target, itc); if (itc->mchar->is_speaking ()) bubbles_draw.push_back (itc->mchar); itc++; } } else { draw_tile (x, y, &tda, target, it); it++; } } for (itb = bubbles_draw.begin (); itb != bubbles_draw.end (); itb++) draw_bubble (x, y, &tda, target, itb); critical_draw.clear (); characters_draw.clear (); bubbles_draw.clear (); if (da_opt) da.detach_drawing_area (); } // Private methods void mapview::draw_tile (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator it) const { it->mapobj->draw_from_base ((it->base_tile->x - posx_) * MAPSQUARE_SIZE - offx_ + x, (it->base_tile->y - posy_) * MAPSQUARE_SIZE - offy_ + y, da_opt, target); } void mapview::draw_mapchar (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator itc) const { u_int16 xdraw = ((itc->mchar->posx () - posx_ - itc->mchar->base_x ()) * MAPSQUARE_SIZE) + itc->mchar->offx () - offx_ + x; u_int16 ydraw = ((itc->mchar->posy () - posy_ - itc->mchar->base_y ()) * MAPSQUARE_SIZE) + itc->mchar->offy () - offy_ + y; itc->mchar->draw (xdraw, ydraw, da_opt, target); } void mapview::draw_bubble (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target, list::iterator itc) const { u_int16 xdraw = (((*itc)->posx () - posx_ - (*itc)->base_x ()) * MAPSQUARE_SIZE) + (*itc)->offx () - offx_ + x; u_int16 ydraw = (((*itc)->posy () - posy_ - (*itc)->base_y ()) * MAPSQUARE_SIZE) + (*itc)->offy () - offy_ + y; (*itc)->draw_bubble (xdraw, ydraw, da_opt, target); } adonthell-0.3.8/src/win_object.h0000644000175000017500000000712512756053060013511 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_OBJECT_H_ #define _WIN_OBJECT_H_ #include "win_container.h" template class win_object : public win_base, public T { public: win_object(); ~win_object(); bool draw(); bool update(); bool input_update(); void set_brightness(bool b); void set_trans(bool b); void pack(); void set_auto_refresh(bool b); protected: void refresh(); image * img_tmp_; image * img_brightness_; bool auto_refresh_; }; template win_object::win_object() { img_tmp_ = new image(); img_brightness_ = new image(); set_auto_refresh(false); } template win_object::~win_object() { if( img_tmp_ !=NULL ) delete img_tmp_ ; if( img_brightness_ != NULL) delete img_brightness_ ; } template bool win_object::draw() { if(win_base::draw()) { assign_drawing_area(wb_father_); win_background::draw(this); if( auto_refresh_ ) refresh(); if(brightness_ || trans_) { if( brightness_ ) img_brightness_->draw(win_base::real_x(), win_base::real_y(), this); else img_tmp_->draw(win_base::real_x(), win_base::real_y(), this); } else T::draw(win_base::real_x(), win_base::real_y(), this); win_border::draw(wb_father_); detach_drawing_area(); return true; } return false; } template bool win_object:: update() { if(win_base::update()) { T::update(); return true; } return false; } template bool win_object::input_update() { if(win_base::input_update()) { if(input::has_been_pushed(win_keys::KEY_ACTIVATE_ENTRY)) on_activate_key(); T::input_update(); return true; } return false; } template void win_object::set_brightness(bool b) { win_base::set_brightness(b); refresh(); } template void win_object::set_trans(bool b) { win_base::set_trans(b); refresh(); } template void win_object::pack() { if(T::length() != win_base::length() || T::height() != win_base::height()) { win_base::resize(T::length(), T::height()); img_tmp_->resize(T::length(), T::height()); } refresh(); } template void win_object::set_auto_refresh(bool b) { auto_refresh_ = b; } template void win_object::refresh() { //put the T drawable object in image if(T::length() && T::height()) { img_tmp_->fillrect(0,0,T::length(),T::height(),screen::trans_col()); T::draw(0,0,NULL,img_tmp_); if(brightness_) { img_brightness_->brightness(*img_tmp_,WIN_BRIGHTNESS_LEVEL); img_brightness_->set_mask(true); } if(trans_) {img_tmp_->set_alpha(130);img_brightness_->set_alpha(130);} else {img_tmp_->set_alpha(255);img_brightness_->set_alpha(255);} } } #endif adonthell-0.3.8/src/image.cc0000644000175000017500000001574012756050241012606 00000000000000/* Copyright (C) 1999/2000/2001/2002/2004 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file image.cc * @author Alexandre Courbot * * @brief Defines the image class. * * */ #include "image.h" #include "pnm.h" #include using namespace std; image::image () : surface () { } image::image (u_int16 l, u_int16 h, const u_int8 & scale) : surface (scale) { resize (l, h); } image::image (SDL_Surface *s, const SDL_Color & color) : surface (screen::scale()) { set_alpha(SDL_ALPHA_OPAQUE, true); resize((s->w+screen::scale()-1)/screen::scale(), (s->h+screen::scale()-1)/screen::scale()); SDL_Surface *dest = to_sw_surface(NULL); SDL_SetColorKey (s, 1, SDL_MapRGB (s->format, color.r, color.g, color.b)); SDL_BlitSurface (s, NULL, dest, NULL); unlock(); SDL_FreeSurface (dest); SDL_FreeSurface (s); } image::~image () { } void image::resize (u_int16 l, u_int16 h) { surface::resize (l, h); } void image::clear () { surface::clear (); } s_int8 image::get (igzstream& file) { s_int8 ret; u_int8 m; u_int8 a; m << file; a << file; ret = get_raw (file); if (!ret) { set_mask (m); set_alpha (a); } return ret; } s_int8 image::load (string fname) { igzstream file (fname); s_int8 ret = 0; if (!file.is_open ()) return 1; ret = get (file); file.close (); return ret; } s_int8 image::get_raw (igzstream& file) { void * rawdata; u_int16 l, h; clear (); l << file; h << file; rawdata = new char[l * h * 3]; file.get_block (rawdata, l * h * 3); raw2display (rawdata, l, h); delete[] (char *) rawdata; if (!Surface) return -1; return 0; } s_int8 image::load_raw (string fname) { igzstream file (fname); s_int8 ret = 0; if (!file.is_open ()) { std::cout << "cannot find file " << fname << std::endl; return 1; } ret = get_raw (file); file.close (); return ret; } s_int8 image::get_pnm (SDL_RWops * file) { void *rawdata; u_int16 l, h; clear (); rawdata = pnm::get (file, &l, &h); raw2display (rawdata, l, h); free (rawdata); if (!Surface) return -1; return 0; } s_int8 image::load_pnm (string fname) { SDL_RWops *file; s_int8 ret = 0; file = SDL_RWFromFile (fname.c_str (), "rb"); if (!file) { std::cout << "cannot find file " << fname << std::endl; return 1; } ret = get_pnm (file); SDL_RWclose (file); return ret; } s_int8 image::put (ogzstream& file) const { bool m = is_masked (); s_int8 a = alpha (); m >> file; a >> file; put_raw (file); return 0; } s_int8 image::save (string fname) const { ogzstream file (fname); s_int8 ret = 0; if (!file.is_open ()) return 1; ret = put (file); file.close (); return ret; } s_int8 image::put_raw (ogzstream& file) const { length () >> file; height () >> file; if (!length () || !height ()) return 0; void *rawdata = get_data(3, R_MASK, G_MASK, B_MASK, 0); file.put_block ((u_int8 *) rawdata, length () * height() * 3); free(rawdata); return 0; } s_int8 image::save_raw (string fname) const { ogzstream file (fname); s_int8 ret = 0; if (!file.is_open ()) return 1; ret = put_raw (file); file.close (); return ret; } s_int8 image::put_pnm (SDL_RWops * file) const { void *rawdata = get_data(3, R_MASK, G_MASK, B_MASK, 0); pnm::put (file, rawdata, length (), height ()); free(rawdata); return 0; } s_int8 image::save_pnm (string fname) const { SDL_RWops *file; s_int8 ret = 0; file = SDL_RWFromFile (fname.c_str (), "wb"); if (!file) return 1; ret = put_pnm (file); SDL_RWclose (file); return ret; } void image::zoom (const surface& src, u_int16 l, u_int16 h, u_int16 x, u_int16 y) { // Calculate the step per pixel. // While the surface positions are u_int16s, we use u_int32s for step // and position during zoom, that we'll divide by 65535 ( >> 16). That // way, we can perform our zoom without having to divide two times per // pixel we proceed (we can replace the divides with shift, much much // faster. u_int32 xstep = (u_int32) (((double) src.length () / (double) l) * 65535); u_int32 ystep = (u_int32) (((double) src.height () / (double) h) * 65535); u_int32 xcur; u_int32 ycur; u_int32 col; lock (); src.lock (); ycur = 0; u_int16 i, j; for (j = y; j < h + y; j++) { xcur = 0; for (i = x; i < l + x; i++) { col = src.get_pix ((u_int16)(xcur >> 16), (u_int16)(ycur >> 16)); put_pix (i, j, col); xcur += xstep; } ycur += ystep; } src.unlock (); unlock (); } void image::tile (const surface& src, u_int16 l, u_int16 h, u_int16 x, u_int16 y) { u_int16 posx; u_int16 posy; drawing_area da (x, y, l, h); for (posy = 0; posy < h; posy += src.height ()) for (posx = 0; posx < l; posx += src.length ()) src.draw (x + posx, y + posy, &da, this); } void image::brightness (const surface& src, u_int8 cont, bool proceed_mask) { u_int16 i, j; u_int8 ir, ig, ib, ia; u_int32 temp = 0; clear(); set_scale(src.scale()); resize (src.length (), src.height ()); u_int16 real_height = height() * scale(); u_int16 real_length = length() * scale(); lock (); src.lock (); for (j = 0; j < real_height; j++) for (i = 0; i < real_length; i++) { temp = src.get_pix (i, j); if ((proceed_mask) || temp != screen::trans_col ()) { unmap_color (temp, ir, ig, ib, ia); ir = (ir * cont) >> 8; ig = (ig * cont) >> 8; ib = (ib * cont) >> 8; temp = map_color(ir, ig, ib, ia); } put_pix (i, j, temp); } src.unlock (); unlock (); } image& image::operator = (const image& src) { (surface&) (*this) = (surface&) src; return *this; } // Private methods void image::raw2display (void * rawdata, u_int16 l, u_int16 h) { set_data(rawdata, l, h, 3, R_MASK, G_MASK, B_MASK, 0); } adonthell-0.3.8/src/map_event.h0000644000175000017500000000621512756051104013340 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file map_event.h * * @author Kai Sterker * @brief Declares the different map events. */ #ifndef MAP_EVENT_H__ #define MAP_EVENT_H__ #include "event.h" #include "character.h" /** * Baseclass for map enter/leave/action events. * The event will be launched if all the member's data matches. */ class map_event : public event { public: /** * Default constructor. */ map_event (); /** * Saves the basic %event %data (such as the type or script data) * to a file. * * @param out file where to save the %event. */ void put_state (ogzstream&) const; /** * Loads the basic %event %date from a file. * * @param in file to load the %event from. * @return \e true if the %event could be loaded, \e false otherwise */ bool get_state (igzstream&); /** * Submap index (-1 for any). */ s_int32 submap; /** * X position (-1 for any). */ s_int32 x; /** * Y position (-1 for any). */ s_int32 y; /** * Direction where the character is looking (-1 for any). */ s_int8 dir; /** * Useless (for now). */ s_int32 map; /** * Pointer to the mapcharacter that can launch this event (NULL for any). */ mapcharacter *c; /** * Compare two map events for equality. * * @param evnt The map event to compare this to. * @return True if the two events equal, false otherwise. */ bool equals (const event* evnt); /** * Executes the script associated with this map %event. If the * event does not repeat it is removed from the %event handler. * * @param evnt The %event that triggered this map %event. * * @return The number of times the %event needs to be repeated. */ s_int32 execute (const event* evnt); }; /** * To notify when a character entered a mapsquare. */ class enter_event : public map_event { public: /** * Default constructor. */ enter_event (); }; /** * To notify when a mapcharacter left a mapsquare. */ class leave_event : public map_event { public: /** * Default constructor. */ leave_event (); }; /** * To notify when a mapcharacter "act" on a square. */ class action_event : public map_event { public: /** * Default constructor. */ action_event (); }; #endif // MAP_EVENT_H__ adonthell-0.3.8/src/data_screen.h0000644000175000017500000000522412756050014013630 00000000000000/* Copyright (C) 2001 by Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file data_screen.h * @author Kai Sterker * * @brief Declares the data_screen class. * * */ #ifndef DATA_SCREEN_H__ #define DATA_SCREEN_H__ #include "win_select.h" #include "win_theme.h" #include "win_write.h" /** * Whether the data screen should load or save games. * */ enum { LOAD_SCREEN = 0, SAVE_SCREEN = 1 }; /** * The gui for loading/saving games. * */ class data_screen : public win_container { public: /** * Constructor. * * @param m LOAD_SCREEN or SAVE_SCREEN, depending on whether * you want to save or load a game. * */ data_screen (int m); /** * Destructor. * */ ~data_screen (); /** * React to input. * */ bool update (); /** * Returns the player's action * * @return * @li true if a game has been loaded/saved * @li false if the action has been cancelled */ bool get_result () { return !aborted; } private: /** * GUI initialisation. * */ void init (); /** * Callback for selecting a game. * */ void on_select (); /** * Callback for entering a description. * */ void on_save (); /** * Write the thumbnail to disk. * */ void save_preview (string); win_font *font; // the font win_theme *theme; // the theme win_write *entry; // for entering a description of the game win_select *image_list; // list of thumbnails vector entry_list; // list of game descriptions int mode; // Whether we're saving or loading bool aborted; // Indicates whether action has been cancelled char gametime[20]; // time when saving the game }; #endif // DATA_SCREEN_H__ adonthell-0.3.8/src/win_ttf.cc0000664000175000017500000001444013164230614013172 00000000000000/* (C) Copyright 2004/2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include #include #include "win_ttf.h" // number of references to font file u_int32 win_ttf::refcount = 0; // path of the font file std::string win_ttf::path_; // font file used TTF_Font *win_ttf::ttf = NULL; // ctor win_ttf::win_ttf (const char *color, const string & file) : win_font () { switch (color[0]) { case 'r': // red Color.r = 255; Color.g = 173; Color.b = 123; break; case 'b': // blue Color.r = 139; Color.g = 185; Color.b = 238; break; case 'g': // green Color.r = 205; Color.g = 254; Color.b = 148; break; case 'y': // yellow Color.r = 255; Color.g = 238; Color.b = 123; break; case 'v': // violet Color.r = 222; Color.g = 133; Color.b = 230; break; default: // white and all the rest Color.r = 255; Color.g = 255; Color.b = 255; break; } Color.a = SDL_ALPHA_OPAQUE; refcount++; if (load (file)) { int real_height_ = TTF_FontHeight(ttf) + screen::scale() - 1; height_ = real_height_ / screen::scale(); cursor = &operator[]('_'); length_ = cursor->length (); } // fallback to old win_font implementation else win_font::load ((char *) color); } win_ttf::~win_ttf () { refcount--; if (refcount == 0 && ttf != NULL) TTF_CloseFont (ttf); } static int glyph_height (TTF_Font *ttf, const u_int16 & chr) { int miny, maxy; if (TTF_GlyphIsProvided(ttf, chr)) { TTF_GlyphMetrics(ttf, chr, NULL, NULL, &miny, &maxy, NULL); return maxy - miny; } return TTF_FontHeight(ttf)/2; } bool win_ttf::load (const string & file) { string path; int avg_size = 0; // size of font u_int32 size = screen::scale () * 12; // load font only once if (ttf != NULL) return true; // absolute or relative font file from config? if (file.size() > 1 && (file[0] == '/' || file[1] == ':')) { path = file; } else { // path where is the file path = WIN_DIRECTORY; // add win font directory path path += WIN_FONT_DIRECTORY; // font name from config file path += file == "" ? "Aclonica.ttf" : file; } // try to load font specified in cfg file ttf = TTF_OpenFont (path.c_str (), size); if (ttf == NULL) { printf ("*** error loading font '%s':\n %s\n", path.c_str (), TTF_GetError ()); return false; } TTF_SetFontHinting(ttf, TTF_HINTING_LIGHT); // determine average pixel height of font, based on a number of glyphs avg_size += glyph_height(ttf, 'c'); avg_size += glyph_height(ttf, 'C'); avg_size += glyph_height(ttf, '0'); avg_size += glyph_height(ttf, ':'); // make sure our font doesn't exceed a certain height // since every font is different, this really only is an // approximation and results are not perfect for each and // every font out there while (avg_size > (22.5 * screen::scale())) { avg_size = 0; TTF_CloseFont (ttf); ttf = TTF_OpenFont (path.c_str (), --size); TTF_SetFontHinting(ttf, TTF_HINTING_LIGHT); avg_size += glyph_height(ttf, 'c'); avg_size += glyph_height(ttf, 'C'); avg_size += glyph_height(ttf, '0'); avg_size += glyph_height(ttf, ':'); } path_ = file; return true; } bool win_ttf::in_table(u_int16 tmp) { if (win_font::in_table (tmp) == true) return true; // try to create font if (tmp > 0x80 || isprint (tmp)) { operator[](tmp); return true; } return false; } image & win_ttf::operator[](u_int16 glyph) { u_int16 unichar[2] = { 0, 0 }; unichar[0] = glyph; static SDL_Color bg = { 0x00, 0x00, 0x00, 0 }; static SDL_Color white = { 0xff, 0xff, 0xff, 0 }; if (ttf && cursor && cursor->scale() != screen::scale()) { // if screen scale changed since creating the glyph, // it needs to be recreated with the new size TTF_CloseFont (ttf); ttf = NULL; erase(); if (load (path_)) { int real_height_ = TTF_FontHeight(ttf) + screen::scale() - 1; height_ = real_height_ / screen::scale(); cursor = &operator[]('_'); length_ = cursor->length (); } } else if (win_font::in_table (glyph)) { return *(glyphs[glyph]); } if (ttf == NULL) { return *(glyphs[' ']); } SDL_Surface *s = TTF_RenderUNICODE_Shaded (ttf, unichar, Color, bg); if (s == NULL) { return *(glyphs[' ']); } u_int16 width = s->w; image tmp (s, bg); overflow[glyph] = width - tmp.length() * screen::scale(); image *glph = new image (tmp.length(), height_, screen::scale()); glph->fillrect (0, 0, tmp.length(), height_, screen::trans_col(), NULL); s = TTF_RenderUNICODE_Solid (ttf, unichar, bg); if (s != NULL) { image shadow (s, white); shadow.draw (1, 1+height_-shadow.height(), 0, 0, shadow.length(), shadow.height(), NULL, glph); } else { fprintf (stderr, "%s\n", TTF_GetError ()); } tmp.draw (0, height_-tmp.height(), 0, 0, tmp.length(), tmp.height(), NULL, glph); if (cursor != NULL) { glyphs[glyph] = glph; } return *glph; } s_int8 win_ttf::kerning(const u_int16 & char1, const u_int16 & char2) { #ifdef HAVE_TTF_GETFONTKERNINGSIZEGLYPHS if (ttf) { return TTF_GetFontKerningSizeGlyphs(ttf, char1, char2) + overflow[char1]; } #endif return overflow[char1]; } adonthell-0.3.8/src/win_select.cc0000644000175000017500000004417612756053136013673 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_select.h" #include "audio.h" win_select::win_select() { cur_select_ = list_wb_.begin(); set_mode(MODE_BRIGHTNESS); border_select_ = NULL; set_circle(false); finish_scroll_ = true; //set_visible_scrollbar(false); } void win_select::add(win_base * w) { win_scroll::add(w); cur_select_ = list_wb_.begin (); //if select has a border for the selection, just set border to the win_base added if(border_select_ != NULL) w->set_border(*border_select_); //set the object to unselect rules(false, w); set_default(); //update_cur_select_position(); } void win_select::remove(win_base * w) { rules(false, w); win_scroll::remove(w); set_default(); } void win_select::remove_all() { win_scroll::remove_all(); cur_select_ = list_wb_.begin(); } void win_select::next() { //test if next possible if(cur_select_ == list_wb_.end() || list_wb_.size() == 0) return; audio::play_wave (-1, 1); (*cur_select_)->on_unselect(); //unselect cur element rules(false,*cur_select_); (*cur_select_)->set_activate (false); //create a temporary index lwb :: iterator i = cur_select_; //go next i++; //while not a the end, not be selected and different at old object go to the next while( i != list_wb_.end() && !(*i)->is_can_be_selected() && i != cur_select_) i++; //if at end of list and select circle is activate if(i == list_wb_.end()) { //cur is the begin of list if( circle_ ) { i = list_wb_.begin(); while(i != list_wb_.end() && !(*i)->is_can_be_selected() && i != cur_select_) i++; if(i != list_wb_.end()) cur_select_ = i; } }else cur_select_ = i; rules(true,*cur_select_); (*cur_select_)->on_select(); on_next(); finish_scroll_ =false; //update_cur_select_position(); } void win_select::previous() { if(cur_select_==list_wb_.end() || list_wb_.size() == 0) return; audio::play_wave (-1, 1); (*cur_select_)->on_unselect(); //set to unselect object rules(false,*cur_select_); (*cur_select_)->set_activate (false); lwb::iterator i=cur_select_; if(circle_) { if(i==list_wb_.begin()) i=list_wb_.end(); i--; } else if(i!=list_wb_.begin()) i--; while(i != list_wb_.begin() && !(*i)->is_can_be_selected() && i != cur_select_) i--; if( i== list_wb_.begin() && !(*i)->is_can_be_selected()) { if(circle_) { i = list_wb_.end(); i--; while(i!=list_wb_.begin() && !(*i)->is_can_be_selected() && i!=cur_select_) i--; if((*i)->is_can_be_selected()) cur_select_=i; } } else cur_select_=i; (*cur_select_)->on_select(); //set to select object rules(true,*cur_select_); //update_position(); on_previous(); finish_scroll_ =false; //update_cur_select_position(); } void win_select::activate() { if(cur_select_ == list_wb_.end()) return; audio::play_wave (-1, 0); //set_activate(false); (*cur_select_)->set_activate(true); on_activate_key(); } bool win_select::input_update() { if(win_scroll::input_update()) { if(focus_object_) return true; if(input::has_been_pushed(win_keys::KEY_NEXT)) next(); if(input::has_been_pushed(win_keys::KEY_PREVIOUS)) previous(); if(input::has_been_pushed(win_keys::KEY_ACTIVATE) || input::has_been_pushed(win_keys::KEY_ACTIVATE_ENTRY)) activate(); return true; } return false; } void win_select::rules(const bool b, win_base * wb) { if(!wb->is_can_be_selected()) return; switch(mode_) { case MODE_BORDER: wb->set_visible_border(b); break; case MODE_BRIGHTNESS: wb->set_brightness(!b); break; } } void win_select::set_default() { if(list_wb_.size() == 0) return; if(cur_select_ != list_wb_.end()) { rules(false,*cur_select_); } cur_select_ = list_wb_.begin(); while(cur_select_ != list_wb_.end() && !(*cur_select_)->is_can_be_selected()) cur_select_++; if(cur_select_ != list_wb_.end()) rules(true,*cur_select_); finish_scroll_ =false; } void win_select::set_default_object(const win_base * wb) { if(list_wb_.size() == 0) return; if(cur_select_ != list_wb_.end()) rules(false,*cur_select_); cur_select_ = list_wb_.begin(); while(cur_select_ != list_wb_.end() && *cur_select_ != wb) cur_select_++; if(cur_select_ != list_wb_.end()) rules(true,*cur_select_); finish_scroll_ =false; //update_cur_select_position(); } void win_select::set_default_position(const u_int16 pos) { if(list_wb_.size() == 0 || pos > list_wb_.size()) return; if(cur_select_ != list_wb_.end()) rules(false,*cur_select_); cur_select_ = list_wb_.begin(); u_int16 i = 0; while(cur_select_ != list_wb_.end() && i++ < pos) cur_select_++; if(cur_select_ != list_wb_.end()) rules(true,*cur_select_); finish_scroll_ =false; //update_cur_select_position(); } win_base * win_select::get_selected_object() { if(cur_select_ != list_wb_.end() || list_wb_.size() == 0) return *cur_select_; else return NULL; } u_int16 win_select::get_selected_position() { u_int16 pos_=0; lwb::iterator i = list_wb_.begin(); if(i==list_wb_.end()) return 0; while( (*i++) != (*cur_select_)) pos_++; return pos_+1; } void win_select::update_cur_select_position() { if(!max_amplitude_) return; while( 1 ) { // if((*cur_select_)->height() > height() + (space_with_border_ << 1) ) break; // Workaround if the object is bigger than the select (Alex). if((*cur_select_)->height() + (space_with_border_ << 1) > height()) break; else if((*cur_select_)->y() + (*cur_select_)->pad_y() < space_with_border_ ) up(); else if((*cur_select_)->y() + (*cur_select_)->pad_y() + (*cur_select_)->height() > height() - space_with_border_) down(); else break; } } bool win_select::update() { if(win_scroll::update()) { if(!finish_scroll_) { if(!max_amplitude_) {finish_scroll_=true;return true;} if((*cur_select_)->height() + (space_with_border_ << 1) > height()) {finish_scroll_ = true; return true;} else if((*cur_select_)->y() + (*cur_select_)->pad_y() < space_with_border_ ) up(); else if((*cur_select_)->y() + (*cur_select_)->pad_y() + (*cur_select_)->height() > height() - space_with_border_) down(); else finish_scroll_ = true; } return true; } return false; } /* #include #include "types.h" #include "input.h" #include "image.h" #include "win_types.h" #include "win_base.h" #include "win_border.h" #include "win_scrollbar.h" #include "win_theme.h" #include "win_container.h" #include "win_scrolled.h" #include "win_select.h" //STATIC INIT win_select * win_select::curselect_=NULL; bool win_select::activate_keyboard_=true; s_int32 win_select::next_key=WIN_SELECT_DEFAULT_KEY_NEXT; s_int32 win_select::previous_key=WIN_SELECT_DEFAULT_KEY_PREVIOUS; s_int32 win_select::activate_key=WIN_SELECT_DEFAULT_KEY_ACTIVATE; s_int32 win_select::back_key=WIN_SELECT_DEFAULT_KEY_BACK; win_select::win_select(s_int16 tx,s_int16 ty,u_int16 tl,u_int16 th,win_theme * wth):win_scrolled(tx,ty,tl,th,wth) { //father select is the father of this object fatherselect_=NULL; //if there are no select object attached to the static curselet, this object become the curselect if(!curselect_) curselect_=this; index_list=list_obj.begin(); //the default mode select for this object is the border mode_selected_=WIN_SELECT_MODE_BORDER; //by default, the scroll bar is not visible visible_scrollbar_=false; //if when you select you change the first to the last select_circle_=false; //type of the select type_selected_=WIN_SELECT_TYPE_NORMAL; } win_select::~win_select() { //WARNING CHECK BACK if(curselect_==this) { back(); curselect_=NULL; } //WARNING DESTROY() } void win_select::add(win_base * wb) { //call the add of win_scrolled win_scrolled::add(wb); //prevent the new object is in select wb->set_in_select(true); //set the parameters for this object set_select_object(wb,false); //when you add an object, automatically the index become the first element of the list set_default(); //a select can have just one mode to select each object in the list wb->set_select_mode_(mode_selected_); } void win_select::add(win_select * ws) { //add a select object win_select::add((win_base*)ws); //add the object but prevent the new object that this objetc is the father ws->fatherselect_=this; } void win_select::remove(win_base * wb) { //remove an objetc prevent that the object is not in_select win_scrolled::remove(wb); wb->set_in_select(false); wb->set_draw_brightness(false); index_list=list_obj.begin(); } void win_select::remove_all() { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) { (*i)->set_in_select(false); (*i)->wb_father_=NULL;//part of win_container } list_obj.clear(); index_list=list_obj.begin(); //win scrolled part max_amplitude_=0; cur_amplitude_=0; theme_->scrollbar->update_scroll_bar(this); } void win_select::destroy() { win_scrolled::destroy(); index_list=list_obj.begin(); } void win_select::on_next() { if(callback_[WIN_SIG_NEXT_KEY]) (callback_[WIN_SIG_NEXT_KEY])(); } void win_select::on_previous() { if(callback_[WIN_SIG_PREVIOUS_KEY]) (callback_[WIN_SIG_PREVIOUS_KEY])(); } bool win_select::update() { if(win_scrolled::update()) { if(focus_ && activate_keyboard_ && activated_) { if(input::has_been_pushed (SDL_Keycode (next_key))) next_(); if(input::has_been_pushed (SDL_Keycode (previous_key))) previous_(); if(input::has_been_pushed (SDL_Keycode (back_key))) back(); if(input::has_been_pushed (SDL_Keycode (activate_key))) activate___(); } return true; } return false; } //if b is true, cur object take parameters to an selected object void win_select::set_select_object(win_base * wb,bool b) { switch(mode_selected_) { case WIN_SELECT_MODE_BRIGHTNESS: wb->set_draw_brightness(!b); break; case WIN_SELECT_MODE_BORDER: wb->set_border_visible(b); } switch(type_selected_) { case WIN_SELECT_TYPE_NORMAL: wb->set_visible(true); break; case WIN_SELECT_TYPE_SCROLL: wb->set_visible(b); break; } } //WARNING: lots of confuse in next_ and previous maybe rewrite them void win_select::next_() { //test if next is possible if(index_list==list_obj.end() || !activated_) return; //unselect cur element (*index_list)->on_unselect(); set_select_object(*index_list,false); //create a temporary index list::iterator cur_i=index_list; //to next elements cur_i++; //while not a the end, not be selected and different at old object go to the next while(cur_i!=list_obj.end() && !(*cur_i)->is_can_be_selected() && cur_i!=index_list) cur_i++; //if at end of list and select circle is activate if(cur_i==list_obj.end()) { //cur is the begin of list if(select_circle_) { cur_i=list_obj.begin(); while(cur_i!=list_obj.end() && !(*cur_i)->is_can_be_selected() && cur_i!=index_list) cur_i++; if(cur_i!=list_obj.end()) index_list=cur_i; } }else index_list=cur_i; set_select_object(*index_list,true); (*index_list)->on_select(); update_position(); on_next(); } void win_select::previous_() { if(index_list==list_obj.end() || !activated_) return; (*index_list)->on_unselect(); //set to unselect object set_select_object(*index_list,false); list::iterator cur_i=index_list; if(select_circle_) { if(cur_i==list_obj.begin()) cur_i=list_obj.end(); cur_i--; } else if(cur_i!=list_obj.begin()) cur_i--; while(cur_i!=list_obj.begin() && !(*cur_i)->is_can_be_selected() && cur_i!=index_list) cur_i--; if(cur_i==list_obj.begin() && !(*cur_i)->is_can_be_selected()) { if(select_circle_) { cur_i=list_obj.end(); cur_i--; while(cur_i!=list_obj.begin() && !(*cur_i)->is_can_be_selected() && cur_i!=index_list) cur_i--; if((*cur_i)->is_can_be_selected()) index_list=cur_i; } } else index_list=cur_i; (*index_list)->on_select(); //set to select object set_select_object(*index_list,true); update_position(); on_previous(); } void win_select::set_can_be_selected_all(bool b) { for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_can_be_selected(b); } void win_select::set_default() { if(list_obj.size()==0) return; if(index_list!=list_obj.end()) set_select_object(*index_list,false); index_list=list_obj.begin(); while(index_list!=list_obj.end() && !(*index_list)->is_can_be_selected()) index_list++; if(index_list!=list_obj.end()) set_select_object(*index_list,true); } void win_select::update_position() { //this function is used to see the cur object which is selected static bool tmp_is_visible_; //if(index_list==list_obj.end()){cout << "tets\n"; return;} switch(type_selected_) { case WIN_SELECT_TYPE_NORMAL: tmp_is_visible_=false; //if not amplitude --> all object in the list is visible if(!max_amplitude_) {tmp_is_visible_=true;return;} while(!tmp_is_visible_) { // if(((*index_list)->y()+(*index_list)->pady()>space_between_border_) && // ((*index_list)->y()+(*index_list)->height()>height_-space_between_border_)) {tmp_is_visible_=true;cout << "16\n";} if((*index_list)->height()>height_+(space_between_border_<<1)) tmp_is_visible_=true; else if((*index_list)->y()+(*index_list)->pady()y()+(*index_list)->pady()+(*index_list)->height()>height_-space_between_border_) down(); else tmp_is_visible_=true; } break; case WIN_SELECT_TYPE_SCROLL: //set position of the cur select object (*index_list)->move(space_between_border_,space_between_border_); break; default: break; } } void win_select::set_type(u_int8 t) { type_selected_=t; //set all object to the new type set for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) set_select_object(*i,false); //select the first object set_default(); } //return the cur object which is selected win_base * win_select::get() { if(index_list==list_obj.end()) return NULL; else return (*index_list); } //if error return 0 u_int16 win_select::get_pos() { u_int16 pos_=0; list::iterator i=list_obj.begin(); if(i==list_obj.end()) return 0; while((*i++)!=(*index_list)) pos_++; return pos_+1; } void win_select::set_default(u_int16 nb) { if(index_list==list_obj.end()) return; u_int16 j=1; (*index_list)->set_select(false); if(mode_selected_==WIN_SELECT_MODE_BRIGHTNESS) (*index_list)->set_draw_brightness(true); else if(mode_selected_==WIN_SELECT_MODE_BORDER) (*index_list)->set_border_visible(false); index_list=list_obj.begin(); while(index_list!=list_obj.end() && j++set_select(true); if(mode_selected_==WIN_SELECT_MODE_BRIGHTNESS) (*index_list)->set_draw_brightness(false); else if(mode_selected_==WIN_SELECT_MODE_BORDER) (*index_list)->set_border_visible(true); } } void win_select::set_default(win_base * wb) { if(index_list==list_obj.end()) return; (*index_list)->set_select(false); if(mode_selected_==WIN_SELECT_MODE_BRIGHTNESS) (*index_list)->set_draw_brightness(true); else if(mode_selected_==WIN_SELECT_MODE_BORDER) (*index_list)->set_border_visible(false); index_list=list_obj.begin(); while(index_list != list_obj.end() && (*index_list)!=wb) index_list++; if(index_list!=list_obj.end()) { (*index_list)->set_select(true); if(mode_selected_==WIN_SELECT_MODE_BRIGHTNESS) (*index_list)->set_draw_brightness(false); else if(mode_selected_==WIN_SELECT_MODE_BORDER) (*index_list)->set_border_visible(true); } } void win_select::set_select_mode(u_int8 mode) { mode_selected_=mode; if(mode_selected_==WIN_SELECT_MODE_BRIGHTNESS) for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_draw_brightness(true); if(index_list!=list_obj.end()) (*index_list)->set_draw_brightness(false); for(list::iterator i=list_obj.begin();i!=list_obj.end();i++) (*i)->set_select_mode_(mode); } void win_select::activate() { if(curselect_) curselect_->activate___(); } void win_select::next() { if(curselect_) curselect_->next_(); } void win_select::previous() { if(curselect_) curselect_->previous_(); } bool win_select::activate___() { if(index_list!=list_obj.end()) { (*index_list)->set_activated(true); on_activate_key(); return true; } return false; } void win_select::on_activate() { win_scrolled::on_activate(); if(!curselect_) {curselect_=this;return;} if(curselect_==this) return; //if curselect curselect_->on_unactivate(); curselect_=this; } bool win_select::back() { //if true we can go to the father if(curselect_) { if(curselect_->fatherselect_) { if(curselect_->index_list!=curselect_->list_obj.end()) { curselect_->on_unactivate(); curselect_=curselect_->fatherselect_; curselect_->on_activate(); return true; } } } return false; } void win_select::set_cur_select(win_select * ws) { if(curselect_ && curselect_!=ws) curselect_->set_activated(false); curselect_=ws; } void win_select::init() { if(curselect_) curselect_->set_activated(false); curselect_=NULL; } */ adonthell-0.3.8/src/image.h0000644000175000017500000002732512756050253012455 00000000000000/* Copyright (C) 1999/2000/2001/2004 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file image.h * @author Alexandre Courbot * * @brief Declares the image class. * * */ #ifndef IMAGE_H_ #define IMAGE_H_ #include "fileops.h" #include "screen.h" /** * Image manipulation class. * Designed to work with single images, without having to care about the bit * depth. This class is widely used through the %game - in fact it handles * everything that is displayed on the %screen. * This class highly relies on surface, so you'll probably want to have a look * at it before using image. */ class image : public surface { public: /** * Default constructor. * The image created via this constructor is totally empty. */ image (); #ifndef SWIG /** Creates an image with a specified size. * @param l length of the image. * @param h height of the image. * @param scale the initial scale of the image (default 1) * * @attention Not accessible from Python. */ image (u_int16 l, u_int16 h, const u_int8 & scale = 1); /** * Create image from SDL_Surface. * @param s surface */ image (SDL_Surface *s, const SDL_Color & color); #endif /** Destructor. */ virtual ~image (); /** * Resize this image. * All the content will be lost. * If you want to zoom the image you'll want to see the zoom () function * instead. * * @param l new length. * @param h new height. * @sa zoom () */ void resize (u_int16 l, u_int16 h); /** * Resets the image to it's initial state, that is totally * empty. * */ void clear (); /** * @name Loading / Saving Methods. * These methods allows you to load and save * an image in different formats. * */ //@{ /** Loads an image from an opened file, saved in %game internal format, * with alpha and mask values. * @param file the opened file from which to read. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa load () */ s_int8 get (igzstream& file); /** Loads an image from a file name, in game internal format, with alpha * and mask values. * @param fname the name of the file to load. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa get () */ s_int8 load (string fname); /** Loads an image from an opened file, saved in %game internal format, * without alpha and mask values. * @param file the opened file from which to read. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa load_raw () */ s_int8 get_raw (igzstream& file); /** Loads an image from a file name, in game internal format, without alpha * and mask values. * @param fname the name of the file to load. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa get_raw () */ s_int8 load_raw (string fname); /** Loads an image from an opened file, in PNM format, without * alpha and mask values. * @param file the opened file from which to read. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa load_pnm () */ s_int8 get_pnm (SDL_RWops * file); /** Loads an image from a file name, in PNM format, without * alpha and mask values. * @param fname the name of the file to load. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa get_pnm () */ s_int8 load_pnm (string fname); /** Saves an image into an opened file, in %game format, with * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save () */ s_int8 put (ogzstream& file) const; /** Saves an image into an file, in %game format, with * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put () */ s_int8 save (string fname) const; /** Saves an image into an opened file, in %game format, without * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save_raw () */ s_int8 put_raw (ogzstream& file) const; /** Saves an image into an file, in %game format, without * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put_raw () */ s_int8 save_raw (string fname) const; /** Saves an image into an opened file, in PNM format, without * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save_pnm () */ s_int8 put_pnm (SDL_RWops * file) const; /** Saves an image into an file, in PNM format, without * alpha and mask values. * @warning as the image which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving images with full * truecolor quality, use image_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put_pnm () */ s_int8 save_pnm (string fname) const; //@} /** * @name Special FX Methods. * Allows you to put fantasy in your image manipulations! Can * eventually even be usefull... * */ //@{ /** Zooms a surface. * Zoom the content of the src surface into this image, to it's own size. * @param src the source image to zoom. */ void zoom (const surface& src) { zoom (src, length (), height (), 0, 0); } #ifndef SWIG /** * Zooms a surface. * Zoom the content of the src surface into this image, to the size * (l, h), at position (x, y) on this image. * * @param src The source surface to zoom. * @param l length of the zoomed image. * @param h height of the zoomed image. * @param x X offset on the destination image. * @param y Y offset on the destination image. * * @attention Not available from Python. Use zoom_to () from Python instead. * @sa zoom_to () */ void zoom (const surface& src, u_int16 l, u_int16 h, u_int16 x = 0, u_int16 y = 0); #endif /** * Synonym of zoom () to guarantee its access from Python. * * @sa zoom () * */ void zoom_to (const surface& src, u_int16 l, u_int16 h, u_int16 x = 0, u_int16 y = 0) { zoom (src, l, h, x, y); } /** Tiles a surface. * Tiles the src surface so this image is totally filled. * @param source the source surface to tile. */ void tile (const surface& src) { tile (src, length (), height ()); } #ifndef SWIG /** * Tiles a surface. * Tiles the src surface so the area of this image starting at position * (x, y) and (l, h) sized is totally filled. * @param source the source surface to tile. * @param l length of the area to tile. * @param h height of the area to tile. * @param x X offset on the destination image. * @param y Y offset on the destination image. * * @attention Not available from Python. Use tile_to () from Python instead. * @sa tile_to () */ void tile (const surface& src, u_int16 l, u_int16 h, u_int16 x = 0, u_int16 y = 0); #endif /** * Synonym of tile () to guarantee its access from Python. * * @sa tile () * */ void tile_to (const surface& src, u_int16 l, u_int16 h, u_int16 x = 0, u_int16 y = 0) { tile (src, l, h, x, y); } /** * Applies a "brightness" to a surface. * Lighten (or darken) the src surface and put the result into this image. * This image will be resized to the src surface's size. * @param src the source surface to lighten/darken. * @param cont the "brightness" value, if < 256 the image will be * darkened. * @todo modify it so when < 128 -> darken, > 128 -> brighten. * @param proceed_mask if set to true, then the translucent pixels will * be lightened/darkened too. */ void brightness (const surface& src, u_int8 cont, bool proceed_mask = false); //@} #ifndef SWIG /** * Image copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ image& operator = (const image& src); #endif /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const image& src) { *this = src; } private: /** * Forbid value passing. */ image(const image& src); /** * Converts a raw image source recorded in RGB to the current screen depth * and put it to this image. * * @param rawdata raw data to convert. * @param l length of the raw image. * @param h height of the raw image. */ void raw2display (void * rawdata, u_int16 l, u_int16 h); }; #endif adonthell-0.3.8/src/mapcharacter.h0000644000175000017500000005046512756051135014026 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapcharacter.h * * @author Alexandre Courbot * @brief Declares the mapcharacter class. */ #ifndef MAPCHARACTER_H_ #define MAPCHARACTER_H_ /** * Where mapcharacter files resides. * */ #define MAPCHAR_DIR "gfx/mapcharacters/" #include "animation.h" #include "character_base.h" #include "path.h" #include "text_bubble.h" #include "event_list.h" class landmap; class path; /** * @name mapcharacter moves. * */ //@{ /** * Standing North. * */ #define STAND_NORTH 0 /** * Standing South. * */ #define STAND_SOUTH 1 /** * Standing West. * */ #define STAND_WEST 2 /** * Standing East. * */ #define STAND_EAST 3 /** * Walking North. * */ #define WALK_NORTH 4 /** * Walking South. * */ #define WALK_SOUTH 5 /** * Walking West. * */ #define WALK_WEST 6 /** * Walking East. * */ #define WALK_EAST 7 /** * Total number of moves. * */ #define NBR_MOVES 8 /** * No move. * */ #define NO_MOVE 65535 //@} class mapview; /** * Representation of characters on a landmap. * * Like mapobjects, mapcharacters are a set of animations (one for every movment) * and a grid of mapsquare_walkables. This grid represents the map area the mapcharacter * physically occupies, which means that a mapcharacter can occupies several tiles. * * During the execution of Python scripts, some mapcharacter-local variables are * available: * @li myself is a pointer to the character holding this mapcharacter (can of course * serve as a mapcharacter pointer, as character inheritates from mapcharacter). * @li mymap, if defined, points to the landmap the mapcharacter is on. * * These Python variables are available both for schedules and actions. * * In supplement, actions have an extra variable available: * @li requester, which points to the mapcharacter that requested the action. * */ class mapcharacter : public mapsquare_walkable_area, public character_base, public event_list { public: /** * Default constructor. * */ mapcharacter (); /** * Destructor. * */ ~mapcharacter (); /** * Puts the mapcharacter back to it's post-constructor state. * */ void clear (); /** * Returns the current file name of the mapcharacter. * * * @return filename of the mapcharacter. */ string filename () const { return filename_; } /** * @name State updating * */ //@{ /** * Updates the mapcharacter's state and launchs his schedule. * */ bool update (); //@} /** * @name Drawing methods * */ //@{ void draw (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const; void draw_bubble (s_int16 x, s_int16 y, const drawing_area * da_opt = NULL, surface * target = NULL) const; //@} /** * @name Loading/Saving methods * * @note You can't save mapcharacters with this class. */ //@{ /** * Loads a mapcharacter from an opened file. * @param file the opened file from which to load. * @return 0 in case of success, error code otherwise. * */ s_int8 get (igzstream& file); /** * Loads a mapcharacter from it's filename. * * @param fname the name of the file to load. * * @return 0 in case of success, error code otherwise. */ s_int8 load (string fname); /** Saves an mapcharacter into an opened file, in %game format, with * alpha and mask values. * @warning as the mapcharacter which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving mapcharacters with full * truecolor quality, use mapcharacter_edit instead. * @param file opened file where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa save () */ s_int8 put (ogzstream& file) const; /** Saves an mapcharacter into an file, in %game format, with * alpha and mask values. * @warning as the mapcharacter which is saved comes from a %screen's depth * surface, it will be slightly altered during the save. * If you want a class capable of saving mapcharacters with full * truecolor quality, use mapcharacter_edit instead. * @param fname file name where to save into. * @return * @li 0 in case of success. * @li -1 in case of error. * @sa put () */ s_int8 save (string fname) const; //@} /** * @name State loading/saving methods * */ //@{ /** * Restore the mapcharacter's state from an opened file. * * @param file the opened file from which to load the state. * * @return 0 in case of success, error code otherwise. */ s_int8 get_state (igzstream& file); /** * Saves the mapcharacter's state into an opened file. * * @param file the opened file where to the state. * * @return 0 in case of success, error code otherwise. */ s_int8 put_state (ogzstream& file) const; //@} /** * @name Landmap assignment * */ //@{ /** * Puts the mapcharacter on a landmap. * This methods can only be applied if the mapcharacter isn't on any landmap * when it is called, otherwise nothing will occur. * * @warning Be aware that once this methods is called, the mapcharacter has NO * position on the landmap. You MUST call jump_to () after this method to actually * have placed the character on the map. * * @param m pointer to the landmap the mapcharacter should be on. */ void set_map (landmap * m); /** * Removes the mapcharacter from the landmap he was on (if any). * */ void remove_from_map (); /** * Returns a pointer to the landmap the mapcharacter is on. * * * @return pointer to the landmap the mapcharacter is on (NULL if none). */ landmap * mymap () const { return refmap; } //@} /** * @name High-level control * * These methods provide a simple way to control the mapcharacter on the map he's on. * They cover "normal" moves like walking or looking into a direction, plus tests to * know whether a move is possible or not. * */ //@{ /** * Look to North. * */ void stand_north (); /** * Look to South. * */ void stand_south (); /** * Look to East. * */ void stand_east (); /** * Look to West. * */ void stand_west (); /** * Stand to the current direction. * * @note This method only serves to abord an expected waking movment. * */ void stand (); /** * Walk to North (if possible). * * This method asks the mapcharacter to walk one square to North. If the * movment isn't possible (non-walkable mapsquare or map limit), the * character will stand_north () instead. * * @note Each time update () is called, the mapcharacter will continue advancing, * until he reaches the next mapsquare. * */ bool go_north (); /** * Walk to South (if possible). * * This method asks the mapcharacter to walk one square to South. If the * movment isn't possible (non-walkable mapsquare or map limit), the * character will stand_south () instead. * * @note Each time update () is called, the mapcharacter will continue advancing, * until he reaches the next mapsquare. * */ bool go_south (); /** * Walk to East (if possible). * * This method asks the mapcharacter to walk one square to East. If the * movment isn't possible (non-walkable mapsquare or map limit), the * character will stand_east () instead. * * @note Each time update () is called, the mapcharacter will continue advancing, * until he reaches the next mapsquare. * */ bool go_east (); /** * Walk to West (if possible). * * This method asks the mapcharacter to walk one square to West. If the * movment isn't possible (non-walkable mapsquare or map limit), the * character will stand_west () instead. * * @note Each time update () is called, the mapcharacter will continue advancing, * until he reaches the next mapsquare. * */ bool go_west (); /** * Returns whether it is possible or not to go to North from * the current mapcharacter's position. * * * @return \c true if it is possible to go to North, \c false otherwise. */ bool can_go_north () const; /** * Returns whether it is possible or not to go to South from * the current mapcharacter's position. * * * @return \c true if it is possible to go to South, \c false otherwise. */ bool can_go_south () const; /** * Returns whether it is possible or not to go to East from * the current mapcharacter's position. * * * @return \c true if it is possible to go to East, \c false otherwise. */ bool can_go_east ()const; /** * Returns whether it is possible or not to go to West from * the current mapcharacter's position. * * * @return \c true if it is possible to go to West, \c false otherwise. */ bool can_go_west () const; /** * Look at the opposite position of p. * * This method is usefull for dialogues, when we want two * characters to face each other. * * * @param p opposite position of the position to look at. Can be * \c STAND_NORTH, \c STAND_SOUTH, \c STAND_EAST or \c STAND_WEST. */ void look_invert (u_int16 p); /** * Return a pointer to the mapcharacter that is right next to this * mapcharacter, i.e the mapcharacter that is on the square this * mapcharacter is looking at. * * If no mapcharacter is next to this one, NULL will be returned. * * * @return pointer to the mapcharacter next to this mapcharacter. */ mapcharacter *whosnext () const; void speak (const string & text); bool is_speaking () { return (saying != NULL); } text_bubble * get_bubble () { return saying; } //@} /** * @name Low-level controls * * If you need to do non-conventionnal or special things (like * teleport a character from a position to another), or need * to override the walkable mechanism, use these methods. * * You are also provided with various informative methods. * */ //@{ /** * Sets the offset of the mapcharacter on it's current mapsquare. * * @param x X offset. * @param y Y offset. */ void set_offset (s_int8 x, s_int8 y) { offx_ = x; offy_ = y; } /** * Removes the mapcharacter from the place he was on the map. * */ void remove_from_pos (); /** * Remove the mapcharacter from it's current place and put him to a new one. * * @param smap index of the submap to jump to. * @param x X offset to to. * @param y Y offset to to. * @param pos Position to adopt once placed. */ void jump_to (u_int16 smap, u_int16 x, u_int16 y, u_int16 pos = NO_MOVE); /** * Returns the index of the submap where the mapcharacter is. * * * @return the index of the submap where the mapcharacter is. */ u_int16 submap () const { return submap_; } /** * Returns the X position of the mapcharacter. * * * @return the X position of the mapcharacter on his map. */ u_int16 posx () const { return posx_; } /** * Returns the Y position of the mapcharacter. * * * @return the Y position of the mapcharacter on his map. */ u_int16 posy () const { return posy_; } /** * Returns the X offset of the mapcharacter. * * * @return the X offset of the mapcharacter on his map. */ s_int8 offx () const { return offx_; } /** * Returns the Y offset of the mapcharacter. * * * @return the Y offset of the mapcharacter on his map. */ s_int8 offy () const { return offy_; } /** * Returns the current move of the mapcharacter. * * * @return current mapcharacter's move (STAND_NORTH, WALK_SOUTH, etc...). */ u_int16 currentmove () const { return current_move; } bool set_goal (u_int16 x, u_int16 y, u_int16 dir = NO_MOVE); void set_callback (PyObject *callback, PyObject *args = NULL); bool follow_path (); bool goal_reached (); void stop_moving (); void time_callback (string delay, PyObject *cb, PyObject *args = NULL); void time_callback_string (string delay, string cb, PyObject *args = NULL); //@} /** * Schedule control. * */ //@{ /** * Assign a schedule to the mapcharacter. * * The schedule's filename will be \e "scripts/schedules/mapcharacters/.py". * * @param file name of the schedule to use. * @param args Python tuple containing extra arguments passed to the class constructor. * * @warning the args tuple argument MUST ONLY contain strings or integers, as it will * be saved with the mapcharacter state by python::put_tuple (). * */ void set_schedule (string file, PyObject * args = NULL); /** * Returns the name of the mapcharacter's current schedule. * * * @return name of the mapcharacter's current schedule. */ string schedule_file () const { return schedule_file_; } /** * Returns whether the schedule is activated or not. * * * @return \c true if the schedule is activated, \c false otherwise. */ bool is_schedule_activated () const { return schedule_activated; } /** * Sets whether the schedule is active or not. * * @param a \c true if the schedule should be activated, \c false otherwise. */ void set_schedule_active (bool a) { if (a && !schedule.has_attribute ("run")) return; schedule_activated = a; } /** * Tell the character to do something. Will execute the given method * of the current schedule with the given arguments. * * @param method The method of the schedule to call. * @param args The arguments to pass to the method. * * @return \c true if the method has been called, \c false otherwise. */ bool do_stuff (string method, PyObject *args = NULL); //@} /** * Action control. * */ //@{ /** * Assign a action to the mapcharacter. * * The action's filename will be \e "scripts/actions/.py". * * @param file name of the action to use. * @param args Python tuple containing extra arguments passed to the class constructor. * * @warning the args tuple argument MUST ONLY contain strings or integers, as it will * be saved with the mapcharacter state by python::put_tuple (). * */ void set_action (string file, PyObject * args = NULL); /** * Returns the name of the mapcharacter's current action. * * * @return name of the mapcharacter's current action. */ string action_file () const { return action_file_; } /** * Returns whether the action is activated or not. * * * @return \c true if the action is activated, \c false otherwise. */ bool is_action_activated () const { return action_activated; } /** * Sets whether the action is active or not. * * @param a \c true if the action should be activated, \c false otherwise. */ void set_action_active (bool a) { action_activated = a; } /** * Run the mapcharacter's action, passing requester as the "requester" parameter * for the action's Python script. * * @param requester pointer to the mapcharacter that requested the action, which * is passed to the Python run () method. */ void launch_action (mapcharacter * requester); //@} /** * Returns a pointer to an animation corresponding * to a movment. * * @param nbr index of the animation to get. * * @return pointer to the \e nbr animation. */ animation * get_animation (u_int16 nbr) { return anim[nbr]; } #ifndef SWIG /** * Mapcharacter copy (similar to copy ()). * * @attention Not available from Python. Use copy () from Python instead. * @sa copy () */ mapcharacter & operator = (const mapcharacter & m); #endif // SWIG /** * Synonym of operator = to guarantee its access from Python. * * @sa operator = */ void copy (const mapcharacter& src) { *this = src; } private: /** * Forbid value passing. * */ mapcharacter (const mapcharacter & src); /** * Makes the mapcharacter physically occupy an area. * * The given parameters are considered to be where * the mapcharacter's base square will be. * * @param smap submap where to occupy. * @param px X position where to occupy. * @param py Y position where to occupy. */ void occupy (u_int16 smap, u_int16 px, u_int16 py); /** * Makes the mapcharacter physically leave an area previously occupied * with occupy (). * * The given parameters are considered to be where * the mapcharacter's base square were be. * * @param smap submap where to leave. * @param px X position where to leave. * @param py Y position where to leave. */ void leave (u_int16 smap, u_int16 px, u_int16 py); void leave_position (); /** * Sets the position of the mapcharacter on the map. * * This sets the mapcharacter's position to the parameters, * and occupy () the corresponding region. * * @warning Don't forget to leave () the region when moving! * * @param smap index of the submap where the mapcharacter should be. * @param x X position on the submap. * @param y Y position on the submap. */ void set_pos (u_int16 smap, u_int16 x, u_int16 y); /** * Updates the movment of the mapcharacter. * */ void update_move (); /** * Path used for the mapcharacter to have realistic movments. * */ path mypath; /** * Used to count the position on the path * */ u_int16 pathindex; u_int16 current_move; u_int16 previous_move; u_int16 submap_; u_int16 posx_, posy_; s_int8 offx_, offy_; vector anim; landmap *refmap; py_object schedule; py_object action; string filename_; text_bubble * saying; bool schedule_activated; bool action_activated; bool goal_reached_; PyObject * schedule_args; PyObject * action_args; string schedule_file_; string action_file_; py_callback *callback; #ifndef SWIG friend class landmap; #endif }; #endif adonthell-0.3.8/src/event_handler.cc0000644000175000017500000000372012756050014014333 00000000000000/* Copyright (C) 2000/2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event_handler.cc * @author Kai Sterker * * @brief Implements the event_handler class. * */ #include "event_handler.h" #include "map_event.h" #include "map_event_handler.h" #include "time_event.h" #include "time_event_handler.h" // Array with registered event handlers event_handler_base* event_handler::Handler[MAX_EVENTS]; // functions that return newly instanciated events // of a certain type NEW_EVENT (time_event) NEW_EVENT (enter_event) NEW_EVENT (leave_event) NEW_EVENT (action_event) // Initialize the game event system void event_handler::init () { // register event handlers Handler[ENTER_EVENT] = new map_event_handler; Handler[LEAVE_EVENT] = new map_event_handler; Handler[ACTION_EVENT] = new map_event_handler; Handler[TIME_EVENT] = new time_event_handler; // register events REGISTER_EVENT (TIME_EVENT, time_event) REGISTER_EVENT (ENTER_EVENT, enter_event) REGISTER_EVENT (LEAVE_EVENT, leave_event) REGISTER_EVENT (ACTION_EVENT, action_event) } // Clear the registered handlers void event_handler::cleanup () { for (int i = 0; i < MAX_EVENTS; i++) if (Handler[i] != NULL) delete Handler[i]; } adonthell-0.3.8/src/game.cc0000644000175000017500000001132513231072617012430 00000000000000/* Copyright (C) 1999/2000/2001/2002 Kai Sterker Copyright (C) 2002 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file game.cc * @author Kai Sterker * @author Alexandre Courbot * * @brief Defines the game class. * * */ #include "game.h" #include #include #include #include #include #include string game::User_data_dir; string game::Global_data_dir; string game::Game_data_dir; void game::init (string game_dir) { Global_data_dir = game_dir; // set OS specific directory containing the saved games User_data_dir = get_system_dir(USER_DATA); } void game::set_game_data_dir(string game_dir) { Game_data_dir = game_dir; } string game::get_system_dir(const sys_dir_type & type) { std::string result; #if defined(__APPLE__) // OSX result = string (getenv ("HOME")) + "/Library/Application Support/Adonthell/"; #elif defined (WIN32) // Windows char *appDataDir = getenv ("APPDATA"); if (appDataDir != NULL && strlen (appDataDir) > 0) result = string (getenv("APPDATA")) + "/Adonthell/"; else result = "./"; #elif defined(__HAIKU__) // Haiku char *homeDir = getenv ("HOME"); if (homeDir != NULL) result = string (homeDir) + "/config/settings/adonthell/"; else result = string ("/boot/home/config/settings/adonthell/"); #else // Unix const char* xdgEnv = type == USER_DATA ? "XDG_DATA_HOME" : "XDG_CONFIG_HOME"; char *xdgDir = getenv (xdgEnv); if (xdgDir != NULL && strlen (xdgDir) > 0) result = string (xdgDir) + "/adonthell"; else { if (type == USER_DATA) result = string (getenv ("HOME")) + "/.local/share/adonthell/"; else result = string (getenv ("HOME")) + "/.config/adonthell/"; } #endif // make sure save data directory exists, otherwise create it if (!game::directory_exist (result)) { #ifndef WIN32 if (mkdir (result.c_str (), 0700) == -1) #else if (mkdir (result.c_str ()) == -1) #endif { int ecd = errno; std::cerr << "Creating directory '" << result << "' failed: " << strerror (ecd) << std::endl; } } return result; } bool game::directory_exist (const string & dirname) { DIR * dir = opendir (dirname.c_str ()); if (dir) { closedir (dir); return true; } return false; } bool game::file_exist (const string & fname) { FILE * file = fopen (fname.c_str (), "r"); if (file) { fclose (file); return true; } return false; } string game::find_file (const string & fname) { string ret; // If the name is already absolute, no need to search... if (fname[0] == '/') return fname; // First check in the current game directory if ((ret = game_data_dir () + "/") != "/" && file_exist (ret + fname)) ret += fname; // Then check the global data directory else if (file_exist ((ret = global_data_dir () + "/") + fname)) ret += fname; // Finally, try the user data directory else if (file_exist ((ret = user_data_dir () + "/") + fname)) ret += fname; // Nothing found! So bad... else ret = ""; return ret; } string game::find_directory (const string & dirname) { string ret; // If the name is already absolute, no need to search... if (dirname[0] == '/') return dirname; // First check in the current game directory if ((ret = game_data_dir () + "/") != "/" && directory_exist (ret + dirname)) ret += dirname; // Then check the global data directory else if (directory_exist ((ret = global_data_dir () + "/") + dirname)) ret += dirname; // Finally, try the user data directory else if (directory_exist ((ret = user_data_dir () + "/") + dirname)) ret += dirname; // Nothing found! So bad... else ret = ""; return ret; } adonthell-0.3.8/src/text_bubble.h0000644000175000017500000000506712756052503013671 00000000000000/* Copyright (C) 2001 Kai Sterker Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file text_bubble.h * @author Kai Sterker * @author Alexandre Courbot * * @brief Declares the text_bubble class. * * */ #ifndef TEXT_BUBBLE_H_ #define TEXT_BUBBLE_H_ #include "win_label.h" #include "win_theme.h" /** * Displays neat little text speech bubbles. * * This class makes text bubbles designed to stay visible * a short amount of time (just enough to be read). * */ class text_bubble : public win_label { public: /** * Constructor. * * @param text Text to display in that bubble. * @param textcolor Font to use with this bubble (directly taken from the * win_manager's font collection). * @param themename Theme to use with this bubble (directly taken from the * win_manager's theme collection). * @param len Basic duration (in %game cycles) of this bubble. Another amount * of time will be added, depending on it's length. * */ text_bubble (const string & text, const string & textcolor, const string & themename, u_int16 len = 110); /** * Destructor. * */ ~text_bubble (); /** * Update function. * * @return \e false if the bubble should be destroyed now, \e true otherwise. */ bool update (); /** * Returns the number of game cycles remaining before the death of this * bubble. * * @return Number of game cycles remaining before the death of this bubble. */ u_int16 remaining () { return remain; } private: /** * Game cycles remaining before the death of this bubble. * */ u_int16 remain; }; #endif adonthell-0.3.8/src/mapsquare_walkable.cc0000644000175000017500000000704512756051301015361 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapsquare_walkable.cc * @author Alexandre Courbot * * @brief Defines the mapsquare_walkable and mapsquare_walkable_area classes. * * */ #include "mapsquare_walkable.h" mapsquare_walkable::mapsquare_walkable () { set_walkable (ALL_WALKABLE); } s_int8 mapsquare_walkable::get (igzstream& file) { walkable << file; return 0; } s_int8 mapsquare_walkable::put (ogzstream& file) const { walkable >> file; return 0; } mapsquare_walkable_area::mapsquare_walkable_area () { basex = 0; basey = 0; } mapsquare_walkable_area::~mapsquare_walkable_area () { } void mapsquare_walkable_area::clear () { area.clear (); basex = 0; basey = 0; } s_int8 mapsquare_walkable_area::get (igzstream& file) { vector >::iterator it; vector ::iterator jt; u_int16 t_length, t_height; u_int16 basex_, basey_; // Get the area size. t_length << file; t_height << file; resize_area (t_length, t_height); // Load the area. for (it = area.begin (); it != area.end (); it++) for (jt = it->begin (); jt < it->end (); jt++) jt->get (file); // Load the base square information. basex_ << file; basey_ << file; set_base (basex_, basey_); return 0; } s_int8 mapsquare_walkable_area::put (ogzstream& file) const { vector >::iterator it; vector ::iterator jt; // Put the area size. area_length () >> file; area_height () >> file; // Save the area. for (it = area.begin (); it != area.end (); it++) for (jt = it->begin (); jt < it->end (); jt++) jt->put (file); // Save the base square information. base_x () >> file; base_y () >> file; return 0; } void mapsquare_walkable_area::resize_area (u_int16 nl, u_int16 nh) { vector >::iterator i; area.resize (nl); for (i = area.begin (); i != area.end (); i++) i->resize (nh); set_length (nl * MAPSQUARE_SIZE); set_height (nh * MAPSQUARE_SIZE); } void mapsquare_walkable_area::set_base (u_int16 nx, u_int16 ny) { basex = nx; basey = ny; } mapsquare_walkable_area & mapsquare_walkable_area::operator = (const mapsquare_walkable_area & src) { u_int16 i, j; // Clear everything. clear (); (drawable&) (*this) = (drawable&) src; // Copy the area. resize_area (src.area_length (), src.area_height ()); for (i = 0; i < src.area_length (); i++) for (j = 0; j < src.area_height (); j++) area[i][j] = src.area[i][j]; // Copy the base square information. set_base (src.base_x (), src.base_y ()); return *this; } adonthell-0.3.8/src/path.h0000644000175000017500000000762512756051545012335 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file path.h * @author Alexandre Courbot * * @brief Declares the path class. * * */ #ifndef PATH_H__ #define PATH_H__ #include "mapsquare.h" #ifndef SWIG using namespace std; #endif class landmap; /** * A* pathfinding algorithm implementation class. * * This class calculates the shortest way from a begin point * to a goal point on a landmap using the A* algorithm. It * stores a list of directions that when followed lead from * the start to the goal. * * This class is particularly well designed for mapcharacters, * who will often need to walk from one point to another. * */ class path { private: struct compare_squarecost { bool operator() (const mapsquare * s1, const mapsquare * s2) { return (s1->f > s2->f); } }; public: #ifndef SWIG /** * (x, y) coordinates of a point on a submap. * */ struct area_coord { /** * X position. * */ u_int16 x; /** * Y position. * */ u_int16 y; }; /** * Landmap where the pathfinding will occur. * */ landmap * refmap; /** * Submap where the pathfinding will occur. * */ u_int16 submap; /** * Direction to face once the goal is reached. * */ u_int16 dir; /** * Start point. * */ area_coord start; /** * Goal point. * */ area_coord goal; #endif // SWIG /** * Totally clears the path. * */ void clear () { moves_to_goal.clear (); } /** * Tries to find the shortest path possible between the * \e start point and the \e goal point. * * @return \e true if a path was found, \e false otherwise. */ bool calculate (); /** * Returns the number of moves between \e start and \e goal. * * * @return Number of moves between \e start and \e goal. */ u_int16 nbr_moves () const { return moves_to_goal.size (); } /** * Returns the move to perform when at position \e nbr. * * @param nbr Index of the move to get. * * @return Direction (move) at index \e nbr. */ u_int16 get_move (u_int16 nbr) const { return moves_to_goal[nbr_moves () - (nbr + 1)]; } /** * Restore the path's state from an opened file. * * @param file the opened file from which to load the state. * * @return 0 in case of success, error code otherwise. * * @bug the landmap this path belongs to must be restored manually! */ s_int8 get_state (igzstream & file); /** * Saves the path's state into an opened file. * * @param file the opened file where to the state. * * @return 0 in case of success, error code otherwise. * * @bug the landmap this path belongs to can't be saved (as it's a pointer)! */ s_int8 put_state (ogzstream & file) const; private: vector moves_to_goal; u_int16 goal_estimate (u_int16 x, u_int16 y); }; #endif adonthell-0.3.8/src/str_hash.h0000664000175000017500000000373513264661645013217 00000000000000/* (C) Copyright 2001 Alexandre Courbot (C) Copyright 2004/2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file str_hash.h * @author Alexandre Courbot * @author Kai Sterker * * @brief Declares the hash type, to be able to declare * hash_maps with strings as keys. */ #ifndef STR_HASH_H #define STR_HASH_H #include "config.h" #ifdef HAVE_UNORDERED_MAP #include #include #define hash_map unordered_map #define hash_set unordered_set #elif HAVE_TR1_UNORDERED_MAP #include #include #define hash_map tr1::unordered_map #define hash_set tr1::unordered_set #else // gcc < 4.4 #if __GNUG__ > 2 #include #include #else #include #include #endif #include #if __GNUG__ > 2 namespace __gnu_cxx #else namespace std #endif { /** * Hash function for strings. */ template<> struct hash { size_t operator() (const std::string & __s) const { return __stl_hash_string (__s.c_str()); } }; } #if __GNUG__ > 2 namespace std { using namespace __gnu_cxx; } #endif #endif #endif // STR_HASH_H adonthell-0.3.8/src/time_event.cc0000644000175000017500000000554412756052545013675 00000000000000/* Copyright (C) 2002/2003/2004 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file time_event.cc * * @author Kai Sterker * @brief Implements the time_event class. */ #include "time_event.h" #include "gamedate.h" // create a new time event time_event::time_event (const string & time, bool absolute) : event () { Repeat = 1; Type = TIME_EVENT; Absolute = absolute; Time = gamedate::parse_time (time); if (!absolute) Time += gamedate::time (); } // specify the interval between two occurances of the event void time_event::set_repeat (const string & interval, s_int32 count) { Interval = gamedate::parse_time (interval); Repeat = count; } // execute the time event s_int32 time_event::execute (const event * evnt) { // nothing needs be passed to the script; it can get the // current time from the gametime class if it is needed. switch (Action) { case ACTION_SCRIPT: { Script->run (); break; } case ACTION_PYFUNC: { PyFunc->callback_func0 (); break; } case ACTION_CPPFUNC: { Callback (); break; } default: break; } // when the script needs be repeated, do so. if (Repeat != 0) Time += Interval; return do_repeat (); } // disable the event temporarily void time_event::pause () { // save time 'til relative event is raised if (!Absolute) Time -= gamedate::time (); event::pause (); } // enable a previously paused event void time_event::resume () { // restore alarm time for relative event if (!Absolute) Time += gamedate::time (); event::resume (); } // Save time event to file void time_event::put_state (ogzstream& out) const { // save basic event data first event::put_state (out); // save time event data Time >> out; Interval >> out; Absolute >> out; } // load time event from file bool time_event::get_state (igzstream& in) { // get basic event data event::get_state (in); // get time event data Time << in; Interval << in; Absolute << in; return true; } adonthell-0.3.8/src/nls.cc0000644000175000017500000000424412756051504012320 00000000000000/* Copyright (C) 2002/2003/2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file nls.cc * * @author Kai Sterker * @brief National Language Support */ #ifdef HAVE_CONFIG_H #include #endif #include #include "gettext.h" #include "nls.h" std::string nls::current_lang; // Initialize NLS void nls::init (config &myconfig) { #if ENABLE_NLS // if no language specified in the config file, determine // the locale from the environment variables if (myconfig.language == "") setlocale (LC_MESSAGES, ""); // otherwise overwrite any environment variables else set_language (myconfig.language); // open the message catalogue std::string location = myconfig.gamedir + "/locale"; const char *domain = myconfig.game_name.c_str (); bindtextdomain (domain, location.c_str ()); textdomain (domain); bind_textdomain_codeset(domain, "UTF-8"); #endif } // Set the language to use void nls::set_language (const string &language) { #if ENABLE_NLS current_lang = language.empty() ? "LANGUAGE" : "LANGUAGE=" + language; putenv ((char *) current_lang.c_str ()); { // tell gettext that the language has changed extern int _nl_msg_cat_cntr; ++_nl_msg_cat_cntr; } setlocale (LC_ALL,""); setlocale (LC_MESSAGES, language.c_str ()); #endif } // Translate some text const string nls::translate (const string &text) { #if ENABLE_NLS return gettext (text.c_str ()); #else return text; #endif } adonthell-0.3.8/src/character.cc0000644000175000017500000000207012756050014013446 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file character.cc * @author Kai Sterker * * @brief Defines the character class. * * */ #include "character.h" dictionary data::characters; character * data::the_player = NULL; character::character() : mapcharacter () { } character::~character() { } adonthell-0.3.8/src/Makefile.in0000644000175000017500000010215213414164743013261 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = adonthell-0.3$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libadonthell_a_AR = $(AR) $(ARFLAGS) libadonthell_a_LIBADD = am__objects_1 = am_libadonthell_a_OBJECTS = achievements.$(OBJEXT) adonthell.$(OBJEXT) \ animation.$(OBJEXT) audio.$(OBJEXT) character_base.$(OBJEXT) \ character.$(OBJEXT) data_screen.$(OBJEXT) dialog.$(OBJEXT) \ dialog_screen.$(OBJEXT) drawable.$(OBJEXT) \ drawing_area.$(OBJEXT) event.$(OBJEXT) event_handler.$(OBJEXT) \ event_list.$(OBJEXT) fileops.$(OBJEXT) game.$(OBJEXT) \ gamedata.$(OBJEXT) gamedate.$(OBJEXT) gametime.$(OBJEXT) \ image.$(OBJEXT) input.$(OBJEXT) label.$(OBJEXT) \ label_input.$(OBJEXT) landmap.$(OBJEXT) lex.prefs.$(OBJEXT) \ map_event.$(OBJEXT) map_event_handler.$(OBJEXT) \ mapsquare_walkable.$(OBJEXT) mapcharacter.$(OBJEXT) \ mapsquare.$(OBJEXT) mapobject.$(OBJEXT) mapview.$(OBJEXT) \ nls.$(OBJEXT) path.$(OBJEXT) pnm.$(OBJEXT) prefs.$(OBJEXT) \ python_class.$(OBJEXT) py_adonthell_wrap.$(OBJEXT) \ py_callback.$(OBJEXT) py_object.$(OBJEXT) quest.$(OBJEXT) \ screen.$(OBJEXT) surface.$(OBJEXT) storage.$(OBJEXT) \ text_bubble.$(OBJEXT) time_event.$(OBJEXT) \ time_event_handler.$(OBJEXT) win_background.$(OBJEXT) \ win_base.$(OBJEXT) win_border.$(OBJEXT) \ win_container.$(OBJEXT) win_event.$(OBJEXT) win_font.$(OBJEXT) \ win_keys.$(OBJEXT) win_manager.$(OBJEXT) \ win_scrollbar.$(OBJEXT) win_scroll.$(OBJEXT) \ win_select.$(OBJEXT) win_theme.$(OBJEXT) win_ttf.$(OBJEXT) \ yarg.$(OBJEXT) $(am__objects_1) libadonthell_a_OBJECTS = $(am_libadonthell_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_adonthell_0_3_OBJECTS = main.$(OBJEXT) adonthell_0_3_OBJECTS = $(am_adonthell_0_3_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) adonthell_0_3_DEPENDENCIES = libadonthell.a $(am__DEPENDENCIES_2) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libadonthell_a_SOURCES) $(adonthell_0_3_SOURCES) DIST_SOURCES = $(libadonthell_a_SOURCES) $(adonthell_0_3_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = . modules tools am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FT2_CFLAGS = @FT2_CFLAGS@ FT2_LIBS = @FT2_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ IGE_MAC_CFLAGS = @IGE_MAC_CFLAGS@ IGE_MAC_LIBS = @IGE_MAC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OGG_CFLAGS = @OGG_CFLAGS@ OGG_DEFS = @OGG_DEFS@ OGG_LIBS = @OGG_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PY_CFLAGS = @PY_CFLAGS@ PY_LIBS = @PY_LIBS@ PY_PREFIX = @PY_PREFIX@ P_DOT = @P_DOT@ P_DOXYGEN = @P_DOXYGEN@ RANLIB = @RANLIB@ SDL2_CONFIG = @SDL2_CONFIG@ SDL2_FRAMEWORK = @SDL2_FRAMEWORK@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_DEFS = @SDL_DEFS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gamedatadir = @gamedatadir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_DLGEDIT_TRUE@TOOLS_DIR = tools SUBDIRS = . modules $(TOOLS_DIR) EXTRA_DIST = .indent.pro prefs.l py_adonthell.i AM_CPPFLAGS = $(SDL_DEFS) $(OGG_DEFS) $(SDL_CFLAGS) $(OGG_CFLAGS) $(PY_CFLAGS) $(FT2_CFLAGS) noinst_LIBRARIES = libadonthell.a CLEANFILES = $(moddata_SCRIPTS) headers = \ achievements.h \ adonthell.h \ animation.h \ audio.h \ callback.h \ character_base.h \ character.h \ data_screen.h \ dialog.h \ dialog_screen.h \ drawable.h \ drawing_area.h \ event.h \ event_handler.h \ event_handler_base.h \ event_list.h \ fileops.h \ game.h \ gamedata.h \ gamedate.h \ gametime.h \ gettext.h \ image.h \ input.h \ label.h \ label_input.h \ landmap.h \ map_event.h \ map_event_handler.h \ mapsquare.h \ mapsquare_walkable.h \ nls.h \ mapcharacter.h \ mapobject.h \ mapview.h \ path.h \ pnm.h \ prefs.h \ python_class.h \ py_callback.h \ py_object.h \ quest.h \ screen.h \ surface.h \ storage.h \ str_hash.h \ types.h \ text_bubble.h \ time_event.h \ time_event_handler.h \ win_background.h \ win_base.h \ win_border.h \ win_container.h \ win_event.h \ win_font.h \ win_image.h \ win_keys.h \ win_label.h \ win_manager.h \ win_mapview.h \ win_object.h \ win_scrollbar.h \ win_scroll.h \ win_select.h \ win_theme.h \ win_ttf.h \ win_types.h \ win_wrappers.h \ win_write.h \ window.h \ yarg.h libadonthell_a_SOURCES = \ achievements.cc \ adonthell.cc \ animation.cc \ audio.cc \ character_base.cc \ character.cc \ data_screen.cc \ dialog.cc \ dialog_screen.cc \ drawable.cc \ drawing_area.cc \ event.cc \ event_handler.cc \ event_list.cc \ fileops.cc \ game.cc \ gamedata.cc \ gamedate.cc \ gametime.cc \ image.cc \ input.cc \ label.cc \ label_input.cc \ landmap.cc \ lex.prefs.cc \ map_event.cc \ map_event_handler.cc \ mapsquare_walkable.cc \ mapcharacter.cc \ mapsquare.cc \ mapobject.cc \ mapview.cc \ nls.cc \ path.cc \ pnm.cc \ prefs.cc \ python_class.cc \ py_adonthell_wrap.cc \ py_callback.cc \ py_object.cc \ quest.cc \ screen.cc \ surface.cc \ storage.cc \ text_bubble.cc \ time_event.cc \ time_event_handler.cc \ win_background.cc \ win_base.cc \ win_border.cc \ win_container.cc \ win_event.cc \ win_font.cc \ win_keys.cc \ win_manager.cc \ win_scrollbar.cc \ win_scroll.cc \ win_select.cc \ win_theme.cc \ win_ttf.cc \ yarg.cc \ $(headers) libadonthell_LDADD = $(SDL_LIBS) $(OGG_LIBS) $(PY_LIBS) $(INTLLIBS) $(FT2_LIBS) adonthell_0_3_LDADD = libadonthell.a $(libadonthell_LDADD) adonthell_0_3_SOURCES = main.cc all: all-recursive .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libadonthell.a: $(libadonthell_a_OBJECTS) $(libadonthell_a_DEPENDENCIES) $(EXTRA_libadonthell_a_DEPENDENCIES) $(AM_V_at)-rm -f libadonthell.a $(AM_V_AR)$(libadonthell_a_AR) libadonthell.a $(libadonthell_a_OBJECTS) $(libadonthell_a_LIBADD) $(AM_V_at)$(RANLIB) libadonthell.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) adonthell-0.3$(EXEEXT): $(adonthell_0_3_OBJECTS) $(adonthell_0_3_DEPENDENCIES) $(EXTRA_adonthell_0_3_DEPENDENCIES) @rm -f adonthell-0.3$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(adonthell_0_3_OBJECTS) $(adonthell_0_3_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/achievements.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/animation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/character.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/character_base.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog_screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawing_area.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_handler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamedata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamedate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gametime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/label.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/label_input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/landmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.prefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_event.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_event_handler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapcharacter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapobject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapsquare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapsquare_walkable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/py_adonthell_wrap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/py_callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/py_object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/python_class.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_bubble.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_event.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_event_handler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_background.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_base.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_border.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_container.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_event.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_keys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_scroll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_scrollbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_theme.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_ttf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yarg.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-generic \ clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Note: adonthell.py is also built by this target. py_adonthell_wrap.cc : py_adonthell.i $(headers) @if test "${SWIG}" != "no" ; then \ echo ${SWIG} -python -modern -shadow ${SDL_CFLAGS} -I$(srcdir) -I$(top_srcdir) -c++ -makedefault -o $(srcdir)/$*.cc $(srcdir)/py_adonthell.i; \ ${SWIG} -python -modern -shadow ${SDL_CFLAGS} -I$(srcdir) -I$(top_srcdir) -c++ -makedefault -o $(srcdir)/$*.cc $(srcdir)/py_adonthell.i; \ mv $(srcdir)/adonthell.py $(srcdir)/modules/adonthell.py; \ else \ echo "You need swig >= ${SWIG_MINVER} in order to re-build this file."; \ exit 1; \ fi; lex.prefs.cc : prefs.l flex -olex.prefs.cc $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: adonthell-0.3.8/src/prefs.h0000644000175000017500000001105712756051610012503 00000000000000/* Copyright (C) 2000/2002/2004 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file prefs.h * * @author Kai Sterker * @brief Adonthell's configuration */ #ifndef __PREFS_H__ #define __PREFS_H__ #include #include #include "types.h" #ifndef SWIG using namespace std; /** * The config file opened by the lexical scanner */ extern FILE* prefsin; /** * Start the lexical scanner to parse the config file, * usually fount at ~/.adonthell/adonthellrc */ extern int parse_adonthellrc (int&, string&); /** * Returncodes of the scanner for the different entries * of the configuration file. */ enum { PREFS_UNKNOWN = 0, PREFS_SCREEN_MODE = 1, PREFS_LANGUAGE = 2, PREFS_FONT = 3, PREFS_QUICK_LOAD = 4, PREFS_AUDIO_CHANNELS = 5, PREFS_AUDIO_RESOLUTION = 6, PREFS_AUDIO_SAMPLE_RATE = 7, PREFS_AUDIO_VOLUME = 8, PREFS_VERSION = 9, PREFS_NUM = 10, PREFS_STR = 11, PREFS_DISPLAY = 12, }; #endif /** * This class contains the engine's configuration read either from the * %config file or from the command line. */ class config { public: /** * Constructor. Initializes all configuration options with default * values. * - Language: English * - Screen mode: windowed * - Quick load: enabled * - Audio: High quality (44.1kHz, 16 bit, stereo) * - Volume: 100% * - Config file: $HOME/.adonthell/adonthellrc */ config (); /** * See whether any options have been specified on the command line. * Possible command line options are * - \-h Print help message * - \-d Print the data directory * - \-v Print the version number * - \-l List games found in the gamedir * - \-g dir Play %game contained in dir * - \-c Byte-compile all Python scripts in the current directory * * @param argc argument count * @param argv argument vector */ void parse_arguments (int argc, char * argv[]); /** * Writes a default configuration file with the values set in the * constructor * @sa config::config () */ void write_adonthellrc (); /** * Reads the configuration file. If it cannot find the file, it * tries to write a default one. * @return true on success, false otherwise. */ bool read_adonthellrc (); /** * Returns the path to the user's private Adonthell directory. * Usually this is $HOME/.adonthell/ and will contain his personal * configuration as well as all saved games. */ char *get_adonthellrc (); /** * @name Configuration options */ //@{ /** * Language to use if NLS was compiled in. */ string language; string font; /** * Name of the %game that is running at present. */ string game_name; /** * Path of the directory that contains the %game running at present. */ string gamedir; /** * Whether the engine shall run in window (0) or fullscreen (1) mode. */ u_int8 screen_mode; /** * Index of the display to use for fullscreen mode */ u_int8 display; /** * Whether the quick-load feature is enabled (1) or not (0) */ u_int8 quick_load; /** * The number of channels: mono (0) or stereo (1). */ u_int8 audio_channels; /** * The resolution: 8 bit (0) or 16 bit (1) */ u_int8 audio_resolution; /** * The sample rate: 11025 Hz (0), 22050 Hz (1) or 44100 Hz (2) */ u_int8 audio_sample_rate; /** * The volume: a value betwen 0 and 100. 0 means that audio * is completely off. */ u_int8 audio_volume; //@} private: #ifndef SWIG config & operator = (const config*); string adonthellrc; // Path to the adonthellrc file: $HOME/.adonthell/ #endif }; #endif // __PREFS_H__ adonthell-0.3.8/src/event_handler.h0000644000175000017500000000473312756050014014202 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event_handler.h * @author Kai Sterker * * @brief Declares the event_handler class * */ #ifndef EVENT_HANDLER_H__ #define EVENT_HANDLER_H__ #include "event_handler_base.h" #include "event_list.h" /** * It ensures global access to the individual %event handlers. */ class event_handler { public: /** * Instanciate the actual event handlers. Event handlers * can be specific to a certain event, or take care of * different events. */ static void init (); /** * Delete the %event handlers. */ static void cleanup (); /** * Unregister an %event. * * @param ev pointer to the %event to unregister. */ static void remove_event (event* ev) { ev->set_registered (false); Handler[ev->type ()]->remove_event (ev); } /** * Check if an %event corresponding to ev exists, and execute it. * * @param ev %event to raise. */ static void raise_event (const event* ev) { Handler[ev->type ()]->raise_event (ev); } protected: /** * Registers an %event. * * @param ev pointer to the %event to register. */ static void register_event (event* ev) { ev->set_registered (true); Handler[ev->type ()]->register_event (ev); } /** * Only %event_list is allowed to register events with the * %event_handler. */ friend void event_list::add_event (event* ev); /** * As is event::resume. */ friend void event::resume (); private: /** * A list of the actual %event handlers */ static event_handler_base* Handler[MAX_EVENTS]; }; #endif // EVENT_HANDLER_H__ adonthell-0.3.8/src/win_manager.cc0000644000175000017500000001417312756053025014015 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file win_theme.cc * * @author Joel Vennin * @brief Implements the win_theme class. */ #include "types.h" #include "image.h" #include "win_types.h" #include "win_manager.h" // Pointer to the active window(s) win_manager* win_manager::active = NULL; // List of loaded themes hash_map win_manager::theme; // List of loaded fonts hash_map win_manager::font; // True type font to use string win_manager::font_file; win_manager::win_manager () { // save a pointer to the parent window(s) prev = active; // make the current window(s) active active = this; // no window in focus at that point wnd_focus = NULL; // we're not iterating over the window_list current = wnd_list.end (); } win_manager::~win_manager () { destroy (); // restore parent window(s) active = prev; } // Close and delete all windows void win_manager::destroy() { list::iterator i; for (i = wnd_list.begin(); i != wnd_list.end(); i++) { (*i)->set_manager (NULL); // delete *i; } if (input::is_text_input()) { input::stop_text_input(); } wnd_list.clear (); wnd_focus = NULL; } void win_manager::init (const string & font) { font_file = font; TTF_Init (); } // Delete all fonts and themes void win_manager::cleanup () { // Cleaning up themes for (hash_map ::iterator it = theme.begin (); it != theme.end (); it++) delete it->second; theme.clear (); // Cleaning up fonts for (hash_map ::iterator ifo = font.begin (); ifo != font.end (); ifo++) delete ifo->second; font.clear (); TTF_Quit (); } // add a window void win_manager::add (win_base *tmp) { wnd_list.push_back (tmp); tmp->set_manager (this); } /* bool win_manager::exist(win_base *tmp) { for (list::iterator i = wnd_list.begin (); i != wnd_list.end(); i++) if (*i == tmp) return true; return false; } */ // remove a window void win_manager::remove (win_base *tmp) { // if the window has focus take it away if (tmp->is_focus ()) { tmp->set_focus (false); wnd_focus = NULL; } // be careful if the iterator points to the element // we want to remove. This may happen if remove() is called // from a window's update() method or from win_manager::update(). if (tmp == *current) { // make sure that the iterator remains valid current++; } // remove it from the window list wnd_list.remove (tmp); tmp->set_manager (NULL); // if no window has the focus, give it to the topmost window if (!wnd_focus) set_focus (wnd_list.back ()); } // draw all windows void win_manager::draw () { // first descent recursively down the list of parents if (prev != NULL) prev->draw (); // on the way up, draw every window for (current = wnd_list.begin (); current != wnd_list.end(); current++) (*current)->draw (); } // grab keyboard input void win_manager::input_update () { // only the window with the focus may recieve input if (wnd_focus) wnd_focus->input_update (); } // update the state of the topmost window(s) void win_manager::update () { for (current = wnd_list.begin (); current != wnd_list.end ();) // a window signals that it wants to be closed by returning 0 here if (!(*current)->update ()) { // remove and delete it win_base *tmp = *current; remove (tmp); delete tmp; } else current++; } // give the focus to a window void win_manager::set_focus (win_base *tmp) { // but only if there are any windows at all if (!wnd_list.empty ()) { // remove focus from the old window if (wnd_focus) wnd_focus->set_focus (false); // and give it to the new one wnd_focus = tmp; wnd_focus->set_focus (true); } } // load a theme from disk void win_manager::add_theme (string name) { theme[name] = new win_theme ((char *) name.c_str ()); } // remove a theme bool win_manager::remove_theme (string name) { hash_map ::iterator it = theme.find (name); if (it == theme.end ()) return false; delete it->second; theme.erase (it); return true; } // return a pointer to a theme win_theme * win_manager::get_theme (string name) { hash_map ::iterator it = theme.find (name); // try to load it if it's not in memory yet if (it == theme.end ()) { add_theme (name); return get_theme (name); } else return it->second; } // load a font from disk void win_manager::add_font (string name) { font[name] = new win_ttf ((char *) name.c_str (), font_file); } // remove a font bool win_manager::remove_font (string name) { hash_map ::iterator it = font.find (name); if (it == font.end ()) return false; delete it->second; font.erase (it); return true; } // return a pointer to a font win_font * win_manager::get_font (string name) { hash_map ::iterator it = font.find (name); // try to load the font if it's not in memory yet if (it == font.end ()) { add_font (name); return get_font (name); } else return it->second; } adonthell-0.3.8/src/win_ttf.h0000644000175000017500000000241512756053231013035 00000000000000/* (C) Copyright 2004/2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_TTF_H #define WIN_TTF_H #include #include "win_font.h" class win_ttf : public win_font { public: win_ttf (const char *color, const string & file); ~win_ttf (); bool load (const string & file); bool in_table (u_int16 tmp); image & operator[] (u_int16); s_int8 kerning(const u_int16 & char1, const u_int16 & char2); private: SDL_Color Color; static std::string path_; static TTF_Font *ttf; static u_int32 refcount; hash_map overflow; }; #endif // WIN_TTF_H adonthell-0.3.8/src/landmap.cc0000644000175000017500000002216412756050700013136 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file landmap.cc * Defines the landmap class. */ #include "landmap.h" #include "character.h" using namespace std; landmap::landmap () : event_list () { } landmap::~landmap () { clear (); } void landmap::clear () { // Clear all events event_list::clear (); // Remove all mapcharacters from this map. while (mapchar.size ()) mapchar.front ()->remove_from_map (); // Delete all mapobjects vector ::iterator io; for (io = mobj.begin (); io != mobj.end (); io++) delete (*io); mobj.clear (); // Delete all mapobjects filenames mobjsrc.clear (); // Delete all submaps vector ::iterator is; for (is = submap.begin (); is != submap.end (); is++) delete (*is); submap.clear (); // Reset the filename. filename_ = ""; } void landmap::update () { // Update mapobjects vector ::iterator io; for (io = mobj.begin (); io != mobj.end (); io++) (*io)->update (); // Update mapcharacters vector ::iterator ic; for (ic = mapchar.begin (); ic != mapchar.end (); ic++) (*ic)->update (); } s_int8 landmap::get (igzstream& file) { u_int16 i, j; string tstr; clear (); // Load mapobjects i << file; for (; i; i--) { mapobject * tobj = new mapobject; tstr << file; tobj->load (tstr); insert_mapobject (tobj, nbr_of_mapobjects (), tstr.c_str ()); } // Load submaps i << file; for (j = 0; j < i; j++) { insert_submap (nbr_of_submaps ()); mapsquare_area * sm = submap[j]; u_int16 k, l; k << file; l << file; sm->resize_area (k, l); for (l = 0; l < sm->area_height (); l++) for (k = 0; k < sm->area_length (); k++) { sm->area[k][l].can_use_for_pathfinding << file; u_int16 n, t; // Read the number of mapobjects which have their base tile here n << file; while (n) { // Get the mapobject number t << file; sm->put_mapobject (k, l, mobj[t]); n--; } } } return 0; } s_int8 landmap::load (string fname) { igzstream file; s_int8 retvalue = -1; string fdef (MAPS_DIR); fdef += fname; file.open (fdef); if (!file.is_open ()) return -1; if (fileops::get_version (file, 1, 1, fdef)) retvalue = get (file); file.close (); filename_ = fname; return retvalue; } s_int8 landmap::put (ogzstream& file) const { u_int16 i; // Save mapobjects nbr_of_mapobjects () >> file; for (i = 0; i < nbr_of_mapobjects (); i++) { mobjsrc[i] >> file; } // Save submaps nbr_of_submaps () >> file; for (i = 0; i < nbr_of_submaps (); i++) { u_int16 k, l; submap[i]->area_length () >> file; submap[i]->area_height () >> file; for (l = 0; l < submap[i]->area_height (); l++) for (k = 0; k < submap[i]->area_length (); k++) { u_int16 nbr_base = 0; submap[i]->area[k][l].can_use_for_pathfinding >> file; list ::iterator it = submap[i]->area[k][l].tiles.begin (); while (it != submap[i]->area[k][l].tiles.end ()) { if (it->is_base) nbr_base++; it++; } nbr_base >> file; it = submap[i]->area[k][l].tiles.begin (); while (it != submap[i]->area[k][l].tiles.end ()) { if (it->is_base) { u_int16 y = 0; while (mobj[y] != (*it).mapobj) y++; y >> file; } it++; } } } return 0; } s_int8 landmap::save (string fname) { ogzstream file (MAPS_DIR + fname); u_int8 retvalue; if (!file.is_open ()) return -1; fileops::put_version (file, 1); retvalue = put (file); file.close (); filename_ = fname; return retvalue; } s_int8 landmap::get_state (igzstream& file) { mapcharacter *mc = NULL; u_int16 nbr_of; string id; // try to load event list if (!event_list::get_state (file)) return false; // Load the mapcharacters nbr_of << file; for (u_int16 i = 0; i < nbr_of; i++) { id << file; mc = (mapcharacter *) data::characters[id.c_str ()]; mc->set_map (this); mc->get_state (file); } return true; } s_int8 landmap::put_state (ogzstream& file) const { u_int16 nbr_of = nbr_of_mapcharacters (); string id; // save all events attached to this map event_list::put_state (file); // Save the mapcharacters and their status nbr_of >> file; for (u_int16 i = 0; i < nbr_of; i++) { mapcharacter *mc = mapchar[i]; id = mc->get_id (); id >> file; mc->put_state (file); } return 0; } s_int8 landmap::insert_mapobject (mapobject * an, u_int16 pos, string srcfile) { if (pos > nbr_of_mapobjects ()) return -2; vector ::iterator i = mobj.begin (); vector ::iterator j = mobjsrc.begin (); while (pos--) { i++; j++; } mobj.insert (i, an); mobjsrc.insert (j, srcfile); return 0; } s_int8 landmap::delete_mapobject (u_int16 pos) { mapobject * dptr = mobj[pos]; // Update all the submaps to delete any mapsquare_tile that points // to the deleted object. u_int16 k; for (k = 0; k < nbr_of_submaps (); k++) { u_int16 i, j; for (i = 0; i < submap[k]->area_length (); i++) for (j = 0; j < submap[k]->area_height (); j++) { mapsquare & ms = submap[k]->area[i][j]; list ::iterator imt; for (imt = ms.tiles.begin (); imt != ms.tiles.end (); imt++) if (imt->mapobj == dptr) { remove_mapobject (k, i, j, pos); // The iterator is invalidated by the delete operation imt = ms.tiles.begin (); } } } vector ::iterator i; if (pos > nbr_of_mapobjects () - 1) return -2; i = mobj.begin (); while (pos--) i++; delete (*i); mobj.erase (i); return 0; } s_int8 landmap::insert_submap (u_int16 pos) { if (pos > nbr_of_mapobjects ()) return -2; // Update the mapcharacters so they are on the same map as before. vector ::iterator ic; for (ic = mapchar.begin (); ic != mapchar.end (); ic++) if ((*ic)->submap_ >= pos) (*ic)->submap_++; // Insert the submap vector ::iterator i = submap.begin (); while (pos--) i++; mapsquare_area * t = new mapsquare_area; submap.insert (i, t); return 0; } s_int8 landmap::delete_submap (u_int16 pos) { // Update the mapcharacters so they are on the same map as before // and remove those who were on the deleted map. vector ::iterator ic; for (ic = mapchar.begin (); ic != mapchar.end (); ic++) { if ((*ic)->submap_ > pos) (*ic)->submap_--; else if ((*ic)->submap_ == pos) (*ic)->remove_from_map (); } // Suppress the submap vector ::iterator i; if (pos > nbr_of_submaps () - 1) return -2; i = submap.begin (); while (pos--) i++; delete (*i); submap.erase (i); return 0; } s_int8 landmap::put_mapobject (u_int16 smap, u_int16 px, u_int16 py, u_int16 mobjnbr) { return submap[smap]->put_mapobject (px, py, mobj[mobjnbr]); } void landmap::remove_mapobject (u_int16 smap, u_int16 px, u_int16 py, u_int16 mobjnbr) { submap[smap]->remove_mapobject (px, py, mobj[mobjnbr]); } adonthell-0.3.8/src/win_image.h0000644000175000017500000000155612756052763013340 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_IMAGE_H_ #define WIN_IMAGE_H_ #include "win_object.h" #include "image.h" typedef win_object win_image; #endif adonthell-0.3.8/src/main.cc0000664000175000017500000001503513264655045012457 00000000000000/* Copyright (C) 1999/2000/2001/2002/2003/2004 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file main.cc * @author Kai Sterker * * @brief Contains the main() function. * * */ #include "achievements.h" #include "audio.h" #include "event_handler.h" #include "game.h" #include "gamedata.h" #include "gametime.h" #include "input.h" #include "nls.h" #include "python_class.h" #include "screen.h" #include "yarg.h" #include "win_manager.h" #ifdef MEMORY_LEAKS #include #endif using namespace std; /* * SWIG init prototypes. Should we use dynamic linking??? */ extern "C" { /** * SWIG init prototype. * */ #if PY_VERSION_HEX >= 0x03000000 PyObject* PyInit__adonthell (void); #else void init_adonthell (void); #endif } static bool init_python(const char *application) { #if PY_VERSION_HEX >= 0x03000000 // one would assume that this is properly handled by SWIG, // but it seems some extra effort is required on our side // to use a static module if (PyImport_AppendInittab ("_adonthell", PyInit__adonthell) < 0) { return false; } #if PY_VERSION_HEX >= 0x03050000 wchar_t *program = Py_DecodeLocale(application, NULL); if (program != NULL) { Py_SetProgramName(program); } #endif #endif python::init (); // Initialise the import path. // Shared modules path string t; t = game::global_data_dir() + "/modules"; python::insert_path ((char *) t.c_str()); // Game specific path t = game::game_data_dir () + "/scripts/modules"; python::insert_path ((char *) t.c_str ()); t = game::game_data_dir () + "/scripts"; python::insert_path ((char *) t.c_str ()); // Initialise SWIG module. This should go if we ever switch // to dynamic linking #if PY_VERSION_HEX < 0x03000000 init_adonthell(); #endif python::module = python::import_module ("adonthell"); if (!python::module) return false; data::globals = PyModule_GetDict (python::module); return true; } /** * Game's main function. * It simply initialises the game and runs the "init.py" file in the game * directory given as first argument. Once the execution is finished, * it cleans everything up, and exits. * * @param argc Number of arguments to the program. * @param argv Array of strings containing the program's arguments. * * @return 0 in case of success, error code otherwise. * */ extern "C" int main(int argc, char * argv[]) { config myconfig; #ifdef MEMORY_LEAKS // to debug memory leaks with mtrace. It's better to use // a tool like memprof, mpatrol or valgrind though. mtrace (); #endif // init game environment #if !defined (SINGLE_DIR_INST) game::init (DATA_DIR); #else // change working directory to the application's location. if (argc && argv[0]) { char *str = argv[0]; do if (*str == '\\') *str = '/'; while (*(str++)); str = strrchr (argv[0], '/'); *(str + 1) = 0; if (chdir (argv[0]) == -1) { perror("Failed to set working directory"); return 1; } *(str + 1) = '/'; } // get absolute path to current working directory char buf[500]; if (getcwd (buf, sizeof (buf)) == NULL) { perror("Failed getting absolute path to working directory"); return 1; } char *str = buf; do if (*str == '\\') *str = '/'; while (*(str++)); // get absolute path to data directory string data_dir(DATA_DIR); while (data_dir.size() >= 3 && data_dir.compare(0, 3, "../") == 0) { str = strrchr (buf, '/'); if (str != NULL) { *(str+1) = 0; } data_dir = data_dir.substr(3); } game::init (string(buf) + data_dir); #endif // read the $HOME/.adonthell/adonthellrc file // and check the arguments we recieved. myconfig.read_adonthellrc (); myconfig.parse_arguments (argc, argv); // init national language support nls::init (myconfig); game::set_game_data_dir(myconfig.gamedir); // init game loading/saving system gamedata::init (game::user_data_dir(), game::game_data_dir(), myconfig.game_name, myconfig.quick_load); // init achievements achievements::init(); // init video subsystem if (!screen::init (320, 240, 0, myconfig)) { printf("%s\n", screen::info().c_str()); SDL_Quit(); return 1; } #ifdef DEBUG printf("%s\n", screen::info().c_str()); #endif // init audio subsystem if (myconfig.audio_volume > 0) audio::init (&myconfig); // init input subsystem input::init (); // init python interpreter if (!init_python(argv[0])) { std::cout << "Initializing Python module failed" << std::endl; SDL_Quit (); return 1; } // init the game data data::engine = new adonthell; data::the_player = NULL; // init window manager win_manager::init (myconfig.font); // event system event_handler::init (); // gametime system // (180 realtime minutes make approx. 1 gametime day) gametime::init (180); // init random number generator yarg::init (myconfig.game_name); yarg::randomize (); // It's up to the game what happens here python::exec_file ("init"); // close all windows // delete all themes and fonts win_manager::cleanup (); // shutdown input subsystem input::shutdown (); // shutdown audio audio::cleanup (); // cleanup the saves gamedata::cleanup (); // cleanup data delete data::engine; if (data::the_player) delete data::the_player; // cleanup event system event_handler::cleanup (); // shutdown python python::cleanup (); // shutdown screen screen::cleanup (); // shutdown video and SDL SDL_Quit (); return 0; } adonthell-0.3.8/src/win_border.cc0000644000175000017500000001662312756052653013670 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_theme.h" #include "win_border.h" win_border::win_border() { wb_=NULL; init(); set_trans_border(false); set_visible_border( false ); set_brightness_border( false ); } win_border::win_border(win_base *wb) { wb_=wb; init(); set_trans_border(false); set_visible_border( false ); set_brightness_border( false ); } win_border::win_border(char * rep,const char * size) { wb_=NULL; init(); set_visible_border( false ); set_trans_border(false); set_brightness_border( false ); win_border::load(rep,size); refresh(); } win_border::win_border(win_border & wb) { wb_=NULL; init(); set_visible_border( false ); set_trans_border(false); set_brightness_border( false ); *this=wb; refresh(); } win_border::~win_border() { destroy(); } void win_border::set_border(win_border & wb) { *this=wb; refresh(); } void win_border::set_border(win_theme & wt, u_int8 size) { switch(size) { case NORMAL: *this=*(wt.normal); break; case MINI: *this=*(wt.mini); break; } refresh(); } void win_border::init() { h_border_template_=NULL; v_border_template_=NULL; for(u_int8 i=0;iset_mask(true); border_brightness_[i]->set_mask(true); } for(u_int8 i=NB_BORDER_IMAGE-2;iset_mask(true); border_brightness_[i]->set_mask(true); } update(); return *this; } void win_border::destroy() { if(h_border_template_) delete h_border_template_; if(v_border_template_) delete v_border_template_; for(u_int8 i = 0; i< NB_BORDER_IMAGE; i++) {delete border_[i];delete border_brightness_[i];} init(); } void win_border::load(char * rep,const char *size) { destroy(); char path[255];char tmp[255]; strcpy(path,WIN_DIRECTORY); strcat(path,WIN_BORDER_DIRECTORY); strcat(path,rep); strcat(path,size); h_border_template_=new image(); strcpy(tmp,path); strcat(tmp,WIN_H_BORDER_TEMPLATE_FILE); h_border_template_->load_pnm(tmp);//new v_border_template_=new image(); strcpy(tmp,path); strcat(tmp,WIN_V_BORDER_TEMPLATE_FILE); v_border_template_->load_pnm(tmp);//new border_[0]=new image(); strcpy(tmp,path); strcat(tmp,WIN_CORNER_TOP_LEFT_FILE); border_[0]->load_pnm(tmp); border_brightness_[0]=new image(); border_brightness_[0]->brightness(*(border_[0]),WIN_BRIGHTNESS_LEVEL); border_[0]->set_mask(true); border_brightness_[0]->set_mask(true); border_[1]=new image(); strcpy(tmp,path); strcat(tmp,WIN_CORNER_TOP_RIGHT_FILE); border_[1]->load_pnm(tmp); border_brightness_[1]=new image(); border_brightness_[1]->brightness(*(border_[1]),WIN_BRIGHTNESS_LEVEL); border_[1]->set_mask(true); border_brightness_[1]->set_mask(true); border_[2]=new image(); strcpy(tmp,path); strcat(tmp,WIN_CORNER_BOTTOM_LEFT_FILE); border_[2]->load_pnm(tmp); border_brightness_[2]=new image(); border_brightness_[2]->brightness(*(border_[2]),WIN_BRIGHTNESS_LEVEL); border_[2]->set_mask(true); border_brightness_[2]->set_mask(true); border_[3]=new image(); strcpy(tmp,path); strcat(tmp,WIN_CORNER_BOTTOM_RIGHT_FILE); border_[3]->load_pnm(tmp); border_brightness_[3]=new image(); border_brightness_[3]->brightness(*(border_[3]),WIN_BRIGHTNESS_LEVEL); border_[3]->set_mask(true); border_brightness_[3]->set_mask(true); for(u_int8 i=NB_BORDER_IMAGE-2;iset_mask(true); border_brightness_[i]->set_mask(true); } } void win_border::update() { if(!h_border_template_ || !v_border_template_ || !wb_) return; border_[4]->resize(v_border_template_->length(),wb_->height()); border_[4]->tile(*v_border_template_); border_brightness_[4]->brightness(*(border_[4]),WIN_BRIGHTNESS_LEVEL); border_[5]->resize(wb_->length(),h_border_template_->height()); border_[5]->tile(*h_border_template_); border_brightness_[5]->brightness(*(border_[5]),WIN_BRIGHTNESS_LEVEL); } u_int16 win_border::height_border() { if(h_border_template_) return h_border_template_->height(); return 0; } u_int16 win_border::length_border() { if(v_border_template_) return v_border_template_->length(); return 0; } void win_border::set_trans_border(bool b) { if(!h_border_template_) return; if(b) for(u_int8 i=0; iset_alpha(130); border_brightness_[i]->set_alpha(130); } else for(u_int8 i=0; iset_alpha(255); border_brightness_[i]->set_alpha(255); } } void win_border::draw(drawing_area * da) { if(!h_border_template_ || !visible_border_ || !wb_) return; u_int8 xodd = (border_draw_[0]->length () % 2); u_int8 yodd = (border_draw_[0]->length () % 2); border_draw_[5]->draw(wb_->real_x(), wb_->real_y() - height_border(),da); border_draw_[5]->draw(wb_->real_x(), wb_->real_y() + wb_->height(),da); border_draw_[4]->draw(wb_->real_x() - length_border() , wb_->real_y(),da); border_draw_[4]->draw(wb_->real_x() + wb_->length(), wb_->real_y(),da); border_draw_[0]->draw(wb_->real_x() - (border_draw_[0]->length()>>1) - (length_border()>>1) - xodd, wb_->real_y() - (border_draw_[0]->height()>>1) - (height_border()>>1) - yodd, da); border_draw_[1]->draw(wb_->real_x() + wb_->length() - (border_draw_[0]->length()>>1) + (length_border()>>1), wb_->real_y() - (border_draw_[0]->height()>>1) - (height_border()>>1) - yodd, da); border_draw_[2]->draw(wb_->real_x() - (border_draw_[0]->length()>>1) - (length_border()>>1) - xodd , wb_->real_y() + wb_->height() - (border_draw_[0]->height()>>1) + (height_border()>>1), da); border_draw_[3]->draw(wb_->real_x() + wb_->length() - (border_draw_[0]->length()>>1) + (length_border()>>1), wb_->real_y() + wb_->height() - (border_draw_[0]->height()>>1) + (height_border()>>1), da); } void win_border::set_brightness_border(bool b) { brightness_=b; refresh(); } void win_border::refresh() { border_draw_ = (brightness_) ? border_brightness_ : border_; } adonthell-0.3.8/src/dialog_screen.cc0000644000175000017500000001553112756050014014316 00000000000000/* (C) Copyright 2000/2001/2004 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file dialog_screen.cc * @author Kai Sterker * * @brief Defines the dialog_screen class. * * */ #include #include "gamedata.h" #include "input.h" #include "image.h" #include "python_class.h" #include "input.h" #include "dialog_screen.h" #include "win_manager.h" #include "audio.h" // Init the dialogue engine dialog_screen::dialog_screen (character_base *mynpc, char * dlg_file, u_int8 size) { init (mynpc, dlg_file, size); } void dialog_screen::init(character_base *mynpc, char * dlg_file, u_int8 size) { string path = dlg_file; string file = strrchr (dlg_file, '.') ? strrchr (dlg_file, '.') + 1 : dlg_file; audio::play_wave (-1, 0); is_running = true; portrait = "None"; // Init position & size win_container::move (15, 15); win_container::resize (290, 115); // Load the different fonts fonts[0] = win_manager::get_font ("white"); fonts[1] = win_manager::get_font ("yellow"); fonts[2] = win_manager::get_font ("red"); fonts[3] = win_manager::get_font ("violet"); fonts[4] = win_manager::get_font ("blue"); fonts[5] = win_manager::get_font ("green"); theme = win_manager::get_theme ("original"); set_border (*theme); set_background (*theme); set_trans_background (true); // Full or half-sized window if (size) { move (20, 15); resize (280, 210); } // Init the low level dialogue stuff dlg = new dialog (mynpc); // Create dialogue window // The NPC's portrait face = new win_image(); face->move (5, 5); ((image*)face)->resize (64, 64); face->pack(); face->set_visible (true); // The NPC's name name = new win_label (); name->set_font (*(fonts[0])); name->move (5, 74); ((label*)name)->resize (64, 0); name->set_form (label::AUTO_HEIGHT); name->set_visible (true); // The list with the dialogue sel = new win_select (); sel->set_scrollbar (*theme); sel->move (80, 0); sel->resize (210, height ()); sel->set_mode (win_select::MODE_BRIGHTNESS); sel->set_layout (win_container::LIST_LAYOUT); sel->set_space_with_border (5); sel->set_space_with_object (5); sel->set_circle (true); sel->set_visible_scrollbar (true); // Commented 'cause it makes troubles during dialogues right now :) // sel->set_auto_scrollbar (true); sel->set_activate (true); sel->set_visible (true); sel->set_focus (true); //due an error from window system // Notification when a dialogue item get's selected sel->set_signal_connect (makeFunctor (*this, &dialog_screen::on_select), win_event::ACTIVATE_KEY); // add everything to our container add (face); add (name); add (sel); set_focus_object (sel); set_visible_border (true); set_visible_background (true); set_visible (true); set_activate (true); // Make the npc and player available to the dialogue engine PyObject *args = PyTuple_New (2); PyTuple_SetItem (args, 0, python::pass_instance (data::the_player, "character")); PyTuple_SetItem (args, 1, python::pass_instance (mynpc, "character_base")); // Load dialogue if (!dlg->init (path, file, args)) { cout << "\n*** Error loading dialogue script " << file << "\n"; #ifdef PY_DEBUG python::show_traceback (); #endif cout << flush; answer = -1; } else answer = 0; // Clean up Py_DECREF (args); } dialog_screen::~dialog_screen () { sel->set_activate (false); delete dlg; // get rid of any keys that might have been accidently pressed during dialogue input::clear_keys_queue (); } void dialog_screen::run () { u_int32 i = 0; win_label *l; // Possibly error if (answer < 0) { is_running = false; return; } // Continue dialogue with selected answer dlg->run (answer); // End of dialogue if (dlg->text_size () == 0) { is_running = false; return; } // update the NPC's portrait and name set_portrait (dlg->npc_portrait ()); set_name (dlg->npc_name ()); // Add NPC text and all player reactions to container for (string txt = dlg->text (); txt != ""; txt = dlg->text (), i++) { l = new win_label(); l->set_font (i == 0 ? *fonts[dlg->npc_color ()] : *fonts[1]); l->move(0,0); ((label*)l)->resize(190,0); l->set_form(label::AUTO_HEIGHT); l->set_text (txt); l->set_visible (true); l->pack(); cur_answers.push_back (l); sel->add (l); } // Either select the single NPC speech ... if (dlg->text_size () == 1) sel->set_default_object (cur_answers.front ()); // ... or the player's first answer else { cur_answers[0]->set_can_be_selected (false); sel->set_default_object (cur_answers[1]); } // Center on the NPC answer sel->set_pos (0); } bool dialog_screen::update () { return (win_container::update() && is_running); } void dialog_screen::on_select () { // remember choice answer = sel->get_selected_position () - 1; // remove all the text sel->destroy (); cur_answers.clear (); run (); } void dialog_screen::insert_plugin () { } // Set / change the NPC-portrait void dialog_screen::set_portrait (const string & new_portrait) { if (new_portrait == portrait) return; portrait = new_portrait; if (new_portrait == "") { face->image::resize (64, 64); face->fillrect (0, 0, 64, 64, 0x00ff00ff); return; } face->load_pnm(string ("gfx/portraits/") + new_portrait); face->set_mask(true); face->pack(); } // Set / change the NPC-name void dialog_screen::set_name (const string & new_name) { if (new_name == name->text_string()) return; name->set_text (new_name); name->pack (); } // Set a different NPC void dialog_screen::set_npc (const string & new_npc) { character_base *mynpc = (character_base *) data::characters[new_npc.c_str ()]; set_name (mynpc->get_name()); set_portrait (mynpc->get_portrait ()); } adonthell-0.3.8/src/lex.prefs.cc0000664000175000017500000014201512756057102013433 00000000000000#line 2 "lex.prefs.cc" #line 4 "lex.prefs.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer prefs_create_buffer #define yy_delete_buffer prefs_delete_buffer #define yy_flex_debug prefs_flex_debug #define yy_init_buffer prefs_init_buffer #define yy_flush_buffer prefs_flush_buffer #define yy_load_buffer_state prefs_load_buffer_state #define yy_switch_to_buffer prefs_switch_to_buffer #define yyin prefsin #define yyleng prefsleng #define yylex prefslex #define yylineno prefslineno #define yyout prefsout #define yyrestart prefsrestart #define yytext prefstext #define yywrap prefswrap #define yyalloc prefsalloc #define yyrealloc prefsrealloc #define yyfree prefsfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE prefsrestart(prefsin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int prefsleng; extern FILE *prefsin, *prefsout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up prefstext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up prefstext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via prefsrestart()), so that the user can continue scanning by * just pointing prefsin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when prefstext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int prefsleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow prefswrap()'s to do buffer switches * instead of setting up a fresh prefsin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void prefsrestart (FILE *input_file ); void prefs_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE prefs_create_buffer (FILE *file,int size ); void prefs_delete_buffer (YY_BUFFER_STATE b ); void prefs_flush_buffer (YY_BUFFER_STATE b ); void prefspush_buffer_state (YY_BUFFER_STATE new_buffer ); void prefspop_buffer_state (void ); static void prefsensure_buffer_stack (void ); static void prefs_load_buffer_state (void ); static void prefs_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER prefs_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE prefs_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE prefs_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE prefs_scan_bytes (yyconst char *bytes,int len ); void *prefsalloc (yy_size_t ); void *prefsrealloc (void *,yy_size_t ); void prefsfree (void * ); #define yy_new_buffer prefs_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ prefsensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ prefs_create_buffer(prefsin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ prefsensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ prefs_create_buffer(prefsin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define prefswrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *prefsin = (FILE *) 0, *prefsout = (FILE *) 0; typedef int yy_state_type; extern int prefslineno; int prefslineno = 1; extern char *prefstext; #define yytext_ptr prefstext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up prefstext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ prefsleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 18 #define YY_END_OF_BUFFER 19 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[108] = { 0, 0, 0, 0, 0, 19, 17, 16, 16, 1, 15, 17, 17, 17, 17, 17, 17, 17, 12, 14, 13, 16, 1, 1, 15, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 11, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10, 0, 0, 0, 7, 0, 0, 0, 0, 8, 0, 9, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 8, 1, 9, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 11, 1, 12, 1, 1, 13, 1, 1, 1, 1, 14, 1, 15, 1, 1, 1, 16, 1, 17, 18, 19, 1, 20, 21, 22, 1, 23, 24, 25, 26, 27, 28, 1, 29, 30, 31, 32, 33, 1, 1, 34, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[35] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[112] = { 0, 0, 13, 112, 111, 125, 128, 26, 28, 121, 117, 90, 99, 93, 103, 86, 100, 97, 128, 0, 128, 30, 112, 128, 108, 95, 82, 85, 84, 87, 79, 78, 0, 84, 77, 73, 83, 85, 82, 70, 72, 74, 128, 65, 73, 76, 72, 88, 76, 75, 85, 63, 61, 17, 53, 66, 61, 79, 57, 61, 62, 64, 52, 128, 59, 50, 51, 128, 59, 44, 48, 48, 128, 55, 43, 43, 41, 39, 34, 47, 46, 37, 38, 37, 35, 128, 40, 39, 25, 30, 29, 128, 21, 13, 38, 128, 12, 19, 11, 128, 12, 22, 11, 5, 128, 16, 128, 128, 50, 52, 54, 0 } ; static yyconst flex_int16_t yy_def[112] = { 0, 108, 108, 109, 109, 107, 107, 107, 107, 110, 107, 107, 107, 107, 107, 107, 107, 107, 107, 111, 107, 107, 110, 107, 107, 107, 107, 107, 107, 107, 107, 107, 111, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 107, 107, 107, 107 } ; static yyconst flex_int16_t yy_nxt[163] = { 0, 32, 7, 8, 9, 107, 10, 11, 12, 13, 14, 15, 16, 17, 18, 7, 8, 9, 107, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 21, 21, 21, 21, 21, 59, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 60, 61, 95, 94, 62, 6, 6, 19, 19, 22, 22, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 24, 23, 31, 30, 29, 28, 27, 26, 25, 24, 23, 107, 20, 20, 5, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107 } ; static yyconst flex_int16_t yy_chk[163] = { 0, 111, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 8, 8, 21, 21, 53, 105, 103, 102, 101, 100, 98, 97, 96, 94, 93, 92, 53, 53, 90, 89, 53, 108, 108, 109, 109, 110, 110, 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 71, 70, 69, 68, 66, 65, 64, 62, 61, 60, 59, 58, 57, 56, 55, 54, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 41, 40, 39, 38, 37, 36, 35, 34, 33, 31, 30, 29, 28, 27, 26, 25, 24, 22, 17, 16, 15, 14, 13, 12, 11, 10, 9, 5, 4, 3, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int prefs_flex_debug; int prefs_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *prefstext; #line 1 "prefs.l" #line 2 "prefs.l" /* $Id$ Copyright (C) 2000/2004 Kai Sterker Part of the Adonthell Project http://adonthell.linuxgames.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the COPYING file for more details. */ #include #include #include "prefs.h" #define YY_DECL int parse_adonthellrc (int &mynum, string &mytext) #line 572 "lex.prefs.cc" #define INITIAL 0 #define text 1 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int prefslex_destroy (void ); int prefsget_debug (void ); void prefsset_debug (int debug_flag ); YY_EXTRA_TYPE prefsget_extra (void ); void prefsset_extra (YY_EXTRA_TYPE user_defined ); FILE *prefsget_in (void ); void prefsset_in (FILE * in_str ); FILE *prefsget_out (void ); void prefsset_out (FILE * out_str ); int prefsget_leng (void ); char *prefsget_text (void ); int prefsget_lineno (void ); void prefsset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int prefswrap (void ); #else extern int prefswrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( prefstext, prefsleng, 1, prefsout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( prefsin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( prefsin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, prefsin))==0 && ferror(prefsin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(prefsin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int prefslex (void); #define YY_DECL int prefslex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after prefstext and prefsleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 29 "prefs.l" #line 761 "lex.prefs.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! prefsin ) prefsin = stdin; if ( ! prefsout ) prefsout = stdout; if ( ! YY_CURRENT_BUFFER ) { prefsensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = prefs_create_buffer(prefsin,YY_BUF_SIZE ); } prefs_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of prefstext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 108 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 107 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 31 "prefs.l" ; /* Eat up comments */ YY_BREAK case 2: YY_RULE_SETUP #line 33 "prefs.l" return PREFS_SCREEN_MODE; YY_BREAK case 3: YY_RULE_SETUP #line 34 "prefs.l" return PREFS_DISPLAY; YY_BREAK case 4: YY_RULE_SETUP #line 35 "prefs.l" return PREFS_LANGUAGE; YY_BREAK case 5: YY_RULE_SETUP #line 36 "prefs.l" return PREFS_FONT; YY_BREAK case 6: YY_RULE_SETUP #line 37 "prefs.l" return PREFS_QUICK_LOAD; YY_BREAK case 7: YY_RULE_SETUP #line 38 "prefs.l" return PREFS_AUDIO_CHANNELS; YY_BREAK case 8: YY_RULE_SETUP #line 39 "prefs.l" return PREFS_AUDIO_RESOLUTION; YY_BREAK case 9: YY_RULE_SETUP #line 40 "prefs.l" return PREFS_AUDIO_SAMPLE_RATE; YY_BREAK case 10: YY_RULE_SETUP #line 41 "prefs.l" return PREFS_AUDIO_VOLUME; YY_BREAK case 11: YY_RULE_SETUP #line 42 "prefs.l" return PREFS_VERSION; YY_BREAK case 12: YY_RULE_SETUP #line 44 "prefs.l" mytext = ""; BEGIN(text); YY_BREAK case 13: YY_RULE_SETUP #line 45 "prefs.l" BEGIN(INITIAL); return PREFS_STR; YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP #line 46 "prefs.l" mytext += prefstext; YY_BREAK case 15: YY_RULE_SETUP #line 48 "prefs.l" mynum = atoi (prefstext); return PREFS_NUM; YY_BREAK case 16: /* rule 16 can match eol */ YY_RULE_SETUP #line 50 "prefs.l" ; YY_BREAK case 17: YY_RULE_SETUP #line 51 "prefs.l" return PREFS_UNKNOWN; YY_BREAK case 18: YY_RULE_SETUP #line 52 "prefs.l" ECHO; YY_BREAK #line 933 "lex.prefs.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(text): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed prefsin at a new source and called * prefslex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = prefsin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( prefswrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * prefstext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of prefslex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ prefsrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; prefsrestart(prefsin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) prefsrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 108 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 108 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 107); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ prefsrestart(prefsin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( prefswrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve prefstext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void prefsrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ prefsensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = prefs_create_buffer(prefsin,YY_BUF_SIZE ); } prefs_init_buffer(YY_CURRENT_BUFFER,input_file ); prefs_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void prefs_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * prefspop_buffer_state(); * prefspush_buffer_state(new_buffer); */ prefsensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; prefs_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (prefswrap()) processing, but the only time this flag * is looked at is after prefswrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void prefs_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; prefsin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE prefs_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) prefsalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in prefs_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) prefsalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in prefs_create_buffer()" ); b->yy_is_our_buffer = 1; prefs_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with prefs_create_buffer() * */ void prefs_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) prefsfree((void *) b->yy_ch_buf ); prefsfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a prefsrestart() or at EOF. */ static void prefs_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; prefs_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then prefs_init_buffer was _probably_ * called from prefsrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void prefs_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) prefs_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void prefspush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; prefsensure_buffer_stack(); /* This block is copied from prefs_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from prefs_switch_to_buffer. */ prefs_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void prefspop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; prefs_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { prefs_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void prefsensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)prefsalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in prefsensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)prefsrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in prefsensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE prefs_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) prefsalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in prefs_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; prefs_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to prefslex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * prefs_scan_bytes() instead. */ YY_BUFFER_STATE prefs_scan_string (yyconst char * yystr ) { return prefs_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to prefslex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE prefs_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) prefsalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in prefs_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = prefs_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in prefs_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up prefstext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ prefstext[prefsleng] = (yy_hold_char); \ (yy_c_buf_p) = prefstext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ prefsleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int prefsget_lineno (void) { return prefslineno; } /** Get the input stream. * */ FILE *prefsget_in (void) { return prefsin; } /** Get the output stream. * */ FILE *prefsget_out (void) { return prefsout; } /** Get the length of the current token. * */ int prefsget_leng (void) { return prefsleng; } /** Get the current token. * */ char *prefsget_text (void) { return prefstext; } /** Set the current line number. * @param line_number * */ void prefsset_lineno (int line_number ) { prefslineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see prefs_switch_to_buffer */ void prefsset_in (FILE * in_str ) { prefsin = in_str ; } void prefsset_out (FILE * out_str ) { prefsout = out_str ; } int prefsget_debug (void) { return prefs_flex_debug; } void prefsset_debug (int bdebug ) { prefs_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from prefslex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT prefsin = stdin; prefsout = stdout; #else prefsin = (FILE *) 0; prefsout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * prefslex_init() */ return 0; } /* prefslex_destroy is for both reentrant and non-reentrant scanners. */ int prefslex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ prefs_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; prefspop_buffer_state(); } /* Destroy the stack itself. */ prefsfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * prefslex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *prefsalloc (yy_size_t size ) { return (void *) malloc( size ); } void *prefsrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void prefsfree (void * ptr ) { free( (char *) ptr ); /* see prefsrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 52 "prefs.l" adonthell-0.3.8/src/gamedata.cc0000644000175000017500000003644312756050120013266 00000000000000/* Copyright (C) 2001/2002 by Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gamedata.cc * @author Kai Sterker * * @brief Defines the gamedata and data classes. * * */ #include #include #include #include #include #include #include "achievements.h" #include "audio.h" #include "gamedata.h" #include "python_class.h" #include "event_handler.h" // File format versions of the various data files // *** Increase when changing file format! *** #define ENGINE_DAT_VER 5 #define AUDIO_DAT_VER 2 #define CHAR_DAT_VER 4 #define QUEST_DAT_VER 1 #define SAVE_DAT_VER 3 #define ACVMENT_DAT_VER 1 vector gamedata::saves; // The list of available savegames string gamedata::user_data_dir_; // The user's private adonthell directory string gamedata::game_data_dir_; // The adonthell data directory string gamedata::game_name; // The adonthell data directory u_int8 gamedata::quick_load; // Whether Quick-load is active or not using namespace std; gamedata::gamedata () { } gamedata::gamedata (string dir, string desc, string time) { Timestamp = 0; Directory = dir; Description = desc; Gametime = time; } gamedata::~gamedata () { } bool gamedata::get (igzstream& file) { if (!fileops::get_version (file, SAVE_DAT_VER, SAVE_DAT_VER, "save.data")) return false; Timestamp << file; Description << file; Location << file; Gametime << file; return true; } void gamedata::put (ogzstream& file) { fileops::put_version (file, SAVE_DAT_VER); // get current time for Quick-Loading Timestamp = time (NULL); Timestamp >> file; Description >> file; Location >> file; Gametime >> file; } void gamedata::set_description (string desc) { Description = desc; } void gamedata::set_directory (string dir) { Directory = dir; } void gamedata::set_gametime (string time) { Gametime = time; } bool gamedata::load_characters (u_int32 pos) { igzstream in; string filepath; character *mynpc; // try to open character.data filepath = saves[pos]->directory (); filepath += "/character.data"; in.open (filepath); if (!in.is_open ()) { cerr << "Couldn't open \"" << filepath << "\" - stopping\n" << endl; return false; } if (!fileops::get_version (in, CHAR_DAT_VER, CHAR_DAT_VER, filepath)) { in.close (); return false; } // load characters char ctemp; // first, the player data::the_player = new character (); data::the_player->character_base::get_state (in); data::characters[data::the_player->get_id ().c_str ()] = data::the_player; // then all the others while (ctemp << in) { mynpc = new character; mynpc->character_base::get_state (in); // Make this character available to the engine data::characters[mynpc->get_id ().c_str ()] = mynpc; } in.close (); return true; } bool gamedata::load_quests (u_int32 pos) { igzstream in; string filepath; quest *myquest; // try to open quest.data filepath = saves[pos]->directory (); filepath += "/quest.data"; in.open (filepath); if (!in.is_open ()) { cerr << "Couldn't open \"" << filepath << " - stopping\n" << endl; return false; } if (!fileops::get_version (in, QUEST_DAT_VER, QUEST_DAT_VER, filepath)) { in.close (); return false; } // load quests char ctemp; while (ctemp << in) { myquest = new quest; myquest->load (in); // Make this quest available to the engine data::quests[myquest->name.c_str ()] = myquest; } in.close (); return true; } bool gamedata::load_mapengine (u_int32 pos) { igzstream in; string filepath; // Load mapengine state filepath = saves[pos]->directory(); filepath += "/mapengine.data"; in.open (filepath); if (!in.is_open ()) { cerr << "Couldn't open \"" << filepath << " - stopping\n" << endl; return false; } if (!fileops::get_version (in, ENGINE_DAT_VER, ENGINE_DAT_VER, filepath)) { in.close (); return false; } if (!data::engine->get_state(in)) { cerr << "Couldn't load \"" << filepath << " - stopping\n" << endl; in.close (); return false; } in.close (); return true; } bool gamedata::load_audio (u_int32 pos) { igzstream in; string filepath; // Load mapengine state filepath = saves[pos]->directory(); filepath += "/audio.data"; in.open (filepath); if (!in.is_open ()) { cerr << "Couldn't open \"" << filepath << " - stopping\n" << endl; return false; } if (!fileops::get_version (in, AUDIO_DAT_VER, AUDIO_DAT_VER, filepath)) { in.close (); return false; } if (!audio::get_state (in)) { cerr << "Couldn't load \"" << filepath << " - stopping\n" << endl; in.close (); return false; } in.close (); return true; } bool gamedata::load_achievements (u_int32 pos) { igzstream in; string filepath; // Load mapengine state filepath = saves[pos]->directory(); filepath += "/achievements.data"; in.open (filepath); if (!in.is_open ()) { cerr << "Couldn't open \"" << filepath << " - stopping\n" << endl; return false; } if (!fileops::get_version (in, ACVMENT_DAT_VER, ACVMENT_DAT_VER, filepath)) { in.close (); return false; } if (!achievements::get_state (in)) { cerr << "Couldn't load \"" << filepath << " - stopping\n" << endl; in.close (); return false; } in.close (); return true; } bool gamedata::load (u_int32 pos) { // First, unload the current game unload (); if (!load_characters (pos)) return false; if (!load_quests (pos)) return false; if (!load_mapengine (pos)) return false; if (!load_audio (pos)) return false; if (!load_achievements(pos)) return false; return true; } bool gamedata::load_newest () { // Quick-load off / no save game available if (!quick_load || saves.size () <= 1) return false; u_int32 timestamp = 0; u_int32 index = 0; u_int32 newest; for (vector::iterator i = saves.begin (); i != saves.end (); i++) { if ((*i)->timestamp () > timestamp) { timestamp = (*i)->timestamp (); newest = index; } index++; } return load (newest); } bool gamedata::save (u_int32 pos, string desc, string time) { gamedata *gdata; string filepath; char t[10]; ogzstream file; char vnbr; // make sure we don't overwrite the default game if (pos == 0) return false; // see whether we're going to save to a new slot if (pos >= saves.size ()) { int success = 1; // make sure we save to an unused directory while (success) { // that's the directory we're going to save to sprintf(t, "%03i", pos++); filepath = user_data_dir (); filepath += "/" + game_name + "-save-"; filepath += t; #ifdef WIN32 success = mkdir (filepath.c_str()); #else success = mkdir (filepath.c_str(), 0700); #endif // prevent infinite loop if we can't write to the directory if (pos >= 1000) { cerr << "Save failed - seems like you have no write permission in\n" << user_data_dir () << endl; return false; } } // we'll need a new gamedata record gdata = new gamedata (filepath, desc, time); } else { gdata = saves[pos]; gdata->set_description (desc); gdata->set_gametime (time); } // save characters filepath = gdata->directory (); filepath += "/character.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } fileops::put_version (file, CHAR_DAT_VER); // save the player first data::the_player->character_base::put_state (file); // now save all the other characters dictionary ::iterator itc; for (itc = data::characters.begin (); itc != data::characters.end (); itc++) { // don't save the player if (itc->second == (character*) data::the_player) continue; // tell the character.data loader that another entry follows vnbr = 1; vnbr >> file; // append the character data itc->second->character_base::put_state (file); } // write EOF vnbr = 0; vnbr >> file; file.close (); // save quests filepath = gdata->directory (); filepath += "/quest.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } fileops::put_version (file, QUEST_DAT_VER); dictionary ::iterator itq; for (itq = data::quests.begin (); itq != data::quests.end (); itq++) { // tell the quest.data loader that another entry follows vnbr = 1; vnbr >> file; // append the character data itq->second->save (file); } // write EOF vnbr = 0; vnbr >> file; file.close (); // Save mapengine state filepath = gdata->directory(); filepath += "/mapengine.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } fileops::put_version (file, ENGINE_DAT_VER); data::engine->put_state(file); file.close (); // save music filepath = gdata->directory (); filepath += "/audio.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } fileops::put_version (file, AUDIO_DAT_VER); audio::put_state (file); file.close (); // save achievements filepath = gdata->directory (); filepath += "/achievements.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } fileops::put_version (file, ACVMENT_DAT_VER); achievements::put_state (file); file.close (); // save gamedata filepath = gdata->directory (); filepath += "/save.data"; file.open (filepath); if (!file.is_open ()) { cerr << "Couldn't create \"" << filepath << "\" - save failed\n"; return false; } gdata->put (file); file.close (); // only now it is safe to add the new record to the array if (pos >= saves.size ()) saves.push_back (gdata); return true; } gamedata* gamedata::next_save () { static vector::iterator i = saves.begin (); static u_int32 size = saves.size (); // check whether a new save has been added if (size != saves.size ()) { size = saves.size (); i = saves.begin (); } // check whether we reached the end of the list if (++i == saves.end ()) { i = saves.begin (); return NULL; } return *i; } bool gamedata::init (string udir, string gdir, string gname, u_int8 qload) { DIR *dir; igzstream in; struct dirent *dirent; struct stat statbuf; gamedata *gdata; user_data_dir_ = udir; game_data_dir_ = gdir; game_name = gname; quick_load = qload; // try to change into data directory if (chdir (game_data_dir ().c_str ())) { fprintf (stderr, "Seems like %s is no valid data directory.\n", game_data_dir ().c_str ()); fprintf (stderr, "Please make sure that your Adonthell installation is correct.\n"); return false; } // Add the default savegame used to start a new game to the list of saves gdata = new gamedata (gdir, "Start New Game", "Day 0 - 00:00"); saves.push_back (gdata); // Read the user's saved games (if any) - they'll be located in // $HOME/.adonthell/ and called -save- if ((dir = opendir (user_data_dir ().c_str ())) != NULL) { while ((dirent = readdir (dir)) != NULL) { string filepath = user_data_dir () + "/"; filepath += dirent->d_name; string name_save = game_name + "-save-"; if (stat (filepath.c_str (), &statbuf) != -1 && S_ISDIR (statbuf.st_mode) && strncmp (name_save.c_str (), dirent->d_name, name_save.length ()) == 0) { // found a (possibly) valid saved game directory filepath += "/save.data"; // Now try to read the saved game's data record in.open (filepath); if (in.is_open ()) { // restore the pathname filepath = user_data_dir (); filepath += "/"; filepath += dirent->d_name; gdata = new gamedata; if (gdata->get (in)) { gdata->set_directory (filepath); saves.push_back (gdata); } else delete gdata; in.close (); } } } closedir (dir); } return true; } void gamedata::cleanup () { for (vector::iterator i = saves.begin (); i != saves.end (); i++) delete *i; saves.clear (); unload (); } void gamedata::unload () { // stop the music audio::fade_out_background (500); // delete all characters dictionary ::iterator itc; for (itc = data::characters.begin (); itc != data::characters.end (); itc++) { itc->second->remove_from_map (); delete itc->second; } data::characters.clear (); data::the_player = NULL; // delete all quests dictionary ::iterator itq; for (itq = data::quests.begin (); itq != data::quests.end (); itq++) delete itq->second; data::quests.clear (); } adonthell-0.3.8/src/map_event_handler.h0000644000175000017500000000404312756051063015036 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file map_event_handler.h * * @author Kai Sterker * @brief Declares the map_event_handler class. */ #ifndef MAP_EVENT_HANDLER_H__ #define MAP_EVENT_HANDLER_H__ #include #include "event_handler_base.h" using std::vector; /** * This class keeps track of map events, i.e. events that are raised * when a character enters or leaves a tile, or initiates an action. */ class map_event_handler : public event_handler_base { public: /** * Register a map %event with the %event handler. The %event * needs to be removed before it can be safely deleted. * * @param evnt Pointer to the %event to be registered. */ void register_event (event *evnt); /** * Removes the given %event from the %event handler. Once it is * no longer needed, it can be freed. * * @param evnt Pointer to the %event to be removed. */ void remove_event (event *evnt); /** * Raise one or more events in case the given 'trigger' matches. * Unless they need to be repeated, they are removed from the * %event-vector. * * @param evnt A map_event structure. */ void raise_event (const event *evnt); private: // storage for registered time events. vector Events; }; #endif // MAP_EVENT_HANDLER_H__ adonthell-0.3.8/src/win_background.cc0000644000175000017500000000742612756052607014532 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include #include "win_theme.h" #include "win_background.h" win_background::win_background() { wb_=NULL; init(); set_visible_background(false); set_brightness_background(false); set_trans_background(true); } win_background::win_background(win_base * wb) { wb_=wb; init(); set_visible_background(false); set_brightness_background(false); set_trans_background(true); } win_background::win_background(char *rep) { wb_=NULL; init(); set_visible_background(false); set_brightness_background(false); set_trans_background(true); win_background::load(rep); refresh(); } win_background::win_background(win_background & wb) { wb_=NULL; init(); set_visible_background(false); set_brightness_background(false); set_trans_background(true); *this=wb; refresh(); } win_background::~win_background() { destroy(); } void win_background::destroy() { if(background_template_) delete background_template_; if(background_) delete background_; if(background_brightness_) delete background_brightness_; init(); } void win_background::init() { background_template_=NULL; background_=NULL; background_brightness_=NULL; background_draw_=NULL; } win_background & win_background::operator=(win_background & wb) { destroy(); background_template_=new image(); *background_template_=*(wb.background_template_); background_=new image(); background_->set_mask(false); background_brightness_= new image(); background_brightness_->set_mask(true); update(); return *this; } void win_background::set_background(win_background & wb) { *this=wb; refresh(); } void win_background::set_background(win_theme & wt) { *this=*(wt.background); refresh(); } void win_background::set_brightness_background(bool b) { brightness_=b; refresh(); } void win_background::refresh() { background_draw_=(brightness_)? background_brightness_ : background_ ; } void win_background::load(char *rep) { destroy(); char path[255]; strcpy(path,WIN_DIRECTORY); strcat(path,WIN_BACKGROUND_DIRECTORY); strcat(path,rep); strcat(path,WIN_BACKGROUND_FILE); background_template_=new image(); background_template_->load_pnm(path);//new background_=new image(); background_->set_mask(true); background_brightness_=new image(); background_brightness_->set_mask(true); } void win_background::update() { if(!background_template_) return ; background_->resize(wb_->length(),wb_->height()); background_->tile(*background_template_); background_brightness_->brightness(*background_,WIN_BRIGHTNESS_LEVEL); } void win_background::draw(drawing_area * da) { if(!visible_ || !background_draw_ || !wb_) return; background_draw_->draw(wb_->real_x(),wb_->real_y(),da); } void win_background::set_trans_background(bool b) { if(!background_template_) return; if(b) { background_->set_alpha(130); background_brightness_->set_alpha(130); } else { background_->set_alpha(255); background_brightness_->set_alpha(255); } } adonthell-0.3.8/src/dialog_screen.h0000644000175000017500000000752412756050014014163 00000000000000/* (C) Copyright 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file dialog_screen.h * @author Kai Sterker * * @brief Declares the dialog_screen class. * * */ #ifndef DLG_ENGINE_H__ #define DLG_ENGINE_H__ #include "dialog.h" #include "window.h" #include "win_select.h" #include "win_theme.h" /** * Maximum number of colors used during a dialog. * */ #define MAX_COLOR 6 /** * Allows the running of dialogues through a nice interface. * */ class dialog_screen : public win_container { public: /** * Constructor. * * @param mynpc npc the player is talking with. * @param dlg_file dialogue file to use. * @param size if 1, use a large window, else a small one. * */ dialog_screen (character_base * mynpc, char * dlg_file, u_int8 size=1); /** * Destructor. * */ ~dialog_screen (); /** * Inits the dialogue engine (similar to a constructor call). * * @param mynpc npc the player is talking with. * @param dlg_file dialogue file to use. * @param size if 1, use a large window, else a small one. * */ void init(character_base *mynpc, char * dlg_file, u_int8 size=1); /** * Changes the displayed NPC portrait. * * @param new_portrait file name of the new portrait image to set. */ void set_portrait (const string & new_portrait); /** * Changes the displayed NPC name. * * @param char* new name of the npc. */ void set_name (const string & new_name); /** * Changes the whole NPC. * * @param char* the name of the new npc to use. */ void set_npc (const string & new_npc); /** * React to (keyboard) input. * * @return true if the dialog is still running, false otherwise. */ bool update (); /** * Execute one step of the dialogue. * */ void run (); #ifndef SWIG private: /** * 'Merges' a dialogue with the loaded one. * */ void insert_plugin (); /** * Callback when item is "activated". * */ void on_select (); /** * Widget holding NPC portrait. * */ win_image *face; /** * Widget holding NPC name. * */ win_label *name; /** * Window theme. * */ win_theme *theme; /** * Selection of possible answers. * */ win_select *sel; /** * As long as realtime coloring does not work. * */ win_font *fonts[MAX_COLOR]; /** * Answers currently available for selection. * */ vector cur_answers; /** * The Python/C interface for the dialogue. * */ dialog *dlg; /** * The selected dialogue option. * */ s_int32 answer; /** * Index of first selectible dialogue item. * */ u_int32 sel_start; /** * True as long as we don't want to quit. * */ bool is_running; /** * Image to display next to the NPC text * */ string portrait; #endif // SWIG }; #endif // DLG_ENGINE_H__ adonthell-0.3.8/src/map_event_handler.cc0000644000175000017500000000400712756051052015172 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file map_event_handler.cc * * @author Kai Sterker * @brief Implements the map_event_handler class. */ #include #include "map_event.h" #include "map_event_handler.h" // See whether a matching event is registered and execute the // according script(s) void map_event_handler::raise_event (const event* e) { // we have to iterate back to front as executing an event might // erase it from the vector. This invalidates any iterators pointing // _after_ the deleted element. for (vector::iterator i = Events.end (); i > Events.begin ();) { i--; // if the events match, execute them. Note that events that use up // their repeat count are deleted (and automatically unregistered). if ((*i)->equals (e)) if (!(*i)->execute (e)) delete *i; } return; } // Unregister an event void map_event_handler::remove_event (event *e) { vector::iterator i; // Search for the event we want to remove i = find (Events.begin (), Events.end (), e); // found? -> get rid of it :) if (i != Events.end ()) Events.erase (i); } // register an event with the handler void map_event_handler::register_event (event *e) { Events.push_back (e); } adonthell-0.3.8/src/event.h0000644000175000017500000002147612756050014012510 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event.h * @author Kai Sterker * * @brief Declares the %event class. * */ #ifndef EVENT_H__ #define EVENT_H__ #include "callback.h" #include "py_object.h" #include "py_callback.h" class event_list; /** * Directory where %event scripts reside. */ #define EVENTS_DIR "game_events." #ifndef SWIG /** * Available %event types. */ enum { ENTER_EVENT = 0, // Characters reach a new tile LEAVE_EVENT = 1, // Characters leave a tile TIME_EVENT = 2, // Certain point in gametime reached ACTION_EVENT = 3, // Character "acts" on a square MAX_EVENTS = 4 }; /** * Available 'actions', i.e. what happens when the event occurs */ enum { ACTION_NOTHING = 0, ACTION_SCRIPT = 1, ACTION_PYFUNC = 2, ACTION_CPPFUNC = 3 }; #endif // SWIG /** * Base class for events. You can create your own %event types that can * be handled by the event_list and event_handler by inheriting from * this class. * * Events are used to notify when certain things happen during the game. * They may either execute the "run" method of an exclusive %python script * or a simple %python callback defined elsewhere. */ class event { public: /** * Constructor. Needs to be called by any derived class! */ event (); /** * Destructor. */ virtual ~event (); /** * Cleanup. Clears script and its arguments. */ void clear (); /** * @name Member access */ //@{ /** * Get the event's type. * * @return type of the %event */ u_int8 type () const { return Type; } /** * Get the event's id. * * @return id of the %event. */ const string & id () const { return Id; } /** * Assign an id to the %event, so it may be retrieved from an * event_list later on, without having a pointer to it. * * @param id a string to identify the %event. */ void set_id (const string & id) { Id = id; } /** * Test whether the %event is registered with the %event handler. * * @return \c true if this is the case, \c false otherwise. */ bool registered () const { return Registered; } #ifndef SWIG /** * Set whether the %event is registered with the %event handler. * * @param reg Set to \c true if it is, to \c false otherwise. */ void set_registered (bool reg) { Registered = reg; } /** * Tell the whether it is kept in an %event_list. * * @param list The %event_list this event has been added to. */ void set_list (event_list *list); #endif // SWIG /** * Return whether this event should be repeated. * * @return the number of times this event should be repeated or * -1 in case it should be repeated unlimited times. */ s_int32 repeat () const { return Repeat; } /** * Set whether this event should be repeated. A number greater than 0 * will execute the event that many times, a number less than 0 will * repeat the event forever. A number equal to 0 won't repeat the event. * * @param count How often the event should be repeated. */ void set_repeat (s_int32 count) { Repeat = count; } //@} /** * @name Event Handling */ //@{ /** * Execute the associated python script or callback. * * @param evnt The %event that triggered the execution. * * @return The number of times the %event needs to be repeated. */ virtual s_int32 execute (const event* evnt) = 0; /** * Compare two events for equality. * * @param evnt pointer to the %event to compare with. * @return \e true if the events are equal, \e false otherwise. */ virtual bool equals (const event* evnt) = 0; //@} /** * Sets a script to be executed whenever the event occurs. * * @param filename filename of the script to set. * @param args The arguments to pass to the script's constructor */ void set_script (string filename, PyObject * args = NULL); /** * Sets a python function/method to be executed whenever the * %event occurs. * * @warning the callback won't be saved with the %event. It * must be restored by the event's owner. * * @param callback The function or method to call. * @param args Additional arguments to pass to the callback. */ void set_callback (PyObject *callback, PyObject *args = NULL); #ifndef SWIG /** * Sets a C function/C++ method to be executed whenever the * %event occurs. * * @warning the callback won't be saved with the %event. It * must be restored by the event's owner. * * @param callback The callback, a function with no arguments * returning void */ void set_callback (const Functor0 & callback); #endif // SWIG /** * @name Pausing / Resuming execution */ //@{ /** * Disable the %event temporarily. As long as it in this state, the * event will neither be executed, nor will its repeat-count change. * As long as the %event is paused, it will be removed from its * %event handler. */ virtual void pause (); /** * Re-enable an %event that has been paused. Re-registers it with * its %event handler. */ virtual void resume (); /** * Check whether the %event is temporarily disabled or not. * @return \b true if it is paused, \b false otherwise. */ bool is_paused () const { return Paused; } //@} /** * @name Loading / Saving */ //@{ /** * Saves the basic %event %data (such as the type or script data) * to a file. Call this method from the derived class. * * @param out file where to save the %event. */ virtual void put_state (ogzstream& out) const; /** * Loads the basic %event %date from a file. Call this method from * the derived class. * * @param in file to load the %event from. * @return \e true if the %event could be loaded, \e false otherwise */ virtual bool get_state (igzstream& in); //@} protected: #ifndef SWIG /** * Decrease the event's repeat count and return the number of repeats * left. If the repeat-count reaches 0, the %event will be destroyed. * * @return the number of times this event should be repeated or * -1 in case it should be repeated unlimited times. */ s_int32 do_repeat (); /** * @name Basic Event Data */ //@{ /** * Event type - see enum above. */ u_int8 Type; /** * (Optional) Id of the event */ string Id; /** * What happens if the event occurs - see enum above. */ u_int8 Action; /** * Whether the %event is registered with the %event handler. */ bool Registered; /** * Whether the %event temporarily disabled or not. */ bool Paused; /** * Defines how often the %event should be repeated. 0 means * never, -1 means infinitely and n (n > 0) means * exactly n times. */ s_int32 Repeat; /** * The Python script accociated with this %event. It is executed * whenever the %event gets triggered. */ py_object *Script; /** * The arguments passed to the script. This needs to be a PyTuple * or NULL if there are no arguments. */ PyObject *Args; /** * Python callback that may be executed instead of the script. */ py_callback *PyFunc; /** * C++ callback that may be executed when the %event gets triggered. */ Functor0 Callback; /** * The event_list this event is kept in. */ event_list *List; //@} #endif // SWIG }; #endif // EVENT_H__ adonthell-0.3.8/src/adonthell.h0000644000175000017500000001403712756046766013357 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file adonthell.h * * @author Alexandre Courbot * @author Kai Sterker * @brief Declares the adonthell class. */ #ifndef __ADONTHELL_H__ #define __ADONTHELL_H__ #include "win_mapview.h" /** * This is the heart of the Adonthell engine. All activities, * be it checking for user input, calculating a new %game state * and finally rendering a scene are done in the * \ref main_loop "main loop". * * This class works together closely with the * \ref win_manager "window manager" which provides the basic * GUI control methods and the \ref gametime class which is * responsible for synchronising Adonthell to the machine it * is running on. */ class adonthell { public: /** * Standard constructor */ adonthell (); /** * @name The engine's main loop * */ //@{ /** * Starts the main loop. Since having the mainloop running * without a window to display seems to make no sense, you'll * have to pass an inital window when starting the main loop. * This method can be called multiple times. Only those windows * belonging to the outermost main loop are updated and recieve * user input. However, all windows are drawn in correct order, * i.e. innermost first, outermost last. * * See the \ref win_manager "window manager" for more details. * * @param wnd The window to display initially * @param name A name for that window (currently unused) */ void main (win_base *wnd = NULL, const string name = ""); /** * The actual main loop. First, any user %input is processed, * then the new %game state is calculated and finally all * open (and visible) windows are rendered and displayed on * screen. This (currently) happens up to 50 times per second. */ void main_loop (); /** * Quit the main loop. This stops the outermost main loop * and closes all windows associated with that loop. It does * not delete them however. For that you'll have to call * win_manager::destroy (). */ void main_quit (); //@} /** * @name Fading * */ //@{ /** * Fades the screen to black */ void fade_out (); /** * Fades in from a black screen */ void fade_in (); //@} /** * @name Saving and Loading * */ //@{ /** * Restore the engine's state. Loads the previously displayed map, * it's state and the state of the mapview from mapengine.data. * * @param file The opened engine state file (mapengine.data). */ s_int8 get_state (igzstream& file); /** * Save the engine's state. Writes the current map w/ it's state * and the state of the mapview to mapengine.data. * * @param file The opened engine state file (mapengine.data). */ s_int8 put_state (ogzstream& file); //@} /** * @name Additional game control * */ //@{ /** * Returns whether the control script is active or not. * * @return * @li true if that is the case. * @li false otherwise. */ bool control_active () { return control_active_; } /** * Set whether the control script should be executed or * not. This script provides functionality that is not * directly related to contolling the main character, * like opening the main menu, the load or save screen, * etc. * * @param c Pass true to enable the control script, false * to disable it. */ void set_control_active (bool c) { control_active_ = c; } //@} /** * @todo move landmap handling somewhere else */ landmap *get_landmap () { return &lmap; } /** * @todo move landmap handling somewhere else */ bool update_map () { return update_map_; } /** * @todo move landmap handling somewhere else */ void set_update_map (bool u) { update_map_ = u; } /** * @todo move mapview handling somewhere else */ mapview *get_mapview () { return (mapview*) &view; } /** * @todo move mapview handling somewhere else */ void draw (s_int16 x, s_int16 y, drawing_area * da_opt = NULL, surface * target = NULL) { view.mapview::draw (x, y, da_opt, target); } /** * @todo move mapview handling somewhere else */ void set_mapview_schedule (string s, PyObject * args = NULL) { view.mapview::set_schedule (s, args); } /** * @todo move mapview handling somewhere else */ void mapview_start (); /** * @todo move mapview handling somewhere else */ void mapview_stop (); private: py_object control; // flag to indicate whether the control script is active or not bool control_active_; // flag to indicate whether to exit the main loop bool letsexit; // indicates whether the map should be updated or not bool update_map_; // the current map landmap lmap; // the current mapview win_mapview view; }; #ifndef SWIG namespace data { /** * Engine used during the game. * */ extern adonthell *engine; } #endif // SWIG #endif // __ADONTHELL_H__ adonthell-0.3.8/src/win_border.h0000644000175000017500000000375312756052664013534 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_BORDER_H_ #define WIN_BORDER_H_ #include #include "win_types.h" #include "image.h" class win_theme; class win_base; #define NB_BORDER_IMAGE 6 class win_border { public: win_border(); win_border(win_base * wb); win_border(win_border &); win_border(char *rep ,const char *size=WIN_BORDER_NORMAL_SIZE); ~win_border(); void load(char *,const char *); void update(); void destroy(); void draw(drawing_area * da); void set_visible_border(bool b){visible_border_=b;} void set_brightness_border(bool b); void set_border(win_border & ); void set_border(win_theme & wth, u_int8 size = win_border::NORMAL); void set_trans_border(bool b); u_int16 length_border(); u_int16 height_border(); #ifdef SWIG #define win_border_MINI 0 #define win_border_NORMAL 1 #else const static u_int8 MINI = 0; const static u_int8 NORMAL = 1; #endif private: void init(); void refresh(); win_border & operator=(win_border &); image * h_border_template_; image * v_border_template_; image * border_[NB_BORDER_IMAGE]; image * border_brightness_[NB_BORDER_IMAGE]; image ** border_draw_; bool visible_border_; bool brightness_; u_int8 trans_; win_base * wb_; }; #endif adonthell-0.3.8/src/yarg.h0000644000175000017500000000315612756053346012337 00000000000000/* (C) Copyright 1998/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file yarg.h * @author Kai Sterker * * @brief Yet Another Random Number Genarator. * * */ #include class yarg { public: static int get (int = 1); // Return next (nth) random number static void randomize (); // Mix with current time static void init (std::string, int = 0, int = 100);// Seed the generator static void range (int, int); // Change the range private: static void folgezustand (); // Calculate next state of register static int zufallszahl (); // Calculate the number from the register static unsigned char schieberegister[16];// Here the random numbers are created static int min; // Smallest possible numbe static int max; // Largest possible number }; adonthell-0.3.8/src/win_font.h0000644000175000017500000000303512756052754013216 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_FONT_H_ #define _WIN_FONT_H_ #include #include #include #include "str_hash.h" #include "win_types.h" #include "image.h" using namespace std; class win_font{ protected: void erase(); hash_map glyphs; u_int8 height_; u_int8 length_; //just for space bar public: win_font(char *); win_font(win_font &); win_font(); virtual ~win_font(); void load(char *); // void load_font(char *); virtual bool in_table(u_int16 tmp); virtual image & operator[](u_int16); virtual s_int8 kerning(const u_int16 & char1, const u_int16 & char2) { return 0; } //win_font & operator=(win_font &); u_int16 height(){return height_;} u_int16 length(){return length_;} image * cursor; }; #endif adonthell-0.3.8/src/screen.cc0000644000175000017500000002356713412146050013003 00000000000000/* Copyright (C) 1999/2000/2001/2004 Alexandre Courbot Copyright (C) 2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file screen.cc * @author Alexandre Courbot * @author Kai Sterker * * @brief Defines the screen class. * * */ #include #include "screen.h" #include "game.h" #include #include #include using namespace std; #if !defined(HAVE_DECL_SDL_WINDOW_ALLOW_HIGHDPI) || HAVE_DECL_SDL_WINDOW_ALLOW_HIGHDPI == 0 #define SDL_WINDOW_ALLOW_HIGHDPI 0 #endif #ifndef HAVE_SDL_GETDISPLAYUSABLEBOUNDS #define SDL_GetDisplayUsableBounds SDL_GetDisplayBounds #endif surface screen::display; u_int8 screen::bytes_per_pixel_ = 0; u_int32 screen::trans = 0; SDL_Window *screen::Window = NULL; SDL_Renderer *screen::Renderer = NULL; u_int8 screen::mode_ = 0; u_int8 screen::scale_; SDL_Rect screen::clip_rect_ = {}; SDL_DisplayMode screen::fullscreen_mode = {}; void screen::cleanup() { if (Renderer) SDL_DestroyRenderer(Renderer); if (Window) SDL_DestroyWindow(Window); Renderer = NULL; Window = NULL; } bool screen::init (u_int16 nl, u_int16 nh, u_int8 depth, const config & myconfig) { u_int8 screen = myconfig.display; u_int8 screen_mode = myconfig.screen_mode; #if defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_WAYLAND) static std::string wm_class = "SDL_VIDEO_X11_WMCLASS=" + myconfig.game_name; putenv ((char *) wm_class.c_str ()); #endif #if defined(SDL_HINT_RENDER_BATCHING) SDL_SetHint (SDL_HINT_RENDER_BATCHING, "1"); #endif if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER) < 0) { std::cout << "Couldn't init SDL: " << SDL_GetError () << std::endl; return false; } SDL_SetHint (SDL_HINT_RENDER_SCALE_QUALITY, "nearest"); int availableDisplays = SDL_GetNumVideoDisplays(); if (availableDisplays < 1) { std::cout << "Couldn't init screen: " << SDL_GetError () << std::endl; return false; } if (screen >= availableDisplays) { // if the requested display does not exist, pick the first one screen = 0; } if (screen_mode > 2) { // if the requested screen mode is invalid, fallback to window mode screen_mode = 0; } mode_ = screen_mode; scale_ = get_scale_for_display(screen, nl, nh); // set window flags unsigned int flags = SDL_WINDOW_ALLOW_HIGHDPI; switch (screen_mode) { case 1: { flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; break; } case 2: { flags |= SDL_WINDOW_FULLSCREEN; break; } } memset(&fullscreen_mode, 0, sizeof(SDL_DisplayMode)); fullscreen_mode.format = SDL_PIXELFORMAT_RGB888; nl *= scale_; nh *= scale_; SDL_ShowCursor(SDL_DISABLE); Window = SDL_CreateWindow ("Adonthell", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, nl, nh, flags); if (!Window) { std::cout << "Failed creating window: " << SDL_GetError() << std::endl; return false; } #ifdef WIN32 const string icon_name = game::find_file("gfx/icon32.bmp"); if (!icon_name.empty()) { SDL_Surface* icon = SDL_LoadBMP(icon_name.c_str()); if (icon != NULL) { SDL_SetWindowIcon(Window, icon); SDL_FreeSurface(icon); } } #endif if (SDL_SetWindowDisplayMode(Window, &fullscreen_mode) < 0) { std::cout << "Failed setting display mode: " << SDL_GetError() << std::endl; return false; } SDL_ShowWindow(Window); Renderer = SDL_CreateRenderer(Window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (!Renderer) { std::cout << "Failed creating accelerated renderer: " << SDL_GetError() << std::endl; Renderer = SDL_CreateRenderer(Window, -1, SDL_RENDERER_SOFTWARE); if (!Renderer) { std::cout << "Failed creating renderer: " << SDL_GetError() << std::endl; return false; } } display.set_length(nl/scale_); display.set_height(nh/scale_); // check if we have a HIGH_DPI window, in which case we need to update our scale update_scale(); // Setting up transparency color trans = display.map_color(255, 0, 255, SDL_ALPHA_OPAQUE); return true; } string screen::info () { SDL_version version_info; SDL_RendererInfo render_info; std::ostringstream temp; SDL_GetVersion(&version_info); if (Renderer) { SDL_GetRendererInfo(Renderer, &render_info); } else { render_info.name = "not yet initialized"; render_info.flags = 0; } temp << "Video information: " << std::endl << "Platform: " << SDL_GetPlatform() << std::endl << "Version: " << "SDL " <<(int) version_info.major << "." << (int) version_info.minor << "." << (int) version_info.patch << " " << SDL_GetRevision() << std::endl << "Video driver used: " << SDL_GetCurrentVideoDriver() << std::endl << "Renderer used: " << render_info.name << std::endl << "HW Accelerated: " << ((render_info.flags & SDL_RENDERER_ACCELERATED) == SDL_RENDERER_ACCELERATED ? "Yes" : "No") << std::endl << "Display Format: " << SDL_GetPixelFormatName (format()) << std::endl << "Screen Size " << (int)length()*scale() << "x" << (int)height()*scale() << std::endl << "Fullscreen: " << (mode() ? "Yes" : "No") << std::endl << std::ends; return temp.str (); } #ifdef DEBUG static const char* get_mode_str(const u_int8 & m) { switch(m) { case 0: return "window"; case 1: return "letterbox"; case 2: return "fullscreen"; default: return "unknown"; } } #endif bool screen::set_fullscreen (const u_int8 & m) { bool r = false; if (mode_ != m) { #ifdef DEBUG std::cout << "Switching from " << get_mode_str(mode_) << " to " << get_mode_str(m) << std::endl; #endif if (mode_ != 0) { r = SDL_SetWindowFullscreen(Window, SDL_FALSE) == 0; if (!r) { std::cout << "Failed to leave fullscreen mode: " << SDL_GetError() << std::endl; return false; } } // update mode before getting new scale mode_ = m; u_int8 screen = SDL_GetWindowDisplayIndex(Window); u_int8 new_scale = get_scale_for_display(screen, length(), height()); if (new_scale != scale()) { #ifdef DEBUG std::cout << "Scale changed from " << (int)scale_ << " to " << (int)new_scale << std::endl; #endif SDL_SetWindowSize(Window, length()*new_scale, height()*new_scale); } switch(mode_) { case 0: { SDL_SetWindowPosition(Window, SDL_WINDOWPOS_CENTERED_DISPLAY(screen), SDL_WINDOWPOS_CENTERED_DISPLAY(screen)); break; } case 1: { r = SDL_SetWindowFullscreen(Window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0; break; } case 2: { SDL_Rect bounds; SDL_GetDisplayBounds(screen, &bounds); SDL_SetWindowPosition(Window, bounds.x, bounds.y); r = SDL_SetWindowFullscreen(Window, SDL_WINDOW_FULLSCREEN) == 0; break; } } if (r) { update_scale(); } else { std::cout << "Failed to enter fullscreen mode: " << SDL_GetError() << std::endl; } return r; } return false; } u_int8 screen::get_scale_for_display(u_int8 screen, u_int16 nl, u_int16 nh) { SDL_Rect bounds; switch (mode_) { case 0: { // window mode SDL_Delay(250); SDL_GetDisplayUsableBounds(screen, &bounds); break; } case 1: { // letterbox mode with aspect ratio preserved SDL_GetDisplayBounds(screen, &bounds); break; } case 2: { bounds.x = 0; bounds.y = 0; bounds.w = nl * 2; bounds.h = nh * 2; // fullscreen mode at highest supported multiple of 320x240 const int num_modes = SDL_GetNumDisplayModes(screen); SDL_DisplayMode mode; for (int i = 0; i < num_modes; ++i) { if (SDL_GetDisplayMode(screen, i, &mode) > -1) { if (mode.w % nl == 0 && mode.h % nh == 0) { bounds.w = mode.w; bounds.h = mode.h; break; } } } break; } } int scale_x = bounds.w / nl; int scale_y = bounds.h / nh; return std::max(1, scale_x > scale_y ? scale_y : scale_x); } void screen::update_scale() { int w, h; if (SDL_GetRendererOutputSize(Renderer, &w, &h) == 0) { int scale_x = w / length(); int scale_y = h / height(); scale_ = scale_x > scale_y ? scale_y : scale_x; } if (mode_ == 1) { // center viewport in letterbox mode clip_rect_.x = (w - length() * scale_) / 2; clip_rect_.y = (h - height() * scale_) / 2; clip_rect_.w = length() * scale_; clip_rect_.h = height() * scale_; SDL_RenderSetClipRect(Renderer, &clip_rect_); } else { // no rendering offset required when running in window or fullscreen modes clip_rect_.x = 0; clip_rect_.y = 0; clip_rect_.w = length() * scale_; clip_rect_.h = height() * scale_; SDL_RenderSetClipRect(Renderer, NULL); } #ifdef DEBUG std::cout << "Mode = " << get_mode_str(mode_) << ", X = " << offset_x() << ", Y = " << offset_y() << ", Width = " << w << ", Height = " << h << ", Scale = " << (int) (scale_) << std::endl; #endif } void screen::transition (u_int16 i) { display.fillrect (0, 0, i, screen::height (), 0); display.fillrect (screen::length () - i, 0, i, screen::height (), 0); display.fillrect (0, 0, screen::length (), i, 0); display.fillrect (0, screen::height () - i, screen::length (), i, 0); } adonthell-0.3.8/src/game.h0000644000175000017500000001042312756050104012266 00000000000000/* Copyright (C) 1999/2000/2001 Kai Sterker Copyright (C) 2002 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file game.h * @author Kai Sterker * @author Alexandre Courbot * * @brief Declares the game class. * * */ #ifndef GAME_H__ #define GAME_H__ #include #include "types.h" #ifndef SWIG using std::string; #endif typedef enum { CONFIG, USER_DATA } sys_dir_type; /** * Holds information about global settings. * * This static class should be the first to be initialised in your application, * because many others depends on it's correct settings. * */ class game { public: static string User_data_dir; static string Global_data_dir; static string Game_data_dir; /** * Initialise the game framework. * * @param game_dir Global data directory. */ static void init (string game_dir); /** * Specify an additional data directory containing game data. * * @param game_dir Game data directory. */ static void set_game_data_dir (string game_dir); /** * Returns the absolute path to the user data directory (usually ~/.adonthell). * * * @return user data directory */ static string user_data_dir () { return User_data_dir; } /** * Returns the absolute path to the global data directory. * * * @return global data directory */ static string global_data_dir () { return Global_data_dir; } /** * Returns the absolute path to the current game's directory (if any). * * * @return current game data directory, or empty string if none set. */ static string game_data_dir () { return Game_data_dir; } /** * Finds a file in the directories hierarchy, starting searching from * game_data_dir(), then global_data_dir() and finally user_data_dir(). * * If a matching file is found, the full absolute path is returned, else * an empty string "" is returned. If the path was already absolute, it is * returned immediatly. * * @param fname name of the find to search for. * * @return complete absolute path to the file if found, passed string if the given * path was already absolute, or "" if the file wasn't found. */ static string find_file (const string & fname); /** * Finds a directory in the directories hierarchy, starting searching from * game_data_dir(), then global_data_dir() and finally user_data_dir(). * * If a matching directory is found, the full absolute path is returned, else * an empty string "" is returned. If the path was already absolute, it is * returned immediatly. * * @param fname name of the find to search for. * * @return complete absolute path to the directory if found, passed string if the given * path was already absolute, or "" if the directory wasn't found. */ static string find_directory (const string & dirname); #ifndef SWIG /** * Return the OS-specific directory of the given type. If the directory does * not yet exist, it is also created. * * @param type Either CONFIG or USER_DATA * * @return appropriate system directory for the current user. */ static string get_system_dir(const sys_dir_type & type); private: static bool directory_exist (const string & dirname); static bool file_exist (const string & fname); #endif }; #endif // GAME_H__ adonthell-0.3.8/src/win_select.h0000644000175000017500000001120012756053151013510 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_SELECT_H_ #define _WIN_SELECT_H_ #include "win_scroll.h" class win_select : public win_scroll { public: win_select(); bool input_update(); void add(win_base * w); void remove(win_base * w); void remove_all(); void set_mode(const u_int8 mode){mode_ = mode;} void set_border_select(win_border * border){border_select_ = border;} void set_circle(const bool b) {circle_ = b;} bool is_circle(){return circle_;} void set_default(); void set_default_object(const win_base * wb); void set_default_position(const u_int16 pos); void set_pos( const u_int8 pos) {win_scroll::set_pos(pos);finish_scroll_ = true;} bool update(); win_base * get_selected_object(); u_int16 get_selected_position(); static const u_int8 MODE_BORDER = 0; static const u_int8 MODE_BRIGHTNESS = 1; protected: void rules(const bool b, win_base * wb); void update_cur_select_position(); void next(); void previous(); void activate(); u_int8 mode_; bool circle_; bool finish_scroll_; win_border * border_select_; lwb::iterator cur_select_; }; /* class win_base; class win_theme; class win_container; class win_scrolled; class win_select : public win_scrolled { protected: #ifndef SWIG //index of the current object which is selected list::iterator index_list; //to show the selected object if isn't visible in the select void update_position(); //mode to select u_int8 mode_selected_; //type of the select method u_int8 type_selected_; //if this select has a father win_select * fatherselect_; bool select_circle_; //current win_select activate static win_select * curselect_; void next_(); void previous_(); static bool activate_keyboard_; virtual void on_next(); virtual void on_previous(); //use this function to activate the object see win_base.h void on_activate(); bool activate___(); void set_select_object(win_base*,bool b); #endif public: win_select(s_int16 tx,s_int16 ty,u_int16 tl,u_int16 th,win_theme * wth); ~win_select(); //Add object void add(win_base *); void add(win_select *); //remove void remove(win_base *); void remove_all(); void destroy(); bool update(); //get the pointer of the object which is selected win_base * get(); //get the position of the object which is selected u_int16 get_pos(); //set the default object void set_default(win_base * wb); void set_default(u_int16 ); //set the default object with a number, 1 is the first object 2 is the ..... void set_default(); //set the first object which can be selected void set_can_be_selected_all(bool);//set to b all the element which are in the select void set_type(u_int8); //set type of the select, WIN_SELECT_TYPE_NORMAL,WIN_SELECT_TYPE_SCROLL, default is normal u_int8 type() {return type_selected_;} //set the mode of the selection WIN_SELECT_MODE_BRIGHTNESS, WIN_SELECT_MODE_BORDER, cursor not implemented void set_select_mode(u_int8); void set_select_circle(bool b){select_circle_=b;} bool is_select_circle(){return select_circle_;} //next object static void next(); //previous object static void previous(); //set the curselect static void set_cur_select(win_select * ws); //return a the father select static bool back(); //activate the object static void activate(); static void set_activate_keyboard(bool b){activate_keyboard_=b;} static bool is_activate_keyboard(){return activate_keyboard_;} //set the curselect to NULL, needed if you want clean select static void init(); IMPORTANT you can with win_select browse a tree of selection, if you want to return at the last node call the back function, or if you want to go at a node you have selected just call the on_activate_function static s_int32 next_key; static s_int32 previous_key; static s_int32 activate_key; static s_int32 back_key; }; */ #endif adonthell-0.3.8/src/win_theme.cc0000644000175000017500000000346512756053161013510 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_theme.h" win_theme::win_theme() { normal = NULL; mini = NULL; background = NULL; scrollbar = NULL; } win_theme::win_theme(char * theme) { string strtheme = string (theme) + "/"; normal=new win_border((char *) strtheme.c_str(), WIN_BORDER_NORMAL_SIZE); mini=new win_border((char *) strtheme.c_str(), WIN_BORDER_MINI_SIZE); background=new win_background((char *) strtheme.c_str() ); scrollbar=new win_scrollbar((char *) strtheme.c_str() ); } win_theme::win_theme(win_theme & th) { normal=NULL; mini=NULL; background=NULL; scrollbar=NULL; *this=th; } win_theme::~win_theme() { destroy(); } win_theme & win_theme::operator=(win_theme & th) { destroy(); normal = new win_border(*(th.normal)); mini = new win_border(*(th.mini)); background = new win_background(*(th.background)); scrollbar=new win_scrollbar(*(th.scrollbar)); return *this; } void win_theme::destroy() { if(normal)delete normal; if(mini) delete mini; if(background) delete background; if(scrollbar) delete scrollbar; } adonthell-0.3.8/src/win_keys.cc0000644000175000017500000000204412756052775013363 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_keys.h" SDL_Keycode win_keys::KEY_ACTIVATE_ENTRY = SDLK_RETURN; SDL_Keycode win_keys::KEY_UP = SDLK_PAGEUP; SDL_Keycode win_keys::KEY_DOWN = SDLK_PAGEDOWN; SDL_Keycode win_keys::KEY_PREVIOUS = SDLK_UP; SDL_Keycode win_keys::KEY_NEXT = SDLK_DOWN; SDL_Keycode win_keys::KEY_ACTIVATE = SDLK_SPACE; adonthell-0.3.8/src/adonthell.cc0000644000175000017500000001164412756046735013512 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file adonthell.cc * * @author Alexandre Courbot * @author Kai Sterker * @brief Implements the adonthell class. */ #include "win_manager.h" #include "gametime.h" #include "gamedate.h" #include "adonthell.h" #include "audio.h" // Pointer to the active main loop adonthell *data::engine = NULL; // constructor adonthell::adonthell () { letsexit = false; update_map_ = false; control_active_ = false; // load the script taking care of additional game commands control.create_instance ("schedules.control", "control"); } // start and execute the game's main loop void adonthell::main (win_base *wnd, const string name) { win_manager mgr; if (wnd != NULL) { mgr.add (wnd /*, name */); mgr.set_focus (wnd); } else { mapview_start (); set_control_active (true); fade_in (); } while (letsexit == false) { main_loop (); // blit the surface to the physical screen screen::show (); // perform operations to keep the game's speed constant gametime::update (); // update the internal clock gamedate::update (); } // only leave one main loop at a time letsexit = false; } // the main loop void adonthell::main_loop () { input::update (); // check whether music has finished playing if (audio::is_background_finished ()) audio::run_schedule (); // on slower machines, we update several times before drawing, // i.e. we are skipping frames to keep the game's speed constant for (int i = 0; i < gametime::frames_to_skip (); i++) { // grab any user input and update the internal state of // all windows of the current level win_manager::active->input_update (); if (update_map ()) lmap.update (); win_manager::active->update (); if (control_active ()) control.run (); } if (!letsexit) { // first clear the screen to avoid artifacts screen::clear (); // draw everything to our display surface win_manager::active->draw (); } } // quit the main loop void adonthell::main_quit () { letsexit = true; } // fade the screen out void adonthell::fade_out () { s_int16 i = 0; while (i < 60) { gametime::update (); i += gametime::frames_to_skip () * 2; if (i > 60) i = 60; main_loop (); screen::transition (i * 2); screen::show (); } } // fade the screen in void adonthell::fade_in () { s_int16 i = 60; while (i > 0) { gametime::update (); i -= gametime::frames_to_skip () * 2; if (i < 0) i = 0; main_loop (); if (letsexit) { // if we're fading in while a window is closing // ensure that everything is rendered properly screen::clear (); win_manager::active->draw (); } screen::transition (i * 2); screen::show (); } } // load the engine state s_int8 adonthell::get_state (igzstream& file) { string name; // get the current time gamedate::get_state (file); // Get the map filename name << file; // Load the map from the file lmap.get (file); // Load the map state (events) if (!lmap.get_state (file)) return false; view.mapview::attach_map (&lmap); // Load the mapview state view.mapview::get_state (file); view.pack (); return true; } // save the engine state s_int8 adonthell::put_state (ogzstream& file) { // save the current time gamedate::put_state (file); // Save the map filename string name = lmap.filename (); name >> file; // Save the map itself lmap.put (file); // Save the map state (events) lmap.put_state (file); // Save the mapview state view.mapview::put_state (file); return 0; } void adonthell::mapview_start () { set_update_map (true); view.mapview::resize (screen::length (), screen::height ()); view.mapview::attach_map (&lmap); view.set_visible (true); view.pack (); win_manager::active->add (&view); } void adonthell::mapview_stop () { set_update_map (false); view.mapview::detach_map (); win_manager::active->remove (&view); } adonthell-0.3.8/src/win_background.h0000644000175000017500000000325312756052620014361 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_BACKGROUND_H_ #define WIN_BACKGROUND_H_ class win_theme; class win_base; #include "image.h" #include "win_types.h" class win_background { public: win_background(); win_background(win_base *); win_background(win_background &); win_background(char * rep); ~win_background(); void load(char *); void update(); void destroy(); void draw(drawing_area * da =NULL); void set_visible_background(bool b){visible_=b;} void set_background(win_background &); void set_background(win_theme & wt); void set_brightness_background(bool b); void set_trans_background(bool b);//{trans_=b;} private: win_background & operator=(win_background & wb); void refresh(); void init(); image * background_template_; image * background_; image * background_brightness_; image * background_draw_; win_base * wb_; bool visible_; bool brightness_; bool trans_; }; #endif adonthell-0.3.8/src/audio.h0000644000175000017500000000715512756047263012502 00000000000000/* Copyright (C) 2000 Andrew Henderson Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef __AUDIO_H__ #define __AUDIO_H__ #include #include "prefs.h" #include "py_object.h" // #include "audio_loop.h" // We'll only load five waves into memory #define NUM_WAVES 5 // We'll only load three .ogg files into memory #define NUM_MUSIC 3 // We can play four SFX at once #define NUM_CHANNELS 4 class audio { public: static void init(config*); static void cleanup(void); // state saving/loading static s_int8 put_state (ogzstream& file); static s_int8 get_state (igzstream& file); // Background Music functions: // Use these to load/unload background music static int load_background(int slot, char *filename); static void unload_background(int slot); // All input is clamped from 0 to 100 static void set_background_volume(int); // Use only when music is loaded static void pause_music(void); static void unpause_music(void); // Use these to load/unload wave files static int load_wave(int slot, char *filename); static void unload_wave(int slot); // Used to just start sounds playing static void play_wave(int channel, int slot); static void play_background(int slot); // Fade in and fade out background music (time in ms) // Fadeout unselects current tune when done static void fade_in_background(int slot, int time); static void fade_out_background(int time); // Temporary convience function to change background static void change_background(int slot, int time); static bool is_initialized () { return audio_initialized; } static bool is_schedule_activated () { return schedule_active; } static bool is_background_finished () { return !Mix_PlayingMusic (); } static void set_schedule_active (bool a) { schedule_active = a; } static void set_schedule (string file, PyObject * args = NULL); static void run_schedule (); #ifdef OGG_MUSIC // static loop_info *loop[NUM_MUSIC]; // static int get_loop_start() { return loop[current_background]->start; } // static int get_loop_end() { return loop[current_background]->end; } // static int get_start_page_pcm() { return loop[current_background]->start_page_pcm; } // static int get_start_page_raw() { return loop[current_background]->start_page_raw; } // static OggVorbis_File* get_vorbisfile(); #endif private: #ifndef SWIG static bool schedule_active; static bool audio_initialized; static int background_volume; static int effects_volume; static Mix_Music *music[NUM_MUSIC]; static string music_file[NUM_MUSIC]; static Mix_Chunk *sounds[NUM_WAVES]; static int current_background; static int last_background; static bool background_paused; static int audio_rate; static Uint16 buffer_size; static Uint16 audio_format; static int audio_channels; static py_object schedule; static PyObject *schedule_args; #endif }; #endif adonthell-0.3.8/src/character_base.h0000644000175000017500000000744512756050014014315 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file character_base.h * @author Kai Sterker * * @brief Declares the character_base class. * * */ #ifndef CHARACTER_BASE_H_ #define CHARACTER_BASE_H_ /** * Where dialogs are located in the data tree. * */ #define DIALOG_DIR "dialogues/" #include "storage.h" #include "fileops.h" /** * Race enumeration. * */ enum { DWARF = 0, ELF = 1, HALFELF = 2, HUMAN = 3 }; /** * Gender enumeration. * */ enum { FEMALE = 0, MALE = 1 }; /** * Type enumeration. * */ enum { NPC = 0, PLAYER = 1, PARTY = 2 }; /** * Base character class containing attributes and dialog stuff. * */ class character_base : public storage { public: /** * Default constructor. * */ character_base (); /** * Destructor. * */ ~character_base (); /** * Returns the name of the %character. * * @return the name of the %character. */ string get_name () const { return name; } /** * Returns an unique identifier of the %character. * * @return * @li Player for the player controlled %character * @li the %character's name otherwise. */ string get_id () { if (get_val ("type") == PLAYER) return "Player"; else return name; } /** * Sets the name of the %character. * * @param newname name of the %character. */ void set_name (string newname); /** * Returns the color representing the %character. * * @return the color representing the %character. */ u_int32 get_color() const { return color; } /** * Sets the color representing the %character. * * @param c new color representing the %character. */ void set_color (int c) { color = c; } /** * Returns the current portrait of the %character. * * @return the current portrait of the %character. */ string get_portrait() const { return portrait; } /** * Sets the current portrait of the %character. * * @param fname filename of the new portrait to use. */ void set_portrait (string fname) { portrait = fname; } /** * Return the file name of the current %character's dialog. * * @return file name of the dialog currently assigned to this %character. */ string get_dialogue () const { return dialogue; } /** * Sets the dialogue of the %character. * * @param dialogue new %character's dialog. */ void set_dialogue (string dialogue); /** * Loads the state (attributes) of the %character from an opened file. * * @param in file from which to read. */ void get_state (igzstream& in); /** * Saves the state (ttributes) of the %character into an opened file. * * @param out file where to save. */ void put_state (ogzstream& out); private: string name; string dialogue; string portrait; u_int32 color; }; #endif adonthell-0.3.8/src/py_callback.cc0000644000175000017500000001022412756051644013770 00000000000000/* Copyright (C) 2001/2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file py_callback.cc * @author Kai Sterker * * @brief Defines the py_callback class. * * */ #include "py_callback.h" #include "python_class.h" // 'hack' to aid restoring of callbacks from file PyObject *py_callback::instance = NULL; // default constructor py_callback::py_callback () { function = NULL; arguments = NULL; } // preferred constructor py_callback::py_callback (PyObject *func, PyObject *args) { function = func; arguments = args == Py_None ? NULL : args; Py_XINCREF (function); Py_XINCREF (arguments); } // dtor py_callback::~py_callback () { Py_XDECREF (function); Py_XDECREF (arguments); } // calls the python function without argument void py_callback::callback_func0 () { PyObject *py_arg = arguments ? Py_BuildValue ("(O)",arguments) : NULL; PyObject* val = make_call (py_arg); Py_XDECREF (val); } // calls the python function returning a boolean bool py_callback::callback_func0ret () { int retval = 1; PyObject *py_arg = arguments ? Py_BuildValue ("(O)",arguments) : NULL; PyObject* val = make_call (py_arg); if (val) retval = PyInt_AsLong (val); Py_XDECREF (val); return retval != 0; } // calls the python function with an integer as argument void py_callback::callback_func1 (int arg) { PyObject *py_arg; if (arguments) py_arg = Py_BuildValue ("(i,O)", arg, arguments); else py_arg = Py_BuildValue ("(i)", arg); PyObject * val = make_call (py_arg); Py_XDECREF (val); } // save callback to a file void py_callback::put_state (ogzstream & file) const { std::string name = ""; // get name of callback function if (function) { PyObject *p_name = PyObject_GetAttrString (function, "__name__"); if (PyString_Check (p_name)) name = python::as_string (p_name); else fprintf (stderr, "*** error: py_callback::put_state: Failed to retrieve callback name!"); // cleanup Py_XDECREF (p_name); } name >> file; // NOTE: extra arguments need to be a tuple containing only ints or strings. if (arguments != NULL) { true >> file; python::put_tuple (arguments, file); } else false >> file; } // restore callback from a file bool py_callback::get_state (igzstream & file) { std::string name; bool has_args; name << file; has_args << file; // load arguments. No need to INCREF as get_tuple returns new instance. if (has_args) arguments = python::get_tuple (file); // check that we have a valid instance that contains our callback if (instance == NULL) { fprintf (stderr, "*** error: py_callback::get_state: Invalid instance!\n"); return false; } // get our callback from the class or module. No need to INCREF // as GetAttrString returns a new instance. function = PyObject_GetAttrString (instance, (char *) name.c_str ()); // sanity check if (!PyCallable_Check (function)) { fprintf (stderr, "*** error: py_callback::get_state: Setting callback '%s' failed!\n", name.c_str ()); return false; } return true; } // the actual python callback call PyObject *py_callback::make_call (PyObject *args) { if (function == NULL) return NULL; PyObject * val = PyObject_CallObject (function, args); Py_XDECREF (args); #ifdef PY_DEBUG python::show_traceback (); #endif return val; } adonthell-0.3.8/src/types.h0000644000175000017500000000303212756052572012532 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot. Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** @file types.h * @author Alexandre Courbot * @brief Declares some basic types. */ #ifndef TYPES_H__ #define TYPES_H__ #include // We should put ifdefs here to put the correct int values accordingly to the system type /// 8 bits long unsigned integer #define u_int8 unsigned char /// 16 bits long unsigned integer #define u_int16 unsigned short /// 32 bits long unsigned integer #define u_int32 unsigned int /// 8 bits long signed integer #define s_int8 signed char /// 16 bits long signed integer #define s_int16 signed short /// 32 bits long signed integer #define s_int32 signed int /* typedef Uint8 u_int8; typedef Uint16 u_int16; typedef Uint32 u_int32; typedef Sint8 s_int8; typedef Sint16 s_int16; typedef Sint32 s_int32; */ #endif adonthell-0.3.8/src/time_event_handler.cc0000644000175000017500000000463512756052515015367 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file time_event_handler.cc * * @author Kai Sterker * @brief Implements the time_event_handler class. */ #include #include "gamedate.h" #include "time_event.h" #include "time_event_handler.h" // See whether a matching event is registered and execute the // according script(s) void time_event_handler::raise_event (const event * e) { s_int32 repeat; event *evt; // As long as matching events are in the list while (!Events.empty () && Events.front ()->equals (e)) { evt = Events.front (); // we remove the event in any case, as it needs to be // re-registered at a new position if it repeats Events.erase (Events.begin ()); evt->set_registered (false); // events that don't repeat are destroyed automatically repeat = evt->execute (e); // re-register event if it needs be repeated if (repeat) register_event (evt); else delete evt; } return; } // Unregister an event void time_event_handler::remove_event (event *e) { vector::iterator i; // Search for the event we want to remove i = find (Events.begin (), Events.end (), e); // found? -> get rid of it :) if (i != Events.end ()) Events.erase (i); } // register an event with the handler void time_event_handler::register_event (event *e) { vector::iterator i = Events.begin (); // search for the proper place to insert new event while (i != Events.end ()) { // skip events that are raised earlier than e if (((time_event *) e)->time () <= ((time_event *) (*i))->time ()) break; i++; } Events.insert (i, e); } adonthell-0.3.8/src/win_mapview.h0000644000175000017500000000157012756053047013716 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_MAPVIEW_H_ #define WIN_MAPVIEW_H_ #include "win_object.h" #include "mapview.h" typedef win_object win_mapview; #endif adonthell-0.3.8/src/mapobject.cc0000644000175000017500000001040012756051260013456 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapobject.cc * * @author Alexandre Courbot * @brief Defines the mapobject class. */ #include "mapobject.h" using namespace std; // Public methods. mapobject::mapobject () : mapsquare_walkable_area () { clear (); } mapobject::~mapobject () { clear (); } void mapobject::clear () { vector ::iterator i; for (i = anim.begin (); i != anim.end (); i++) delete (*i); anim.clear (); mapsquare_walkable_area::clear (); } bool mapobject::update () { vector ::iterator i; for (i = anim.begin (); i != anim.end (); i++) (*i)->update (); return true; } void mapobject::draw (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target) const { vector ::iterator i; for (i = anim.begin (); i != anim.end (); i++) (*i)->draw (x, y, da_opt, target); } void mapobject::draw_from_base (s_int16 x, s_int16 y, const drawing_area * da_opt, surface * target) const { draw (x - base_x () * MAPSQUARE_SIZE, y - base_y () * MAPSQUARE_SIZE, da_opt, target); } s_int8 mapobject::get (igzstream & file) { u_int16 i; u_int16 nbr_of_parts; if (!fileops::get_version (file, 1, 1, "")) return -1; // Clear everything. clear (); // Read all the animations. nbr_of_parts << file; for (i = 0; i < nbr_of_parts; i++) { anim.push_back (new animation); anim.back ()->get (file); anim.back ()->play (); } mapsquare_walkable_area::get (file); return 0; } s_int8 mapobject::load (string fname) { igzstream file; s_int8 retvalue = -1; string fdef = MAPOBJECTS_DIR; fdef += fname; file.open (fdef); if (!file.is_open ()) return -1; retvalue = get (file); file.close (); return retvalue; } s_int8 mapobject::put (ogzstream & file) const { u_int16 i; fileops::put_version (file, 1); // Write all the animations. nbr_of_animations () >> file; for (i = 0; i < nbr_of_animations (); i++) { anim[i]->put (file); } mapsquare_walkable_area::put (file); return 0; } s_int8 mapobject::save (string fname) const { ogzstream file; s_int8 retvalue = -1; string fdef = MAPOBJECTS_DIR; fdef += fname; file.open (fdef); if (!file.is_open ()) return -1; retvalue = put (file); file.close (); return retvalue; } s_int8 mapobject::insert_animation (animation * an, u_int16 pos) { vector ::iterator i; if (pos > nbr_of_animations ()) return -2; i = anim.begin (); while (pos--) i++; anim.insert (i, an); an->play (); return 0; } s_int8 mapobject::delete_animation (u_int16 pos) { vector ::iterator i; if (pos > nbr_of_animations () - 1) return -2; i = anim.begin (); while (pos--) i++; anim.erase (i); return 0; } mapobject & mapobject::operator = (const mapobject & src) { // Clear everything. clear (); // Copy the area. (mapsquare_walkable_area&) (*this) = (mapsquare_walkable_area&) src; // Copy all animations. vector ::iterator it; for (it = ((mapobject&) src).anim.begin (); it != ((mapobject&) src).anim.end (); it++) { animation * an = new animation; *an = *(*it); insert_animation (an, nbr_of_animations ()); } return *this; } adonthell-0.3.8/src/pnm.cc0000644000175000017500000000514012756051557012322 00000000000000/* Copyright (C) 1999 The Adonthell Project Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file pnm.cc * @author Alexandre Courbot * * @brief Defines the pnm static class. * * */ #include "pnm.h" #include #include #include void *pnm::get (SDL_RWops * file, u_int16 * length, u_int16 * height) { void *image; char sign[10]; u_int16 l, h; u_int32 i = 0; SDL_RWread (file, sign, 1, 2); if ((sign[0] != 'P') || (sign[1] != '6')) { printf ("Invalid format.\n"); return (NULL); } pnm_gotonextline (file); /* Getting height and length */ while (pnm_checkforcomment (file)); do { SDL_RWread (file, &sign[i], 1, 1); i++; } while (sign[i - 1] != ' '); sign[i - 1] = 0; l = atoi (sign); i = 0; do { SDL_RWread (file, &sign[i], 1, 1); i++; } while (sign[i - 1] != '\n'); sign[i - 1] = 0; h = atoi (sign); /* Going to next line */ pnm_gotonextline (file); /* Reading the image */ image = calloc (l * h, 3); SDL_RWread (file, image, 1, l * h * 3); if (length) *length = l; if (height) *height = h; return (image); } void pnm::put (SDL_RWops * file, void *image, u_int16 length, u_int16 height) { char s[30]; sprintf (s, "P6\n%d %d\n255\n", length, height); SDL_RWwrite (file, s, sizeof (char), strlen (s)); SDL_RWwrite (file, image, 1, length * height * 3); } // Private methods. void pnm::pnm_gotonextline (SDL_RWops * file) { char buff; do { SDL_RWread (file, &buff, 1, 1); } while (buff != '\n'); } int pnm::pnm_checkforcomment (SDL_RWops * file) { char buff; SDL_RWread (file, &buff, 1, 1); if (buff == '#') { pnm_gotonextline (file); return (1); } else { SDL_RWseek (file, -1, SEEK_CUR); return (0); } } adonthell-0.3.8/src/gamedate.h0000644000175000017500000000675212756050163013143 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file gamedate.h * * @author Kai Sterker * @brief Declares the gamedate class. */ #ifndef GAMEDATE_H__ #define GAMEDATE_H__ #include "fileops.h" #ifndef SWIG /** * The number of hours that make one gameworld day. */ #define HOURS_PER_DAY 24 /** * The number of days that make one gameworld week. */ #define DAYS_PER_WEEK 7 #endif // SWIG /** * Keeps track of the time the player spent within the game so far. This * time span is given in %game time minutes, not real time. * %gamedate further includes functions to retrieve those minutes as day, * weekday, hour and minute values. */ class gamedate { public: /** * Update the %game date. Whenever a minute of %gametime has * passed, a time event will be raised. This function needs to * be called from the main loop and uses */ static void update (); /** * Get the current %gametime. * @return %gametime in 1/10 minutes since start of the game. */ static u_int32 time () { return Time; } /** * Get the current weekday. * @return weekday as a number between 0 and DAYS_PER_WEEK - 1 */ static u_int16 weekday (); /** * Returns the current day in the gameworld. * @return number of days spent in the gameworld, beginning with day 0. */ static u_int16 day (); /** * Return the hour of the current day. * @return hour of the current day between 0 and HOURS_PER_DAY - 1 */ static u_int16 hour (); /** * Return the minute of the current hour. * @return minute of the current hour between 0 and 59. */ static u_int16 minute (); /** * convert the time string to gametime minutes. The time string * has the format "X", where X may be (w)eek, (d)ay, * (h)our, (m)inute or (t)enth minute. Several such pairs can be * concatenated. * Valid examples are "1w1d1h", "30m1h" but also "1h1h". * * @param time The time format string. * @return The time represented by the string in minutes. */ static u_int32 parse_time (const std::string & time); /** * Load the state of the %gamedate class from disk * @param in stream to read the state from * @return true if the state was successfully retrieved, * false otherwise. */ static bool get_state (igzstream &in); /** * Save the state of the %gamedate class to disk * @param out stream to write the state to */ static void put_state (ogzstream &out); private: #ifndef SWIG // Time spent in the game in 1/10 gametime minutes static u_int32 Time; // number of game cycles since the last 1/10 gametime minute passed static double Ticks; #endif // SWIG }; #endif // GAMEDATE_H__ adonthell-0.3.8/src/storage.cc0000644000175000017500000000767312756052263013204 00000000000000/* Copyright (C) 2000/2001 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file storage.cc * @author Kai Sterker * * @brief Defines the storage and objects classes. * * */ #ifdef _DEBUG_ #include #endif #include "storage.h" storage::~storage () { } // Set a variable to a new value; delete key if value is zero to save space void storage::set_val (string key, s_int32 value) { #ifdef _DEBUG_ std::cout << "storage::set_val \"" << key << "\" = " << value << std::endl; #endif if (!value) data.erase (key); else data[key] = value; changed = 1; } // Get the value of a variable; if key not found then variable is zero s_int32 storage::get_val (string key) { #ifdef _DEBUG_ if (data.find (key) != data.end ()) std::cout << "storage::get_val \"" << key << "\" = " << data[key] << std::endl; else std::cout << "storage::get_val no such key \"" << key << "\"" << std::endl; #endif if (data.find (key) == data.end ()) return 0; else return data[key]; } // [] Operator s_int32& storage::operator[] (string key) { return data[key]; } // Iterate over the array pair storage::next () { if (changed) { changed = 0; i = data.begin (); } if (i == data.end ()) { changed = 1; return pair (NULL, 0); } return *i++; } // Insert a new object for access from the interpreter void objects::set_val (const char* key, storage *val) { map::iterator j; // Check whether that key already exists -> if so, that is bad! for (j = data.begin (); j != data.end (); j++) if (strcmp ((*j).first, key) == 0) { #ifdef _DEBUG_ std::cout << "*** objects::set: key already exists: '" << key << "'\n"; std::cout << "*** container contents: "; for (j = data.begin (); j != data.end (); j++) std::cout << "'" << (*j).first << "', "; std::cout << "\n\n" << flush; #endif // _DEBUG_ return; } data[key] = val; changed = 1; } // Retrieve a object from the map storage* objects::get_val (const char* key) { map::iterator j; // Check whether the key exists for (j = data.begin (); j != data.end (); j++) if (strcmp ((*j).first, key) == 0) return (*j).second; #ifdef _DEBUG_ std::cout << "*** objects::get: key does not exist: '" << key << "'\n"; std::cout << "*** container contents: "; for (j = data.begin (); j != data.end (); j++) cout << "'" << (*j).first << "', "; cout << "\n\n" << flush; #endif // _DEBUG_ // That probably causes a segfault, but if we can't get the // required object, we are in trouble anyway. return NULL; } // Delete a key from the array void objects::erase (const char *key) { // Check whether the key exists if (data.find (key) != data.end ()) { data.erase (key); changed = 1; } } // Iterate over the array storage *objects::next () { if (changed) { changed = 0; i = data.begin (); } if (i == data.end ()) { changed = 1; return NULL; } return (*i++).second; } adonthell-0.3.8/src/mapsquare.cc0000644000175000017500000001700512756051325013522 00000000000000/* Copyright (C) 2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file mapsquare.cc * @author Alexandre Courbot * * @brief Defines the mapsquare and mapsquare_area classes. * * */ #include "mapsquare.h" #include "mapobject.h" #include "mapcharacter.h" mapsquare_tile::mapsquare_tile () { mapobj = NULL; is_base = false; } mapsquare_tile::~mapsquare_tile () { } mapsquare_char::mapsquare_char () { mchar = NULL; is_base = false; } mapsquare_char::~mapsquare_char () { } mapsquare::mapsquare () : mapsquare_walkable () { base_begin = tiles.end (); can_use_for_pathfinding = true; } mapsquare::mapsquare (const mapsquare& src) : mapsquare_walkable () { tiles = src.tiles; mapchars = src.mapchars; // Correctly place the base tile square's base tile pointer. list ::iterator it; for (it = tiles.begin (); it != tiles.end () && *(it->base_tile) < *it; it++); base_begin = it; can_use_for_pathfinding = src.can_use_for_pathfinding; } mapsquare::~mapsquare () { } bool mapsquare::is_free () { list ::iterator i; for (i = mapchars.begin (); i != mapchars.end (); i++) if (i->is_base) return false; return true; } mapcharacter * mapsquare::whoshere () { list ::iterator i; for (i = mapchars.begin (); i != mapchars.end (); i++) if (i->is_base) return i->mchar; return NULL; } mapsquare_area::mapsquare_area () { } mapsquare_area::~mapsquare_area () { } void mapsquare_area::clear () { area.clear (); } s_int8 mapsquare_area::put_mapobject (u_int16 px, u_int16 py, mapobject * mobj) { u_int16 i, j; mapsquare_tile t; list ::iterator it; // Calculating where the object will start and end on the map. u_int16 i0 = px - mobj->base_x () < 0 ? 0 : px - mobj->base_x (); u_int16 j0 = py - mobj->base_y () < 0 ? 0 : py - mobj->base_y (); u_int16 ie = px + (mobj->area_length ()) - mobj->base_x () > area_length () ? area_length () : px + (mobj->area_length ()) - mobj->base_x (); u_int16 je = py + (mobj->area_height ()) - mobj->base_y () > area_height () ? area_height () : py + (mobj->area_height ()) - mobj->base_y (); // Offset between square's position on the map and on the object. s_int16 xoff = mobj->base_x () - px; s_int16 yoff = mobj->base_y () - py; // First place the base tile, as others refers to it... t.mapobj = mobj; t.is_base = true; t.x = px; t.y = py; // The iterator will be inserted AFTER all the others base tiles. // Doing so, this object will be drawn last on this square. for (it = area[px][py].tiles.begin (); it != area[px][py].tiles.end () && *(it->base_tile) <= t; it++); area[px][py].tiles.insert (it, t); it--; it->base_tile = it; // Update t so it refers to the base tile t.base_tile = it; t.is_base = false; // Now place the others tiles. for (j = j0; j < je; j++) for (i = i0; i < ie; i++) { mapsquare & s = area[i][j]; t.x = i; t.y = j; s.set_walkable (s.get_walkable () & mobj->get_square (i + xoff, j + yoff)->get_walkable ()); if (i != px || j != py) { for (it = s.tiles.begin (); it != s.tiles.end () && *(it->base_tile) <= *(t.base_tile); it++); s.tiles.insert (it, t); } } // Correctly place the base tile square's base tile pointer. for (it = area[px][py].tiles.begin (); it != area[px][py].tiles.end () && *(it->base_tile) < *it; it++); area[px][py].base_begin = it; return 0; } void mapsquare_area::remove_mapobject (u_int16 px, u_int16 py, mapobject * mobj) { u_int16 i, j; list ::iterator it; // Calculating where the object will start and end on the map. u_int16 i0 = px - mobj->base_x () < 0 ? 0 : px - mobj->base_x (); u_int16 j0 = py - mobj->base_y () < 0 ? 0 : py - mobj->base_y (); u_int16 ie = px + (mobj->area_length ()) - mobj->base_x () > area_length () ? area_length () : px + (mobj->area_length ()) - mobj->base_x (); u_int16 je = py + (mobj->area_height ()) - mobj->base_y () > area_height () ? area_height () : py + (mobj->area_height ()) - mobj->base_y (); // Find the base tile, get it's reference (to remove others). for (it = area[px][py].tiles.begin (); it != area[px][py].tiles.end () && !(it->is_base == true && it->mapobj == mobj); it++); // Base tile not found - better to return now... if (it == area[px][py].tiles.end ()) return; // Keep the iterator available for further comparison list ::iterator the_base = it; // And now erase all the others tiles of this object. for (j = j0; j < je; j++) for (i = i0; i < ie; i++) { if (i != px || j != py) { mapsquare & s = area[i][j]; for (it = s.tiles.begin (); it != s.tiles.end () && it->base_tile != the_base; it++); // Not found?? Weird - let's not mess with it then! if (it == s.tiles.end ()) continue; s.tiles.erase (it); // Recalculate the walkability of this square. s.set_walkable (ALL_WALKABLE); for (it = s.tiles.begin (); it != s.tiles.end (); it++) { u_int16 wx = it->x - (it->base_tile->x - it->mapobj->base_x ()); u_int16 wy = it->y - (it->base_tile->y - it->mapobj->base_y ()); s.set_walkable (s.get_walkable () & it->mapobj->get_square (wx, wy)->get_walkable ()); } } } mapsquare & s = area[px][py]; // Erase the base tile s.tiles.erase (the_base); // Recalculate the walkability of this square. s.set_walkable (ALL_WALKABLE); for (it = s.tiles.begin (); it != s.tiles.end (); it++) { u_int16 wx = it->x - (it->base_tile->x - it->mapobj->base_x ()); u_int16 wy = it->y - (it->base_tile->y - it->mapobj->base_y ()); s.set_walkable (s.get_walkable () & it->mapobj->get_square (wx, wy)->get_walkable ()); } } void mapsquare_area::resize_area (u_int16 nl, u_int16 nh) { vector >::iterator i; area.resize (nl); for (i = area.begin (); i != area.end (); i++) i->resize (nh); u_int16 j, k; for (j = 0; j < nl; j++) for (k = 0; k < nh; k++) { area[j][k].x_ = j; area[j][k].y_ = k; } } adonthell-0.3.8/src/tools/0000755000175000017500000000000013414165072012427 500000000000000adonthell-0.3.8/src/tools/dlgedit/0000755000175000017500000000000013414165072014043 500000000000000adonthell-0.3.8/src/tools/dlgedit/gui_tree.h0000664000175000017500000001340312756055277015757 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_tree.h * * @author Kai Sterker * @brief View for the dialogue structure */ #ifndef GUI_TREE_H #define GUI_TREE_H #include "dlg_module.h" /** * The %GuiTree displays the structure of a dialogue. Its root * is the top-level dialogue, its children are the various * sub-dialogues. * * The current selection of the tree will always match the * dialogue currently displayed by the graph view. Clicking on * an entry will have the same effect as clicking on a * sub-dialogue node the graph view, i.e. switch to that * module. */ class GuiTree { public: /** * Speaking names for node icons, */ enum { BUBBLE = 0, BUBBLE_SEL = 1, BUBBLE_MOD = 2, BUBBLE_SEL_MOD = 3, PROJECT = 4, MAX_ICONS = 5 }; /** * Constructor. Creates the tree widget and adds it to the * given pane. * @param paned The GtkPaned that will hold the tree widget. */ GuiTree (GtkWidget* paned); /** * Standard desctructor. */ ~GuiTree (); /** * Displays the given module in the tree. In case the module * is no top-level dialogue, this method will search backwards * through the list of parents until it finds the top-level * dialogue. It will then display the structure of this dialogue. * * @param module A module whose structure should be displayed. */ void addModule (DlgModule *module); /** * Refresh the given module. This will remove the module sub-tree * and generate it anew. To be called after reverting to saved. * * @param module The module to refresh. */ void updateModule (DlgModule *module); /** * Attach the given module to a new project. To be called after * changine the project the module belongs to. * * @param module The module to move to new project. */ void updateProject (DlgModule *module); /** * Remove a module sub-tree. To be called when a module is closed * or a sub-module is deleted. * * @param The module to remove. */ void removeModule (DlgModule *module); /** * Add available projects to the tree. */ void addProjects (); /** * Empty the widget. */ void clear (); /** * Update the state (saved/modified) of the module's icon. * @param module Module whose state (and icon) to update */ void setChanged (DlgModule *module); /** * Update the name of the given module. * @param module Module whose name should be updated. */ void setName (DlgModule *module); /** * Insert a module into the tree, as child of the given parent. * @param parent The parent of the module to add. * @param module The module to add. */ void insert (DlgModule *parent, DlgModule *module); /** * Select the given node of the tree. If another node is selected, * it will be deselected first. * @param node The node to be selected. */ void select (GtkTreeIter *node); /** * Select the given module in the tree. If a node is currently * selected, it will be deselected first. * @param module The module to select. */ void select (DlgModule *module); /** * Deselect the given module in the tree. * @param module The module to deselect. */ void unselect (DlgModule *module); private: /** * Build the initial module tree, by descending recursively * into the module's sub-dialogues, sub-sub-dialogues, and so on. * @param root The root of the (sub-)tree to be build. */ void build (GtkTreeIter root); /** * Insert a module into the tree, as child of the given parent. * @param parent The parent of the module to add. * @param module The module to add. * @return The node that has been added. */ GtkTreeIter insert (GtkTreeIter parent, DlgModule *module); /** * Set the icon of the given node to the appropriate state. * @param node Node whose icon to change. * @param select Whether to use the selected or normal icon. * @param changed Whether the given node is saved or modified. */ void setIcon (GtkTreeIter node, bool select, bool changed); /** * Find the node associated with the given module. * @param module DlgModule whose node to retrieve. * @param node iterator set to the node associated with the module * @return true if node associated with the module was found, false otherwise. */ bool locate (DlgModule *module, GtkTreeIter *node); /** * Find the node associated with the given project. If no such node * exists, it will be created. * @param project Name of the project * @return Node associated with project */ GtkTreeIter locateProject (const std::string &project); GtkWidget *tree; // The actual GTK+ tree widget // Icons to display next to tree nodes GdkPixbuf *icon[MAX_ICONS]; }; #endif // GUI_TREE_H adonthell-0.3.8/src/tools/dlgedit/dlg_node_gfx.h0000664000175000017500000000604412756054425016570 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_node_gfx.h * * @author Kai Sterker * @brief Base class for a DlgNode's graphical representation. */ #ifndef DLG_NODE_GFX_H #define DLG_NODE_GFX_H #include #include "dlg_rect.h" #include "dlg_types.h" /** * This class provide the interface for the graphical representation of * the node in the graph window. This includes functionality needed for * the actual rendering of the node, as well as positional information * (inherited from DlgRect). */ class DlgNodeGfx : public DlgRect { public: DlgNodeGfx () { } DlgNodeGfx (DlgPoint &position); virtual ~DlgNodeGfx () { } /** * Change the mode of a node. * @param m the new mode. */ void setMode (mode_type m) { mode_ = m; } /** * Get the current mode of a node. * @return the node's mode. */ mode_type mode () { return mode_; } /** * Blit a certain area of the graph widget to the screen * @param widget the widget to update * @param area the rectangular area to update. */ void update (GtkWidget *widget, DlgRect &area); /** * Draw this node to the given surface with the specified offset. * The node's current mode determines the color thw node is drawn with. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing */ virtual void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget) = 0; /** * Draw this node to the given surface. During drawing, the mode is * temporarily changed to the given mode. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing * @param mode the new mode of the node */ virtual void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget, mode_type mode) = 0; /** * Check whether the node is located at the given point. * @return true if this is the case, false otherwise. */ virtual bool operator== (DlgPoint &point) { return contains (point); } protected: mode_type mode_; // This nodes mode (NONE, HILIGHTED, SELECTED) }; #endif // DLG_NODE_GFX_H adonthell-0.3.8/src/tools/dlgedit/gui_graph_events.cc0000664000175000017500000002104312756054744017640 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_graph_events.cc * * @author Kai Sterker * @brief Event-callbacks for the dialogue graph view */ #include #include "gui_dlgedit.h" // Window resized gint configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer data) { GuiGraph *graph = (GuiGraph *) data; // resize the drawing area graph->resizeSurface (widget); // do a redraw graph->draw (); // redraw the preview GuiDlgedit::window->list()->draw (); return TRUE; } // Redraw the screen from the backing pixmap gint expose_event (GtkWidget * widget, GdkEventExpose * event, gpointer data) { GuiGraph *graph = (GuiGraph *) data; cairo_t *cr = gdk_cairo_create (GDK_WINDOW(gtk_widget_get_window(widget))); cairo_set_source_surface (cr, graph->pixmap (), 0, 0); gdk_cairo_rectangle (cr, &event->area); cairo_fill (cr); cairo_destroy(cr); return FALSE; } // Mouse-button pressed on Drawing Area gint button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data) { GuiGraph *graph = (GuiGraph *) data; DlgPoint point ((int) event->x, (int) event->y); #ifdef __APPLE__ // simulate right click on OSX if (event->state & GDK_CONTROL_MASK) { event->button = 3; } #endif switch (event->button) { // Middle button pressed case 2: { // ignore edit command if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) break; // If nothing selected, see if we're over a node if (graph->mode () == IDLE) if (!graph->selectNode (point)) // create a submodule, if we aren't graph->newModule (point); // Edit node if (graph->mode () == NODE_SELECTED) graph->editNode (); break; } // Right button pressed case 3: { // if something selected -> deselect if (graph->mode () == NODE_SELECTED) graph->deselectNode (); break; } default: break; } return TRUE; } // Mouse moved over drawing area gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer data) { GuiGraph *graph = (GuiGraph *) data; DlgPoint point ((int) event->x, (int) event->y); // scroll the graph if necessary (this has to happen before // anything else, as the next method(s) change 'point'. graph->prepareScrolling (point); // Dragging dialogue nodes if (event->state & GDK_BUTTON1_MASK) { // don't allow dragging if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) return FALSE; // no node being dragged so far -> start dragging if (graph->mode () != NODE_DRAGGED) graph->prepareDragging (point); // otherwise continue moving else graph->drag (point); } // highlight nodes under the cursor and display their 'tooltip' else graph->mouseMoved (point); return FALSE; } // Mouse-button released on Drawing Area gint button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer data) { GuiGraph *graph = (GuiGraph *) data; DlgPoint point ((int) event->x, (int) event->y); #ifdef __APPLE__ // simulate right click on OSX if (event->state & GDK_CONTROL_MASK) { event->button = 3; } #endif // Left button released if (event->button == 1) { switch (graph->mode ()) { // nothing selected case IDLE: { // select the node under the cursor, if any if (!graph->selectNode (point)) // otherwise create a new circle at that position if (GuiDlgedit::window->mode () != L10N_PREVIEW) graph->newCircle (point); break; } // node selected case NODE_SELECTED: { // ignore edit command if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) break; // try to create a new link between two nodes graph->newArrow (point); break; } // node dragged case NODE_DRAGGED: { // stop dragging graph->stopDragging (point); break; } default: break; } } return TRUE; } // Key pressed guint key_press_notify_event (GtkWidget * widget, GdkEventKey * event, gpointer user_data) { GuiGraph *graph = (GuiGraph *) user_data; switch (event->keyval) { // scroll up case GDK_KEY_Up: { if (graph->scrollingAllowed()) { graph->setScrollOffset(0, 40); graph->scroll(); } break; } // scroll down case GDK_KEY_Down: { if (graph->scrollingAllowed()) { graph->setScrollOffset(0, -40); graph->scroll(); } break; } // scroll left case GDK_KEY_Left: { if (graph->scrollingAllowed()) { graph->setScrollOffset(40, 0); graph->scroll(); } break; } // scroll right case GDK_KEY_Right: { if (graph->scrollingAllowed()) { graph->setScrollOffset(-40, 0); graph->scroll(); } break; } // center current node case 'c': { graph->centerNode (); break; } // select parent node case 'w': { if (graph->selectParent ()) graph->centerNode (); break; } // select child node case 's': { if (graph->selectChild ()) graph->centerNode (); break; } // select sibling to the left case 'a': { if (graph->selectSibling (PREV)) graph->centerNode (); break; } // select sibling to the right case 'd': { if (graph->selectSibling (NEXT)) graph->centerNode (); break; } // edit selected node case GDK_KEY_Return: { int x, y; // ignore edit command if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) break; // get cursor position gtk_widget_get_pointer (graph->drawingArea (), &x, &y); DlgPoint point (x, y); // If nothing selected, see if we're over a node if (graph->mode () == IDLE) if (!graph->selectNode (point)) // create a submodule, if we aren't graph->newModule (point); // Edit node if (graph->mode () == NODE_SELECTED) graph->editNode (); break; } // deselect Node case GDK_KEY_Escape: { graph->deselectNode (); break; } // delete node case GDK_KEY_BackSpace: // fall through case GDK_KEY_Delete: { // ignore delete command if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) break; graph->deleteNode (); break; } // key not consumed default: { return FALSE; } } return TRUE; } adonthell-0.3.8/src/tools/dlgedit/gui_tooltip.cc0000664000175000017500000000666712756055250016655 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_tooltip.cc * * @author Kai Sterker * @brief A custom, tooltip-like widget */ #include "gui_dlgedit.h" #include "gui_tooltip.h" // constructor GuiTooltip::GuiTooltip (DlgNode *n) { GtkWidget *tip; std::string text; // the actual tooltip tooltip = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_keep_above (GTK_WINDOW (tooltip), FALSE); gtk_window_set_transient_for (GTK_WINDOW (tooltip), GTK_WINDOW (GuiDlgedit::window->getWindow ())); gtk_window_set_type_hint (GTK_WINDOW (tooltip), GDK_WINDOW_TYPE_HINT_NOTIFICATION); gtk_window_set_skip_taskbar_hint(GTK_WINDOW (tooltip), TRUE); gtk_window_set_opacity (GTK_WINDOW (tooltip), 0.9f); g_object_set_data (G_OBJECT (tooltip), "tip_window", tooltip); gtk_window_set_resizable (GTK_WINDOW (tooltip), FALSE); // get the text switch (n->type ()) { case NPC: case PLAYER: case NARRATOR: { text = ((DlgCircle *) n)->tooltip (); break; } case MODULE: { text = ((DlgModule *) n)->entry ()->description (); break; } default: break; } // label with the text tip = gtk_label_new (text.c_str ()); g_object_ref (tip); g_object_set_data_full (G_OBJECT (tooltip), "tip", tip, (GDestroyNotify) g_object_unref); gtk_widget_show (tip); gtk_container_add (GTK_CONTAINER (tooltip), tip); gtk_label_set_justify (GTK_LABEL (tip), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (tip), TRUE); gtk_misc_set_padding (GTK_MISC (tip), 4, 1); // keep a pointer to the node node = n; } // destructor GuiTooltip::~GuiTooltip () { gtk_widget_destroy (tooltip); } // draw the tooltip void GuiTooltip::draw (GtkWidget *graph, DlgPoint &offset) { if (node->type () == LINK) return; // get position and extension of dlgedit window int x, y; GdkWindow *window = gtk_widget_get_parent_window (graph); gdk_window_get_origin (window, &x, &y); int width = gdk_window_get_width(window); gtk_widget_realize (tooltip); GtkAllocation allocation; gtk_widget_get_allocation (graph, &allocation); // calculate the position of the tooltip x += width - allocation.width; if (node->x () < allocation.width / 2) { x += node->x () + node->width (); } else { gtk_widget_get_allocation (tooltip, &allocation); x += node->x () - allocation.width; } y += node->y () + node->height (); // position and display the tooltip gtk_window_move (GTK_WINDOW(tooltip), x + offset.x (), y + offset.y ()); gtk_widget_show (tooltip); } adonthell-0.3.8/src/tools/dlgedit/dlg_circle_entry.cc0000664000175000017500000000465212756054176017625 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_circle_entry.cc * * @author Kai Sterker * @brief The contents of a DlgCircle. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "gettext.h" #include "gui_dlgedit.h" #include "dlg_circle_entry.h" // Default Constructor DlgCircleEntry::DlgCircleEntry () { loop_ = false; text_ = ""; annotation_ = ""; npc_ = "Default"; code_ = ""; condition_ = ""; } // get the dialogue text std::string DlgCircleEntry::text () { // in case we are in preview mode, we need to translate the text first if (GuiDlgedit::window && GuiDlgedit::window->mode () == L10N_PREVIEW) return gettext (text_.c_str ()); // usually, we just need to return the text return text_; } // set the dialogue text void DlgCircleEntry::setText (std::string t) { unsigned long pos = 0; text_ = t; // Make text safe: // replace linebreaks with space replace (text_.begin (), text_.end (), '\n', ' '); // escape quotes while ((pos = text_.find ("\"", pos)) != text_.npos) { if (pos > 0) { if (text_[pos-1] != '\\') text_.insert (pos, "\\"); } else text_.insert (pos, "\\"); pos++; } } // set the node's condition void DlgCircleEntry::setCondition (std::string c) { if (c == "") { condition_ = c; return; } // remove all whitespace from the edges of the condition condition_ = c.substr (c.find_first_not_of (" \n\t"), c.find_last_not_of (" \n\t") + 1); // replace 'else if' by the shorter 'elif' if (strncmp ("else if", condition_.c_str (), 7) == 0) condition_.replace (0, 7, "elif"); } adonthell-0.3.8/src/tools/dlgedit/dlg_module.h0000664000175000017500000003074012756054354016265 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_module.h * * @author Kai Sterker * @brief One complete dialogue or sub-dialogue. */ #ifndef DLG_MODULE_H #define DLG_MODULE_H #include "dlg_module_entry.h" #include "kb_traverse.h" /** * This class contains a dialogue, made up of elementary nodes and * (optionally) sub-dialogues. It is different from the other * nodes as it contains a complete dialogue, but can also be part * of another dialogue. */ class DlgModule : public DlgNode { public: /** * Create a new, empty dialogue module. * @param p The full path to the file containing the module. * @param n The actual name without file extension. * @param u Unique id of the module. * @param d Description of the module. * @param id Serial number of the module. */ DlgModule (std::string p, std::string n, std::string u, std::string d); /** * Delete a subdialogue. */ ~DlgModule (); /** * Reset the dialogue to its state after construction. Deletes all * nodes and clears the DlgModuleEntry. */ void clear (); /** * Set the node id of this module. The toplevel module will always * have the id 0. Sub-modules will get the next unused node id of * the top-level module. That means, sub-modules may end up with the * same id than circles of the same parent module. But this is not as * tragic as it might seem, as circles and modules are treated * differently when searching for a certain node. */ void setID () { int &id = toplevel ()->serial (); nid_ = id; id++; } /** * @name Module drawing */ //@{ /** * Calculate this module's shape. The shape is a rectangle centered * around the given DlgPoint. It is large enough to display the * module's name. * @param center The point to center the module shape around. */ void initShape (const DlgPoint ¢er); /** * Draw this node to the given surface with the specified offset. * The node's current mode determines the color thw node is drawn with. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing */ void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget); //@} /** * @name Node handling */ //@{ /** * Add the given node to the dialogue. * @param node the DlgNode to add. */ void addNode (DlgNode *node); /** * Delete the currently selected node from the dialogue. If the node * is a circle, also deletes all attached arrows. * @return \b true> if the node has been deleted, \b false otherwise. */ bool deleteNode (); /** * Delete the given node from the dialogue. * @param node The node to delete. */ void deleteNode (DlgNode *node); /** * Select a node from the list of nodes. * @param node The DlgNode to select. * @return \b true if the node has been selected, \b false otherwise. */ bool selectNode (DlgNode *node); /** * Mark the given node as highlighted, to show that is under the cursor. * @param node the DlgNode to be highlighted * @return the the previously highlighted node, or \b NULL if no * node has been highlighted */ DlgNode* highlightNode (DlgNode *node); /** * Select the root node of the dialogue. * @return \b true if the node has been selected, \b false otherwise. */ bool selectRoot (); /** * Deselect a previously selected node. * @return the previously selected DlgNode, or \b NULL if no * node has been deselected */ DlgNode* deselectNode (); /** * Get the node at the given position. * @return the DlgNode at the positon, or \b NULL if there is none. */ DlgNode* getNode (DlgPoint &point); /** * Get the node that is currently selected. * @return the DlgNode currently selected */ DlgNode* selected () { return selected_; } //@} /** * @name Node retrieval */ //@{ /** * Get the node with the given module and node id. First locates * the module with given mid. Then locates the node with the given * nid within this module. * @param mid The node id of the module the node is located in. * @param nid The node id of the node to retrieve. * @return the DlgNode with that id, or \b NULL if there is none. */ DlgNode* getNode (int mid, int nid); /** * Get the node with the given node id in the current module. * @param nid The node id of the node to retrieve. * @return the DlgNode with that id, or \b NULL if there is none. */ DlgNode* getNode (int id); /** * Get the (sub-)module with the given node id in the current module. * @param nid The node id of the node to retrieve. * @return the DlgNode with that id, or \b NULL if there is none. */ DlgModule* getModule (int id); /** * Return the first parent in the chain of parents, i.e. the * toplevel module. * @return the module in the chain of parents with no parent. */ DlgModule *toplevel (); //@} /** * Get the extension of the module for centering in view. * * @param min_x will contain position of leftmost node * @param min_y will contain position of rightmost node * @param y will contain position of topmost node */ void extension (int &min_x, int &max_x, int &y); /** * @name Loading / Saving */ //@{ /** * Init the Dialogue from a file * @return \b true if loading was successful, \b false otherwise. */ bool load (); /** * Init a sub-dialogue from a file. */ void loadSubdialogue (); /** * Save the Dialogue to a file * @param path full path of the dialogue. * @param name file name without extension. * @return \b true if saving was successful, \b false otherwise. */ bool save (std::string &path, std::string &name); /** * Save module as sub-dialogue. In contrast to the method above, * this only saves a 'reference' to the module. It will have to be * restored from the actual source file. * * In order to allow different users to work on the same dialogues, * the reference will be relative to CfgProject::BaseDir. That way, * a dialogue referencing sub-dialogues can be loaded even if it is * moved to a different location, provided the relative paths of * included modules have not changed. * * @param file an opened file. */ void save (std::ofstream &file); //@} /** * @name Filename and Path retrieval */ //@{ /** * Get the name of this dialogue. * @return a reference to the dialogue's name. */ std::string &name () { return name_; } /** * Get the name and id of this dialogue. To be used for window * captions and window menu. * @return string composed of name and unique id. */ std::string shortName () { return name_ + uid_; } /** * Get the full path and filename of this dialogue. To be used when * saving the dialogue. * @return string composed of path, filename and file extension. */ std::string fullName () { return path_ + name_ + FILE_EXT; } /** * Return the path and filename of this dialogue relative to its * parent. * @return location on disk relative to parent. */ std::string relativeName (); /** * Get the module's path * @return the full path of the module */ std::string path () { return path_; } //@} /** * @name Member access */ //@{ /** * Get the list of nodes in this dialogue. * @return a reference to the list of nodes. */ std::vector &getNodes () { return nodes; } /** * Get the current offset of this dialogue. * @return a reference to the dialogue's offset. */ DlgPoint &offset () { return offset_; } /** * Get the serial number for the next node that is * created. It is up to the caller of this function to * increase the number if neccessary. * @return Id to use for the next node. */ int &serial () { return serial_; } /** * Whether this (sub-)dialogue has been in view before switching * dialogues. * @return \b true if that is the case, \b false otherwise. */ bool displayed () { return displayed_; } /** * Mark this dialogue as displayed. * @param c Set to \b true to mark the dialogue as displayed. */ void setDisplayed (bool displayed) { displayed_ = displayed; } /** * Check whether this dialogue has been changed since it's been * opened or saved. * @return \b true if that is the case, \b false otherwise. */ bool changed () { return changed_; } /** * Mark this dialogue as changed. * @param c Set to \b true to mark the dialogue as changed. */ void setChanged (bool c = true); /** * Retrieve the parent dialogue of this module. If the module is * a sub-dialogue, this will point to the dialogue that contains * the module. If it is the top-level dialogue, the parent will be * NULL. * @return parent of this dialogue, or \b NULL if it's a top-level dialogue */ DlgModule *parent () { return parent_; } /** * Set the parent of this dialogue. * @param parent The module containing this sub-dialogue */ void setParent (DlgModule *parent) { parent_ = parent; } /** * Get the current state of the module, i.e. whether a node is selected, * highlighted, etc ... . * @return The module's state. */ mode_type state () { return state_; } /** * Set the state mode of the module. * @param state The modules new state. */ void setState (mode_type state) { state_ = state; } /** * Get a pointer to the module entry * @return the DlgModuleEntry of this module */ DlgModuleEntry *entry () { return &entry_; } /** * Get a pointer to the keyboard graph traversal helper. This keeps track * of the current selection's siblings. Users can navigate through them * via the arrow keys. * @return the KBTraverse of this module */ KBTraverse *traverse () { return &traverse_; } //@} protected: std::vector nodes;// all the nodes in this dialogue DlgNode *selected_; // the node currently selected DlgNode *highlighted_; // the node currently under the cursor DlgModule *parent_; // parent of sub-dialogue DlgPoint offset_; // The current offset in the graph view bool displayed_; // Whether that (sub-)dialogue was in view bool changed_; // Whether there were changes since saving int serial_; // Id to use for the next new node mode_type state_; // one of NONE, HILIGHTED, SELECTED std::string name_; // Short (file-) name of the dialogue std::string path_; // Path of the dialogue std::string uid_; // Unique number of the dialogue DlgModuleEntry entry_; // further content of the dialogue KBTraverse traverse_; // Keyboard graph traversal helper private: void init (); // initialize a newly constructed DlgModule }; #endif // DLG_MODULE_H adonthell-0.3.8/src/tools/dlgedit/gui_modal_dialog.cc0000664000175000017500000000303212756055076017563 00000000000000/* Copyright (C) 2002/2007 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_modal_dialog.cc * * @author Kai Sterker * @brief Base class for modal dialog windows */ #include #include "gui_modal_dialog.h" // ctor GuiModalDialog::GuiModalDialog (GtkWindow *p, const bool & m) { parent = p; pressedOK = false; modal = m; window = NULL; } // clean up GuiModalDialog::~GuiModalDialog () { // destroy the window if (window != NULL) { gtk_widget_destroy (GTK_WIDGET (window)); } } // displays the dialog window bool GuiModalDialog::run () { gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (parent)); gtk_window_set_modal (GTK_WINDOW (window), modal); gtk_widget_show (GTK_WIDGET (window)); if (modal) gtk_main (); // return whether the OK button has been pressed return pressedOK; } adonthell-0.3.8/src/tools/dlgedit/dlg_module.cc0000664000175000017500000004152412756054342016422 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_module.cc * * @author Kai Sterker * @brief One complete dialogue or sub-dialogue. */ #include #include "dlg_module.h" #include "dlg_arrow.h" #include "gui_dlgedit.h" #include "gui_resources.h" // ctor DlgModule::DlgModule (std::string p, std::string n, std::string u, std::string d) { entry_.setDescription (d); uid_ = u; path_ = p + "/"; name_ = n; init (); } // dtor DlgModule::~DlgModule () { if (GuiDlgedit::window != NULL) { GuiDlgedit::window->tree ()->removeModule (this); } } // initialize a newly constructed DlgModule void DlgModule::init () { type_ = MODULE; mode_ = IDLE; state_ = IDLE; selected_ = NULL; highlighted_ = NULL; parent_ = NULL; changed_ = false; displayed_ = false; nid_ = 0; serial_ = 1; } // reset dialogue to initial state void DlgModule::clear () { // delete all nodes while (!nodes.empty ()) deleteNode (nodes.front ()); // clear custom code and such entry_.clear (); // reset all variables init (); } // calculate shape of sub-dialogue void DlgModule::initShape (const DlgPoint ¢er) { int width; // calculate width of the module icon PangoLayout *font = GuiResources::font (); pango_layout_set_text (font, name().c_str(), -1); pango_layout_get_pixel_size (font, &width, NULL); width += 10; // align module to the (imaginary) grid and set shape top_left = DlgPoint (center.x (), center.y ()); top_left.move (-width/2 - (center.x () % CIRCLE_DIAMETER), -(center.y () % CIRCLE_DIAMETER)); resize (width, 20); } // select a given node bool DlgModule::selectNode (DlgNode *node) { // try to find the given node in our array of nodes std::vector::iterator i = find (nodes.begin(), nodes.end(), node); // if it is not there, return if (i == nodes.end ()) return false; // see if a node is already selected if (selected_ != NULL) return false; // remember which node is selected selected_ = node; // set the mode of dialogue and node state_ = NODE_SELECTED; node->setMode (NODE_SELECTED); return true; } // highlight the given node DlgNode* DlgModule::highlightNode (DlgNode *node) { // mark the new node as highlighted ... DlgNode *prev = highlighted_; highlighted_ = node; // ... and return the node highlighted before return prev; } // select the dialogue's root node. bool DlgModule::selectRoot () { for (std::vector::iterator i=nodes.begin(); i != nodes.end(); i++) if ((*i)->type () != LINK) if ((*i)->prev (FIRST) == NULL) return selectNode (*i); return false; } // get the node at the given postion DlgNode* DlgModule::getNode (DlgPoint &position) { // find the node with the given pos in our array of nodes std::vector::iterator i; for (i = nodes.begin (); i != nodes.end (); i++) if (*(*i) == position) return *i; return NULL; } // get the node with the given module and node ids DlgNode* DlgModule::getNode (int mid, int nid) { // first, get the module DlgModule *module = getModule (mid); // then, get the node if (module) return module->getNode (nid); return NULL; } // get node with the given node id DlgNode* DlgModule::getNode (int id) { // find the node with the given pos in our array of nodes std::vector::iterator i; for (i = nodes.begin (); i != nodes.end (); i++) if ((*i)->node_id () == id && (*i)->type () != MODULE) return *i; return NULL; } // get module with the given module id DlgModule* DlgModule::getModule (int id) { if (id == nid_) return this; std::vector::iterator i; DlgModule *module; for (i = nodes.begin (); i != nodes.end (); i++) if ((*i)->type () == MODULE) { // FIXME shouldn't this be (*i)->getModule(id) ??? module = getModule (id); if (module) return module; } // nothing found return NULL; } // add a node to the dialogue void DlgModule::addNode (DlgNode *node) { nodes.push_back (node); } // delete a node from the dialogue bool DlgModule::deleteNode () { // if no node is selected, there's nothing to delete if (selected_ == NULL) return false; // otherwise, first deselect it DlgNode *node = deselectNode (); // actually delete it deleteNode (node); return true; } // delete the given node void DlgModule::deleteNode (DlgNode *node) { // if the node is a circle, also delete the attached arrows if (node->type () != LINK) { // reset traversal info if current node gets deleted traverse_.clear(); // delete all preceding arrows for (DlgNode *i = node->prev (FIRST); i != NULL; i = node->prev (FIRST)) { nodes.erase (remove (nodes.begin (), nodes.end (), i), nodes.end ()); if (highlighted_ == i) highlighted_ = NULL; delete i; } // delete all following arrows for (DlgNode *i = node->next (FIRST); i != NULL; i = node->next (FIRST)) { nodes.erase (remove (nodes.begin (), nodes.end (), i), nodes.end ()); if (highlighted_ == i) highlighted_ = NULL; delete i; } } // remove the node itself from the vector nodes.erase (remove (nodes.begin (), nodes.end (), node), nodes.end ()); if (highlighted_ == node) highlighted_ = NULL; delete node; } // deselect the selected node DlgNode* DlgModule::deselectNode () { DlgNode *retval = selected_; // see if a node is selected at all if (selected_ == NULL) return NULL; // unselect node state_ = IDLE; selected_->setMode (IDLE); // nothing selected selected_ = NULL; // return the node for drawing return retval; } // indicate that this module has been modified by the user void DlgModule::setChanged (bool changed) { if (changed_ != changed) { changed_ = changed; // updated view GuiDlgedit::window->setChanged (); } } // draw the module void DlgModule::draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget) { cairo_t *cr = cairo_create (surface); // get the color for drawing the circle const GdkColor *gc = GuiResources::getColor (mode_, type_); // offset circle DlgPoint position = topLeft ().offset (offset); DlgRect area (position, width () + 1, height () + 1); // draw everything to the surface drawRectangle (cr, GuiResources::getColor (GC_WHITE), TRUE, position.x (), position.y (), width (), height ()); drawRectangle (cr, gc, FALSE, position.x (), position.y (), width (), height ()); // get the font to draw name const PangoFontDescription *desc = pango_layout_get_font_description (GuiResources::font ()); // create pango cairo compatible layout PangoLayout *font = pango_cairo_create_layout(cr); pango_layout_set_font_description (font, desc); pango_layout_set_text (font, name().c_str(), -1); // place text in module's center int h; pango_layout_get_pixel_size (font, NULL, &h); int x = position.x () + 5; int y = position.y () + (height () - h) / 2; // set font color and position gdk_cairo_set_source_color(cr, gc); pango_cairo_update_layout (cr, font); cairo_move_to(cr, x, y); // draw text pango_cairo_show_layout (cr, font); g_object_unref(font); // Update the drawing area update (widget, area); cairo_destroy(cr); } // get toplevel module DlgModule* DlgModule::toplevel () { DlgModule *toplevel = this; while (toplevel->parent () != NULL) toplevel = toplevel->parent (); return toplevel; } // Get extension of the graph for proper displaying void DlgModule::extension (int &min_x, int &max_x, int &y) { y = 0; min_x = 0; max_x = 0; for (std::vector::iterator i=nodes.begin(); i != nodes.end(); i++) if ((*i)->type () != LINK) { if ((*i)->y () < y) y = (*i)->y (); if ((*i)->x () < min_x) min_x = (*i)->x (); else if ((*i)->x () > max_x) max_x = (*i)->x (); } } // load a dialogue from file bool DlgModule::load () { int i = 1, id = 0, n; DlgCircle *circle; DlgArrow *arrow; std::string s; // load all nodes and toplevel items while (i) { switch (i = parse_dlgfile (s, n)) { // load text node case LOAD_CIRCLE: { circle = new DlgCircle (nid_, id++); circle->load (); nodes.push_back (circle); break; } // load arrow node case LOAD_ARROW: { arrow = new DlgArrow; if (arrow->load (this)) nodes.push_back (arrow); break; } // load submodule node case LOAD_MODULE: { if (parse_dlgfile (s, n) == LOAD_STR) { // get filename of submodule std::string file = path_ + s; // try to create the subdialogue DlgModule *subdlg = GuiDlgedit::window->loadSubdialogue (file); // if succeeded, read the final bits if (subdlg) { subdlg->loadSubdialogue (); subdlg->setParent (this); nodes.push_back (subdlg); } } break; } case LOAD_PROJECT: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setProject (s); break; } case LOAD_NOTE: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setDescription (s); break; } case LOAD_FUNC: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setMethods (s); break; } case LOAD_CTOR: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setCtor (s); break; } case LOAD_DTOR: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setDtor (s); break; } case LOAD_IMPORTS: { if (parse_dlgfile (s, n) == LOAD_STR) entry_.setImports (s); break; } case LOAD_RACE: { if (parse_dlgfile (s, n) == LOAD_NUM); //->myplayer->set_val ("race", n); break; } case LOAD_GENDER: { if (parse_dlgfile (s, n) == LOAD_NUM); //->myplayer->set_val ("gender", n); break; } case LOAD_NPC: { if (parse_dlgfile (s, n) == LOAD_STR); break; } case LOAD_ID: { if (parse_dlgfile (s, n) == LOAD_NUM) serial_ = n; break; } default: break; } } // set serial of version 1 dialogues if (serial_ < id) serial_ = id; return true; } // load sub-dialogue void DlgModule::loadSubdialogue () { int i = 1, n; std::string s; while (i) { switch (i = parse_dlgfile (s, n)) { // module loaded or EOF case LOAD_END: return; // get id of submodule case LOAD_ID: { if (parse_dlgfile (s, n) == LOAD_NUM) nid_ = n; break; } // get position of submodule case LOAD_POS: { int x, y; int width; PangoLayout *font = GuiResources::font (); pango_layout_set_text (font, name().c_str(), -1); pango_layout_get_pixel_size (font, &width, NULL); if (parse_dlgfile (s, n) == LOAD_NUM) x = n; if (parse_dlgfile (s, n) == LOAD_NUM) y = n; top_left = DlgPoint (x, y); bottom_right = DlgPoint (x + width + 10, y + 20); break; } default: break; } } } // save dialogue to file bool DlgModule::save (std::string &path, std::string &name) { // update path and name path_ = path + "/"; if (name_ != name) { name_ = name; changed_ = true; } // open file std::ofstream out (fullName ().c_str ()); // opening failed for some reasons if (!out.is_open()) return false; // Write Header: Adonthell Dialogue System file version 2 out << "# Dlgedit File Format 2\n#\n" << "# Produced by Adonthell Dlgedit v" << _VERSION_ << "\n" << "# (C) 2000/2001/2002/2003 The Adonthell Team & Kai Sterker\n#\n" << "# $I" << "d$\n\n" << "Note \xa7" << entry_.description () << "\xa7\n\n"; // Node ID out << "Id " << serial_ << "\n"; // Save settings and stuff if (entry_.project () != "none") out << "Proj \xa7" << entry_.project () << "\xa7\n"; if (entry_.imports () != "") out << "Inc \xa7" << entry_.imports () << "\xa7\n"; if (entry_.ctor () != "") out << "Ctor \xa7" << entry_.ctor () << "\xa7\n"; if (entry_.dtor () != "") out << "Dtor \xa7" << entry_.dtor () << "\xa7\n"; if (entry_.methods () != "") out << "Func \xa7" << entry_.methods () << "\xa7\n"; // Save Circles first, as arrows depend on them when loading later on for (std::vector::iterator i = nodes.begin (); i != nodes.end (); i++) if ((*i)->type () != LINK) (*i)->save (out); // Save Arrows for (std::vector::iterator i = nodes.begin (); i != nodes.end (); i++) if ((*i)->type () == LINK) (*i)->save (out); out.flush(); out.close(); // mark dialogue as unchanged setChanged (false); return true; } // save a sub-module void DlgModule::save (std::ofstream &file) { // module's relative filename file << "\nModule " << relativeName () << "\n"; // module's id file << " Id " << nid_ << "\n"; // module's position file << " Pos " << x () << " " << y () << "\n"; file << "End\n"; } // return the module's path relative to its parent std::string DlgModule::relativeName () { // no parent -> return absolute Name if (parent_ == NULL) return fullName (); std::string p_path = parent_->path (); // parent path std::string m_path = path_; // module path std::string r_path = ""; // module's path relative to parent unsigned long pos = 0; // find the part of the filename that matches while (pos < m_path.length () && pos < p_path.length () && p_path[pos] == m_path[pos]) pos++; // complete module path matched if (pos == m_path.length ()) { // so either both files are in the same path, or the sub-dialogue // is on a higher level while ((pos = p_path.find ('/', pos)) != p_path.npos) r_path += "../"; } // complete parent path matched else if (pos == p_path.length ()) { // so the sub-dialogue is in a sub-directory r_path = m_path.substr (pos); } // none of the paths completely matched else { // sub-dialogue is in a different directory on a higher level unsigned long i = pos; while ((i = p_path.find ('/', i)) != p_path.npos) r_path += "../"; r_path += m_path.substr (pos); } return r_path + name_ + FILE_EXT; } adonthell-0.3.8/src/tools/dlgedit/gui_scrollable.h0000664000175000017500000000546712756055217017147 00000000000000/* Copyright (C) 2009 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_scrollable.h * * @author Kai Sterker * @brief Basic functionality for automated scolling. */ #ifndef COMMON_SCROLLING_H #define COMMON_SCROLLING_H #include /** * Implements scrolling that is triggered by the mouse pointer * near the border of the widget. */ class Scrollable { public: /** * Constructor. */ Scrollable(); /** * Destructor. */ virtual ~Scrollable(); /** * @name Auto-Scrolling (TM) ;) functionality. */ //@{ /** * Method deciding whether to start with scrolling. The cursor has to * remain in the outer 20 pixel of the view to enable scrolling. * @param point The current cursor position. */ void prepareScrolling (const GdkPoint & point); /** * Moves the view in the desired direction. */ virtual void scroll () = 0; /** * Check whether we are currently scrolling * @return true if that is the case, false otherwise. */ bool isScrolling () const; /** * Finish scrolling. */ void stopScrolling (); //@} /** * @name Program-Initiated Scrolling */ void setScrollOffset (const int & x, const int & y) { scroll_offset.x = x; scroll_offset.y = y; } /** * @name Hooks into users of auto-scrolling. */ //@{ /** * Return a pointer to the drawing area * @return the GtkDrawingArea widget */ virtual GtkWidget *drawingArea () const = 0; /** * Check whether it is allowed to initiate * scrolling. * @return false if scrolling is forbidden, true otherwise. */ virtual bool scrollingAllowed () const = 0; //@} protected: /// Offset by which the view moves during scrolling GdkPoint scroll_offset; private: /// create the cursor to display when scrolling is active void createScrollCursor (); /// Cursor to indicate scrolling GdkCursor *scrollCursor; /// Indicates whether autoscrolling is active bool scrolling; }; #endif // COMMON_SCROLLING_H adonthell-0.3.8/src/tools/dlgedit/gui_file.cc0000664000175000017500000000702212756054724016071 00000000000000/* Copyright (C) 2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_file.cc * * @author Kai Sterker * @brief Wrapper for the GtkFileChooser widget */ #include #include "gui_file.h" #include "util.h" // create a new file selection window GuiFile::GuiFile (GtkWindow *parent, GtkFileChooserAction action, const std::string &title, const std::string &file) : GuiModalDialog (parent) { const gchar *label; switch (action) { case GTK_FILE_CHOOSER_ACTION_SAVE: { label = GTK_STOCK_SAVE; break; } case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER: { label = GTK_STOCK_NEW; break; } default: label = GTK_STOCK_OPEN; } window = gtk_file_chooser_dialog_new (title.c_str (), parent, action, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, label, GTK_RESPONSE_ACCEPT, NULL); // forbid multiple selections gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER(window), FALSE); // set current directory or file if (file[file.length()-1] == '/') { gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(window), file.c_str ()); } else { gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(window), file.c_str ()); } if (action == GTK_FILE_CHOOSER_ACTION_SAVE || action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) { gchar *name = g_path_get_basename (file.c_str ()); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(window), name); g_free (name); } } // clean up GuiFile::~GuiFile () { } // display file select widget bool GuiFile::run () { if (gtk_dialog_run (GTK_DIALOG (window)) == GTK_RESPONSE_ACCEPT) { gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (window)); File = MK_UNIX_PATH (filename); g_free (filename); return true; } return false; } void GuiFile::add_shortcut (const std::string & shortcut) { if (shortcut.length () > 0) { gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER(window), shortcut.c_str (), NULL); } } void GuiFile::add_filter (const std::string & pattern, const std::string & name) { unsigned long pos; std::string pattern_str = pattern; GtkFileFilter *filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, name.c_str ()); while ((pos = pattern_str.find ('|')) != std::string::npos) { std::string filter_str = pattern_str.substr (0, pos); pattern_str = pattern_str.substr (pos + 1); gtk_file_filter_add_pattern (filter, filter_str.c_str ()); } gtk_file_filter_add_pattern (filter, pattern_str.c_str ()); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(window), filter); gtk_file_chooser_set_filter (GTK_FILE_CHOOSER(window), filter); } adonthell-0.3.8/src/tools/dlgedit/gui_scrollable.cc0000664000175000017500000003127512756055202017273 00000000000000/* Copyright (C) 2009 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_scrollable.cc * * @author Kai Sterker * @brief Basic functionality for automated scolling. */ #include #include "gui_scrollable.h" /// the area around the view sensitive to scrolling #define ACTIVE_BORDER 40 /// amount of pixels the view is moved per iteration #define SCROLL_OFFSET 15 /// width and length of the cursor #define SCROLL_CURSOR_SIZE (24) /// a cursor to indicate scrolling static const guint8 SCROLL_CURSOR_pixel_data[24 * 24 * 4 + 1] = "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\0\0\0\377\200\200\200\377\200\200\200\377\0\0\0\377\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\200\200\200\377\377\377\377" "\377\377\377\377\377\200\200\200\377\0\0\0\377\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\200" "\200\200\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" "\200\200\200\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0" "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\200\200" "\200\377\0\0\0\344\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377" "\200\200\200\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0" "\377\200\200\200\377\377\377\377\377\0\0\0\377\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\0\0\0\377\377\377\377\377\200\200\200\377\0\0\0\377\377\377\377" "\0\0\0\0\377\200\200\200\377\377\377\377\377\377\377\377\377\0\0\0\377\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377" "\377\377\377\377\377\377\377\377\0\0\0\377\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\377\377\377\377\377" "\377\200\200\200\377\0\0\0\377\0\0\0\377\200\200\200\377\377\377\377\377\377" "\377\377\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\0\0\0\377\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" "\377\377\377\377\377\377\377\200\200\200\377\0\0\0\377\377\377\377\0\0\0\0" "\377\200\200\200\377\377\377\377\377\0\0\0\377\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\0\0\0\377\377\377\377\377\200\200\200\377\0\0\0\377\377\377\377" "\0\377\377\377\0\377\377\377\0\0\0\0\377\200\200\200\377\0\0\0\302\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\200\200\200\377\0\0\0\377" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0" "\0\350\0\0\0\345\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0" "\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\0\0\0\377\200\200\200\377\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\200\200\200\377\0\0\0\377" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\0\0\0\377\200\200\200\377\377\377\377\377\377\377\377\377" "\200\200\200\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377" "\200\200\200\377\200\200\200\377\0\0\0\377\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0"; /** * Callback for autoscrolling the graph view. * * Once 'auto-scrolling' is activated, this function is called every * 10th of a second until it returns FALSE */ int on_scroll_graph (gpointer data) { int x, y; static int delay = 0; Scrollable *scroller = (Scrollable *) data; GtkWidget *widget = scroller->drawingArea (); // check that parent window is active GtkWidget *window = gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW); if (window != NULL && !gtk_window_is_active (GTK_WINDOW(window))) { scroller->stopScrolling (); delay = 0; return FALSE; } // get the present cursor position (relative to the graph) gtk_widget_get_pointer (widget, &x, &y); GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); // stop scrolling if outside widget or too far from widget's border if (x < 0 || x > allocation.width || y < 0 || y > allocation.height || !scroller->isScrolling ()) { scroller->stopScrolling (); delay = 0; return FALSE; } // wait approx. 0.8 seconds before starting to scroll if (delay++ < 5) return TRUE; // move the view scroller->scroll (); return TRUE; } // ctor Scrollable::Scrollable() { scrolling = false; scroll_offset.x = 0; scroll_offset.y = 0; createScrollCursor(); } // dtor Scrollable::~Scrollable() { gdk_cursor_unref (scrollCursor); } // prepare everything for 'auto-scrolling' (TM) ;-) void Scrollable::prepareScrolling (const GdkPoint & point) { if (!scrollingAllowed ()) return; int scroll_x = 0; int scroll_y = 0; GtkWidget *widget = drawingArea (); GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); // set scrolling offset and direction if (point.x < ACTIVE_BORDER) scroll_x = SCROLL_OFFSET; if (point.y < ACTIVE_BORDER) scroll_y = SCROLL_OFFSET; if (point.x + ACTIVE_BORDER > allocation.width) scroll_x = -SCROLL_OFFSET; if (point.y + ACTIVE_BORDER > allocation.height) scroll_y = -SCROLL_OFFSET; // enable scrolling if (scroll_x || scroll_y) { scroll_offset.x = scroll_x; scroll_offset.y = scroll_y; if (!scrolling) { GdkWindow *window = gtk_widget_get_window (widget); gdk_window_set_cursor (window, scrollCursor); scrolling = true; // make sure that drawing has priority over scrolling g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100, on_scroll_graph, this, NULL); } } else stopScrolling(); } // scrolling or not? bool Scrollable::isScrolling () const { return scrolling; } // stop scrolling void Scrollable::stopScrolling () { GdkWindow *window = gtk_widget_get_window (drawingArea()); gdk_window_set_cursor (window, NULL); scrolling = false; } // the cursor displayed while in the scrolling region void Scrollable::createScrollCursor() { GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data (SCROLL_CURSOR_pixel_data, GDK_COLORSPACE_RGB, TRUE, 8, SCROLL_CURSOR_SIZE, SCROLL_CURSOR_SIZE, SCROLL_CURSOR_SIZE * 4, NULL, NULL); scrollCursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default(), pixbuf, SCROLL_CURSOR_SIZE / 2, SCROLL_CURSOR_SIZE / 2); g_object_unref (pixbuf); } adonthell-0.3.8/src/tools/dlgedit/loadlg.l0000664000175000017500000000646512756055416015427 00000000000000%{ /* Copyright (C) 2000/2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include #include #include "dlg_types.h" #define YY_DECL int parse_dlgfile (std::string &mytext, int &mynum) // definitions for using 'includes' #define MAX_INCLUDE_DEPTH 10 YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; int include_stack_ptr = 0; // switch to another file for input void parser_switch_input () { include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER; yy_switch_to_buffer (yy_create_buffer (yyin, YY_BUF_SIZE)); } // return to previous file void parser_restore_input () { yy_delete_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (include_stack[include_stack_ptr]); } %} digit [0-9] num -?{digit}+ %x text module %option noyywrap nounput never-interactive prefix="loadlg" %% "#".*[\n]? ; /* Eat up comments */ Circle return LOAD_CIRCLE; Arrow return LOAD_ARROW; End return LOAD_END; Type return LOAD_TYPE; Prev return LOAD_PREV; Next return LOAD_NEXT; Link return LOAD_LINK; Pos return LOAD_POS; Note return LOAD_NOTE; Text return LOAD_TEXT; Cond return LOAD_COND; Vars return LOAD_VARS; Func return LOAD_FUNC; NPC return LOAD_NPC; Name return LOAD_NAME; Race return LOAD_RACE; Gender return LOAD_GENDER; Loop return LOAD_LOOP; Proj return LOAD_PROJECT; Inc return LOAD_IMPORTS; Dtor return LOAD_DTOR; Ctor return LOAD_CTOR; Id return LOAD_ID; Module mytext = ""; BEGIN(module); return LOAD_MODULE; [ \t] /* Eat whitespace */ [^ \t\n]+ { mytext += yytext; BEGIN(INITIAL); if (include_stack_ptr >= MAX_INCLUDE_DEPTH) { fprintf (stderr, "Modules nested too deeply\n"); return LOAD_UNKNOWN; } return LOAD_STR; } <> { if (--include_stack_ptr < 0) { include_stack_ptr = 0; yyterminate (); } else { parser_restore_input (); return 0; } } \xa7 mytext = ""; BEGIN(text); \xa7 BEGIN(INITIAL); return LOAD_STR; [^\xa7]+ mytext += yytext; {num} mynum = atoi (yytext); return LOAD_NUM; [ \t\n]+ ; . return LOAD_UNKNOWN; adonthell-0.3.8/src/tools/dlgedit/gui_list_events.cc0000664000175000017500000000370312756055011017501 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_list_events.cc * * @author Kai Sterker * @brief Event-callbacks for the instant dialogue preview */ #include "gui_list_events.h" #include "gui_dlgedit.h" // Node selected in preview void on_list_select (GtkTreeSelection *selection, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; // anything selected at all? if (gtk_tree_selection_get_selected (selection, &model, &iter)) { DlgCircle* circle; gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &circle, -1); GuiGraph *graph = GuiDlgedit::window->graph (); // change selection in the graph view graph->deselectNode (); graph->selectNode (circle); graph->centerNode (); } } // list resized -> update column width void on_list_resize (GtkWidget *widget, GdkRectangle *allocation, gpointer data) { // set new size for each row GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gtk_list_store_set (GTK_LIST_STORE(model), &iter, 4, allocation->width - 10, -1); } while (gtk_tree_model_iter_next (model, &iter)); } } adonthell-0.3.8/src/tools/dlgedit/gui_messages.cc0000664000175000017500000001203112756055056016754 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_messages.cc * * @author Kai Sterker * @brief Defines the messages to display in the status bar. */ #include #include "gui_messages.h" // define all the different messages GuiMessages::GuiMessages (GtkWidget *sb) { current = 0; statusbar = sb; // Menu Help Messages messages[1] = " Create new dialogue"; messages[2] = " Load dialogue from disk"; messages[3] = " Save dialogue to disk"; messages[4] = " Save dialogue under new name"; messages[5] = " Close current dialogue"; messages[6] = " Exit the program"; messages[7] = " Reload dialogue from disk, discarding recent changes."; messages[10] = " Change the preferences of the current dialogue"; messages[11] = " Customize imports, constructor, destructor and methods of the dialogue script"; messages[12] = " Transform the current dialogue into a Python script, as required by the dialogue engine"; messages[13] = " Preview a translation of the current dialogue"; messages[14] = " Start the dialogue engine with the current dialogue"; messages[20] = " Switch the view to this dialogue"; // Dialogue Editing Help Messages messages[100] = " LEFT-click to select Circle or MIDDLE-click to edit it"; messages[101] = " LEFT-click to select Arrow"; messages[102] = " LEFT-click to create new Circle"; messages[110] = " RIGHT-click to cancel selection or press DEL to delete selected node"; messages[111] = " LEFT-click to connect the two Circles"; messages[112] = " LEFT-click to create new Circle, connected with the selected one"; messages[113] = " MIDDLE-click/press ENTER to edit selected Circle"; messages[120] = " Release LEFT mouse button to attach Arrow to this Circle"; messages[130] = " All editing functions are disabled. Press CTRL+V to leave preview mode"; // Report Success messages[200] = " Loading successful"; messages[201] = " Saving successful"; messages[202] = " Sub-dialogue loaded successfully"; messages[210] = " Settings updated"; messages[211] = " Custom code updated"; messages[212] = " Dialogue compiled successfully"; // Welcome Message messages[1000] = " Welcome to the Adonthell Dialogue Editor"; // Report Failure messages[-2] = " Could not open '%s'. Please make sure the file exists and is readable"; messages[-3] = " Could not load '%s'. Either this is no dialogue source, or it has been corrupted"; messages[-4] = " Saving of '%s' failed."; messages[-100] = " Cannot connect two PLAYER Circles"; // Preview Translations messages[-130] = " '%s' does not appear to be a binary catalog file"; messages[-131] = " Failed to create temporary locale dir"; } // display a message to the statusbar void GuiMessages::display (int id) { // no change needed if (id == current) return; const char *message = messages[id]; // some context id the statusbar needs for some reason id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Message"); // remove the previous message gtk_statusbar_pop (GTK_STATUSBAR (statusbar), id); // add the new status gtk_statusbar_push (GTK_STATUSBAR (statusbar), id, message); } // display a message with some custom text inserted void GuiMessages::display (int id, const char* text) { if (id == current) return; std::string message (messages[id]); unsigned long pos = message.find ("%s"); // insert text into the message if (pos != message.npos) message.replace (pos, 2, text); // some context id the statusbar needs for some reason id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Message"); // remove the previous message gtk_statusbar_pop (GTK_STATUSBAR (statusbar), id); // add the new status gtk_statusbar_push (GTK_STATUSBAR (statusbar), id, message.c_str ()); } // clear the statusbar void GuiMessages::clear () { // some context id the statusbar needs for some reason int id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Message"); // remove the previous message gtk_statusbar_pop (GTK_STATUSBAR (statusbar), id); } adonthell-0.3.8/src/tools/dlgedit/gui_circle.cc0000664000175000017500000004742612756054555016431 00000000000000/* Copyright (C) 2002/2004/2007 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include #include "gui_circle.h" #include "gui_circle_events.h" /** * @file gui_circle.cc * * @author Kai Sterker * @brief The Edit Circle window */ static gint sort_strings (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer unused) { GValue val_a = {0}; GValue val_b = {0}; gtk_tree_model_get_value (model, a, 0, &val_a); gtk_tree_model_get_value (model, b, 0, &val_b); // sort "Default" entry to the top of the list if (strcmp ("Default", g_value_get_string (&val_a)) == 0) return -1; if (strcmp ("Default", g_value_get_string (&val_b)) == 0) return 1; return strcmp(g_value_get_string (&val_a), g_value_get_string (&val_b)); } GuiCircle::GuiCircle (GtkWindow *parent, node_type *t, DlgCircleEntry *e, DlgModuleEntry *dme) : GuiModalDialog (parent) { entry = e; type = t; GtkWidget *vbox1; GtkWidget *notebook1; GtkWidget *vbox2; GtkWidget *scrolledwindow; GtkWidget *label; GSList *character_group = NULL; GtkWidget *player_button; GtkWidget *narrator_button; GtkWidget *hbox1; GtkWidget *npc_button; GtkWidget *npc_mood; GtkWidget *frame1; GtkWidget *hbuttonbox1; GtkWidget *ok_button; GtkWidget *cancel_button; GtkWidget *ebox; GtkWidget *text_view; GtkWidget *annotation_view; // color to use for Player and Narrator text and labels GdkColor dark_blue = { 0, 0, 0, 35000 }; GdkColor green = { 0, 0, 27300, 15600 }; GdkColor dark_green = { 0, 0, 27500, 0 }; GtkStyle *style = NULL; // the "Edit Dialogue Node" window window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_set_data (G_OBJECT (window), "window", window); gtk_widget_set_size_request (window, 400, 320); gtk_window_set_title (GTK_WINDOW (window), "Edit Dialogue Node"); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); vbox1 = gtk_vbox_new (FALSE, 0); g_object_ref (vbox1); g_object_set_data_full (G_OBJECT (window), "vbox1", vbox1, (GDestroyNotify) g_object_unref); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (window), vbox1); // the GtkNotebook with the different 'pages' of the window notebook1 = gtk_notebook_new (); g_object_ref (notebook1); g_object_set_data_full (G_OBJECT (window), "notebook1", notebook1, (GDestroyNotify) g_object_unref); gtk_widget_show (notebook1); gtk_box_pack_start (GTK_BOX (vbox1), notebook1, TRUE, TRUE, 0); gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook1), FALSE); gtk_widget_set_can_focus (notebook1, FALSE); // Page 1: Edit Text vbox2 = gtk_vbox_new (FALSE, 0); g_object_ref (vbox2); g_object_set_data_full (G_OBJECT (window), "vbox2", vbox2, (GDestroyNotify) g_object_unref); gtk_widget_show (vbox2); gtk_container_add (GTK_CONTAINER (notebook1), vbox2); gtk_container_set_border_width (GTK_CONTAINER (vbox2), 4); // Scrollbar for the text entry scrolledwindow = gtk_scrolled_window_new (NULL, NULL); g_object_ref (scrolledwindow); g_object_set_data_full (G_OBJECT (window), "scrolledwindow1", scrolledwindow, (GDestroyNotify) g_object_unref); gtk_widget_show (scrolledwindow); gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); // the text entry text_entry = gtk_text_buffer_new (NULL); text_view = gtk_text_view_new_with_buffer (GTK_TEXT_BUFFER (text_entry)); g_object_ref (text_view); g_object_set_data_full (G_OBJECT (window), "text_view", text_view, (GDestroyNotify) g_object_unref); gtk_widget_show (text_view); gtk_container_add (GTK_CONTAINER (scrolledwindow), text_view); gtk_widget_set_can_default (text_view, TRUE); gtk_widget_set_tooltip_text (text_view, "Enter the Text to appear within the conversation"); gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), TRUE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); // set the text of the entry gtk_text_buffer_set_text (GTK_TEXT_BUFFER (text_entry), e->text ().c_str (), -1); // The radiobuttons to chose the text-type from label = gtk_label_new ("Narrator"); gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); // make the narrator-radiobutton-text green style = gtk_style_copy (gtk_widget_get_default_style ()); style->fg[GTK_STATE_NORMAL] = dark_green; style->fg[GTK_STATE_ACTIVE] = dark_green; style->fg[GTK_STATE_PRELIGHT] = dark_green; style->fg[GTK_STATE_SELECTED] = dark_green; gtk_widget_set_style (label, style); gtk_widget_show (label); narrator_button = gtk_radio_button_new (character_group); gtk_container_add (GTK_CONTAINER(narrator_button), label); character_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (narrator_button)); g_object_ref (narrator_button); g_object_set_data_full (G_OBJECT (window), "narrator_button", narrator_button, (GDestroyNotify) g_object_unref); g_object_set_data (G_OBJECT (narrator_button), "type", GINT_TO_POINTER (NARRATOR)); gtk_widget_show (narrator_button); gtk_box_pack_start (GTK_BOX (vbox2), narrator_button, FALSE, FALSE, 0); gtk_widget_set_can_focus (narrator_button, FALSE); // activate the narrator button if neccessary if (*type == NARRATOR) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (narrator_button), TRUE); on_radio_button_pressed (GTK_BUTTON (narrator_button), text_view); } // the player button label = gtk_label_new ("Player"); gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); // make the player-radiobutton-text blue style = gtk_style_copy (gtk_widget_get_default_style ()); style->fg[GTK_STATE_NORMAL] = dark_blue; style->fg[GTK_STATE_ACTIVE] = dark_blue; style->fg[GTK_STATE_PRELIGHT] = dark_blue; style->fg[GTK_STATE_SELECTED] = dark_blue; gtk_widget_set_style (label, style); gtk_widget_show (label); player_button = gtk_radio_button_new (character_group); gtk_container_add (GTK_CONTAINER(player_button), label); character_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (player_button)); g_object_ref (player_button); g_object_set_data_full (G_OBJECT (window), "player_button", player_button, (GDestroyNotify) g_object_unref); g_object_set_data (G_OBJECT (player_button), "type", GINT_TO_POINTER (PLAYER)); gtk_widget_show (player_button); gtk_box_pack_start (GTK_BOX (vbox2), player_button, FALSE, FALSE, 0); gtk_widget_set_can_focus (player_button, FALSE); // activate the player button if neccessary if (*type == PLAYER) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (player_button), TRUE); on_radio_button_pressed (GTK_BUTTON (player_button), text_view); } hbox1 = gtk_hbox_new (FALSE, 10); g_object_ref (hbox1); g_object_set_data_full (G_OBJECT (window), "hbox1", hbox1, (GDestroyNotify) g_object_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0); // the NPC radiobutton npc_button = gtk_radio_button_new_with_label (character_group, "NPC:"); character_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (npc_button)); g_object_ref (npc_button); g_object_set_data_full (G_OBJECT (window), "npc_button", npc_button, (GDestroyNotify) g_object_unref); g_object_set_data (G_OBJECT (npc_button), "type", GINT_TO_POINTER (NPC)); gtk_widget_show (npc_button); gtk_box_pack_start (GTK_BOX (hbox1), npc_button, FALSE, FALSE, 0); gtk_widget_set_can_focus (npc_button, FALSE); // activate the NPC button if neccessary if (*type == NPC) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (npc_button), TRUE); on_radio_button_pressed (GTK_BUTTON (npc_button), text_view); } // the option menu with the available NPC's GtkTreeIter iter; GtkListStore *npc_list = gtk_list_store_new (1, G_TYPE_STRING); npc_selection = GTK_COMBO_BOX (gtk_combo_box_new_with_model (GTK_TREE_MODEL (npc_list))); g_object_ref (GTK_WIDGET (npc_selection)); g_object_set_data_full (G_OBJECT (window), "npc_selection", npc_selection, (GDestroyNotify) g_object_unref); gtk_widget_show (GTK_WIDGET (npc_selection)); gtk_box_pack_start (GTK_BOX (hbox1), GTK_WIDGET (npc_selection), TRUE, TRUE, 0); gtk_widget_set_tooltip_text (GTK_WIDGET (npc_selection), "Select the speaker"); GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (npc_selection), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (npc_selection), renderer, "text", 0, NULL); // add "default" entry gtk_list_store_append (GTK_LIST_STORE (npc_list), &iter); gtk_list_store_set (GTK_LIST_STORE (npc_list), &iter, 0, "Default", -1); gtk_combo_box_set_active_iter (npc_selection, &iter); for (std::string name = dme->character (); name != ""; name = dme->character ()) { gtk_list_store_append (GTK_LIST_STORE (npc_list), &iter); gtk_list_store_set (GTK_LIST_STORE (npc_list), &iter, 0, name.c_str(), -1); if (name == e->npc ()) { gtk_combo_box_set_active_iter (npc_selection, &iter); } } // set sorting gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(npc_list), 0, sort_strings, NULL, NULL); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(npc_list), 0, GTK_SORT_ASCENDING); // the option menu with the available moods label = gtk_label_new ("Mood: "); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox1), label, TRUE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label), 0.01, 0.5); GtkListStore *mood_list = gtk_list_store_new (1, G_TYPE_STRING); npc_mood = gtk_combo_box_new_with_model (GTK_TREE_MODEL (mood_list)); g_object_ref (GTK_WIDGET (npc_mood)); g_object_set_data_full (G_OBJECT (window), "npc_mood", npc_mood, (GDestroyNotify) g_object_unref); gtk_widget_show (GTK_WIDGET (npc_mood)); gtk_box_pack_start (GTK_BOX (hbox1), GTK_WIDGET (npc_mood), TRUE, TRUE, 0); gtk_widget_set_tooltip_text (GTK_WIDGET (npc_mood), "How the speaker's image appears to the player"); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (npc_mood), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (npc_mood), renderer, "text", 0, NULL); // add "default" entry gtk_list_store_append (GTK_LIST_STORE (mood_list), &iter); gtk_list_store_set (GTK_LIST_STORE (mood_list), &iter, 0, "Default", -1); gtk_combo_box_set_active_iter (GTK_COMBO_BOX(npc_mood), &iter); // The heading of this page label = gtk_label_new ("Text"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label); // the entry for annotations frame1 = gtk_frame_new ("Annotations:"); g_object_ref (frame1); g_object_set_data_full (G_OBJECT (window), "frame1", frame1, (GDestroyNotify) g_object_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (vbox2), frame1, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); g_object_ref (scrolledwindow); g_object_set_data_full (G_OBJECT (window), "scrolledwindow4", scrolledwindow, (GDestroyNotify) g_object_unref); gtk_widget_show (scrolledwindow); gtk_container_add (GTK_CONTAINER (frame1), scrolledwindow); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow), 4); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); annotation_entry = gtk_text_buffer_new (NULL); annotation_view = gtk_text_view_new_with_buffer (annotation_entry); g_object_ref (annotation_view); g_object_set_data_full (G_OBJECT (window), "annotation_view", annotation_view, (GDestroyNotify) g_object_unref); gtk_widget_show (annotation_view); gtk_container_add (GTK_CONTAINER (scrolledwindow), annotation_view); gtk_widget_set_tooltip_text (annotation_view, "Here is room for comments and other reminders"); gtk_text_view_set_editable (GTK_TEXT_VIEW (annotation_view), TRUE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (annotation_view), GTK_WRAP_WORD); // insert text gtk_text_buffer_set_text (GTK_TEXT_BUFFER (annotation_entry), e->annotation ().c_str (), -1); // the loop checkbox ebox = gtk_event_box_new (); g_object_ref (ebox); gtk_widget_show (ebox); g_object_set_data_full (G_OBJECT (window), "ebox", ebox, (GDestroyNotify) g_object_unref); gtk_box_pack_end (GTK_BOX (vbox2), ebox, FALSE, FALSE, 0); gtk_widget_set_tooltip_text (ebox, "Unless this is checked, the text becomes unavailable after being uttered."); loop = gtk_check_button_new_with_label ("Loop"); g_object_ref (loop); g_object_set_data_full (G_OBJECT (window), "loop", loop, (GDestroyNotify) g_object_unref); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (loop), e->loop ()); gtk_widget_show (loop); gtk_container_add (GTK_CONTAINER (ebox), loop); // Condition-editor cond_edit = new GuiEdit (notebook1); // append tooltips gtk_widget_set_tooltip_text (cond_edit->widget (), "Enter the conditions that have to be met before this node is available in the dialogue"); // display the current conditios cond_edit->setText (entry->condition ()); style = gtk_style_copy (gtk_widget_get_default_style ()); style->fg[GTK_STATE_NORMAL] = green; style->fg[GTK_STATE_ACTIVE] = green; style->fg[GTK_STATE_PRELIGHT] = green; style->fg[GTK_STATE_SELECTED] = green; label = gtk_label_new ("Conditions"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); if (e->condition () != "") gtk_widget_set_style (label, style); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label); // Code-editor code_edit = new GuiEdit (notebook1); // append tooltips gtk_widget_set_tooltip_text (code_edit->widget (), "Here you can enter arbitrary Python code to be executed when this line of dialogue is uttered."); // display the current code code_edit->setText (entry->code ()); label = gtk_label_new ("Variables"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); if (e->code () != "") gtk_widget_set_style (label, style); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label); hbuttonbox1 = gtk_hbutton_box_new (); g_object_ref (hbuttonbox1); g_object_set_data_full (G_OBJECT (window), "hbuttonbox1", hbuttonbox1, (GDestroyNotify) g_object_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 0); // ok button ok_button = gtk_button_new_with_label ("OK"); g_object_ref (ok_button); g_object_set_data_full (G_OBJECT (window), "ok_button", ok_button, (GDestroyNotify) g_object_unref); gtk_widget_show (ok_button); gtk_container_add (GTK_CONTAINER (hbuttonbox1), ok_button); gtk_widget_set_can_default (ok_button, TRUE); // cancel button cancel_button = gtk_button_new_with_label ("Cancel"); g_object_ref (cancel_button); g_object_set_data_full (G_OBJECT (window), "cancel_button", cancel_button, (GDestroyNotify) g_object_unref); gtk_widget_show (cancel_button); gtk_container_add (GTK_CONTAINER (hbuttonbox1), cancel_button); gtk_widget_set_can_default (cancel_button, TRUE); // the various input handlers g_signal_connect (G_OBJECT (player_button), "clicked", G_CALLBACK (on_radio_button_pressed), text_view); g_signal_connect (G_OBJECT (npc_button), "clicked", G_CALLBACK (on_radio_button_pressed), text_view); g_signal_connect (G_OBJECT (narrator_button), "clicked", G_CALLBACK (on_radio_button_pressed), text_view); g_signal_connect (G_OBJECT (ok_button), "clicked", G_CALLBACK (on_circle_ok_button_pressed), this); g_signal_connect (G_OBJECT (cancel_button), "clicked", G_CALLBACK (gtk_main_quit), NULL); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_widget_destroyed), &window); // give focus to the text entry gtk_widget_grab_focus (text_view); gtk_widget_grab_default (text_view); } // Apply the user's changes to the DlgCircle void GuiCircle::applyChanges () { GtkTextIter start, end; gchar *text; // set the circle's type *type = (node_type) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (text_entry), "type")); // get the contents of the different entries gtk_text_buffer_get_bounds (text_entry, &start, &end); text = gtk_text_buffer_get_text (text_entry, &start, &end, TRUE); entry->setText (text); g_free (text); gtk_text_buffer_get_bounds (annotation_entry, &start, &end); text = gtk_text_buffer_get_text (annotation_entry, &start, &end, TRUE); entry->setAnnotation (text); g_free (text); entry->setCode (code_edit->getText ()); entry->setCondition (cond_edit->getText ()); entry->setNpc (getOption (npc_selection)); entry->setLoop (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (loop))); } // returns selected option const gchar *GuiCircle::getOption (GtkComboBox *cbox) { GtkTreeIter iter; gchar *option = NULL; if (gtk_combo_box_get_active_iter (cbox, &iter)) { GtkTreeModel *model = gtk_combo_box_get_model (cbox); gtk_tree_model_get (model, &iter, 0, &option, -1); } return option ? option : "Default"; } // sets a default option void GuiCircle::setOption (GtkComboBox *cbox, const gchar *label) { GtkTreeIter iter; gchar *option = NULL; GtkTreeModel *model = gtk_combo_box_get_model (cbox); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get (model, &iter, 0, &option, -1); if (strcmp(option, label) == 0) { gtk_combo_box_set_active_iter(cbox, &iter); break; } } while (gtk_tree_model_iter_next(model, &iter)); } } adonthell-0.3.8/src/tools/dlgedit/gui_circle_events.cc0000664000175000017500000000421012756054532017770 00000000000000/* Copyright (C) 2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_circle_events.cc * * @author Kai Sterker * @brief Callbacks of the Edit Circle dialog */ #include "gui_circle_events.h" #include "gui_circle.h" // Colorize the dialogue text according to the character it is assigned to void on_radio_button_pressed (GtkButton * button, gpointer user_data) { GtkWidget *entry = (GtkWidget *) user_data; GtkTextBuffer *buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry)); int type = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "type")); GdkColor color = { 0, 0, 0, 0 }; switch (type) { case PLAYER: color.blue = 35000; break; case NARRATOR: color.green = 27300; color.blue = 15600; break; } // Change the color of the text entry gtk_widget_modify_text (entry, GTK_STATE_NORMAL, &color); // remember the type of the text g_object_set_data (G_OBJECT (buf), "type", GINT_TO_POINTER (type)); } // close the dialog and keep all changes void on_circle_ok_button_pressed (GtkButton * button, gpointer user_data) { GuiCircle *dialog = (GuiCircle *) user_data; dialog->applyChanges (); dialog->okButtonPressed (true); // clean up gtk_main_quit (); } // close dialog and dismiss all changes void on_circle_cancel_button_pressed (GtkButton * button, gpointer user_data) { // clean up gtk_main_quit (); } adonthell-0.3.8/src/tools/dlgedit/gui_resources.cc0000664000175000017500000000774712756055156017202 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_resources.cc * * @author Kai Sterker * @brief Provides fonts and Colors used throughout dlgedit. */ #include "gui_resources.h" /** * The font for text output. */ PangoLayout *GuiResources::Font; /** * Some pens for line drawing. */ GdkColor GuiResources::Color[MAX_GC]; // create font and pens void GuiResources::init (GtkWidget *widget) { // font to use on the drawing area Font = gtk_widget_create_pango_layout (widget, NULL); GdkColor *c; // Black c = &(Color[GC_BLACK]); c->red = 0; c->green = 0; c->blue = 0; // White c = &(Color[GC_WHITE]); c->red = 65535; c->green = 65535; c->blue = 65535; // Grey (for NPC node background) c = &(Color[GC_GREY]); c->red = 55000; c->green = 55000; c->blue = 55000; // Dark Red (for selected nodes) c = &(Color[GC_DARK_RED]); c->red = 65535; c->green = 0; c->blue = 0; // Red c = &(Color[GC_RED]); c->red = 65535; c->green = 16350; c->blue = 0; // Green (for narrator node background) c = &(Color[GC_GREEN]); c->red = 51117; c->green = 65355; c->blue = 48496; // Dark Green (for narrator nodes) c = &(Color[GC_DARK_GREEN]); c->red = 0; c->green = 27300; c->blue = 15600; // Orange (for highlighting nodes) c = &(Color[GC_ORANGE]); c->red = 62258; c->green = 43253; c->blue = 9175; // Dark Blue (for player nodes) c = &(Color[GC_DARK_BLUE]); c->red = 0; c->green = 0; c->blue = 60000; // Blue - like the sky (for player node background) c = &(Color[GC_BLUE]); c->red = 48496; c->green = 50461; c->blue = 65535; } // Get a certain predefined Color const GdkColor *GuiResources::getColor (int color) { if (color < 0 || color > MAX_GC) return (GdkColor*) NULL; else return &Color[color]; } // Get the right Color for a (mode, type) combination const GdkColor *GuiResources::getColor (mode_type mode, node_type type) { switch (mode) { // not selected case IDLE: { if (type == NPC || type == LINK || type == MODULE) return &Color[GC_BLACK]; else if (type == NARRATOR) return &Color[GC_DARK_GREEN]; else if (type == PLAYER) return &Color[GC_DARK_BLUE]; else return &Color[GC_BLACK]; } // selected case NODE_SELECTED: { return &Color[GC_DARK_RED]; } // highlighted case NODE_HILIGHTED: { return &Color[GC_ORANGE]; } // unknown default: return &Color[GC_BLACK]; } return (GdkColor*) NULL; } // Get the right Fill Color for a (mode, type) combination // This color is going to be filled inside the node cirle const GdkColor* GuiResources::getFill (mode_type mode, node_type type) { switch (type) { case PLAYER: return &Color[GC_BLUE]; case NPC: return &Color[GC_GREY]; case NARRATOR: return &Color[GC_GREEN]; // unknown default: return &Color[GC_WHITE]; } return (GdkColor*) NULL; } adonthell-0.3.8/src/tools/dlgedit/dlg_arrow.cc0000664000175000017500000002443012756054154016265 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_arrow.cc * * @author Kai Sterker * @brief The node linking two DlgCircle's. */ #include #include #include "dlg_arrow.h" #include "dlg_module.h" #include "gui_resources.h" // Create a new link between two nodes DlgArrow::DlgArrow (DlgNode *start, DlgNode *end) { type_ = LINK; mode_ = IDLE; nid_ = 0; // add the start and end to this arrow prev_.push_back (start); next_.push_back (end); // add the arrow to it's start and end node start->addNext (this); end->addPrev (this); // init the Arrow's shape, for faster drawing initShape (); } // Remove arrow from it's start and end node DlgArrow::~DlgArrow () { DlgNode *circle; // remove arrow from previous circle if (prev_.size () != 0) { circle = prev_.front (); circle->removeNext (this); } // remove arrow from following circle if (next_.size () != 0) { circle = next_.front (); circle->removePrev (this); } } // prepare the Arrow's shape void DlgArrow::initShape () { // start- and end-point of arrow DlgPoint start = prev_.front ()->center (); DlgPoint end = next_.front ()->center (); // gradient of line int x = start.x () - end.x (); int y = start.y () - end.y (); // scaled to 1 float s = sqrt (x*x + y*y); float a = x / s; float b = y / s; DlgPoint line0 = getIntersection (start, end, *prev_.front ()); DlgPoint line1 = getIntersection (end, start, *next_.front ()); // line from start- to end-circle line[0] = (GdkPoint) line0; line[1] = (GdkPoint) line1; // arrow's tip tip[0] = line[1]; tip[1] = (GdkPoint) line1.offset ((int)(a * 8.0f + b * 4.0f), (int)(b * 8.0f - a * 4.0f)); tip[2] = (GdkPoint) line1.offset ((int)(a * 8.0f - b * 4.0f), (int)(b * 8.0f + a * 4.0f)); // calculate arrow's new dimension init (line0, line1); grow (2, 2); } // calculate intersection of arrow and node shape DlgPoint DlgArrow::getIntersection (DlgPoint &start, DlgPoint &end, DlgRect &shape) { DlgPoint tl = shape.topLeft (); DlgPoint br = shape.bottomRight (); int direction; double a, b; DlgPoint p; // gradient of line int x = end.x () - start.x (); int y = end.y () - start.y (); // tangens of angle between line(start, end) and x-axis double m = x == 0 ? 1.0 : double (y) / x; double n = y == 0 ? 1.0 : double (x) / y; // direction where line(start, end) intersects with border of start enum { NORTH, EAST, SOUTH, WEST }; // calculate where line(start, end) intersects with border of start if (y < 0) { a = tl.y () - start.y (); if (x > 0) { // 1. quadrant b = br.x () - start.x (); if (m > a / b) direction = EAST; else direction = NORTH; } else { // 2. quadrant b = tl.x () - start.x (); if (m >= a / b) direction = NORTH; else direction = WEST; } } else { a = br.y () - start.y (); if (x < 0) { // 3. quadrant b = tl.x () - start.x (); if (m > a / b) direction = WEST; else direction = SOUTH; } else { // 4. quadrant b = br.x () - start.x (); if (m >= a / b) direction = SOUTH; else direction = EAST; } } // now we have one coordinate of the intersection and can // calculate the second switch (direction) { case NORTH: { p = DlgPoint ((tl.y () - start.y ()) * n + start.x (), tl.y ()); break; } case EAST: { p = DlgPoint (br.x (), start.y () + m * (br.x () - start.x ())); break; } case SOUTH: { p = DlgPoint ((br.y () - start.y ()) * n + start.x (), br.y ()); break; } case WEST: { p = DlgPoint (tl.x (), start.y () + m * (tl.x () - start.x ())); break; } } return p; } // draw the Arrow void DlgArrow::draw (cairo_surface_t *surface, DlgPoint &point, GtkWidget *widget) { cairo_t *cr = cairo_create (surface); const GdkColor *color = GuiResources::getColor (mode_, type_); DlgPoint l[2]; DlgPoint t[4]; DlgRect area = inflate (10, 10); // Current position area.move (point); l[0] = DlgPoint (line[0]).offset (point); l[1] = DlgPoint (line[1]).offset (point); t[0] = DlgPoint (tip[0]).offset (point); t[1] = DlgPoint (tip[1]).offset (point); t[2] = DlgPoint (tip[2]).offset (point); t[3] = DlgPoint (tip[0]).offset (point); // draw everything drawPolygon (cr, color, FALSE, l, 2); drawPolygon (cr, GuiResources::getColor (GC_WHITE), TRUE, t, 3); drawPolygon (cr, color, FALSE, t, 4); // update drawing area update (widget, area); cairo_destroy(cr); } bool DlgArrow::operator== (DlgPoint &point) { // is the point anywhere near the arrow? if (contains (point)) { int x, dx, dy; // straight g: ax + by + c = 0 through 2 points p(x, y) und q(x, y): // with a = (p.y - q.y), b = (q.x - p.x), c = (-(p.x * a + p.y * b)) // insert point in above function; values |x| < 500 are close to the arrow dx = line[1].x - line[0].x; dy = line[0].y - line[1].y; x = (dy * point.x () + dx * point.y ()) - (line[0].x * dy + line[0].y * dx); if (x < 500 && x > -500) return true; } return false; } // load an arrow bool DlgArrow::load (DlgNode *m) { DlgModule *module = (DlgModule *) m; DlgModule *owner = module; DlgModule *toplevel = module->toplevel (); DlgNode *circle; std::string str; int n; // as long as we haven't reached EOF or are finished with loading: while (1) { // look what we find in the file switch (parse_dlgfile (str, n)) { // EOF or finished case 0: case LOAD_END: { // claculate the Arrow's shape initShape (); // finish concatenation prev_.front ()->addNext (this); next_.front ()->addPrev (this); return true; } // Module node belongs to case LOAD_MODULE: { if (parse_dlgfile (str, n) == LOAD_NUM) { // get the module the node belongs to owner = toplevel->getModule (n); // failed if (!owner || owner->type () != MODULE) { std::cout << "DlgArrow::load: failed to getModule (" << n << ")!" << std::endl; return false; } } break; } // Node prior to arrow case LOAD_PREV: { if (parse_dlgfile (str, n) == LOAD_NUM) { // get the id of the previous circle circle = owner->getNode (n); // failed if (circle == NULL) return false; } // everything okay, so add circle prev_.push_back (circle); // restore owner owner = module; break; } // Node following arrow case LOAD_NEXT: { if (parse_dlgfile (str, n) == LOAD_NUM) { // get the id of the previous circle circle = owner->getNode (n); // failed if (circle == NULL) return false; } // everything okay, so add circle next_.push_back (circle); // restore owner owner = module; break; } // Nodes linked to the arrow (obsolete -> convert to normal arrow) case LOAD_LINK: { if (parse_dlgfile (str, n) == LOAD_NUM) { circle = module->getNode (n); if (circle == NULL) break; DlgArrow *arrow = new DlgArrow (circle, next_.front ()); module->addNode (arrow); } break; } // Just ignore everything else default: break; } } return false; } // save an arrow to file void DlgArrow::save (std::ofstream &file) { // Keyword "Arrow" and arrow's number file << "\nArrow\n"; // module of start circle, if != 0 if (prev_.front ()->module_id () != 0) file << " Module " << prev_.front ()->module_id () << "\n"; // start circle file << " Prev " << prev_.front ()->node_id () << "\n"; // module of end circle, if != 0 if (next_.front ()->module_id () != 0) file << " Module " << next_.front ()->module_id () << "\n"; // end circle file << " Next " << next_.front ()->node_id () << "\n"; // end of node file << "End\n"; } adonthell-0.3.8/src/tools/dlgedit/gui_list.h0000664000175000017500000000420612756055050015761 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_list.h * * @author Kai Sterker * @brief Instant dialogue preview */ #ifndef GUI_LIST_H #define GUI_LIST_H #include "dlg_circle.h" /** * This widget uses a GtkList to display an instant preview of the dialogue. * It shows the parents and childs of a selected node and allows to navigate * through the dialogue by clicking on a line of text. */ class GuiList { public: /** * Constructor. Main purpose is to create the drawing area for the * graph and to register the GTK+ event callbacks used to catch * user input for this widget. * @param paned The GtkPaned that will hold the list widget. */ GuiList (GtkWidget* paned); /** * Standard desctructor. */ ~GuiList (); /** * "Draw" the current contents of the list. */ void draw (); /** * Empties the list and redraws it. */ void clear (); /** * Displays the given Dlgnode in the list, including all of it's parents * and children. * @param the node currently selected. */ void display (DlgNode *node); private: /** * Add an item to the list. * @param mode Defines whether the circle is selected or not * @param circle The circle whose text is to be added to the list */ void add (int mode, DlgCircle *circle); GtkWidget *list; // The actual GTK+ list widget }; #endif // GUI_LIST_H adonthell-0.3.8/src/tools/dlgedit/gui_list.cc0000664000175000017500000001134612756055041016122 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_list.cc * * @author Kai Sterker * @brief Instant dialogue preview widget */ #include "gui_list.h" #include "gui_list_events.h" GuiList::GuiList (GtkWidget *paned) { // Create list widget GtkWidget *scrolled = gtk_scrolled_window_new (NULL, NULL); gtk_paned_add2 (GTK_PANED (paned), scrolled); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_widget_show (scrolled); // the model GtkListStore *model = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING, PANGO_TYPE_WRAP_MODE, G_TYPE_INT); // the list list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); g_object_ref (list); gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(list), GTK_TREE_VIEW_GRID_LINES_NONE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled), list); gtk_widget_show (list); // create the columns GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(list), -1, "Dialogue", renderer, "text", 0, "foreground", 2, "wrap-mode", 3, "wrap-width", 4, NULL); GtkTreeViewColumn *column = gtk_tree_view_get_column(GTK_TREE_VIEW(list), 0); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); // selection listener GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(list)); // connect callbacks g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK(on_list_select), this); g_signal_connect (G_OBJECT (list), "size-allocate", G_CALLBACK(on_list_resize), this); } // (re)draw the list void GuiList::draw () { gtk_widget_queue_draw (list); } void GuiList::clear () { gtk_widget_hide (list); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gtk_list_store_clear (GTK_LIST_STORE(model)); gtk_widget_show (list); } // display instant preview for a given node void GuiList::display (DlgNode *node) { // make sure we have a valid node if (node == NULL || node->type() == MODULE) return; DlgCircle *circle, *c; // draw the new list gtk_widget_hide (list); // clear the list clear (); // make sure the node is a circle if (node->type () == LINK) circle = (DlgCircle*) node->next (FIRST); else circle = (DlgCircle *) node; // first of all, display all parents c = circle->parent (FIRST); while (c != NULL) { add (0, c); c = circle->parent (NEXT); } // add selected node add (1, circle); // finally, add all children c = circle->child (FIRST); while (c != NULL) { add (0, c); c = circle->child (NEXT); } gtk_widget_show (list); } // add an item to the list void GuiList::add (int mode, DlgCircle *circle) { GdkColor color; std::string label_text = circle->text (); // see what sort of node we have if (mode == 1) { color.red = 65535; if (circle->type () == NPC) color.green = 0; else if (circle->type () == NARRATOR) color.green = 32700; else color.green = 16350; color.blue = 0; } // parent and child nodes' text else { color.red = 0; if (circle->type () == NARRATOR) color.green = 27300; else color.green = 0; if (circle->type () == NPC) color.blue = 0; else if (circle->type () == NARRATOR) color.blue = 15600; else color.blue = 35000; } GtkAllocation allocation; gtk_widget_get_allocation (list, &allocation); // add list-item to list GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set (GTK_LIST_STORE(model), &iter, 0, label_text.c_str(), 1, circle, 2, gdk_color_to_string(&color), 3, PANGO_WRAP_WORD, 4, allocation.width - 10, -1); } adonthell-0.3.8/src/tools/dlgedit/dlg_circle.h0000664000175000017500000001211112756054231016223 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_circle.h * * @author Kai Sterker * @brief The node containing the actual dialogue text. */ #ifndef DLG_CIRCLE_H #define DLG_CIRCLE_H #include "dlg_node.h" #include "dlg_circle_entry.h" /** * This is the node that contains the actual dialogue text and associated * attributes, such as conditions or arbitrary (Python) code. * * There are three types of circles: Player, NPC and Narrator nodes. * - Player nodes contain text assigned to the person in front of the screen. * - NPC nodes are assigned to a certain, computer controlled entity. * - Narrator nodes are assigned to an (imaginary) voice from the off. */ class DlgCircle : public DlgNode { public: /** * Create an empty circle. Used when loading a circle. * @param mid The id of the module the circle belongs to. * @param nid The id of the circle. */ DlgCircle (int mid = 0, int nid = 0) { mode_ = IDLE; entry_ = NULL; mid_ = mid; nid_ = nid; } /** * Create a circle with basic information. Used to create a new circle. * @param p The point where the circle needs to be created. * @param t The type of the circle (PLAYER, NPC or NARRATOR). * @param nid The unique id of the newly created circle. * @param mid The id of the module the circle belongs to. * @param e The actual contents of the circle. */ DlgCircle (DlgPoint &p, node_type t, int nid, int mid, DlgCircleEntry *e = NULL); /** * Standard destructor. */ ~DlgCircle (); /** * @name Methods for graph traversal */ //@{ /** * This method retrieves a %DlgCircle preceeding this node, i.e. * (one of) it's parent(s). * @param pos Defines from what position to start retrieving the parent. * @param offset Get the parent found at the specified offset from the * position given above. * @return The %DlgCircle found at the specified offset from the * given position. * @see query_type */ DlgCircle* parent (query_type pos, int offset = 1); /** * This method retrieves a %DlgCircle following this node, i.e. * (one of) it's child(ren). * @param pos Defines from what position to start retrieving the child. * @param offset Get the child found at the specified offset from the * position given above. * @return The %DlgCircle found at the specified offset from the * given position. * @see query_type */ DlgCircle* child (query_type pos, int offset = 1); //@} /** * load circle from a file. The file to load from is a global variable, * as loading is handled by a scanner generated with flex. * @return true on success, false otherwise. */ bool load (); /** * save a circle to a file * @param file Stream to an open file */ void save (std::ofstream &file); /** * Draw this node to the given surface with the specified offset. * The node's current mode determines the color thw node is drawn with. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing */ void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget); /** * Get the contents of this node. * @return a DlgCircleEntry with the circle's text, code, conditions, etc. */ DlgCircleEntry *entry () { return entry_; } /** * Get the text of this circle * @return a string of the form ": " if a certain NPC is * attached to the node, otherwise returns only the text. */ std::string text (); /** * Get the text of this circle for use with the GuiTooltip * @return a string of the form "\n\n". */ std::string tooltip (); /** * Check whether any arbitrary Python code is assigned to this circle. * @return true if this is the case, false otherwise. */ bool hasCode () { return entry_->hasCode (); } /** * Check whether the given node is a child of this circle * @return true if this is the case, false otherwise. */ bool hasChild (DlgNode *child); private: DlgCircleEntry *entry_; }; #endif // DLG_CIRCLE_H adonthell-0.3.8/src/tools/dlgedit/gui_graph.cc0000664000175000017500000005706312756054771016267 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_graph.cc * * @author Kai Sterker * @brief View for the dialogue graph */ #include "cfg_data.h" #include "dlg_mover.h" #include "gui_dlgedit.h" #include "gui_graph_events.h" #include "gui_resources.h" #include "gui_circle.h" #include "gui_file.h" // Constructor GuiGraph::GuiGraph (GtkWidget *paned) : Scrollable () { // initialize members to sane values mover = NULL; module = NULL; offset = NULL; surface = NULL; tooltip = NULL; // create drawing area for the graph graph = gtk_drawing_area_new (); gtk_widget_set_size_request (graph, 200, 450); gtk_paned_add2 (GTK_PANED (paned), graph); gtk_widget_show (graph); gtk_widget_grab_focus (graph); // register our event callbacks g_signal_connect (G_OBJECT (graph), "expose_event", G_CALLBACK(expose_event), this); g_signal_connect (G_OBJECT (graph), "configure_event", G_CALLBACK(configure_event), this); g_signal_connect (G_OBJECT (graph), "button_press_event", G_CALLBACK(button_press_event), this); g_signal_connect (G_OBJECT (graph), "button_release_event", G_CALLBACK(button_release_event), this); g_signal_connect (G_OBJECT (graph), "motion_notify_event", G_CALLBACK(motion_notify_event), this); g_signal_connect (G_OBJECT (GuiDlgedit::window->getWindow ()), "key_press_event", G_CALLBACK(key_press_notify_event), this); gtk_widget_set_events (graph, GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK); } // dtor GuiGraph::~GuiGraph() { cairo_surface_destroy(surface); } // attach a module void GuiGraph::attachModule (DlgModule *m, bool cntr) { module = m; // get reference of the module's offset offset = &m->offset (); // center the module in view if (cntr) center (); // if a node is selected, update the instant preview GuiDlgedit::window->list ()->display (module->selected ()); // update the module structure GuiDlgedit::window->tree ()->select (module); // update the program state GuiDlgedit::window->setMode (module->state ()); GtkAllocation allocation; gtk_widget_get_allocation (graph, &allocation); // set the size of the dialogue drawing_area.resize (allocation.width, allocation.height); // tell the module that it is in view module->setDisplayed (true); // display the module draw (); } // detach a module void GuiGraph::detachModule () { module = NULL; // clear the instant preview GuiDlgedit::window->list ()->clear (); // update the program state GuiDlgedit::window->setMode (IDLE); // remove the tooltip if it is open if (tooltip) { delete tooltip; tooltip = NULL; } } // display a different module void GuiGraph::switchModule (DlgModule *m) { // we're switching between sub-dialogues if (module) module->setDisplayed (false); detachModule (); attachModule (m); } // create a new circle bool GuiGraph::newCircle (DlgPoint &point, node_type type) { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return false; // get the serial number to use for this node int &serial = module->serial (); // create the new node ... DlgCircle *circle = new DlgCircle (point, type, serial, module->node_id ()); // ... add it to the module ... module->addNode (circle); // ... and select it for editing module->selectNode (circle); // see whether creation was cancelled if (!editNode ()) { // cleanup module->deleteNode (); return false; } // update the program state GuiDlgedit::window->setMode (NODE_SELECTED); // node created -> increase serial number for next node serial++; return true; } // create a new arrow bool GuiGraph::newArrow (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return false; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // get start and end of the circle DlgNode *start = module->selected (); DlgNode *end = module->getNode (point); // sanity checks if (!start || start->type () == LINK) return false; if (end && end->type () == LINK) return false; // if no end selected, create a new circle first if (end == NULL) { // chose a sensible type for the new circle node_type type = (start->type () == NPC ? PLAYER : NPC); // there musn't be a node selected to create a new circle module->deselectNode (); // try to create a new circle if (newCircle (point, type)) { // chose the newly created circle as end of the arrow end = module->getNode (point); // restore selection deselectNode (); selectNode (start); } // do we have a valid end now? if (end == NULL) return false; } // no loops and no duplicate connections if (start == end || ((DlgCircle *) start)->hasChild (end)) return false; // no connection between start and end if both are PLAYER nodes if (start->type () == PLAYER && end->type () == PLAYER) return false; // now create the arrow between start and end, ... DlgArrow *arrow = new DlgArrow (start, end); // ... add it to the module ... module->addNode (arrow); // ... and update everything GuiDlgedit::window->list ()->display (start); arrow->draw (surface, *offset, graph); module->setChanged (); return true; } // add a new subdialogue bool GuiGraph::newModule (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return false; // if a project root exists, use that in file selector std::string dir = CfgData::data->getBasedir (module->entry ()->project ()); // otherwise revert to directory last opened if (dir == "") dir = GuiDlgedit::window->directory (); // allow the user to select a module GtkWindow *parent = GTK_WINDOW (GuiDlgedit::window->getWindow()); GuiFile fs (parent, GTK_FILE_CHOOSER_ACTION_OPEN, "Select sub-dialogue to add", dir + "/"); fs.add_filter ("*" FILE_EXT, "Adonthell Dialogue Source"); // set shortcuts const std::vector & projects = CfgData::data->projectsFromDatadir (); for (std::vector::const_iterator i = projects.begin (); i != projects.end (); i++) { const std::string &dir = CfgData::data->getBasedir (*i); fs.add_shortcut (dir); } if (fs.run ()) { DlgModule *subdlg = GuiDlgedit::window->loadSubdialogue (fs.getSelection()); if (subdlg == NULL) return false; // set parent of the sub-dialogue subdlg->setParent (module); // set id of the sub-dialogue subdlg->setID (); // draw the sub-dialogue subdlg->initShape (point); subdlg->draw (surface, *offset, graph); // update the module module->setChanged (); module->addNode (subdlg); // update the module tree GuiDlgedit::window->tree ()->insert (module, subdlg); return true; } return false; } // delete the selected node bool GuiGraph::deleteNode () { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // try to delete node if (module->deleteNode ()) { // update the program state GuiDlgedit::window->setMode (IDLE); // update the instant preview GuiDlgedit::window->list ()->clear (); // remove tooltip if it is open if (tooltip) { delete tooltip; tooltip = NULL; } // redraw the dialogue draw (); return true; } return false; } // select a node bool GuiGraph::selectNode (DlgNode *node) { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // a node has been selected if (module->selectNode (node)) { // update the program state GuiDlgedit::window->setMode (NODE_SELECTED); // update the instant preview GuiDlgedit::window->list ()->display (node); // redraw the node node->draw (surface, *offset, graph); return true; } return false; } // select the node at the given position bool GuiGraph::selectNode (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // is point within module's boundaries? if (!drawing_area.contains (point)) return false; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // see if we're over a node DlgNode *node = module->getNode (point); // no node at that position if (node == NULL) return false; // otherwise select the node if (selectNode (node)) { module->traverse ()->select (node); return true; } return false; } // select parent bool GuiGraph::selectParent () { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // see if a node is currently selected DlgNode *selected = module->selected (); // if so ... if (selected) { // ... try to retrieve it's parent DlgNode *parent = module->traverse ()->up (); // deselect current deselectNode (); // if we have it, then select it if (parent) return selectNode (parent); } // if no node is selected, we simply select the first one return selectRoot (); } // select the child of a node bool GuiGraph::selectChild () { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // see if a node is currently selected DlgNode *selected = module->selected (); // if so ... if (selected) { // ... try to retrieve it's child DlgNode *child = module->traverse ()->down (); // if we have it, then select it if (child) { deselectNode (); return selectNode (child); } } // if no node is selected, we simply select the first one else return selectRoot (); return false; } // select a sibling of the currently selected node bool GuiGraph::selectSibling (query_type pos) { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return false; // see if a node is currently selected DlgNode *selected = module->selected (); // if so ... if (selected) { DlgNode *sibling; // see if selected is arrow if (selected->type () == LINK) selected = selected->next (FIRST); // ... try to retrieve it's child if (pos == PREV) sibling = module->traverse ()->left (); else sibling = module->traverse ()->right (); // if we have something now if (sibling && sibling != selected) { deselectNode (); return selectNode (sibling); } } // if no node is selected, we simply select the first one else return selectRoot (); return false; } // select the first node in the dialogue bool GuiGraph::selectRoot () { return selectNode (module->traverse ()->selectRoot (&module->getNodes ())); } // deselect a node void GuiGraph::deselectNode () { // if there is no module assigned to the view, there is nothing to select if (module == NULL) return; DlgNode *deselected = module->deselectNode (); if (deselected) { // update the program state GuiDlgedit::window->setMode (IDLE); // update the instant preview GuiDlgedit::window->list ()->clear (); // redraw the node deselected->draw (surface, *offset, graph); } return; } // center the view on given node bool GuiGraph::centerNode (DlgNode *node) { if (module == NULL) return false; if (node == NULL && module->selected () != NULL) node = module->selected (); else return false; // calculate the correct offset for the given node DlgPoint pos = node->center ().offset (*offset); int x, y; x = drawing_area.width () / 5; y = drawing_area.height () / 5; // is node outside the views inner 60% ? if (!drawing_area.inflate (-x, -y).contains (pos)) { // then move the view so it is centered on the given point DlgPoint o (-(pos.x()-drawing_area.width()/2), -(pos.y()-drawing_area.height()/2)); offset->move (o); draw (); return true; } return false; } // center whole dialogue in view void GuiGraph::center () { if (module == NULL) return; int min_x, max_x, y; module->extension (min_x, max_x, y); GtkAllocation allocation; gtk_widget_get_allocation (graph, &allocation); int x_off = (allocation.width - (max_x - min_x))/2 - min_x; int y_off = -y + 20; offset->move (x_off, y_off); } // edit selected node bool GuiGraph::editNode () { if (module == NULL) return false; // see if a node is currently selected DlgNode *selected = module->selected (); // disable scrolling (just in case) stopScrolling(); // if we have a sub-dialogue, descent for editing if (selected->type () == MODULE) { switchModule ((DlgModule *) selected); return true; } // if we have a circle, open edit dialog if (selected && selected->type () != LINK) { GtkWindow *parent = GTK_WINDOW (GuiDlgedit::window->getWindow()); GuiCircle edit (parent, &selected->type (), ((DlgCircle *) selected)->entry (), module->entry ()); // editing aborted? if (!edit.run ()) return false; // otherwise update everything GuiDlgedit::window->list ()->display (selected); selected->draw (surface, *offset, graph); module->setChanged (); return true; } return false; } // set everything up for moving nodes around bool GuiGraph::prepareDragging (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return false; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // see if we're over a node DlgNode *node = module->getNode (point); // Not over a node if (node == NULL) return false; // if no node selected, select node for dragging if (module->selected () == NULL) selectNode (node); // else check whether dragged and selected node are the same else if (node != module->selected ()) return false; // Is dragged node circle or arrow? if (node->type () != LINK) { // circles and modules can be dragged directly mover = node; // remove any tooltip, as it only gets in the way if (tooltip) { delete tooltip; tooltip = NULL; } } else { // arrows have to be attached to a (invisible) mover mover = new DlgMover (point); // try to attach arrow to mover if (!((DlgMover *) mover)->attach ((DlgArrow *) node)) { // moving of arrow failed, so clean up delete mover; mover = NULL; } } // if we have a mover, update program state if (mover != NULL) { GuiDlgedit::window->setMode (NODE_DRAGGED); module->setState (NODE_DRAGGED); return true; } return false; } // drag a node around void GuiGraph::drag (DlgPoint &point) { static int redraw = 0; // if there is no module assigned to the view, there is nothing to do if (module == NULL) return; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // move node mover->setPos (DlgPoint (point.x () - (point.x () % CIRCLE_DIAMETER), point.y () - (point.y () % CIRCLE_DIAMETER))); // update arrows for (DlgNode *a = mover->prev (FIRST); a != NULL; a = mover->prev (NEXT)) ((DlgArrow *) a)->initShape (); for (DlgNode *a = mover->next (FIRST); a != NULL; a = mover->next (NEXT)) ((DlgArrow *) a)->initShape (); // update view switch (redraw) { case 0: { draw (); redraw++; break; } case 7: { redraw = 0; break; } default: { redraw++; break; } } } // stop dragging node void GuiGraph::stopDragging (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to do if (module == NULL || mover == NULL) return; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // see whether arrow was dragged if (mover->type () == MOVER) { // see whether we are over a node DlgNode *node = module->getNode (point); // drop the mover onto the node ((DlgMover *) mover)->drop (node); // cleanup delete mover; } // if circle moved, realign it to the grid else { // make sure we drop on an empty location DlgNode *node = module->getNode (point); while (node != NULL && node != mover && node->type() != LINK) { point.move (0, 2*CIRCLE_DIAMETER); node = module->getNode (point); } mover->setPos (DlgPoint (point.x () - (point.x () % CIRCLE_DIAMETER), point.y () - (point.y () % CIRCLE_DIAMETER))); // also need to update arrows and reorder children and parents for (DlgNode *a = mover->prev (FIRST); a != NULL; a = mover->prev (NEXT)) { a->prev (FIRST)->removeNext (a); a->prev (FIRST)->addNext (a); ((DlgArrow *) a)->initShape (); } for (DlgNode *a = mover->next (FIRST); a != NULL; a = mover->next (NEXT)) { a->next (FIRST)->removePrev (a); a->next (FIRST)->addPrev (a); ((DlgArrow *) a)->initShape (); } } // update everything if (mover->type() == MODULE) deselectNode (); else { GuiDlgedit::window->list ()->display (module->selected ()); GuiDlgedit::window->setMode (NODE_SELECTED); module->setState (NODE_SELECTED); module->setChanged (); } // clear mover mover = NULL; draw (); } // resize the drawing area void GuiGraph::resizeSurface (GtkWidget *widget) { GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); // delete the old surface if (surface) cairo_surface_destroy (surface); // create a new one with the proper size surface = gdk_window_create_similar_surface (gtk_widget_get_window(widget), CAIRO_CONTENT_COLOR, allocation.width, allocation.height); // init the surface if (GuiResources::getColor (GC_GREY)) clear (); // set the size of the attached dialogues drawing_area.resize (allocation.width, allocation.height); } // empty the drawing area void GuiGraph::clear () { GdkRectangle t; GtkAllocation allocation; gtk_widget_get_allocation (graph, &allocation); cairo_t *cr = cairo_create (surface); gdk_cairo_set_source_color(cr, GuiResources::getColor (GC_GREY)); cairo_rectangle(cr, 0, 0, allocation.width, allocation.height); cairo_fill(cr); cairo_destroy(cr); t.x = 0; t.y = 0; t.width = allocation.width; t.height = allocation.height; gdk_window_invalidate_rect (gtk_widget_get_window (graph), &t, FALSE); } // draw the graph to the surface void GuiGraph::draw () { // nothing to draw if (module == NULL) return; GdkRectangle t; std::vector::reverse_iterator i; std::vector nodes = module->getNodes (); // get visible part of graph t.x = -offset->x (); t.y = -offset->y (); t.width = drawing_area.width (); t.height = drawing_area.height (); DlgRect rect (t); // Clear graph cairo_t *cr = cairo_create (surface); gdk_cairo_set_source_color(cr, GuiResources::getColor (GC_WHITE)); cairo_rectangle(cr, 0, 0, t.width, t.height); cairo_fill(cr); cairo_destroy(cr); // normalize rect t.x = 0; t.y = 0; // check for each node, wether it is visible for (i = nodes.rbegin (); i != nodes.rend (); i++) // draw nodes and arrows if ((*i)->contains (rect)) (*i)->draw (surface, *offset, NULL); // draw backing image to screen gdk_window_invalidate_rect (gtk_widget_get_window (graph), &t, FALSE); } // the mouse has been moved void GuiGraph::mouseMoved (DlgPoint &point) { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return; // calculate absolute position of the point point.move (-offset->x (), -offset->y ()); // see if we're over a node DlgNode *node = module->getNode (point); // get the node that was highlighted before (if any) DlgNode *prev = module->highlightNode (node); // there's no need for action unless old and new highlight differs if (prev != node) { // clear old if necessary if (prev != NULL) { prev->draw (surface, *offset, graph); if (tooltip) { delete tooltip; tooltip = NULL; } } // then highlight the new one if (node != NULL && gtk_window_is_active(GTK_WINDOW(gtk_widget_get_toplevel(graph)))) { node->draw (surface, *offset, graph, NODE_HILIGHTED); tooltip = new GuiTooltip (node); tooltip->draw (graph, *offset); } } return; } // is scrolling allowed? bool GuiGraph::scrollingAllowed () const { // if there is no module assigned to the view or no nodes // in the module yet, there is nothing to do if (module == NULL || module->getNodes ().empty ()) return false; return true; } // the actual scrolling void GuiGraph::scroll () { offset->move (scroll_offset.x, scroll_offset.y); draw (); } // get the toplevel dialogue module DlgModule *GuiGraph::dialogue () { // if there is no module assigned to the view, there is nothing to do if (module == NULL) return NULL; return module->toplevel (); } adonthell-0.3.8/src/tools/dlgedit/gui_recent_files.cc0000664000175000017500000000537212756055125017616 00000000000000/* Copyright (C) 2011 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_recent_files.cc * * @author Kai Sterker * @brief Keep track of recently opened files. */ #include "util.h" #include "gui_recent_files.h" static void on_recent_file_selected (GtkRecentChooser *chooser, gpointer user_data) { GuiRecentFiles *recent_files = (GuiRecentFiles *) user_data; GuiRecentFileListener *listener = recent_files->getListener(); if (listener != NULL) { gchar* uri = gtk_recent_chooser_get_current_uri (chooser); gchar* file = g_filename_from_uri (uri, NULL, NULL); listener->OnRecentFileActivated(file); g_free (file); g_free (uri); } } // ctor GuiRecentFiles::GuiRecentFiles(const std::string & cmd, const std::string & args) { Listener = NULL; Command = cmd; Arguments = args; Manager = gtk_recent_manager_get_default (); // only show what's been opened by the current program GtkRecentFilter *filter = gtk_recent_filter_new (); gtk_recent_filter_add_application (filter, cmd.c_str()); // create menu to use in application Menu = gtk_recent_chooser_menu_new_for_manager (Manager); gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (Menu), filter); gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (Menu), 10); gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (Menu), GTK_RECENT_SORT_MRU); g_signal_connect (G_OBJECT(Menu), "item-activated", G_CALLBACK (on_recent_file_selected), this); } // dtor GuiRecentFiles::~GuiRecentFiles() { } // register new recent file void GuiRecentFiles::registerFile (const std::string & file, const std::string & type) { GtkRecentData info; info.display_name = NULL; info.description = NULL; info.mime_type = g_strdup (type.c_str()); info.app_name = g_strdup (Command.c_str()); info.app_exec = g_strdup (Arguments.c_str()); info.groups = NULL; info.is_private = FALSE; gchar* uri = g_filename_to_uri (util::get_absolute_path(file).c_str(), NULL, NULL); gtk_recent_manager_add_full (Manager, uri, &info); } adonthell-0.3.8/src/tools/dlgedit/gui_tree.cc0000664000175000017500000003537212756055267016125 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_tree.cc * * @author Kai Sterker * @brief View for the dialogue structure */ #include "cfg_data.h" #include "gui_tree.h" #include "gui_dlgedit.h" /* Icon for unselected dialogue */ static const char * dlg_xpm[] = { "16 16 5 1", " c None", ". c #646464", "+ c #000000", "@ c #848484", "# c #FFFFFF", " ", " ", " .+++++++++. ", " .+@#######@+. ", " +@#########@+. ", " +###########+. ", " +###########+. ", " +@#########@+. ", " .+@#######@+. ", " .+@#@+++++. ", " +@+..... ", " ++. ", " +. ", " . ", " ", " "}; /* Icon for selected dialogue */ static const char * sel_xpm[] = { "16 16 5 1", " c None", ". c #446484", "+ c #000020", "@ c #6484A4", "# c #CFEFEF", " ", " ", " .+++++++++. ", " .+@#######@+. ", " +@#########@+. ", " +###########+. ", " +###########+. ", " +@#########@+. ", " .+@#######@+. ", " .+@#@+++++. ", " +@+..... ", " ++. ", " +. ", " . ", " ", " "}; /* Not selected and modified */ static const char * dlg_mod_xpm[] = { "16 16 5 1", " c None", ". c #646464", "+ c #000000", "@ c #848484", "# c #FFFFFF", " ", " ", " .+++++++++. ", " .+@#######@+. ", " +@#.@#.##@#@+. ", " +###.##.@.##+. ", " +###@#@#####+. ", " +@#@.@.@.@#@+. ", " .+@#######@+. ", " .+@#@+++++. ", " +@+..... ", " ++. ", " +. ", " . ", " ", " "}; /* Selected and modified */ static const char * sel_mod_xpm[] = { "16 16 5 1", " c None", ". c #446484", "+ c #000020", "@ c #6484A4", "# c #CFEFEF", " ", " ", " .+++++++++. ", " .+@#######@+. ", " +@#.@#.##@#@+. ", " +###.##.@.##+. ", " +###@#@#####+. ", " +@#@.@.@.@#@+. ", " .+@#######@+. ", " .+@#@+++++. ", " +@+..... ", " ++. ", " +. ", " . ", " ", " "}; /* Project icon */ static const char * project_xpm[] = { "16 16 9 1", " c None", ". c #004F8C", "+ c #000000", "@ c #EFE8EF", "# c #C4D9FF", "$ c #93BCFF", "% c #619CCC", "& c #83A0D3", "* c #013E63", " ", " .....+ ", " .@##$$.+ ", ".%%%%%%%...... ", ".###########$%+ ", ".#$$.%.%.%.$&%+ ", ".#$.$@@@#@$.$%+ ", ".#$.@#@#@$@*&%+ ", ".#$.$###$#&.$%+ ", ".#$$.$#*.*.$&%+ ", ".#$$$.*&$&$&&%+ ", ".#&$&*&$&$&&&%+ ", ".%%%%%%%%%%%%%+ ", " ++++++++++++++ ", " ", " "}; // selection changed void on_tree_select_row (GtkTreeSelection *selection, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; // anything selected at all? if (gtk_tree_selection_get_selected (selection, &model, &iter)) { DlgModule *module; DlgModule *current = GuiDlgedit::window->graph ()->getAttached (); gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &module, -1); if (module != NULL) { if (module != current) { // mark current selection GuiTree *view = (GuiTree *) user_data; view->unselect (current); view->select (&iter); // display the newly selected module GuiDlgedit::window->graph ()->switchModule (module); } } else { gtk_tree_selection_unselect_iter (selection, &iter); } } } // create tree widget GuiTree::GuiTree (GtkWidget *paned) { GtkWidget *scrolledwindow; // the scrolled window for the tree scrolledwindow = gtk_scrolled_window_new (NULL, NULL); g_object_ref (scrolledwindow); g_object_set_data_full (G_OBJECT (paned), "scrolledwindow", scrolledwindow, (GDestroyNotify) g_object_unref); gtk_widget_show (scrolledwindow); gtk_paned_add1 (GTK_PANED (paned), scrolledwindow); gtk_widget_set_size_request (scrolledwindow, 160, -1); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); // the model GtkTreeStore *model = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_POINTER, GDK_TYPE_PIXBUF); // the tree widget tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL(model)); g_object_ref (tree); g_object_set_data_full (G_OBJECT (paned), "tree", tree, (GDestroyNotify) g_object_unref); gtk_container_add (GTK_CONTAINER (scrolledwindow), tree); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(tree), FALSE); gtk_widget_set_can_focus(tree, FALSE); // create the columns GtkTreeViewColumn *col = gtk_tree_view_column_new(); GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(col, renderer, FALSE); gtk_tree_view_column_set_attributes(col, renderer, "pixbuf", 2, NULL); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(col, renderer, TRUE); gtk_tree_view_column_set_attributes(col, renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), col); gtk_widget_show_all (tree); // connect callbacks GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(tree)); g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK(on_tree_select_row), this); // create pixmaps and masks icon[BUBBLE] = gdk_pixbuf_new_from_xpm_data (dlg_xpm); icon[BUBBLE_SEL] = gdk_pixbuf_new_from_xpm_data (sel_xpm); icon[BUBBLE_MOD] = gdk_pixbuf_new_from_xpm_data (dlg_mod_xpm); icon[BUBBLE_SEL_MOD] = gdk_pixbuf_new_from_xpm_data (sel_mod_xpm); icon[PROJECT] = gdk_pixbuf_new_from_xpm_data (project_xpm); // add available projects to tree addProjects (); } // dtor GuiTree::~GuiTree () { clear (); } // add the given module void GuiTree::addModule (DlgModule *module) { GtkTreeIter node; // is module valid? if (module == NULL) return; if (locate (module, &node)) return; // locate the project node for this module GtkTreeIter project = locateProject (module->entry ()->project ()); // build the sub-tree build (insert (project, module)); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &project); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree), path); // cleanup gtk_tree_path_free (path); } // find a given project GtkTreeIter GuiTree::locateProject (const std::string &project) { GtkTreeIter node; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); if (gtk_tree_model_get_iter_first (model, &node)) { gchar *text; do { gtk_tree_model_get (model, &node, 0, &text, -1); if (project == text) return node; } while (gtk_tree_model_iter_next(model, &node)); } // project not in tree yet -> add it gtk_tree_store_append(GTK_TREE_STORE(model), &node, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &node, 0, project.c_str (), 1, NULL, 2, icon[PROJECT], -1); return node; } // update the given module void GuiTree::updateModule (DlgModule *module) { if (module == NULL) return; GtkTreeIter node; if (!locate (module, &node)) return; gchar *project; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_model_get (model, &node, 0, &project, -1); // module still belongs to same project -> nothing to do if (module->entry ()->project () == project) { return; } else { // otherwise just append to new project gtk_tree_store_remove(GTK_TREE_STORE(model), &node); addModule (module); } } // remove the given module void GuiTree::removeModule (DlgModule *module) { if (module == NULL) return; GtkTreeIter node; if (!locate (module, &node)) return; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_remove(GTK_TREE_STORE (model), &node); } // locate the node corresponding to the given module bool GuiTree::locate (DlgModule *module, GtkTreeIter *node) { GtkTreeIter root; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); if (gtk_tree_model_get_iter_first (model, &root)) { DlgModule *data; do { if (gtk_tree_model_iter_children(model, node, &root)) { do { gtk_tree_model_get (model, node, 1, &data, -1); if (module == data) return true; } while (gtk_tree_model_iter_next(model, node)); } } while (gtk_tree_model_iter_next(model, &root)); } return false; } // add available projects to tree void GuiTree::addProjects () { std::vector projects = CfgData::data->projectsFromDatadir (); std::vector::iterator i; GtkTreeIter node; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); for (i = projects.begin (); i != projects.end (); i++) { gtk_tree_store_append(GTK_TREE_STORE(model), &node, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &node, 0, i->c_str (), 1, NULL, 2, icon[PROJECT], -1); } } // assign module to a different project void GuiTree::updateProject (DlgModule *module) { GtkTreeIter node; GtkTreeIter project = locateProject (module->entry ()->project ()); if (!locate (module, &node)) return; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_remove(GTK_TREE_STORE(model), &node); insert (project, module); } // build the initial tree void GuiTree::build (GtkTreeIter root) { DlgModule *module; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_model_get (model, &root, 1, &module, -1); std::vector nodes = module->getNodes (); // search through all nodes of the given module for (std::vector::iterator i = nodes.begin (); i != nodes.end (); i++) // if we find a sub-dialogue if ((*i)->type () == MODULE) // insert it into the tree and continue with its sub-dialogues build (insert (root, (DlgModule *) *i)); } // insert a module into the tree GtkTreeIter GuiTree::insert (GtkTreeIter parent, DlgModule *module) { GtkTreeIter node; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_append(GTK_TREE_STORE(model), &node, &parent); gtk_tree_store_set(GTK_TREE_STORE(model), &node, 0, module->name ().c_str (), 1, module, 2, icon[BUBBLE], -1); // display the module that has been in the view before if (module->displayed ()) { GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); gtk_tree_selection_select_iter(selection, &node); } return node; } // insert a module into the tree void GuiTree::insert (DlgModule *parent, DlgModule *module) { GtkTreeIter node; if (!locate (parent, &node)) return; insert (node, module); } // highlight node in view void GuiTree::select (GtkTreeIter *node) { GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); // first of all, deselect old node if (!gtk_tree_selection_iter_is_selected (selection, node) && gtk_tree_selection_count_selected_rows(selection) == 1) { DlgModule *module; GtkTreeModel *model; GtkTreeIter selected; gtk_tree_selection_get_selected (selection, &model, &selected); gtk_tree_model_get (GTK_TREE_MODEL (model), &selected, 1, &module, -1); setIcon (selected, false, module->changed ()); } // then select the new node if (node != NULL) { DlgModule *module; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_model_get (GTK_TREE_MODEL (model), node, 1, &module, -1); setIcon (*node, true, module->changed ()); if (!gtk_tree_selection_iter_is_selected (selection, node)) { gtk_tree_selection_select_iter(selection, node); // expand parent nodes, so that selected node becomes visible GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), node); gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree), path); gtk_tree_path_free (path); } } } // change icon of node void GuiTree::setIcon (GtkTreeIter node, bool select, bool changed) { int index; if (select) index = changed ? BUBBLE_SEL_MOD : BUBBLE_SEL; else index = changed ? BUBBLE_MOD : BUBBLE; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_set (GTK_TREE_STORE (model), &node, 2, icon[index], -1); } // select the given module void GuiTree::select (DlgModule *module) { GtkTreeIter node; if (!locate (module, &node)) return; select (&node); } // deselect the given module void GuiTree::unselect (DlgModule *module) { GtkTreeIter node; if (!locate (module, &node)) return; setIcon (node, false, module->changed ()); } // set whether a module is modified or not void GuiTree::setChanged (DlgModule *module) { // locate module GtkTreeIter node; if (!locate (module, &node)) return; GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); // set icon setIcon (node, gtk_tree_selection_iter_is_selected(selection, &node), module->changed ()); } // update the name of the given module void GuiTree::setName (DlgModule *module) { // locate module GtkTreeIter node; if (!locate (module, &node)) return; // set name GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_set (GTK_TREE_STORE (model), &node, 0, module->name ().c_str (), -1); } // remove everything from the tree void GuiTree::clear () { GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); gtk_tree_store_clear(GTK_TREE_STORE(model)); } adonthell-0.3.8/src/tools/dlgedit/gui_error.cc0000664000175000017500000001673312756054703016311 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_error.cc * * @author Kai Sterker * @brief The error console */ #include #include "gui_dlgedit.h" #include "gui_error.h" // callback for selecting an item from the list static void on_list_select_child (GtkTreeSelection *selection, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; // anything selected at all? if (gtk_tree_selection_get_selected (selection, &model, &iter)) { // don't show selection gtk_tree_selection_unselect_iter (selection, &iter); // ignore edit command if in preview mode if (GuiDlgedit::window->mode () == L10N_PREVIEW) return; DlgNode* node; gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &node, -1); GuiGraph *graph = GuiDlgedit::window->graph (); // select the node where the error occurred graph->deselectNode (); graph->selectNode (node); // center the view on it graph->centerNode (); // open the edit dialog if (graph->editNode ()) { // dialog closed with okay -> assume the error is fixed gtk_list_store_remove(GTK_LIST_STORE(model), &iter); // close error console if no items remain in the list if (gtk_tree_model_iter_n_children (model, NULL) == 0) gtk_widget_hide (GTK_WIDGET (user_data)); } } } // callback for closing the window static void on_close_clicked (GtkButton *button, gpointer user_data) { // only hide the window gtk_widget_hide (GTK_WIDGET (user_data)); } // callback when the window is deleted static void on_delete_window (GtkWidget *window) { gtk_widget_destroy (window); if (GuiError::console) delete GuiError::console; } // global pointer to the error console GuiError *GuiError::console = NULL; // constructor GuiError::GuiError () { GtkWidget *vbox; GtkWidget *scrolled; GtkWidget *hseparator1; GtkWidget *buttonbox; GtkWidget *close; // the error console window window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_set_data (G_OBJECT (window), "window", window); gtk_widget_set_size_request (window, 400, 320); gtk_window_set_title (GTK_WINDOW (window), "Error Console"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); vbox = gtk_vbox_new (FALSE, 0); g_object_ref (vbox); g_object_set_data_full (G_OBJECT (window), "vbox", vbox, (GDestroyNotify) g_object_unref); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_container_set_border_width (GTK_CONTAINER (vbox), 4); // vertical scrollbar for the list scrolled = gtk_scrolled_window_new (NULL, NULL); g_object_ref (scrolled); g_object_set_data_full (G_OBJECT (window), "scrolled", scrolled, (GDestroyNotify) g_object_unref); gtk_widget_show (scrolled); gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); // the model GtkListStore *model = gtk_list_store_new(4, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); // the list list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); g_object_ref (list); gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(list), GTK_TREE_VIEW_GRID_LINES_HORIZONTAL); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list), FALSE); g_object_set_data_full (G_OBJECT (window), "list", list, (GDestroyNotify) g_object_unref); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled), list); gtk_widget_show (list); // create the columns GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(list), 0, "Errors", renderer, "text", 0, "font", 2, "foreground", 3, NULL); // tooltip for the list gtk_widget_set_tooltip_text (window, "Click on an error to bring up the corresponding node"); hseparator1 = gtk_hseparator_new (); g_object_ref (hseparator1); g_object_set_data_full (G_OBJECT (window), "hseparator1", hseparator1, (GDestroyNotify) g_object_unref); gtk_widget_show (hseparator1); gtk_box_pack_start (GTK_BOX (vbox), hseparator1, FALSE, TRUE, 2); buttonbox = gtk_hbutton_box_new (); g_object_ref (buttonbox); g_object_set_data_full (G_OBJECT (window), "buttonbox", buttonbox, (GDestroyNotify) g_object_unref); gtk_widget_show (buttonbox); gtk_box_pack_start (GTK_BOX (vbox), buttonbox, FALSE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (buttonbox), 0); // close button close = gtk_button_new_with_label ("Close"); g_object_ref (close); g_object_set_data_full (G_OBJECT (window), "close", close, (GDestroyNotify) g_object_unref); gtk_widget_show (close); gtk_container_add (GTK_CONTAINER (buttonbox), close); gtk_container_set_border_width (GTK_CONTAINER (close), 2); gtk_widget_set_can_default (close, TRUE); gtk_widget_set_tooltip_text (close, "Hide the Error Console"); // selection listener GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(list)); g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK(on_list_select_child), window); g_signal_connect (G_OBJECT (close), "clicked", G_CALLBACK (on_close_clicked), window); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (on_delete_window), window); // give the focus to the close button gtk_widget_grab_focus (close); gtk_widget_grab_default (close); // make sure that there is only one error console if (console) delete console; console = this; // set transient for dialogue editor main window gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (GuiDlgedit::window->getWindow ())); } // dtor GuiError::~GuiError () { console = NULL; } // empty the list void GuiError::clear () { gtk_widget_hide (list); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gtk_list_store_clear (GTK_LIST_STORE(model)); gtk_widget_show (list); } // add an error message to the list void GuiError::add (std::string error, DlgNode *node) { GtkTreeIter iter; GdkColor color = { 0, 27500, 0, 0 }; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gchar *font_color = gdk_color_to_string(&color); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set (GTK_LIST_STORE(model), &iter, 0, error.c_str(), 1, node, 2, "Fixed,Monospace 10", 3, font_color, -1); g_free(font_color); } // display all error messages void GuiError::display () { // show the console gtk_widget_show (window); } adonthell-0.3.8/src/tools/dlgedit/dlg_module_entry.h0000664000175000017500000001263412756050015017476 00000000000000/* $Id$ Copyright (C) 2002 Kai Sterker Part of the Adonthell Project http://adonthell.linuxgames.com Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * @file dlg_module_entry.h * * @author Kai Sterker * @brief The textual contents of a DlgModule. */ #ifndef DLG_MODULE_ENTRY_H #define DLG_MODULE_ENTRY_H #include #include /** * The %DlgModuleeEntry keeps the custom Python code of a certain * dialogue and a few other settings. */ class DlgModuleEntry { public: /** * Create an empty %DlgModuleEntry. */ DlgModuleEntry (); /** * @name Initialization / Cleanup */ //@{ /** * Initialize the entry to a sane state. All members are set to * the empty string (""). */ void init (); /** * Reset the entry to state after construction time. Erases all quest * and character information. Sets other members to "". */ void clear (); //@} /** * Attribute access. */ //@{ /** * Get the project this module is assigned to. * @return the project the module belongs to. */ std::string project () { return project_; } /** * Get the description of this module. * @return the module's description. */ std::string description () { return description_; } /** * Get the import statements assigned to this module. * @return the module's additional imports. */ std::string imports () { return imports_; } /** * Get the constructor code assigned to this module. * @return the module's constructor code. */ std::string ctor () { return ctor_; } /** * Get the destructor code assigned to this module. * @return the module's destructor code. */ std::string dtor () { return dtor_; } /** * Get the user defined methods of this module. * @return the module's user defined methods. */ std::string methods () { return methods_; } /** * Sets the project this dialogue belongs to. Then loads the NPC and * Quest names of this project. * @param p Project name * @return true if NPC's and Quests could be loaded, * false otherwise. */ bool setProject (std::string p); /** * Set the description of this module. * @param d some text describing the module. */ void setDescription (std::string d) { description_ = d; } /** * Set the import statements assigned to this module. * @param i the module's additional imports. */ void setImports (std::string i) { imports_ = i; } /** * Set the constructor code assigned to this module. * @param c the module's constructor code. */ void setCtor (std::string c) { ctor_ = c; } /** * Set the destructor code assigned to this module. * @param d the module's destructor code. */ void setDtor (std::string d) { dtor_ = d; } /** * Set the user defined methods of this module. * @param m the module's user defined methods. */ void setMethods (std::string m) { methods_ = m; } /** * Test whether the given string represents an available character. * @param c name of the character to check for. * @retorn true if the character exists, false otherwise. */ bool isCharacter (const std::string &c); /** * Test whether the given string represents an available quest. * @param q name of the quest to check for. * @retorn true if the quest exists, false otherwise. */ bool isQuest (const std::string &q); /** * Iterate over the available characters. * @return the character name or the empty string ("") when the * end of the list is reached. */ std::string character (); /** * Iterate over the available quests. * @return the quest name or the empty string ("") when the * end of the list is reached. */ std::string quest (); //@} private: bool loadCharacters (); bool loadQuests (); void addCharacter (std::string c); void addQuest (std::string q); std::string project_; // project the dialogue belongs to std::string imports_; // additional import statements std::string ctor_; // constructor code std::string dtor_; // destructor code std::string methods_; // user defined methods std::string description_; // Description of the dialogue std::vector characters; std::vector quests; std::vector::iterator itc; std::vector::iterator itq; }; #endif // DLG_MODULE_ENTRY_H adonthell-0.3.8/src/tools/dlgedit/gui_resources.h0000664000175000017500000000471712756055167017040 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_resources.h * * @author Kai Sterker * @brief Provides fonts and colors used throughout dlgedit. */ #ifndef GUI_RESOURCES_H #define GUI_RESOURCES_H #include #include #include "dlg_types.h" /** * This class provides some fonts and pens that are used throughout * dlgedit. Instead of creating the newly each time something needs * to be drawn, they are created once when the program starts. */ class GuiResources { public: /** * Create all the fonts and colors needed. * @param widget the widget we later draw to */ static void init (GtkWidget *widget); /** * Retrieve a colored 'pen' to draw onto a drawing area. * @param color the color to retrieve * @return a GdkColor. */ static const GdkColor *getColor (int color); /** * Retrieve a colored 'pen' to draw onto a drawing area, depending * on the given mode and type. * @param mode the mode of a DlgNode * @param type the type of a DlgNode * @return a GdkColor. */ static const GdkColor *getColor (mode_type mode, node_type type); /** * Retrieve a color to fill drawn objects on a drawing area, * depending on the given mode and type. * @param mode the mode of a DlgNode * @param type the type of a DlgNode * @return a GdkColor. */ static const GdkColor *getFill (mode_type mode, node_type type); /** * Retrieve the font used to draw text onto a drawing area. * @return a PangoLayout. */ static PangoLayout *font () { return Font; } private: static PangoLayout *Font; // font for text-output static GdkColor Color[MAX_GC]; // custom colors }; #endif // GUI_RESOURCES_H adonthell-0.3.8/src/tools/dlgedit/cfg_project.cc0000664000175000017500000000335312756054133016570 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_project.cc * * @author Kai Sterker * @brief Project specific configuration data */ #include "cfg_project.h" #include "dlg_types.h" extern int parse_cfgfile (std::string&, int&); // ctor CfgProject::CfgProject (std::string name) { Name = name; BaseDir = ""; } // load project data bool CfgProject::load () { int token = 1, n; std::string s; // as long as reading something from file ... while (token) { // get next token switch (token = parse_cfgfile (s, n)) { case LOAD_END: return true; case LOAD_BASE_DIR: { if (parse_cfgfile (s, n) == LOAD_STR) BaseDir = s; break; } default: break; } } return false; } // save project data void CfgProject::save (std::ofstream &out) { out << "\nProject [" << Name << "]\n" << " BaseDir [" << BaseDir << "]\n" << "End" << std::endl; } adonthell-0.3.8/src/tools/dlgedit/gui_dlgedit_events.cc0000664000175000017500000001333412756054620020150 00000000000000/* Copyright (C) 1999/2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_dlgedit_events.cc * * @author Kai Sterker * @brief The Events triggered via the Dialogue Editor's main window */ #include "cfg_data.h" #include "gui_dlgedit.h" #include "gui_file.h" // Main Window: on_widget_destroy App void on_widget_destroy (GtkWidget * widget, gpointer data) { gtk_main_quit (); gtk_widget_destroy (widget); } // File Menu: New void on_file_new_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; dlgedit->newDialogue (); } // File Menu: Load void on_file_load_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; GtkWindow *parent = (GtkWindow *) dlgedit->getWindow (); GuiFile fs (parent, GTK_FILE_CHOOSER_ACTION_OPEN, "Load dialogue source", dlgedit->directory ()); fs.add_filter ("*" FILE_EXT, "Adonthell Dialogue Source"); // set shortcuts const std::vector & projects = CfgData::data->projectsFromDatadir (); for (std::vector::const_iterator i = projects.begin (); i != projects.end (); i++) { const std::string &dir = CfgData::data->getBasedir (*i); fs.add_shortcut (dir); } // File selection closed with OK if (fs.run ()) dlgedit->loadDialogue (fs.getSelection ()); } // File Menu: Save As void on_file_save_as_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; GtkWindow *parent = (GtkWindow *) dlgedit->getWindow (); GuiFile fs (parent, GTK_FILE_CHOOSER_ACTION_SAVE, "Save dialogue source", dlgedit->filename ()); fs.add_filter ("*" FILE_EXT, "Adonthell Dialogue Source"); // set shortcuts const std::vector & projects = CfgData::data->projectsFromDatadir (); for (std::vector::const_iterator i = projects.begin (); i != projects.end (); i++) { const std::string &dir = CfgData::data->getBasedir (*i); fs.add_shortcut (dir); } // File selection closed with OK if (fs.run ()) dlgedit->saveDialogue (fs.getSelection ()); } // File Menu: Save void on_file_save_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; std::string filename = dlgedit->filename (); // only save dialogues that aren't 'untitled' if (filename.find ("untitled.adlg") == filename.npos) dlgedit->saveDialogue (filename); // otherwise open file selection else on_file_save_as_activate (menuitem, user_data); } // File Menu: Revert to Saved void on_file_revert_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit::window->revertDialogue (); } // File Menu: Close void on_file_close_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit::window->closeDialogue (); } // Dialogue Menu: Compile void on_dialogue_compile_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit::window->compileDialogue (); } // Dialogue Menu: Settings void on_dialogue_player_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit::window->settings (); } // Dialogue Menu: Functions void on_dialogue_functions_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; dlgedit->customCode (); } // Dialogue Menu: Preview i18n void on_dialogue_preview_activate (GtkMenuItem * menuitem, gpointer user_data) { GuiDlgedit *dlgedit = (GuiDlgedit *) user_data; GtkWindow *parent = (GtkWindow *) dlgedit->getWindow (); GuiFile fs (parent, GTK_FILE_CHOOSER_ACTION_OPEN, "Select translation", dlgedit->directory ()); fs.add_filter ("*.mo", "Gettext Message Catalogue"); // start translation preview if (dlgedit->mode () != L10N_PREVIEW) { // File selection closed with OK if (fs.run ()) dlgedit->previewTranslation (fs.getSelection ()); } // stop translation preview else dlgedit->exitPreview (); } // Dialogue Menu: Run void on_dialogue_run_activate (GtkMenuItem * menuitem, gpointer user_data) { /* MainFrame *wnd = (MainFrame *) user_data; if (wnd->test_dlg == NULL) { wnd->test_dlg = new run_dlg (wnd); wnd->test_dlg->run (); } */ } // Select an entry from the Window menu void on_window_activate (GtkMenuItem * menuitem, gpointer user_data) { DlgModule *module = (DlgModule*) user_data; GuiDlgedit::window->showDialogue (module); } // Display help text associated with a menuitem to the statusbar gboolean on_display_help (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { int id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "help-id")); GuiMessages *message = (GuiMessages *) user_data; message->display (id); return FALSE; } // Clear text displayed by the statusbar gboolean on_clear_help (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { GuiMessages *message = (GuiMessages *) user_data; message->clear (); return FALSE; } adonthell-0.3.8/src/tools/dlgedit/gui_circle_events.h0000664000175000017500000000214212756054544017637 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_circle_events.h * * @author Kai Sterker * @brief Callbacks of the Edit Circle dialog */ #ifndef GUI_CIRCLE_EVENTS_H #define GUI_CIRCLE_EVENTS_H #include void on_radio_button_pressed (GtkButton *button, gpointer user_data); void on_circle_ok_button_pressed (GtkButton *button, gpointer user_data); #endif // GUI_CIRCLE_EVENTS_H adonthell-0.3.8/src/tools/dlgedit/gui_tooltip.h0000664000175000017500000000237712756055257016520 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_tooltip.h * * @author Kai Sterker * @brief A custom, tooltip-like widget */ #ifndef GUI_TOOLTIP_H #define GUI_TOOLTIP_H #include "dlg_node.h" /** * A widget similar to the GtkTooltip that is used to display a * DlgCircle's text as long as the mouse hovers over the circle. */ class GuiTooltip { public: GuiTooltip (DlgNode *node); ~GuiTooltip (); void draw (GtkWidget *parent, DlgPoint &offset); private: DlgNode *node; GtkWidget *tooltip; }; #endif // GUI_TOOLTIP_H adonthell-0.3.8/src/tools/dlgedit/dlg_module_entry.cc0000664000175000017500000001121012756054314017627 00000000000000/* Copyright (C) 2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_module_entry.cc * * @author Kai Sterker * @brief The textual contents of a DlgModule. */ #include #include "game.h" #include "quest.h" #include "character_base.h" #include "fileops.h" #include "dlg_module_entry.h" // ctor DlgModuleEntry::DlgModuleEntry () { init (); } // initialize the DlgModuleEntry to sane state void DlgModuleEntry::init () { project_ = "none"; imports_ = ""; ctor_ = ""; dtor_ = ""; methods_ = ""; itc = characters.end (); itq = quests.end (); } // reset everything to initial state void DlgModuleEntry::clear () { // empty character and quest array characters.clear (); quests.clear (); init (); } // set the project bool DlgModuleEntry::setProject (std::string p) { bool retval = true; if (project_ != p) { project_ = p; // empty character and quest array characters.clear (); quests.clear (); if (p != "none") { retval &= loadCharacters (); retval &= loadQuests (); } } return retval; } // load the character names bool DlgModuleEntry::loadCharacters () { // look for a character file std::string file = game::find_file (project_ + "/character.data"); if (file == "") return false; // open the file igzstream in; in.open (file); // version check if (!fileops::get_version (in, 3, 4, file)) return false; // load characters character_base *mychar; char ctemp; do { mychar = new character_base; mychar->get_state (in); // save the name of the NPC's if (mychar->get_id () != "Player") addCharacter (mychar->get_name ()); delete mychar; } while (ctemp << in); // close file in.close (); itc = characters.begin (); return true; } // load the quest names bool DlgModuleEntry::loadQuests () { // look for a character file std::string file = game::find_file (project_ + "/quest.data"); if (file == "") return false; // open the file igzstream in; in.open (file); // version check if (!fileops::get_version (in, 1, 1, file)) return false; ::quest myquest; char ctemp; // save the name of each Quest while (ctemp << in) { myquest.load (in); addQuest (myquest.name); } // close file in.close (); itq = quests.begin (); return true; } // add a character void DlgModuleEntry::addCharacter (std::string character) { std::vector::iterator i; for (i = characters.begin (); i != characters.end (); i++) if (character < *i) break; characters.insert (i, character); } // add a quest void DlgModuleEntry::addQuest (std::string quest) { std::vector::iterator i; for (i = quests.begin (); i != quests.end (); i++) if (quest < *i) break; quests.insert (i, quest); } // check whether a certain character exists bool DlgModuleEntry::isCharacter (const std::string &character) { if (find (characters.begin (), characters.end (), character) == characters.end ()) return false; return true; } // check whether a certain quest exists bool DlgModuleEntry::isQuest (const std::string &quest) { if (find (quests.begin (), quests.end (), quest) == quests.end ()) return false; return true; } // iterate over the existing characters std::string DlgModuleEntry::character () { std::string character = ""; if (itc != characters.end ()) { character = *itc; itc++; } else itc = characters.begin (); return character; } // iterate over the existing quests std::string DlgModuleEntry::quest () { std::string quest = ""; if (itq != quests.end ()) { quest = *itq; itq++; } else itq = quests.begin (); return quest; } adonthell-0.3.8/src/tools/dlgedit/Makefile.am0000664000175000017500000000431412742773625016037 00000000000000## Process this file with automake to produce Makefile.in EXTRA_DIST = loadlg.l loadcfg.l bin_PROGRAMS = adonthell-dlgedit headers = \ cfg_data.h \ cfg_io.h \ cfg_project.h \ dlg_arrow.h \ dlg_circle.h \ dlg_circle_entry.h \ dlg_cmdline.h \ dlg_compiler.h \ dlg_module.h \ dlg_module_entry.h \ dlg_mover.h \ dlg_node.h \ dlg_node_gfx.h \ dlg_point.h \ dlg_rect.h \ dlg_types.h \ gui_circle.h \ gui_circle_events.h \ gui_code.h \ gui_dlgedit.h \ gui_dlgedit_events.h \ gui_edit.h \ gui_error.h \ gui_file.h \ gui_graph.h \ gui_graph_events.h \ gui_list.h \ gui_list_events.h \ gui_messages.h \ gui_modal_dialog.h \ gui_recent_files.h \ gui_resources.h \ gui_scrollable.h \ gui_settings.h \ gui_tooltip.h \ gui_tree.h \ kb_traverse.h \ util.h adonthell_dlgedit_SOURCES = \ cfg_data.cc \ cfg_io.cc \ cfg_project.cc \ dlg_arrow.cc \ dlg_circle.cc \ dlg_circle_entry.cc \ dlg_cmdline.cc \ dlg_compiler.cc \ dlg_module.cc \ dlg_module_entry.cc \ dlg_mover.cc \ dlg_node.cc \ dlg_node_gfx.cc \ dlg_point.cc \ dlg_rect.cc \ gui_circle.cc \ gui_circle_events.cc \ gui_code.cc \ gui_dlgedit.cc \ gui_dlgedit_events.cc \ gui_edit.cc \ gui_error.cc \ gui_file.cc \ gui_graph.cc \ gui_graph_events.cc \ gui_list.cc \ gui_list_events.cc \ gui_messages.cc \ gui_modal_dialog.cc \ gui_resources.cc \ gui_recent_files.cc \ gui_scrollable.cc \ gui_settings.cc \ gui_tooltip.cc \ gui_tree.cc \ kb_traverse.cc \ lex.loadcfg.cc \ lex.loadlg.cc \ main.cc \ util.cc \ $(headers) # preparation for switching to GTK+ 3.0 GTK_3_0_FLAGS = -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED AM_CPPFLAGS = -I@top_srcdir@/src adonthell_dlgedit_CXXFLAGS = -D_VERSION_=\"0.3.6\" $(SDL_CFLAGS) $(GTK_CFLAGS) $(GTK_3_0_FLAGS) $(PY_CFLAGS) $(IGE_MAC_CFLAGS) adonthell_dlgedit_LDADD = ../../libadonthell.a $(GTK_LIBS) $(PY_LIBS) $(IGE_MAC_LIBS) lex.loadlg.cc: loadlg.l flex -olex.loadlg.cc $< lex.loadcfg.cc: loadcfg.l flex -olex.loadcfg.cc $< adonthell-0.3.8/src/tools/dlgedit/gui_code.h0000664000175000017500000000415512756054610015724 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_code.h * * @author Kai Sterker * @brief The Custom Code dialog. */ #ifndef GUI_CODE_H #define GUI_CODE_H #include "gui_edit.h" #include "dlg_module_entry.h" /** * Provides entries for additional import lines, for code to be inserted * into constructor and destructor and for defining custom methods. */ class GuiCode { public: /** * Create empty Python Code Dialog. */ GuiCode (); /** * Cleanup. */ ~GuiCode (); /** * Global pointer to the custom code dialog */ static GuiCode *dialog; /** * Show the dialog and display the contents of the given module. * @param entry the custom code of a certain DlgModule to be edited. * @param name name of the dialogue whose code is being edited. */ void display (DlgModuleEntry *entry, const std::string &name); /** * Store the user's entries once the OK button has been pressed. */ void applyChanges (); private: DlgModuleEntry *entry; // The module being edited GtkWidget *window; // The dialog window GuiEdit *imports; // entry for additional import statements GuiEdit *ctor; // entry for code inserted into constructor GuiEdit *dtor; // entry for code inserted into destructor GuiEdit *methods; // entry for custom methods }; #endif // GUI_CODE_H adonthell-0.3.8/src/tools/dlgedit/gui_graph_events.h0000664000175000017500000000340612756054760017503 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_graph_events.h * * @author Kai Sterker * @brief Event-callbacks for the dialogue graph view */ #ifndef GUI_GRAPH_EVENTS_H #define GUI_GRAPH_EVENTS_H #include #include /** * Callback notifying that the widget's size has changed. */ gint configure_event (GtkWidget *, GdkEventConfigure *, gpointer); /** * Callback indicating that the widget needs to be redrawn. */ gint expose_event (GtkWidget *, GdkEventExpose *, gpointer); /** * Callback indicating that a mouse button has been pressed. */ gint button_press_event (GtkWidget *, GdkEventButton *, gpointer); /** * Callback indicating that a mouse button has been released. */ gint button_release_event (GtkWidget *, GdkEventButton *, gpointer); /** * Callback indicating that the mouse has been moved. */ gint motion_notify_event (GtkWidget *, GdkEventMotion *, gpointer); /** * Callback indicating that a key has been pushed. */ guint key_press_notify_event (GtkWidget *, GdkEventKey *, gpointer); #endif // GUI_GRAPH_EVENTS_H adonthell-0.3.8/src/tools/dlgedit/dlg_arrow.h0000664000175000017500000001052112756054167016127 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_arrow.h * * @author Kai Sterker * @brief The node linking two DlgCircle's. */ #ifndef DLG_ARROW_H #define DLG_ARROW_H #include "dlg_node.h" /** * This node type's sole purpose is to link any two DlgCircles. * It's graphical representation is an arrow, hence the name. */ class DlgArrow : public DlgNode { public: /** * Create a new arrow. */ DlgArrow () { mode_ = IDLE; type_ = LINK; nid_ = 0; } /** * Create a new link between two nodes. * @param s The node where the link starts. * @param e The node the link points to. */ DlgArrow (DlgNode *s, DlgNode *e); /** * Detach the arrow from it's start and end circle. */ ~DlgArrow (); /** * Calculate the arrow's shape. Call this function every time either * it's start- or end-circle has moved. */ void initShape (); /** * Draw this node to the given surface with the specified offset. * The node's current mode determines the color thw node is drawn with. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing */ void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget); /** * Init the Arrow from a file. The file to load from is a global * variable, as loading is handled by a scanner generated with flex. * @param module The dialogue this arrow belongs to. * @return true if loading was successful, false * otherwise. */ bool load (DlgNode *module); /** * save an Arrow to a file * @param file Stream to an open file */ void save (std::ofstream &file); /** * Check whether the arrow is located at the given point. * @return true if this is the case, false otherwise. */ bool operator== (DlgPoint &point); /** * Get the arrow's head. * @return position of the arrow's head. */ DlgPoint getTip () { return DlgPoint (line[1]); } /** * Get the arrow's tail. * @return position of the arrow's tail. */ DlgPoint getTail () { return DlgPoint (line[0]); } private: /** * Calculate intersection of arrow line and node shape. This works * as follows: * * We have a rectangle that represents the shape of the start node. * The start of the arrow's line lies in the center of this rectangle, * and it will obviously pass through exactly one of its four sides. * * To find out which side, we split the rectangle into four quadrants, * with the start point as origin. Then we check through which of the * four quadrants above line runs. * * That way, only two sides will remain for the intersection. To figure * out the right one, we compare the line with the angle bisection of * its quadrant. * * Now that we know the side, we also know one coordinate of the * intersection. We can simply insert this into the equation of the * line and calculate the second coordinate. Voila: we have the point * where the arrow intersects with the node. * * @param start Point where the arrow starts * @param end Point where the arrow ends * @param shape Shape of the start node * * @return The intersection of arrow and start node. */ DlgPoint getIntersection (DlgPoint &start, DlgPoint &end, DlgRect &shape); GdkPoint line[2]; // the arrow's line GdkPoint tip[3]; // the arrow's tip }; #endif // DLG_ARROW_H adonthell-0.3.8/src/tools/dlgedit/gui_circle.h0000664000175000017500000000514612756054565016265 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_circle.h * * @author Kai Sterker * @brief The Edit Circle dialog */ #ifndef GUI_CIRCLE_H #define GUI_CIRCLE_H #include "dlg_types.h" #include "dlg_circle_entry.h" #include "dlg_module_entry.h" #include "gui_edit.h" #include "gui_modal_dialog.h" /** * This is the dialog used to input text, conditions and arbitrary code of * a DlgCircle. It further is used to specify whether the node contains speech * of the Player, the Narrator or of an NPC. In latter case, the text may * be attached to a special NPC, or to the default one. This default one is * always the NPC to whom the dialogue belongs in the game. */ class GuiCircle : public GuiModalDialog { public: /** * Open the "Edit Dialogue Node" dialog. * @param parent The parent of the dialog * @param type The type of the circle to display (NPC, PLAYER or NARRATOR) * @param entry The contents of the circle * @param dme The contents of the dialogue */ GuiCircle (GtkWindow *parent, node_type *type, DlgCircleEntry *entry, DlgModuleEntry *dme); /** * Apply the values entered in the dialogue to the edited node. This * method should be called when the user hits the OK button. */ void applyChanges (); private: const gchar *getOption (GtkComboBox * cbox); void setOption (GtkComboBox *o, const gchar *label); GuiEdit *cond_edit; // Text entry for conditions GuiEdit *code_edit; // Text entry for code GtkWidget *loop; // Checkbox for looping text GtkTextBuffer *text_entry; // Entry for dialogue text GtkTextBuffer *annotation_entry;// Entry for annotations GtkComboBox *npc_selection; // The dropdown list with the various NPC's DlgCircleEntry *entry; // The data to display node_type *type; // The type of the node }; #endif // GUI_CIRCLE_H adonthell-0.3.8/src/tools/dlgedit/gui_settings.h0000664000175000017500000000712412756055241016652 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_settings.h * * @author Kai Sterker * @brief The Dialogue settings dialog. */ #ifndef GUI_SETTINGS_H #define GUI_SETTINGS_H #include #include "dlg_module_entry.h" /** * Interface to various generic dialogue and project settings. Currently this * includes * - the project of the dialogue * - the dialogue's description * - the base directory of the above project */ class GuiSettings { public: /** * Create empty Settings Dialog. */ GuiSettings (); /** * Cleanup. */ ~GuiSettings (); /** * Global pointer to the settings dialog */ static GuiSettings *dialog; /** * Show the dialog and display the settings of the given module. * @param entry the settings of a certain DlgModule to be edited. * @param name name of the dialogue whose settings are being edited. */ void display (DlgModuleEntry *entry, const std::string &name); /** * Store the user's entries once the OK button has been pressed. */ void applyChanges (); /** * @name Member access */ //@{ /** * Set the base directory according to selected project. Call this * method whenever the user assigns a different project. * @param project the name of the selected project. */ void setBasedir (const std::string & project); /** * Return the basedir associated with the selected project. * @return The basedir of the selected project. */ std::string getBasedir (); /** * Set the project list to the project the module is assigned to. * If that module is not in the list yet, it will be added. * @param project name of the module's project. */ void setProject (const std::string & project); /** * Return the project the user has selected in the list. * @return The name of the selected project. */ std::string getProject (); //@} private: /** * Display the module's description. The text area is cleared * if neccessary. * @param desc the module's description. */ void setDescription (const std::string & desc); /** * Get the Description the user has entered for the module. * @return the module's description. */ std::string getDescription (); /** * Read available projects from DlgCmdline::datadir and add * them to the project list. Also add the "none" entry for * modules that do not belong to a project yet. */ void populateProjects (); DlgModuleEntry *entry; // The module's settings GtkWidget *window; // The dialog window GtkWidget *project; // Dropdown list for the project GtkTextBuffer *description; // Entry for the dialogue's description GtkWidget *basedir; // Entry for the project's base directory }; #endif // GUI_SETTINGS_H adonthell-0.3.8/src/tools/dlgedit/gui_dlgedit_events.h0000664000175000017500000000362512756054631020016 00000000000000/* Copyright (C) 1999/2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_dlgedit_events.h * * @author Kai Sterker * @brief The Events triggered via the Dialogue Editor's main window */ #ifndef GUI_DLGEDIT_EVENTS_H #define GUI_DLGEDIT_EVENTS_H void on_widget_destroy (GtkWidget *, gpointer); // Menu Callbacks void on_file_new_activate (GtkMenuItem *, gpointer); void on_file_load_activate (GtkMenuItem *, gpointer); void on_file_save_activate (GtkMenuItem *, gpointer); void on_file_save_as_activate (GtkMenuItem *, gpointer); void on_file_revert_activate (GtkMenuItem *, gpointer); void on_file_close_activate (GtkMenuItem *, gpointer); void on_dialogue_compile_activate (GtkMenuItem *, gpointer); void on_dialogue_run_activate (GtkMenuItem *, gpointer); void on_dialogue_preview_activate (GtkMenuItem *, gpointer); void on_dialogue_functions_activate (GtkMenuItem *, gpointer); void on_dialogue_player_activate (GtkMenuItem *, gpointer); void on_window_activate (GtkMenuItem *, gpointer); // Statusbar callbacks gboolean on_display_help (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data); gboolean on_clear_help (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data); #endif // GUI_DLGEDIT_EVENTS_H adonthell-0.3.8/src/tools/dlgedit/gui_list_events.h0000664000175000017500000000241612756055021017344 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_list_events.h * * @author Kai Sterker * @brief Event-callbacks for the instant dialogue preview */ #ifndef GUI_LIST_EVENTS_H #define GUI_LIST_EVENTS_H #include #include /** * Callback notifying that the user selected one of the list items. */ void on_list_select (GtkTreeSelection *selection, gpointer user_data); /** * Callback to resize the text to the new list size */ void on_list_resize (GtkWidget *widget, GdkRectangle *allocation, gpointer data); #endif // GUI_LIST_EVENTS_H adonthell-0.3.8/src/tools/dlgedit/dlg_cmdline.cc0000664000175000017500000000700612756054242016544 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_cmdline.cc * * @author Kai Sterker * @brief Methods to parse the dlgedit commandline. */ #include #include #include #include "dlg_cmdline.h" // flag indicating whether to compile the given scripts bool DlgCmdline::compile = false; // the directory to look for project files std::string DlgCmdline::datadir = DATA_DIR"/games"; // the default project std::string DlgCmdline::project = "none"; // index of the first dialgoue source in argv[] int DlgCmdline::sources; // examine the parameters passed to dlgedit bool DlgCmdline::parse (int argc, char* argv[]) { int c; // Check for options while ((c = getopt (argc, argv, "cdhvg:p:")) != -1) { switch (c) { case 'd': { std::cout << datadir << std::endl; return false; } case 'v': { std::cout << _VERSION_ << std::endl; return false; } case 'c': { compile = true; break; } case 'p': { project = optarg; break; } case 'g': { datadir = optarg; if (datadir[datadir.size () - 1] == '/') datadir.erase (datadir.size () - 1); // Check whether the requested game directory exists DIR * mydir = opendir (datadir.c_str ()); if (!mydir) { std::cerr << "No such directory " << datadir << "!" << std::endl; return false; } closedir (mydir); break; } case '?': case 'h': { help (argv[0]); return false; } } } sources = optind; return true; } // prints the help message void DlgCmdline::help (const std::string &program) { std::cout << "Usage: " << program << " [OPTIONS] [SOURCES]" << std::endl; std::cout << std::endl; std::cout << "Where [OPTIONS] can be:\n"; std::cout << "-h print this help message and exit" << std::endl; std::cout << "-d print the project directory and exit" << std::endl; std::cout << "-v print version and exit" << std::endl; std::cout << "-c compile all SOURCES and exit" << std::endl; std::cout << "-g dir specify a custom project directory" << std::endl; std::cout << "-p project specify a default project" << std::endl; } adonthell-0.3.8/src/tools/dlgedit/gui_settings.cc0000664000175000017500000003713712756055231017016 00000000000000/* Copyright (C) 2002/2003/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_settings.cc * * @author Kai Sterker * @brief The Dialogue settings dialog. */ #include #include #include #include "cfg_data.h" #include "gui_file.h" #include "gui_dlgedit.h" #include "gui_settings.h" // global pointer to the settings dialog GuiSettings * GuiSettings::dialog = NULL; // the project selection has changed void on_project_changed (GtkComboBox *widget, gpointer user_data) { // set project basedir accordingly GuiSettings *settings = (GuiSettings *) user_data; settings->setBasedir (settings->getProject()); } // browse the harddisk for a project void on_browse_basedir_clicked (GtkButton * button, gpointer user_data) { // if a project root exists, use that in file selector std::string dir = CfgData::data->getBasedir (GuiSettings::dialog->getProject ()); // otherwise revert to directory last opened if (dir == "") dir = GuiDlgedit::window->directory (); GtkWindow *parent = GTK_WINDOW (GuiDlgedit::window->getWindow()); GuiFile fs (parent, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, "Select base directory", dir + "/"); // File selection closed with OK if (fs.run ()) { GtkEntry *entry = (GtkEntry *) user_data; std::string file = fs.getSelection (); unsigned int len = file.length () - 1; // check if we have a directory struct stat statbuf; stat (file.c_str (), &statbuf); if (S_ISDIR (statbuf.st_mode)) { // have a directory gtk_entry_set_text (entry, file.substr (0, len).c_str ()); } else { // extract directory from file name unsigned int pos = file.rfind ('/'); gtk_entry_set_text (entry, file.substr (0, pos).c_str ()); } gtk_editable_set_position (GTK_EDITABLE(entry), -1); } } // OK button pressed void on_ok_button_clicked (GtkButton * button, gpointer user_data) { GuiSettings::dialog->applyChanges (); delete GuiSettings::dialog; } // Apply button pressed void on_apply_button_clicked (GtkButton * button, gpointer user_data) { GuiSettings::dialog->applyChanges (); } // callback for closing the window void on_close_settings (GtkButton * button, gpointer user_data) { delete GuiSettings::dialog; } // ctor GuiSettings::GuiSettings () { GtkWidget *vbox; GtkWidget *frame; GtkWidget *table; GtkWidget *label; GtkWidget *scrolledwindow; GtkWidget *hbox; GtkWidget *button; GtkWidget *hseparator; GtkWidget *hbuttonbox; GtkWidget *view; // the dialog window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_set_data (G_OBJECT (window), "window", window); gtk_widget_set_size_request (window, 400, 320); gtk_window_set_title (GTK_WINDOW (window), "Settings"); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); vbox = gtk_vbox_new (FALSE, 2); g_object_ref (vbox); g_object_set_data_full (G_OBJECT (window), "vbox", vbox, (GDestroyNotify) g_object_unref); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (window), vbox); // dialogue settings frame = gtk_frame_new ("Dialogue Settings"); g_object_ref (frame); g_object_set_data_full (G_OBJECT (window), "frame", frame, (GDestroyNotify) g_object_unref); gtk_widget_show (frame); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 4); table = gtk_table_new (2, 2, FALSE); g_object_ref (table); g_object_set_data_full (G_OBJECT (window), "table", table, (GDestroyNotify) g_object_unref); gtk_widget_show (table); gtk_container_add (GTK_CONTAINER (frame), table); gtk_container_set_border_width (GTK_CONTAINER (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 8); gtk_table_set_row_spacings (GTK_TABLE (table), 4); // project label = gtk_label_new ("Project"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 8); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); // description label = gtk_label_new ("Description"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_size_request(label, 70, -1); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); g_object_ref (scrolledwindow); g_object_set_data_full (G_OBJECT (window), "scrolledwindow", scrolledwindow, (GDestroyNotify) g_object_unref); gtk_widget_show (scrolledwindow); gtk_table_attach (GTK_TABLE (table), scrolledwindow, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); description = gtk_text_buffer_new (NULL); view = gtk_text_view_new_with_buffer (description); g_object_ref (view); g_object_set_data_full (G_OBJECT (window), "view", view, (GDestroyNotify) g_object_unref); gtk_widget_show (view); gtk_container_add (GTK_CONTAINER (scrolledwindow), view); gtk_widget_set_tooltip_text (view, "Here goes a view of the dialogue"); gtk_text_view_set_editable (GTK_TEXT_VIEW (view), TRUE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD); // project selection project = gtk_combo_box_new(); g_object_ref (project); g_object_set_data_full (G_OBJECT (window), "project", project, (GDestroyNotify) g_object_unref); gtk_widget_show (project); gtk_table_attach (GTK_TABLE (table), project, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_tooltip_text (project, "The project this dialogue belongs to"); g_signal_connect (G_OBJECT (project), "changed", G_CALLBACK (on_project_changed), this); GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (project), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (project), renderer, "text", 0, NULL); // add available projects to list populateProjects (); frame = gtk_frame_new ("Project Settings"); g_object_ref (frame); g_object_set_data_full (G_OBJECT (window), "frame", frame, (GDestroyNotify) g_object_unref); gtk_widget_show (frame); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 4); hbox = gtk_hbox_new (FALSE, 8); g_object_ref (hbox); g_object_set_data_full (G_OBJECT (window), "hbox", hbox, (GDestroyNotify) g_object_unref); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (frame), hbox); gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); // base dir entry label = gtk_label_new ("Base dir"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_set_size_request (label, 70, -1); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); basedir = gtk_entry_new (); g_object_ref (basedir); g_object_set_data_full (G_OBJECT (window), "basedir", basedir, (GDestroyNotify) g_object_unref); gtk_widget_show (basedir); gtk_box_pack_start (GTK_BOX (hbox), basedir, TRUE, TRUE, 0); gtk_widget_set_tooltip_text (basedir, "The directory root of dialogue sources belonging to above project"); // browse for base dir button = gtk_button_new_with_label ("..."); g_object_ref (button); g_object_set_data_full (G_OBJECT (window), "button", button, (GDestroyNotify) g_object_unref); gtk_widget_show (button); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_set_size_request (button, 30, -1); gtk_widget_set_tooltip_text (button, "Browse your file system for the base directory"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_browse_basedir_clicked), basedir); hseparator = gtk_hseparator_new (); g_object_ref (hseparator); g_object_set_data_full (G_OBJECT (window), "hseparator", hseparator, (GDestroyNotify) g_object_unref); gtk_widget_show (hseparator); gtk_box_pack_start (GTK_BOX (vbox), hseparator, FALSE, FALSE, 0); hbuttonbox = gtk_hbutton_box_new (); g_object_ref (hbuttonbox); g_object_set_data_full (G_OBJECT (window), "hbuttonbox", hbuttonbox, (GDestroyNotify) g_object_unref); gtk_widget_show (hbuttonbox); gtk_box_pack_start (GTK_BOX (vbox), hbuttonbox, FALSE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (hbuttonbox), 0); button = gtk_button_new_with_label ("Apply"); g_object_ref (button); g_object_set_data_full (G_OBJECT (window), "button", button, (GDestroyNotify) g_object_unref); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (hbuttonbox), button); gtk_widget_set_can_default (button, TRUE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_apply_button_clicked), this); button = gtk_button_new_with_label ("OK"); g_object_ref (button); g_object_set_data_full (G_OBJECT (window), "button", button, (GDestroyNotify) g_object_unref); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (hbuttonbox), button); gtk_widget_set_can_default (button, TRUE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_ok_button_clicked), NULL); button = gtk_button_new_with_label ("Cancel"); g_object_ref (button); g_object_set_data_full (G_OBJECT (window), "button", button, (GDestroyNotify) g_object_unref); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (hbuttonbox), button); gtk_widget_set_can_default (button, TRUE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_close_settings), NULL); // set transient for dialogue editor main window gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (GuiDlgedit::window->getWindow ())); dialog = this; entry = NULL; } // dtor GuiSettings::~GuiSettings () { gtk_widget_destroy (window); dialog = NULL; } // display the dialog void GuiSettings::display (DlgModuleEntry * e, const std::string & name) { if (entry != e) { entry = e; // display the contents of the module setProject (entry->project ()); setDescription (entry->description()); } // set the title gchar *title = g_strjoin (NULL, "Settings - [", name.c_str (), "]", NULL); gtk_window_set_title (GTK_WINDOW (window), title); // now show the window gtk_widget_show (window); } // store the user's entries void GuiSettings::applyChanges () { // project std::string project = getProject (); // if project changed, update tree if (project != entry->project ()) { if (!entry->setProject (project)) std::cout << "Loading quests/characters failed!\n"; GuiDlgedit::window->updateProject (); } // description entry->setDescription (getDescription ()); // basedir if (project != "none") CfgData::data->setBasedir (project, getBasedir ()); } // returns selected option std::string GuiSettings::getProject () { GtkTreeIter iter; gchar *s = NULL; if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX(project), &iter)) { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX(project)); gtk_tree_model_get (model, &iter, 0, &s, -1); } return s ? s : "none"; } // sets a default option void GuiSettings::setProject (const std::string & label) { GtkTreeIter iter; gchar *option = NULL; GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX(project)); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get (model, &iter, 0, &option, -1); if (strcmp(option, label.c_str()) == 0) { // found our entry -> set as default and return gtk_combo_box_set_active_iter(GTK_COMBO_BOX(project), &iter); // update base directory setBasedir (label); return; } } while (gtk_tree_model_iter_next(model, &iter)); } // that project is not available yet, so add it gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, label.c_str(), -1); gtk_combo_box_set_active_iter (GTK_COMBO_BOX(project), &iter); // update base directory setBasedir (label); } // set the module's description void GuiSettings::setDescription (const std::string & desc) { gtk_text_buffer_set_text (description, desc.c_str (), -1); } // get the module's description std::string GuiSettings::getDescription () { GtkTextIter start, end; gtk_text_buffer_get_bounds (description, &start, &end); gchar *tmp = gtk_text_buffer_get_text (description, &start, &end, TRUE); std::string text (tmp); g_free (tmp); return text; } // set project base directory void GuiSettings::setBasedir (const std::string & project) { // do nothing for project "none" if (project == "none") { gtk_entry_set_text (GTK_ENTRY (basedir), ""); return; } // get base directory of given project from config file std::string dir = CfgData::data->getBasedir (project); // update the entry gtk_entry_set_text (GTK_ENTRY (basedir), dir.c_str ()); gtk_editable_set_position (GTK_EDITABLE (basedir), -1); } // get project base directory std::string GuiSettings::getBasedir () { return gtk_entry_get_text (GTK_ENTRY (basedir)); } // add available projects to list void GuiSettings::populateProjects () { GtkTreeIter iter; GtkListStore *model = gtk_list_store_new (1, G_TYPE_STRING); gtk_combo_box_set_model(GTK_COMBO_BOX(project), GTK_TREE_MODEL(model)); std::vector projects = CfgData::data->projectsFromDatadir (); std::vector::iterator i; for (i = projects.begin (); i != projects.end (); i++) { gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, 0, i->c_str(), -1); } } adonthell-0.3.8/src/tools/dlgedit/kb_traverse.h0000664000175000017500000001046212756055320016452 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file kb_traverse.h * * @author Kai Sterker * @brief Graph traversal via keyboard */ #ifndef KB_TRAVERSE_H #define KB_TRAVERSE_H #include "dlg_node.h" /** * This class implements the graph traversal strategy for keyboard users. * As a single node may have both multiple children and multiple parents, * this is not that easy. The current strategy is the following: * * - when a node is selected, LEFT and RIGHT iterate over a list of * siblings of that node. * - pressing UP will move to the first parent of the selected node. The * list of siblings will contain all the remainig parents. * - pressing DOWN will move to the first child of the selected node. The * list of siblings will contain all the remaining children. * - pressing a key with no node selected will select the first node * without parent. The list of siblings will contain all other nodes * without parents. * * If you got a better solution, please tell me :). */ class KBTraverse { public: /** * Default constructor. */ KBTraverse (); /** * Default destructor. */ ~KBTraverse (); /** * @name Movement */ //@{ /** * Select previous node in list and return new selection. * @return pointer to current selection or \b NULL if nothing selected. */ DlgNode* left (); /** * Select next node in list and return new selection. * @return pointer to current selection or \b NULL if nothing selected. */ DlgNode* right (); /** * Select first parent of current selection. Update list with * this node's siblings. * @return pointer to current selection or \b NULL if nothing selected. */ DlgNode* up (); /** * Select first child of current selection. Update list with * its siblings. * @return pointer to current selection or \b NULL if nothing selected. */ DlgNode* down (); //@} /** * @name Selection */ //@{ /** * Get all parents of selected node. Adds them to the list * of siblings and selects the first of them. * @return true if a parent can be selected, false otherwise. */ bool selectParents (); /** * Get all children of selected node. Adds them to the list * of siblings and selects the first of them. * @return true if a child can be selected, false otherwise. */ bool selectChildren (); /** * Select the given node. Update list with this nodes siblings. Use this * method to keep the keyboard selection up-to-date when selecting nodes * in a different way. * @param node to be selected * @return true if node has been selected, false otherwise. */ bool select (DlgNode *node); /** * Select the first of the module's root nodes. * @param nodes vector with the module's nodes. * @return pointer to current selection or \b NULL if nothing selected. */ DlgNode *selectRoot (std::vector *nodes); /** * Empty list of nodes and clear selection. */ void clear (); //@} private: /** * Add a node to the list of siblings. The nodes are sorted by their * position. The ones with the smallest y value come first; if nodes have * the same y value, then those with the smallest x value come first. * @param node the DlgNode to add. */ void addSibling (DlgNode *node); std::list Siblings; // Nodes reachable with left/right std::list::iterator Current; // Selected node }; #endif // KB_TRAVERSE_H adonthell-0.3.8/src/tools/dlgedit/dlg_types.h0000664000175000017500000000632712756054521016144 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_types.h * * @author Kai Sterker * @brief Typedefs and Enumerations used throughout dlgedit */ #ifndef DLG_TYPES_H #define DLG_TYPES_H /** * The type of a given DlgNode. */ enum node_type { PLAYER = 1, NPC = 2, LINK = 3, MOVER = 4, NARRATOR = 5, MODULE = 6 }; /** * Specifies which node to retrieve. */ enum query_type { FIRST = 0, NEXT = 1, PREV = 2, LAST = 3, CURRENT = 4 }; /** * Defines the state of an individual node, but also that of the whole program. */ enum mode_type { IDLE = 0, NODE_SELECTED = 1, NODE_HILIGHTED = 2, NODE_DRAGGED = 3, L10N_PREVIEW = 4, NUM_MODES = 5 }; /** * A few predefined colors for drawing operations */ enum { GC_BLACK = 0, GC_GREY = 1, GC_WHITE = 2, GC_DARK_RED = 3, GC_RED = 4, GC_DARK_GREEN = 5, GC_GREEN = 6, GC_ORANGE = 7, GC_DARK_BLUE = 8, GC_BLUE = 9, MAX_GC = 10 }; /** * Talking names for the different file menu items. */ enum menu_item { SAVE = 0, SAVE_AS = 1, CLOSE = 2, SETTINGS = 3, FUNCTIONS = 4, COMPILE = 5, PREVIEW = 6, RUN = 7, REVERT = 8, MAX_ITEM = 9 }; /** * Defines for the various parts of a dialogue source file. */ enum { LOAD_CIRCLE = 1, LOAD_ARROW = 2, LOAD_END = 3, LOAD_TYPE = 4, LOAD_PREV = 5, LOAD_NEXT = 6, LOAD_LINK = 7, LOAD_POS = 8, LOAD_NOTE = 9, LOAD_TEXT = 10, LOAD_COND = 11, LOAD_VARS = 12, LOAD_FUNC = 13, LOAD_ACT = 14, LOAD_NAME = 15, LOAD_RACE = 16, LOAD_GENDER = 17, LOAD_NPC = 18, LOAD_STR = 19, LOAD_NUM = 20, LOAD_IMPORTS = 21, LOAD_CTOR = 22, LOAD_DTOR = 23, LOAD_PROJECT = 24, LOAD_LOOP = 25, LOAD_FILE = 26, LOAD_BASE_DIR = 27, LOAD_MODULE = 28, LOAD_ID = 29, LOAD_UNKNOWN = 30 }; /** * The size of a DlgCircle. */ #define CIRCLE_DIAMETER 20 #define CIRCLE_RADIUS 10 /** * File extension of dialogue source files. */ #define FILE_EXT ".adlg" #endif // DLG_TYPES_H adonthell-0.3.8/src/tools/dlgedit/gui_graph.h0000664000175000017500000002177712756055002016120 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_graph.h * * @author Kai Sterker * @brief View for the dialogue graph */ #ifndef GUI_GRAPH_H #define GUI_GRAPH_H #include "gui_scrollable.h" #include "gui_tooltip.h" #include "dlg_module.h" /** * The widget handling the graphical representation of the dialogue graph. * Displays a dialogue module and offers an interface for authors to edit * the dialogue. Only one instance of this class exists throughout the whole * dlgedit session. */ class GuiGraph : public Scrollable { public: /** * Constructor. Main purpose is to create the drawing area for the * graph and to register the GTK+ event callbacks used to catch * user input for this widget. * @param paned The GtkPaned that will hold the graph view widget. */ GuiGraph (GtkWidget* paned); /** * Standard desctructor. */ virtual ~GuiGraph (); /** * @name Changing the view */ //@{ /** * Attach a dialogue module to the view for drawing. * @param m the DlgModule to display and edit. * @param cntr whether the module should be centered in the view */ void attachModule (DlgModule *m, bool cntr = false); /** * Detach the dialogue module attached to the view. */ void detachModule (); /** * Switch view to the given module. Just a convenience method. Calling * detachModule () followed by attachModule (m) will do the same. * @param m The module to display. */ void switchModule (DlgModule *m); //@} /** * @name Drawing area handling methods. */ //@{ /** * Highlight nodes when hit by the cursor. * @param point Current position of the cursor. */ void mouseMoved (DlgPoint &point); /** * Draw everything to the backing pixmap. */ void draw (); /** * Resize the drawing area (after the user resized the window). * @param widget The widget containing the drawing area. */ void resizeSurface (GtkWidget *widget); /** * Clear the drawing area. */ void clear (); /** * Center the displayed dialogue on the drawing area. */ void center (); //@} /** * @name Node manipulation methods. */ //@{ /** * Create a new DlgCircle at the given position. * @param pos Current cursor position * @param type Type of the new circle. * @return true if the circle could be created, * false otherwise. */ bool newCircle (DlgPoint &pos, node_type type = NPC); /** * Create a new DlgArrow between the selected node and the given position. * @param pos Current cursor position * @return true if the link could be created, false otherwise. */ bool newArrow (DlgPoint &pos); /** * Insert a subdialogue at the given position. Note that the position is * already relative to the graph's origin. * @param pos Current cursor position. * @return \b true if a subdialogue could be added, \b false otherwise. */ bool newModule (DlgPoint &pos); /** * Edit currently selected node. * @return true if editing was successful, false otherwise. */ bool editNode (); /** * Delete currently selected node. * @return true if deleting was successful, false otherwise. */ bool deleteNode (); /** * Select the given node and update the instant preview and node editor * accordingly. * @param node the DlgNode to be selected * @return true if the node exists and was selected successfully, * false otherwise. */ bool selectNode (DlgNode *node); /** * Select the node at the given position. * @param point the coordinates of the DlgNode to be selected * @return true if the node exists and was selected successfully, * false otherwise. */ bool selectNode (DlgPoint &point); /** * Select the parent of the currently selected node (or the first node * in case no node is selected so far. * @return true if the node exists and was selected successfully, * false otherwise. */ bool selectParent (); /** * Select the first child of the currently selected node (or the first * node in case no node is selected so far. * @return true if the node exists and was selected successfully, * false otherwise. */ bool selectChild (); /** * Select a sibling of the currently selected node (or the first * node in case no node is selected so far. * @param pos Specifies whether to select the previous or the next sibling. * @return true if the sibling exists and was selected successfully, * false otherwise. */ bool selectSibling (query_type pos); /** * Select the first node in the dialogue. * @return true on success, false otherwise. */ bool selectRoot (); /** * Deselect the node currently selected. */ void deselectNode (); /** * Center the view on the given node, as long as it does not lie in the * inner 60\% of the visible area. * @param node DlgNode to center the view on. * @return true if the node exists and was centered on, * false otherwise. */ bool centerNode (DlgNode *node = NULL); //@} /** * @name Drag'n dropping of DlgNodes */ //@{ /** * Prepare a DlgNode for dragging. Circles can be moved directly. * Arrows need to be attached to a temporary, invisible node. This * method takes care of that. * @param point position where the user started to drag the mouse. * @return true if a node is being dragged, false otherwise. */ bool prepareDragging (DlgPoint &point); /** * As long as in dragging mode, this method will update the position * of the node being dragged. * @param point current cursor position. */ void drag (DlgPoint &point); /** * Once the user releases the left mouse button, this method calculates * the final position. In case of an Arrow being dragged, it will be * attached to a node if possible. Otherwise, the former state will be * restored. * @param point current cursor position. */ void stopDragging (DlgPoint &point); //@} /** * @name Auto-Scrolling (TM) ;) functionality. */ //@{ /** * Moves the view in the desired direction. */ virtual void scroll (); /** * Check whether it is allowed to initiate * scrolling. * @return false if scrolling is forbidden, true otherwise. */ virtual bool scrollingAllowed () const; /** * Return a pointer to the drawing area * @return the GtkDrawingArea widget */ virtual GtkWidget *drawingArea () const { return graph; } //@} /** * @name Member access methods. */ //@{ /** * Returns the current offset of the attached DlgModule. * @return the absolute position of the view */ DlgPoint *position () { return offset; } /** * Return a pointer to the drawing surface. * @return the drawing surface */ cairo_surface_t *pixmap () { return surface; } /** * Return the attached dialogue module. * @return the DlgModule currently attached to the view */ DlgModule *getAttached () { return module; } /** * Get the (toplevel) dialogue the attached module * belongs to. * @return The toplevel dialogue. */ DlgModule *dialogue (); /** * Get the state of the attached module. * @return the attached DlgModule's state. */ mode_type mode () { return module ? module->state () : IDLE; } //@} private: DlgNode *mover; // The node currently dragged DlgModule *module; // Module assigned to the graph view DlgPoint *offset; // Module's relative position to the origin GtkWidget *graph; // Drawing Area cairo_surface_t *surface; // Drawing surface DlgRect drawing_area; // Size of the Drawing Area GuiTooltip *tooltip; // Tooltip for displaying node-text }; #endif // GUI_GRAPH_H adonthell-0.3.8/src/tools/dlgedit/gui_file.h0000664000175000017500000000433112756054734015734 00000000000000/* Copyright (C) 2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_file.h * * @author Kai Sterker * @brief Wrapper for the GtkFileSelection widget */ #include #include "gui_modal_dialog.h" /** * A C++ interface to GTK's file selection dialog. */ class GuiFile : public GuiModalDialog { public: /** * Create a new file selection dialog. * @param parent the parent window for the dialog. * @param action type of file dialog. * @param file name of default file. * @param title the dialog title. */ GuiFile (GtkWindow *parent, GtkFileChooserAction action, const std::string &file, const std::string &title); /** * Cleanup. */ ~GuiFile (); /** * Show the dialog. * @return true if closed with okay, false otherwise. */ bool run (); /** * Add a filter to limit the files that will be visible and * selectable by the user. * @param pattern only show files matching the pattern. * @param name name of the filter. */ void add_filter (const std::string & pattern, const std::string & name); /** * Add shortcut to the given directory to the file chooser. * @param shortcut the shortcut to add. */ void add_shortcut (const std::string & shortcut); /** * Return the users selection. * @param the users selection. */ std::string getSelection () const { return File; } private: /// the file the user has selected std::string File; }; adonthell-0.3.8/src/tools/dlgedit/gui_recent_files.h0000664000175000017500000000557512756055144017466 00000000000000/* Copyright (C) 2011 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/gui_recent_files.h * * @author Kai Sterker * @brief Keeps a list of recent files. */ #ifndef GUI_RECENT_FILES_H #define GUI_RECENT_FILES_H #include #include /** * Interface for anyone interested in recent file actions. */ class GuiRecentFileListener { public: virtual void OnRecentFileActivated (const std::string & file) = 0; }; /** * Keeps a list of recently opened file for the application. * Also adds the file to the desktop-wide recent file list * and allows to launch the program with that file. */ class GuiRecentFiles { public: /** * Create a recent files list for the given application * @param cmd the executable * @param args the required command line arguments */ GuiRecentFiles (const std::string & cmd, const std::string & args); /** * Destructor. */ virtual ~GuiRecentFiles(); /** * Register the given file with given mimetype as a recently opened file. * @param file the absolute pathname to the file. * @param type the files mimetype. */ void registerFile (const std::string & file, const std::string & type); /** * Register a listener to get notified when a recent file * has been selected. * @param listener the new listener to set */ void setListener (GuiRecentFileListener *listener) { Listener = listener; } /** * Get the listener that wants to be notified when a recent * file has been selected. * @return the current listener */ GuiRecentFileListener *getListener () const { return Listener; } /** * Return a menu with the list of recent files. */ GtkWidget *recentFileMenu () const { return Menu; } private: /// the application to launch std::string Command; /// the command line arguments std::string Arguments; /// the recent files manager GtkRecentManager* Manager; /// the menu displaying recently used files GtkWidget *Menu; /// listener to notify when a recent file was selected GuiRecentFileListener *Listener; }; #endif /* GUI_RECENT_FILES_H_ */ adonthell-0.3.8/src/tools/dlgedit/util.cc0000664000175000017500000000742612756055356015275 00000000000000/* Copyright (C) 2009/2010 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/util.cc * * @author Kai Sterker * @brief Helper methods. */ #include #include #include #include #include #include #include "game.h" #ifdef WIN32 #define realpath(N,R) _fullpath((R),(N),_MAX_PATH) #undef PATH_MAX #define PATH_MAX _MAX_PATH #endif #include "util.h" // get path relative to data directory std::string util::get_relative_path (const std::string & path, const std::string & target_dir) { std::string base_path = MK_UNIX_PATH (game::user_data_dir()); std::string rel_path = path; // make sure to use path relative to (user defined) data directory if (base_path == "" || !remove_common_path (rel_path, base_path)) { // fallback to builtin data dir if that doesn't seem to work base_path = MK_UNIX_PATH (game::game_data_dir()); if (!remove_common_path (rel_path, base_path)) { // if everything fails, try locating target_dir in the path and use // that as relative path size_t pos = rel_path.rfind (target_dir); if (pos != std::string::npos) { rel_path = rel_path.substr (pos); if (rel_path[0] == '/') { rel_path = rel_path.substr (1); } } } } return rel_path; } // try to make path relative to base path bool util::remove_common_path (std::string & path, const std::string & base_path) { // make canonical base path char canonical_path[PATH_MAX]; if (realpath(base_path.c_str(), canonical_path)) { std::string c_base_path = canonical_path; if (realpath(path.c_str(), canonical_path)) { path = MK_UNIX_PATH (canonical_path); if (path.compare (0, c_base_path.size(), c_base_path) == 0) { path = path.substr (c_base_path.length()); if (path[0] == '/') { path = path.substr (1); } return true; } } } return false; } // convert windows directory separators to unix style std::string util::to_unix_path (const std::string & path) { std::string result = path; for (std::string::iterator i = result.begin(); i != result.end(); i++) { if (*i == '\\') *i = '/'; } return result; } // convert relative path to absolute path std::string util::get_absolute_path (const std::string & path) { std::string result = path; if (result[0] != '/') { char *oldwd = getcwd (NULL, 0); if (chdir (dirname ((char*) result.c_str()))) { return path; } // get absolute pathname char *cpath = getcwd (NULL, 0); char *bname = strdup (path.c_str()); result = std::string(cpath) + "/" + basename (bname); // restore working directory chdir (oldwd); // cleanup free (oldwd); free (cpath); free (bname); } return result; } adonthell-0.3.8/src/tools/dlgedit/dlg_rect.cc0000664000175000017500000000752112756054477016102 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_rect.cc * * @author Kai Sterker * @brief A wrapper around GdkRectangle. */ #include "dlg_rect.h" // Cast GdkRectangle to DlgRect DlgRect::DlgRect (GdkRectangle &rect) { top_left = DlgPoint (rect.x, rect.y); bottom_right = DlgPoint (x () + rect.width, y () + rect.height); } // Cast DlgRect to GdkRectangle DlgRect::operator GdkRectangle () { GdkRectangle rect; rect.x = x (); rect.y = y (); rect.width = width (); rect.height = height (); return rect; } // Create a valid rectangle from any two points void DlgRect::init (DlgPoint &a, DlgPoint &b) { top_left = DlgPoint (a.x () < b.x () ? a.x () : b.x (), a.y () < b.y () ? a.y () : b.y ()); bottom_right = DlgPoint (a.x () < b.x () ? b.x () : a.x (), a.y () < b.y () ? b.y () : a.y ()); } // create a Rectangle from a point and width and height DlgRect::DlgRect (DlgPoint &p, int width, int height) { DlgPoint q (p.x () + width, p.y () + height); init (p, q); } // Test whether point lies within this rectangle's boundaries bool DlgRect::contains (const DlgPoint &point) { if (point.x () < x () || point.x () > bottom_right.x () || point.y () < y () || point.y () > bottom_right.y ()) return false; return true; } // Test whether the given rectangle overlaps with this one bool DlgRect::contains (const DlgRect &rect) { if (x () <= rect.x ()) { if (bottomRight ().x () >= rect.x ()) { if (y () <= rect.y ()) { if (bottomRight ().y () >= rect.y ()) return true; } else { if (rect.bottomRight ().y () >= y ()) return true; } } } else { if (rect.bottomRight ().x () >= x ()) { if (y () <= rect.y ()) { if (bottomRight ().y () >= rect.y ()) return true; } else { if (rect.bottomRight ().y () >= y ()) return true; } } } return false; } // Create a copy of this rectangle, inflated by the amount specified by p DlgRect DlgRect::inflate (int x, int y) { DlgPoint tl (top_left.x () - x, top_left.y () - y); DlgPoint br (bottom_right.x () + x, bottom_right.y () + y); return DlgRect (tl, br); } // Grow this rectangle void DlgRect::grow (int x, int y) { top_left = top_left.offset (-x, -y); bottom_right = bottom_right.offset (x, y); } // Move this rect to a new position void DlgRect::setPos (const DlgPoint &pos) { int w = width (); int h = height (); top_left = pos; resize (w, h); } // Move this rect by the given amount void DlgRect::move (DlgPoint &p) { top_left = DlgPoint (top_left.x () + p.x(), top_left.y() + p.y()); bottom_right = DlgPoint (bottom_right.x () + p.x(), bottom_right.y() + p.y()); } // Change the size of the rectangle. void DlgRect::resize (int width, int height) { bottom_right = DlgPoint (top_left.x () + width, top_left.y () + height); } // compare position of two rects bool DlgRect::operator< (DlgRect &rect) { return center () < rect.center (); } adonthell-0.3.8/src/tools/dlgedit/Makefile.in0000644000175000017500000033465313414164743016052 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = adonthell-dlgedit$(EXEEXT) subdir = src/tools/dlgedit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = am_adonthell_dlgedit_OBJECTS = adonthell_dlgedit-cfg_data.$(OBJEXT) \ adonthell_dlgedit-cfg_io.$(OBJEXT) \ adonthell_dlgedit-cfg_project.$(OBJEXT) \ adonthell_dlgedit-dlg_arrow.$(OBJEXT) \ adonthell_dlgedit-dlg_circle.$(OBJEXT) \ adonthell_dlgedit-dlg_circle_entry.$(OBJEXT) \ adonthell_dlgedit-dlg_cmdline.$(OBJEXT) \ adonthell_dlgedit-dlg_compiler.$(OBJEXT) \ adonthell_dlgedit-dlg_module.$(OBJEXT) \ adonthell_dlgedit-dlg_module_entry.$(OBJEXT) \ adonthell_dlgedit-dlg_mover.$(OBJEXT) \ adonthell_dlgedit-dlg_node.$(OBJEXT) \ adonthell_dlgedit-dlg_node_gfx.$(OBJEXT) \ adonthell_dlgedit-dlg_point.$(OBJEXT) \ adonthell_dlgedit-dlg_rect.$(OBJEXT) \ adonthell_dlgedit-gui_circle.$(OBJEXT) \ adonthell_dlgedit-gui_circle_events.$(OBJEXT) \ adonthell_dlgedit-gui_code.$(OBJEXT) \ adonthell_dlgedit-gui_dlgedit.$(OBJEXT) \ adonthell_dlgedit-gui_dlgedit_events.$(OBJEXT) \ adonthell_dlgedit-gui_edit.$(OBJEXT) \ adonthell_dlgedit-gui_error.$(OBJEXT) \ adonthell_dlgedit-gui_file.$(OBJEXT) \ adonthell_dlgedit-gui_graph.$(OBJEXT) \ adonthell_dlgedit-gui_graph_events.$(OBJEXT) \ adonthell_dlgedit-gui_list.$(OBJEXT) \ adonthell_dlgedit-gui_list_events.$(OBJEXT) \ adonthell_dlgedit-gui_messages.$(OBJEXT) \ adonthell_dlgedit-gui_modal_dialog.$(OBJEXT) \ adonthell_dlgedit-gui_resources.$(OBJEXT) \ adonthell_dlgedit-gui_recent_files.$(OBJEXT) \ adonthell_dlgedit-gui_scrollable.$(OBJEXT) \ adonthell_dlgedit-gui_settings.$(OBJEXT) \ adonthell_dlgedit-gui_tooltip.$(OBJEXT) \ adonthell_dlgedit-gui_tree.$(OBJEXT) \ adonthell_dlgedit-kb_traverse.$(OBJEXT) \ adonthell_dlgedit-lex.loadcfg.$(OBJEXT) \ adonthell_dlgedit-lex.loadlg.$(OBJEXT) \ adonthell_dlgedit-main.$(OBJEXT) \ adonthell_dlgedit-util.$(OBJEXT) $(am__objects_1) adonthell_dlgedit_OBJECTS = $(am_adonthell_dlgedit_OBJECTS) am__DEPENDENCIES_1 = adonthell_dlgedit_DEPENDENCIES = ../../libadonthell.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) adonthell_dlgedit_LINK = $(CXXLD) $(adonthell_dlgedit_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(adonthell_dlgedit_SOURCES) DIST_SOURCES = $(adonthell_dlgedit_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FT2_CFLAGS = @FT2_CFLAGS@ FT2_LIBS = @FT2_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ IGE_MAC_CFLAGS = @IGE_MAC_CFLAGS@ IGE_MAC_LIBS = @IGE_MAC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OGG_CFLAGS = @OGG_CFLAGS@ OGG_DEFS = @OGG_DEFS@ OGG_LIBS = @OGG_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PY_CFLAGS = @PY_CFLAGS@ PY_LIBS = @PY_LIBS@ PY_PREFIX = @PY_PREFIX@ P_DOT = @P_DOT@ P_DOXYGEN = @P_DOXYGEN@ RANLIB = @RANLIB@ SDL2_CONFIG = @SDL2_CONFIG@ SDL2_FRAMEWORK = @SDL2_FRAMEWORK@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_DEFS = @SDL_DEFS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gamedatadir = @gamedatadir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = loadlg.l loadcfg.l headers = \ cfg_data.h \ cfg_io.h \ cfg_project.h \ dlg_arrow.h \ dlg_circle.h \ dlg_circle_entry.h \ dlg_cmdline.h \ dlg_compiler.h \ dlg_module.h \ dlg_module_entry.h \ dlg_mover.h \ dlg_node.h \ dlg_node_gfx.h \ dlg_point.h \ dlg_rect.h \ dlg_types.h \ gui_circle.h \ gui_circle_events.h \ gui_code.h \ gui_dlgedit.h \ gui_dlgedit_events.h \ gui_edit.h \ gui_error.h \ gui_file.h \ gui_graph.h \ gui_graph_events.h \ gui_list.h \ gui_list_events.h \ gui_messages.h \ gui_modal_dialog.h \ gui_recent_files.h \ gui_resources.h \ gui_scrollable.h \ gui_settings.h \ gui_tooltip.h \ gui_tree.h \ kb_traverse.h \ util.h adonthell_dlgedit_SOURCES = \ cfg_data.cc \ cfg_io.cc \ cfg_project.cc \ dlg_arrow.cc \ dlg_circle.cc \ dlg_circle_entry.cc \ dlg_cmdline.cc \ dlg_compiler.cc \ dlg_module.cc \ dlg_module_entry.cc \ dlg_mover.cc \ dlg_node.cc \ dlg_node_gfx.cc \ dlg_point.cc \ dlg_rect.cc \ gui_circle.cc \ gui_circle_events.cc \ gui_code.cc \ gui_dlgedit.cc \ gui_dlgedit_events.cc \ gui_edit.cc \ gui_error.cc \ gui_file.cc \ gui_graph.cc \ gui_graph_events.cc \ gui_list.cc \ gui_list_events.cc \ gui_messages.cc \ gui_modal_dialog.cc \ gui_resources.cc \ gui_recent_files.cc \ gui_scrollable.cc \ gui_settings.cc \ gui_tooltip.cc \ gui_tree.cc \ kb_traverse.cc \ lex.loadcfg.cc \ lex.loadlg.cc \ main.cc \ util.cc \ $(headers) # preparation for switching to GTK+ 3.0 GTK_3_0_FLAGS = -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED AM_CPPFLAGS = -I@top_srcdir@/src adonthell_dlgedit_CXXFLAGS = -D_VERSION_=\"0.3.6\" $(SDL_CFLAGS) $(GTK_CFLAGS) $(GTK_3_0_FLAGS) $(PY_CFLAGS) $(IGE_MAC_CFLAGS) adonthell_dlgedit_LDADD = ../../libadonthell.a $(GTK_LIBS) $(PY_LIBS) $(IGE_MAC_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tools/dlgedit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tools/dlgedit/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) adonthell-dlgedit$(EXEEXT): $(adonthell_dlgedit_OBJECTS) $(adonthell_dlgedit_DEPENDENCIES) $(EXTRA_adonthell_dlgedit_DEPENDENCIES) @rm -f adonthell-dlgedit$(EXEEXT) $(AM_V_CXXLD)$(adonthell_dlgedit_LINK) $(adonthell_dlgedit_OBJECTS) $(adonthell_dlgedit_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-cfg_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-cfg_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-cfg_project.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_arrow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_circle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_compiler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_module.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_mover.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_point.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-dlg_rect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_circle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_circle_events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_code.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_graph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_graph_events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_list_events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_messages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_recent_files.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_resources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_scrollable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_tooltip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-gui_tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-kb_traverse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-lex.loadlg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adonthell_dlgedit-util.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` adonthell_dlgedit-cfg_data.o: cfg_data.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_data.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_data.Tpo -c -o adonthell_dlgedit-cfg_data.o `test -f 'cfg_data.cc' || echo '$(srcdir)/'`cfg_data.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_data.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_data.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_data.cc' object='adonthell_dlgedit-cfg_data.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_data.o `test -f 'cfg_data.cc' || echo '$(srcdir)/'`cfg_data.cc adonthell_dlgedit-cfg_data.obj: cfg_data.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_data.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_data.Tpo -c -o adonthell_dlgedit-cfg_data.obj `if test -f 'cfg_data.cc'; then $(CYGPATH_W) 'cfg_data.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_data.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_data.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_data.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_data.cc' object='adonthell_dlgedit-cfg_data.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_data.obj `if test -f 'cfg_data.cc'; then $(CYGPATH_W) 'cfg_data.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_data.cc'; fi` adonthell_dlgedit-cfg_io.o: cfg_io.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_io.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_io.Tpo -c -o adonthell_dlgedit-cfg_io.o `test -f 'cfg_io.cc' || echo '$(srcdir)/'`cfg_io.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_io.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_io.cc' object='adonthell_dlgedit-cfg_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_io.o `test -f 'cfg_io.cc' || echo '$(srcdir)/'`cfg_io.cc adonthell_dlgedit-cfg_io.obj: cfg_io.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_io.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_io.Tpo -c -o adonthell_dlgedit-cfg_io.obj `if test -f 'cfg_io.cc'; then $(CYGPATH_W) 'cfg_io.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_io.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_io.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_io.cc' object='adonthell_dlgedit-cfg_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_io.obj `if test -f 'cfg_io.cc'; then $(CYGPATH_W) 'cfg_io.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_io.cc'; fi` adonthell_dlgedit-cfg_project.o: cfg_project.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_project.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_project.Tpo -c -o adonthell_dlgedit-cfg_project.o `test -f 'cfg_project.cc' || echo '$(srcdir)/'`cfg_project.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_project.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_project.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_project.cc' object='adonthell_dlgedit-cfg_project.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_project.o `test -f 'cfg_project.cc' || echo '$(srcdir)/'`cfg_project.cc adonthell_dlgedit-cfg_project.obj: cfg_project.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-cfg_project.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-cfg_project.Tpo -c -o adonthell_dlgedit-cfg_project.obj `if test -f 'cfg_project.cc'; then $(CYGPATH_W) 'cfg_project.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_project.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-cfg_project.Tpo $(DEPDIR)/adonthell_dlgedit-cfg_project.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cfg_project.cc' object='adonthell_dlgedit-cfg_project.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-cfg_project.obj `if test -f 'cfg_project.cc'; then $(CYGPATH_W) 'cfg_project.cc'; else $(CYGPATH_W) '$(srcdir)/cfg_project.cc'; fi` adonthell_dlgedit-dlg_arrow.o: dlg_arrow.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_arrow.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Tpo -c -o adonthell_dlgedit-dlg_arrow.o `test -f 'dlg_arrow.cc' || echo '$(srcdir)/'`dlg_arrow.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_arrow.cc' object='adonthell_dlgedit-dlg_arrow.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_arrow.o `test -f 'dlg_arrow.cc' || echo '$(srcdir)/'`dlg_arrow.cc adonthell_dlgedit-dlg_arrow.obj: dlg_arrow.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_arrow.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Tpo -c -o adonthell_dlgedit-dlg_arrow.obj `if test -f 'dlg_arrow.cc'; then $(CYGPATH_W) 'dlg_arrow.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_arrow.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_arrow.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_arrow.cc' object='adonthell_dlgedit-dlg_arrow.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_arrow.obj `if test -f 'dlg_arrow.cc'; then $(CYGPATH_W) 'dlg_arrow.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_arrow.cc'; fi` adonthell_dlgedit-dlg_circle.o: dlg_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_circle.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_circle.Tpo -c -o adonthell_dlgedit-dlg_circle.o `test -f 'dlg_circle.cc' || echo '$(srcdir)/'`dlg_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_circle.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_circle.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_circle.cc' object='adonthell_dlgedit-dlg_circle.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_circle.o `test -f 'dlg_circle.cc' || echo '$(srcdir)/'`dlg_circle.cc adonthell_dlgedit-dlg_circle.obj: dlg_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_circle.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_circle.Tpo -c -o adonthell_dlgedit-dlg_circle.obj `if test -f 'dlg_circle.cc'; then $(CYGPATH_W) 'dlg_circle.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_circle.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_circle.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_circle.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_circle.cc' object='adonthell_dlgedit-dlg_circle.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_circle.obj `if test -f 'dlg_circle.cc'; then $(CYGPATH_W) 'dlg_circle.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_circle.cc'; fi` adonthell_dlgedit-dlg_circle_entry.o: dlg_circle_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_circle_entry.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Tpo -c -o adonthell_dlgedit-dlg_circle_entry.o `test -f 'dlg_circle_entry.cc' || echo '$(srcdir)/'`dlg_circle_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_circle_entry.cc' object='adonthell_dlgedit-dlg_circle_entry.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_circle_entry.o `test -f 'dlg_circle_entry.cc' || echo '$(srcdir)/'`dlg_circle_entry.cc adonthell_dlgedit-dlg_circle_entry.obj: dlg_circle_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_circle_entry.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Tpo -c -o adonthell_dlgedit-dlg_circle_entry.obj `if test -f 'dlg_circle_entry.cc'; then $(CYGPATH_W) 'dlg_circle_entry.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_circle_entry.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_circle_entry.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_circle_entry.cc' object='adonthell_dlgedit-dlg_circle_entry.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_circle_entry.obj `if test -f 'dlg_circle_entry.cc'; then $(CYGPATH_W) 'dlg_circle_entry.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_circle_entry.cc'; fi` adonthell_dlgedit-dlg_cmdline.o: dlg_cmdline.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_cmdline.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Tpo -c -o adonthell_dlgedit-dlg_cmdline.o `test -f 'dlg_cmdline.cc' || echo '$(srcdir)/'`dlg_cmdline.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_cmdline.cc' object='adonthell_dlgedit-dlg_cmdline.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_cmdline.o `test -f 'dlg_cmdline.cc' || echo '$(srcdir)/'`dlg_cmdline.cc adonthell_dlgedit-dlg_cmdline.obj: dlg_cmdline.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_cmdline.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Tpo -c -o adonthell_dlgedit-dlg_cmdline.obj `if test -f 'dlg_cmdline.cc'; then $(CYGPATH_W) 'dlg_cmdline.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_cmdline.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_cmdline.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_cmdline.cc' object='adonthell_dlgedit-dlg_cmdline.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_cmdline.obj `if test -f 'dlg_cmdline.cc'; then $(CYGPATH_W) 'dlg_cmdline.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_cmdline.cc'; fi` adonthell_dlgedit-dlg_compiler.o: dlg_compiler.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_compiler.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Tpo -c -o adonthell_dlgedit-dlg_compiler.o `test -f 'dlg_compiler.cc' || echo '$(srcdir)/'`dlg_compiler.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_compiler.cc' object='adonthell_dlgedit-dlg_compiler.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_compiler.o `test -f 'dlg_compiler.cc' || echo '$(srcdir)/'`dlg_compiler.cc adonthell_dlgedit-dlg_compiler.obj: dlg_compiler.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_compiler.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Tpo -c -o adonthell_dlgedit-dlg_compiler.obj `if test -f 'dlg_compiler.cc'; then $(CYGPATH_W) 'dlg_compiler.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_compiler.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_compiler.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_compiler.cc' object='adonthell_dlgedit-dlg_compiler.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_compiler.obj `if test -f 'dlg_compiler.cc'; then $(CYGPATH_W) 'dlg_compiler.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_compiler.cc'; fi` adonthell_dlgedit-dlg_module.o: dlg_module.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_module.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_module.Tpo -c -o adonthell_dlgedit-dlg_module.o `test -f 'dlg_module.cc' || echo '$(srcdir)/'`dlg_module.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_module.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_module.cc' object='adonthell_dlgedit-dlg_module.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_module.o `test -f 'dlg_module.cc' || echo '$(srcdir)/'`dlg_module.cc adonthell_dlgedit-dlg_module.obj: dlg_module.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_module.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_module.Tpo -c -o adonthell_dlgedit-dlg_module.obj `if test -f 'dlg_module.cc'; then $(CYGPATH_W) 'dlg_module.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_module.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_module.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_module.cc' object='adonthell_dlgedit-dlg_module.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_module.obj `if test -f 'dlg_module.cc'; then $(CYGPATH_W) 'dlg_module.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_module.cc'; fi` adonthell_dlgedit-dlg_module_entry.o: dlg_module_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_module_entry.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Tpo -c -o adonthell_dlgedit-dlg_module_entry.o `test -f 'dlg_module_entry.cc' || echo '$(srcdir)/'`dlg_module_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_module_entry.cc' object='adonthell_dlgedit-dlg_module_entry.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_module_entry.o `test -f 'dlg_module_entry.cc' || echo '$(srcdir)/'`dlg_module_entry.cc adonthell_dlgedit-dlg_module_entry.obj: dlg_module_entry.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_module_entry.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Tpo -c -o adonthell_dlgedit-dlg_module_entry.obj `if test -f 'dlg_module_entry.cc'; then $(CYGPATH_W) 'dlg_module_entry.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_module_entry.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_module_entry.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_module_entry.cc' object='adonthell_dlgedit-dlg_module_entry.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_module_entry.obj `if test -f 'dlg_module_entry.cc'; then $(CYGPATH_W) 'dlg_module_entry.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_module_entry.cc'; fi` adonthell_dlgedit-dlg_mover.o: dlg_mover.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_mover.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_mover.Tpo -c -o adonthell_dlgedit-dlg_mover.o `test -f 'dlg_mover.cc' || echo '$(srcdir)/'`dlg_mover.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_mover.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_mover.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_mover.cc' object='adonthell_dlgedit-dlg_mover.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_mover.o `test -f 'dlg_mover.cc' || echo '$(srcdir)/'`dlg_mover.cc adonthell_dlgedit-dlg_mover.obj: dlg_mover.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_mover.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_mover.Tpo -c -o adonthell_dlgedit-dlg_mover.obj `if test -f 'dlg_mover.cc'; then $(CYGPATH_W) 'dlg_mover.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_mover.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_mover.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_mover.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_mover.cc' object='adonthell_dlgedit-dlg_mover.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_mover.obj `if test -f 'dlg_mover.cc'; then $(CYGPATH_W) 'dlg_mover.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_mover.cc'; fi` adonthell_dlgedit-dlg_node.o: dlg_node.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_node.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_node.Tpo -c -o adonthell_dlgedit-dlg_node.o `test -f 'dlg_node.cc' || echo '$(srcdir)/'`dlg_node.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_node.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_node.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_node.cc' object='adonthell_dlgedit-dlg_node.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_node.o `test -f 'dlg_node.cc' || echo '$(srcdir)/'`dlg_node.cc adonthell_dlgedit-dlg_node.obj: dlg_node.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_node.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_node.Tpo -c -o adonthell_dlgedit-dlg_node.obj `if test -f 'dlg_node.cc'; then $(CYGPATH_W) 'dlg_node.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_node.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_node.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_node.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_node.cc' object='adonthell_dlgedit-dlg_node.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_node.obj `if test -f 'dlg_node.cc'; then $(CYGPATH_W) 'dlg_node.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_node.cc'; fi` adonthell_dlgedit-dlg_node_gfx.o: dlg_node_gfx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_node_gfx.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Tpo -c -o adonthell_dlgedit-dlg_node_gfx.o `test -f 'dlg_node_gfx.cc' || echo '$(srcdir)/'`dlg_node_gfx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_node_gfx.cc' object='adonthell_dlgedit-dlg_node_gfx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_node_gfx.o `test -f 'dlg_node_gfx.cc' || echo '$(srcdir)/'`dlg_node_gfx.cc adonthell_dlgedit-dlg_node_gfx.obj: dlg_node_gfx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_node_gfx.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Tpo -c -o adonthell_dlgedit-dlg_node_gfx.obj `if test -f 'dlg_node_gfx.cc'; then $(CYGPATH_W) 'dlg_node_gfx.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_node_gfx.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_node_gfx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_node_gfx.cc' object='adonthell_dlgedit-dlg_node_gfx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_node_gfx.obj `if test -f 'dlg_node_gfx.cc'; then $(CYGPATH_W) 'dlg_node_gfx.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_node_gfx.cc'; fi` adonthell_dlgedit-dlg_point.o: dlg_point.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_point.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_point.Tpo -c -o adonthell_dlgedit-dlg_point.o `test -f 'dlg_point.cc' || echo '$(srcdir)/'`dlg_point.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_point.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_point.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_point.cc' object='adonthell_dlgedit-dlg_point.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_point.o `test -f 'dlg_point.cc' || echo '$(srcdir)/'`dlg_point.cc adonthell_dlgedit-dlg_point.obj: dlg_point.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_point.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_point.Tpo -c -o adonthell_dlgedit-dlg_point.obj `if test -f 'dlg_point.cc'; then $(CYGPATH_W) 'dlg_point.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_point.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_point.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_point.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_point.cc' object='adonthell_dlgedit-dlg_point.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_point.obj `if test -f 'dlg_point.cc'; then $(CYGPATH_W) 'dlg_point.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_point.cc'; fi` adonthell_dlgedit-dlg_rect.o: dlg_rect.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_rect.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_rect.Tpo -c -o adonthell_dlgedit-dlg_rect.o `test -f 'dlg_rect.cc' || echo '$(srcdir)/'`dlg_rect.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_rect.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_rect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_rect.cc' object='adonthell_dlgedit-dlg_rect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_rect.o `test -f 'dlg_rect.cc' || echo '$(srcdir)/'`dlg_rect.cc adonthell_dlgedit-dlg_rect.obj: dlg_rect.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-dlg_rect.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-dlg_rect.Tpo -c -o adonthell_dlgedit-dlg_rect.obj `if test -f 'dlg_rect.cc'; then $(CYGPATH_W) 'dlg_rect.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_rect.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-dlg_rect.Tpo $(DEPDIR)/adonthell_dlgedit-dlg_rect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dlg_rect.cc' object='adonthell_dlgedit-dlg_rect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-dlg_rect.obj `if test -f 'dlg_rect.cc'; then $(CYGPATH_W) 'dlg_rect.cc'; else $(CYGPATH_W) '$(srcdir)/dlg_rect.cc'; fi` adonthell_dlgedit-gui_circle.o: gui_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_circle.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_circle.Tpo -c -o adonthell_dlgedit-gui_circle.o `test -f 'gui_circle.cc' || echo '$(srcdir)/'`gui_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_circle.Tpo $(DEPDIR)/adonthell_dlgedit-gui_circle.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_circle.cc' object='adonthell_dlgedit-gui_circle.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_circle.o `test -f 'gui_circle.cc' || echo '$(srcdir)/'`gui_circle.cc adonthell_dlgedit-gui_circle.obj: gui_circle.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_circle.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_circle.Tpo -c -o adonthell_dlgedit-gui_circle.obj `if test -f 'gui_circle.cc'; then $(CYGPATH_W) 'gui_circle.cc'; else $(CYGPATH_W) '$(srcdir)/gui_circle.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_circle.Tpo $(DEPDIR)/adonthell_dlgedit-gui_circle.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_circle.cc' object='adonthell_dlgedit-gui_circle.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_circle.obj `if test -f 'gui_circle.cc'; then $(CYGPATH_W) 'gui_circle.cc'; else $(CYGPATH_W) '$(srcdir)/gui_circle.cc'; fi` adonthell_dlgedit-gui_circle_events.o: gui_circle_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_circle_events.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Tpo -c -o adonthell_dlgedit-gui_circle_events.o `test -f 'gui_circle_events.cc' || echo '$(srcdir)/'`gui_circle_events.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_circle_events.cc' object='adonthell_dlgedit-gui_circle_events.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_circle_events.o `test -f 'gui_circle_events.cc' || echo '$(srcdir)/'`gui_circle_events.cc adonthell_dlgedit-gui_circle_events.obj: gui_circle_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_circle_events.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Tpo -c -o adonthell_dlgedit-gui_circle_events.obj `if test -f 'gui_circle_events.cc'; then $(CYGPATH_W) 'gui_circle_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_circle_events.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_circle_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_circle_events.cc' object='adonthell_dlgedit-gui_circle_events.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_circle_events.obj `if test -f 'gui_circle_events.cc'; then $(CYGPATH_W) 'gui_circle_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_circle_events.cc'; fi` adonthell_dlgedit-gui_code.o: gui_code.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_code.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_code.Tpo -c -o adonthell_dlgedit-gui_code.o `test -f 'gui_code.cc' || echo '$(srcdir)/'`gui_code.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_code.Tpo $(DEPDIR)/adonthell_dlgedit-gui_code.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_code.cc' object='adonthell_dlgedit-gui_code.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_code.o `test -f 'gui_code.cc' || echo '$(srcdir)/'`gui_code.cc adonthell_dlgedit-gui_code.obj: gui_code.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_code.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_code.Tpo -c -o adonthell_dlgedit-gui_code.obj `if test -f 'gui_code.cc'; then $(CYGPATH_W) 'gui_code.cc'; else $(CYGPATH_W) '$(srcdir)/gui_code.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_code.Tpo $(DEPDIR)/adonthell_dlgedit-gui_code.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_code.cc' object='adonthell_dlgedit-gui_code.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_code.obj `if test -f 'gui_code.cc'; then $(CYGPATH_W) 'gui_code.cc'; else $(CYGPATH_W) '$(srcdir)/gui_code.cc'; fi` adonthell_dlgedit-gui_dlgedit.o: gui_dlgedit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_dlgedit.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Tpo -c -o adonthell_dlgedit-gui_dlgedit.o `test -f 'gui_dlgedit.cc' || echo '$(srcdir)/'`gui_dlgedit.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Tpo $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_dlgedit.cc' object='adonthell_dlgedit-gui_dlgedit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_dlgedit.o `test -f 'gui_dlgedit.cc' || echo '$(srcdir)/'`gui_dlgedit.cc adonthell_dlgedit-gui_dlgedit.obj: gui_dlgedit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_dlgedit.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Tpo -c -o adonthell_dlgedit-gui_dlgedit.obj `if test -f 'gui_dlgedit.cc'; then $(CYGPATH_W) 'gui_dlgedit.cc'; else $(CYGPATH_W) '$(srcdir)/gui_dlgedit.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Tpo $(DEPDIR)/adonthell_dlgedit-gui_dlgedit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_dlgedit.cc' object='adonthell_dlgedit-gui_dlgedit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_dlgedit.obj `if test -f 'gui_dlgedit.cc'; then $(CYGPATH_W) 'gui_dlgedit.cc'; else $(CYGPATH_W) '$(srcdir)/gui_dlgedit.cc'; fi` adonthell_dlgedit-gui_dlgedit_events.o: gui_dlgedit_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_dlgedit_events.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Tpo -c -o adonthell_dlgedit-gui_dlgedit_events.o `test -f 'gui_dlgedit_events.cc' || echo '$(srcdir)/'`gui_dlgedit_events.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_dlgedit_events.cc' object='adonthell_dlgedit-gui_dlgedit_events.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_dlgedit_events.o `test -f 'gui_dlgedit_events.cc' || echo '$(srcdir)/'`gui_dlgedit_events.cc adonthell_dlgedit-gui_dlgedit_events.obj: gui_dlgedit_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_dlgedit_events.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Tpo -c -o adonthell_dlgedit-gui_dlgedit_events.obj `if test -f 'gui_dlgedit_events.cc'; then $(CYGPATH_W) 'gui_dlgedit_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_dlgedit_events.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_dlgedit_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_dlgedit_events.cc' object='adonthell_dlgedit-gui_dlgedit_events.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_dlgedit_events.obj `if test -f 'gui_dlgedit_events.cc'; then $(CYGPATH_W) 'gui_dlgedit_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_dlgedit_events.cc'; fi` adonthell_dlgedit-gui_edit.o: gui_edit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_edit.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_edit.Tpo -c -o adonthell_dlgedit-gui_edit.o `test -f 'gui_edit.cc' || echo '$(srcdir)/'`gui_edit.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_edit.Tpo $(DEPDIR)/adonthell_dlgedit-gui_edit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_edit.cc' object='adonthell_dlgedit-gui_edit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_edit.o `test -f 'gui_edit.cc' || echo '$(srcdir)/'`gui_edit.cc adonthell_dlgedit-gui_edit.obj: gui_edit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_edit.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_edit.Tpo -c -o adonthell_dlgedit-gui_edit.obj `if test -f 'gui_edit.cc'; then $(CYGPATH_W) 'gui_edit.cc'; else $(CYGPATH_W) '$(srcdir)/gui_edit.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_edit.Tpo $(DEPDIR)/adonthell_dlgedit-gui_edit.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_edit.cc' object='adonthell_dlgedit-gui_edit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_edit.obj `if test -f 'gui_edit.cc'; then $(CYGPATH_W) 'gui_edit.cc'; else $(CYGPATH_W) '$(srcdir)/gui_edit.cc'; fi` adonthell_dlgedit-gui_error.o: gui_error.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_error.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_error.Tpo -c -o adonthell_dlgedit-gui_error.o `test -f 'gui_error.cc' || echo '$(srcdir)/'`gui_error.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_error.Tpo $(DEPDIR)/adonthell_dlgedit-gui_error.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_error.cc' object='adonthell_dlgedit-gui_error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_error.o `test -f 'gui_error.cc' || echo '$(srcdir)/'`gui_error.cc adonthell_dlgedit-gui_error.obj: gui_error.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_error.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_error.Tpo -c -o adonthell_dlgedit-gui_error.obj `if test -f 'gui_error.cc'; then $(CYGPATH_W) 'gui_error.cc'; else $(CYGPATH_W) '$(srcdir)/gui_error.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_error.Tpo $(DEPDIR)/adonthell_dlgedit-gui_error.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_error.cc' object='adonthell_dlgedit-gui_error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_error.obj `if test -f 'gui_error.cc'; then $(CYGPATH_W) 'gui_error.cc'; else $(CYGPATH_W) '$(srcdir)/gui_error.cc'; fi` adonthell_dlgedit-gui_file.o: gui_file.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_file.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_file.Tpo -c -o adonthell_dlgedit-gui_file.o `test -f 'gui_file.cc' || echo '$(srcdir)/'`gui_file.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_file.Tpo $(DEPDIR)/adonthell_dlgedit-gui_file.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_file.cc' object='adonthell_dlgedit-gui_file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_file.o `test -f 'gui_file.cc' || echo '$(srcdir)/'`gui_file.cc adonthell_dlgedit-gui_file.obj: gui_file.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_file.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_file.Tpo -c -o adonthell_dlgedit-gui_file.obj `if test -f 'gui_file.cc'; then $(CYGPATH_W) 'gui_file.cc'; else $(CYGPATH_W) '$(srcdir)/gui_file.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_file.Tpo $(DEPDIR)/adonthell_dlgedit-gui_file.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_file.cc' object='adonthell_dlgedit-gui_file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_file.obj `if test -f 'gui_file.cc'; then $(CYGPATH_W) 'gui_file.cc'; else $(CYGPATH_W) '$(srcdir)/gui_file.cc'; fi` adonthell_dlgedit-gui_graph.o: gui_graph.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_graph.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_graph.Tpo -c -o adonthell_dlgedit-gui_graph.o `test -f 'gui_graph.cc' || echo '$(srcdir)/'`gui_graph.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_graph.Tpo $(DEPDIR)/adonthell_dlgedit-gui_graph.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_graph.cc' object='adonthell_dlgedit-gui_graph.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_graph.o `test -f 'gui_graph.cc' || echo '$(srcdir)/'`gui_graph.cc adonthell_dlgedit-gui_graph.obj: gui_graph.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_graph.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_graph.Tpo -c -o adonthell_dlgedit-gui_graph.obj `if test -f 'gui_graph.cc'; then $(CYGPATH_W) 'gui_graph.cc'; else $(CYGPATH_W) '$(srcdir)/gui_graph.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_graph.Tpo $(DEPDIR)/adonthell_dlgedit-gui_graph.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_graph.cc' object='adonthell_dlgedit-gui_graph.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_graph.obj `if test -f 'gui_graph.cc'; then $(CYGPATH_W) 'gui_graph.cc'; else $(CYGPATH_W) '$(srcdir)/gui_graph.cc'; fi` adonthell_dlgedit-gui_graph_events.o: gui_graph_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_graph_events.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Tpo -c -o adonthell_dlgedit-gui_graph_events.o `test -f 'gui_graph_events.cc' || echo '$(srcdir)/'`gui_graph_events.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_graph_events.cc' object='adonthell_dlgedit-gui_graph_events.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_graph_events.o `test -f 'gui_graph_events.cc' || echo '$(srcdir)/'`gui_graph_events.cc adonthell_dlgedit-gui_graph_events.obj: gui_graph_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_graph_events.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Tpo -c -o adonthell_dlgedit-gui_graph_events.obj `if test -f 'gui_graph_events.cc'; then $(CYGPATH_W) 'gui_graph_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_graph_events.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_graph_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_graph_events.cc' object='adonthell_dlgedit-gui_graph_events.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_graph_events.obj `if test -f 'gui_graph_events.cc'; then $(CYGPATH_W) 'gui_graph_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_graph_events.cc'; fi` adonthell_dlgedit-gui_list.o: gui_list.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_list.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_list.Tpo -c -o adonthell_dlgedit-gui_list.o `test -f 'gui_list.cc' || echo '$(srcdir)/'`gui_list.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_list.Tpo $(DEPDIR)/adonthell_dlgedit-gui_list.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_list.cc' object='adonthell_dlgedit-gui_list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_list.o `test -f 'gui_list.cc' || echo '$(srcdir)/'`gui_list.cc adonthell_dlgedit-gui_list.obj: gui_list.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_list.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_list.Tpo -c -o adonthell_dlgedit-gui_list.obj `if test -f 'gui_list.cc'; then $(CYGPATH_W) 'gui_list.cc'; else $(CYGPATH_W) '$(srcdir)/gui_list.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_list.Tpo $(DEPDIR)/adonthell_dlgedit-gui_list.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_list.cc' object='adonthell_dlgedit-gui_list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_list.obj `if test -f 'gui_list.cc'; then $(CYGPATH_W) 'gui_list.cc'; else $(CYGPATH_W) '$(srcdir)/gui_list.cc'; fi` adonthell_dlgedit-gui_list_events.o: gui_list_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_list_events.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_list_events.Tpo -c -o adonthell_dlgedit-gui_list_events.o `test -f 'gui_list_events.cc' || echo '$(srcdir)/'`gui_list_events.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_list_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_list_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_list_events.cc' object='adonthell_dlgedit-gui_list_events.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_list_events.o `test -f 'gui_list_events.cc' || echo '$(srcdir)/'`gui_list_events.cc adonthell_dlgedit-gui_list_events.obj: gui_list_events.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_list_events.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_list_events.Tpo -c -o adonthell_dlgedit-gui_list_events.obj `if test -f 'gui_list_events.cc'; then $(CYGPATH_W) 'gui_list_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_list_events.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_list_events.Tpo $(DEPDIR)/adonthell_dlgedit-gui_list_events.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_list_events.cc' object='adonthell_dlgedit-gui_list_events.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_list_events.obj `if test -f 'gui_list_events.cc'; then $(CYGPATH_W) 'gui_list_events.cc'; else $(CYGPATH_W) '$(srcdir)/gui_list_events.cc'; fi` adonthell_dlgedit-gui_messages.o: gui_messages.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_messages.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_messages.Tpo -c -o adonthell_dlgedit-gui_messages.o `test -f 'gui_messages.cc' || echo '$(srcdir)/'`gui_messages.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_messages.Tpo $(DEPDIR)/adonthell_dlgedit-gui_messages.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_messages.cc' object='adonthell_dlgedit-gui_messages.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_messages.o `test -f 'gui_messages.cc' || echo '$(srcdir)/'`gui_messages.cc adonthell_dlgedit-gui_messages.obj: gui_messages.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_messages.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_messages.Tpo -c -o adonthell_dlgedit-gui_messages.obj `if test -f 'gui_messages.cc'; then $(CYGPATH_W) 'gui_messages.cc'; else $(CYGPATH_W) '$(srcdir)/gui_messages.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_messages.Tpo $(DEPDIR)/adonthell_dlgedit-gui_messages.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_messages.cc' object='adonthell_dlgedit-gui_messages.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_messages.obj `if test -f 'gui_messages.cc'; then $(CYGPATH_W) 'gui_messages.cc'; else $(CYGPATH_W) '$(srcdir)/gui_messages.cc'; fi` adonthell_dlgedit-gui_modal_dialog.o: gui_modal_dialog.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_modal_dialog.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Tpo -c -o adonthell_dlgedit-gui_modal_dialog.o `test -f 'gui_modal_dialog.cc' || echo '$(srcdir)/'`gui_modal_dialog.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Tpo $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_modal_dialog.cc' object='adonthell_dlgedit-gui_modal_dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_modal_dialog.o `test -f 'gui_modal_dialog.cc' || echo '$(srcdir)/'`gui_modal_dialog.cc adonthell_dlgedit-gui_modal_dialog.obj: gui_modal_dialog.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_modal_dialog.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Tpo -c -o adonthell_dlgedit-gui_modal_dialog.obj `if test -f 'gui_modal_dialog.cc'; then $(CYGPATH_W) 'gui_modal_dialog.cc'; else $(CYGPATH_W) '$(srcdir)/gui_modal_dialog.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Tpo $(DEPDIR)/adonthell_dlgedit-gui_modal_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_modal_dialog.cc' object='adonthell_dlgedit-gui_modal_dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_modal_dialog.obj `if test -f 'gui_modal_dialog.cc'; then $(CYGPATH_W) 'gui_modal_dialog.cc'; else $(CYGPATH_W) '$(srcdir)/gui_modal_dialog.cc'; fi` adonthell_dlgedit-gui_resources.o: gui_resources.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_resources.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_resources.Tpo -c -o adonthell_dlgedit-gui_resources.o `test -f 'gui_resources.cc' || echo '$(srcdir)/'`gui_resources.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_resources.Tpo $(DEPDIR)/adonthell_dlgedit-gui_resources.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_resources.cc' object='adonthell_dlgedit-gui_resources.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_resources.o `test -f 'gui_resources.cc' || echo '$(srcdir)/'`gui_resources.cc adonthell_dlgedit-gui_resources.obj: gui_resources.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_resources.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_resources.Tpo -c -o adonthell_dlgedit-gui_resources.obj `if test -f 'gui_resources.cc'; then $(CYGPATH_W) 'gui_resources.cc'; else $(CYGPATH_W) '$(srcdir)/gui_resources.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_resources.Tpo $(DEPDIR)/adonthell_dlgedit-gui_resources.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_resources.cc' object='adonthell_dlgedit-gui_resources.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_resources.obj `if test -f 'gui_resources.cc'; then $(CYGPATH_W) 'gui_resources.cc'; else $(CYGPATH_W) '$(srcdir)/gui_resources.cc'; fi` adonthell_dlgedit-gui_recent_files.o: gui_recent_files.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_recent_files.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Tpo -c -o adonthell_dlgedit-gui_recent_files.o `test -f 'gui_recent_files.cc' || echo '$(srcdir)/'`gui_recent_files.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Tpo $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_recent_files.cc' object='adonthell_dlgedit-gui_recent_files.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_recent_files.o `test -f 'gui_recent_files.cc' || echo '$(srcdir)/'`gui_recent_files.cc adonthell_dlgedit-gui_recent_files.obj: gui_recent_files.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_recent_files.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Tpo -c -o adonthell_dlgedit-gui_recent_files.obj `if test -f 'gui_recent_files.cc'; then $(CYGPATH_W) 'gui_recent_files.cc'; else $(CYGPATH_W) '$(srcdir)/gui_recent_files.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Tpo $(DEPDIR)/adonthell_dlgedit-gui_recent_files.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_recent_files.cc' object='adonthell_dlgedit-gui_recent_files.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_recent_files.obj `if test -f 'gui_recent_files.cc'; then $(CYGPATH_W) 'gui_recent_files.cc'; else $(CYGPATH_W) '$(srcdir)/gui_recent_files.cc'; fi` adonthell_dlgedit-gui_scrollable.o: gui_scrollable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_scrollable.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Tpo -c -o adonthell_dlgedit-gui_scrollable.o `test -f 'gui_scrollable.cc' || echo '$(srcdir)/'`gui_scrollable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Tpo $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_scrollable.cc' object='adonthell_dlgedit-gui_scrollable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_scrollable.o `test -f 'gui_scrollable.cc' || echo '$(srcdir)/'`gui_scrollable.cc adonthell_dlgedit-gui_scrollable.obj: gui_scrollable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_scrollable.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Tpo -c -o adonthell_dlgedit-gui_scrollable.obj `if test -f 'gui_scrollable.cc'; then $(CYGPATH_W) 'gui_scrollable.cc'; else $(CYGPATH_W) '$(srcdir)/gui_scrollable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Tpo $(DEPDIR)/adonthell_dlgedit-gui_scrollable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_scrollable.cc' object='adonthell_dlgedit-gui_scrollable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_scrollable.obj `if test -f 'gui_scrollable.cc'; then $(CYGPATH_W) 'gui_scrollable.cc'; else $(CYGPATH_W) '$(srcdir)/gui_scrollable.cc'; fi` adonthell_dlgedit-gui_settings.o: gui_settings.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_settings.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_settings.Tpo -c -o adonthell_dlgedit-gui_settings.o `test -f 'gui_settings.cc' || echo '$(srcdir)/'`gui_settings.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_settings.Tpo $(DEPDIR)/adonthell_dlgedit-gui_settings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_settings.cc' object='adonthell_dlgedit-gui_settings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_settings.o `test -f 'gui_settings.cc' || echo '$(srcdir)/'`gui_settings.cc adonthell_dlgedit-gui_settings.obj: gui_settings.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_settings.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_settings.Tpo -c -o adonthell_dlgedit-gui_settings.obj `if test -f 'gui_settings.cc'; then $(CYGPATH_W) 'gui_settings.cc'; else $(CYGPATH_W) '$(srcdir)/gui_settings.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_settings.Tpo $(DEPDIR)/adonthell_dlgedit-gui_settings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_settings.cc' object='adonthell_dlgedit-gui_settings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_settings.obj `if test -f 'gui_settings.cc'; then $(CYGPATH_W) 'gui_settings.cc'; else $(CYGPATH_W) '$(srcdir)/gui_settings.cc'; fi` adonthell_dlgedit-gui_tooltip.o: gui_tooltip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_tooltip.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Tpo -c -o adonthell_dlgedit-gui_tooltip.o `test -f 'gui_tooltip.cc' || echo '$(srcdir)/'`gui_tooltip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Tpo $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_tooltip.cc' object='adonthell_dlgedit-gui_tooltip.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_tooltip.o `test -f 'gui_tooltip.cc' || echo '$(srcdir)/'`gui_tooltip.cc adonthell_dlgedit-gui_tooltip.obj: gui_tooltip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_tooltip.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Tpo -c -o adonthell_dlgedit-gui_tooltip.obj `if test -f 'gui_tooltip.cc'; then $(CYGPATH_W) 'gui_tooltip.cc'; else $(CYGPATH_W) '$(srcdir)/gui_tooltip.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Tpo $(DEPDIR)/adonthell_dlgedit-gui_tooltip.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_tooltip.cc' object='adonthell_dlgedit-gui_tooltip.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_tooltip.obj `if test -f 'gui_tooltip.cc'; then $(CYGPATH_W) 'gui_tooltip.cc'; else $(CYGPATH_W) '$(srcdir)/gui_tooltip.cc'; fi` adonthell_dlgedit-gui_tree.o: gui_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_tree.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_tree.Tpo -c -o adonthell_dlgedit-gui_tree.o `test -f 'gui_tree.cc' || echo '$(srcdir)/'`gui_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_tree.Tpo $(DEPDIR)/adonthell_dlgedit-gui_tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_tree.cc' object='adonthell_dlgedit-gui_tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_tree.o `test -f 'gui_tree.cc' || echo '$(srcdir)/'`gui_tree.cc adonthell_dlgedit-gui_tree.obj: gui_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-gui_tree.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-gui_tree.Tpo -c -o adonthell_dlgedit-gui_tree.obj `if test -f 'gui_tree.cc'; then $(CYGPATH_W) 'gui_tree.cc'; else $(CYGPATH_W) '$(srcdir)/gui_tree.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-gui_tree.Tpo $(DEPDIR)/adonthell_dlgedit-gui_tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gui_tree.cc' object='adonthell_dlgedit-gui_tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-gui_tree.obj `if test -f 'gui_tree.cc'; then $(CYGPATH_W) 'gui_tree.cc'; else $(CYGPATH_W) '$(srcdir)/gui_tree.cc'; fi` adonthell_dlgedit-kb_traverse.o: kb_traverse.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-kb_traverse.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-kb_traverse.Tpo -c -o adonthell_dlgedit-kb_traverse.o `test -f 'kb_traverse.cc' || echo '$(srcdir)/'`kb_traverse.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-kb_traverse.Tpo $(DEPDIR)/adonthell_dlgedit-kb_traverse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='kb_traverse.cc' object='adonthell_dlgedit-kb_traverse.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-kb_traverse.o `test -f 'kb_traverse.cc' || echo '$(srcdir)/'`kb_traverse.cc adonthell_dlgedit-kb_traverse.obj: kb_traverse.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-kb_traverse.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-kb_traverse.Tpo -c -o adonthell_dlgedit-kb_traverse.obj `if test -f 'kb_traverse.cc'; then $(CYGPATH_W) 'kb_traverse.cc'; else $(CYGPATH_W) '$(srcdir)/kb_traverse.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-kb_traverse.Tpo $(DEPDIR)/adonthell_dlgedit-kb_traverse.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='kb_traverse.cc' object='adonthell_dlgedit-kb_traverse.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-kb_traverse.obj `if test -f 'kb_traverse.cc'; then $(CYGPATH_W) 'kb_traverse.cc'; else $(CYGPATH_W) '$(srcdir)/kb_traverse.cc'; fi` adonthell_dlgedit-lex.loadcfg.o: lex.loadcfg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-lex.loadcfg.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Tpo -c -o adonthell_dlgedit-lex.loadcfg.o `test -f 'lex.loadcfg.cc' || echo '$(srcdir)/'`lex.loadcfg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Tpo $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.loadcfg.cc' object='adonthell_dlgedit-lex.loadcfg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-lex.loadcfg.o `test -f 'lex.loadcfg.cc' || echo '$(srcdir)/'`lex.loadcfg.cc adonthell_dlgedit-lex.loadcfg.obj: lex.loadcfg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-lex.loadcfg.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Tpo -c -o adonthell_dlgedit-lex.loadcfg.obj `if test -f 'lex.loadcfg.cc'; then $(CYGPATH_W) 'lex.loadcfg.cc'; else $(CYGPATH_W) '$(srcdir)/lex.loadcfg.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Tpo $(DEPDIR)/adonthell_dlgedit-lex.loadcfg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.loadcfg.cc' object='adonthell_dlgedit-lex.loadcfg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-lex.loadcfg.obj `if test -f 'lex.loadcfg.cc'; then $(CYGPATH_W) 'lex.loadcfg.cc'; else $(CYGPATH_W) '$(srcdir)/lex.loadcfg.cc'; fi` adonthell_dlgedit-lex.loadlg.o: lex.loadlg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-lex.loadlg.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Tpo -c -o adonthell_dlgedit-lex.loadlg.o `test -f 'lex.loadlg.cc' || echo '$(srcdir)/'`lex.loadlg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Tpo $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.loadlg.cc' object='adonthell_dlgedit-lex.loadlg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-lex.loadlg.o `test -f 'lex.loadlg.cc' || echo '$(srcdir)/'`lex.loadlg.cc adonthell_dlgedit-lex.loadlg.obj: lex.loadlg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-lex.loadlg.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Tpo -c -o adonthell_dlgedit-lex.loadlg.obj `if test -f 'lex.loadlg.cc'; then $(CYGPATH_W) 'lex.loadlg.cc'; else $(CYGPATH_W) '$(srcdir)/lex.loadlg.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Tpo $(DEPDIR)/adonthell_dlgedit-lex.loadlg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lex.loadlg.cc' object='adonthell_dlgedit-lex.loadlg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-lex.loadlg.obj `if test -f 'lex.loadlg.cc'; then $(CYGPATH_W) 'lex.loadlg.cc'; else $(CYGPATH_W) '$(srcdir)/lex.loadlg.cc'; fi` adonthell_dlgedit-main.o: main.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-main.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-main.Tpo -c -o adonthell_dlgedit-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-main.Tpo $(DEPDIR)/adonthell_dlgedit-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cc' object='adonthell_dlgedit-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc adonthell_dlgedit-main.obj: main.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-main.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-main.Tpo -c -o adonthell_dlgedit-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-main.Tpo $(DEPDIR)/adonthell_dlgedit-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cc' object='adonthell_dlgedit-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` adonthell_dlgedit-util.o: util.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-util.o -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-util.Tpo -c -o adonthell_dlgedit-util.o `test -f 'util.cc' || echo '$(srcdir)/'`util.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-util.Tpo $(DEPDIR)/adonthell_dlgedit-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cc' object='adonthell_dlgedit-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-util.o `test -f 'util.cc' || echo '$(srcdir)/'`util.cc adonthell_dlgedit-util.obj: util.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -MT adonthell_dlgedit-util.obj -MD -MP -MF $(DEPDIR)/adonthell_dlgedit-util.Tpo -c -o adonthell_dlgedit-util.obj `if test -f 'util.cc'; then $(CYGPATH_W) 'util.cc'; else $(CYGPATH_W) '$(srcdir)/util.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/adonthell_dlgedit-util.Tpo $(DEPDIR)/adonthell_dlgedit-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='util.cc' object='adonthell_dlgedit-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(adonthell_dlgedit_CXXFLAGS) $(CXXFLAGS) -c -o adonthell_dlgedit-util.obj `if test -f 'util.cc'; then $(CYGPATH_W) 'util.cc'; else $(CYGPATH_W) '$(srcdir)/util.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile lex.loadlg.cc: loadlg.l flex -olex.loadlg.cc $< lex.loadcfg.cc: loadcfg.l flex -olex.loadcfg.cc $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: adonthell-0.3.8/src/tools/dlgedit/lex.loadcfg.cc0000664000175000017500000013610212756057103016470 00000000000000#line 2 "lex.loadcfg.cc" #line 4 "lex.loadcfg.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer loadcfg_create_buffer #define yy_delete_buffer loadcfg_delete_buffer #define yy_flex_debug loadcfg_flex_debug #define yy_init_buffer loadcfg_init_buffer #define yy_flush_buffer loadcfg_flush_buffer #define yy_load_buffer_state loadcfg_load_buffer_state #define yy_switch_to_buffer loadcfg_switch_to_buffer #define yyin loadcfgin #define yyleng loadcfgleng #define yylex loadcfglex #define yylineno loadcfglineno #define yyout loadcfgout #define yyrestart loadcfgrestart #define yytext loadcfgtext #define yywrap loadcfgwrap #define yyalloc loadcfgalloc #define yyrealloc loadcfgrealloc #define yyfree loadcfgfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE loadcfgrestart(loadcfgin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int loadcfgleng; extern FILE *loadcfgin, *loadcfgout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up loadcfgtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up loadcfgtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via loadcfgrestart()), so that the user can continue scanning by * just pointing loadcfgin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when loadcfgtext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int loadcfgleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow loadcfgwrap()'s to do buffer switches * instead of setting up a fresh loadcfgin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void loadcfgrestart (FILE *input_file ); void loadcfg_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE loadcfg_create_buffer (FILE *file,int size ); void loadcfg_delete_buffer (YY_BUFFER_STATE b ); void loadcfg_flush_buffer (YY_BUFFER_STATE b ); void loadcfgpush_buffer_state (YY_BUFFER_STATE new_buffer ); void loadcfgpop_buffer_state (void ); static void loadcfgensure_buffer_stack (void ); static void loadcfg_load_buffer_state (void ); static void loadcfg_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER loadcfg_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE loadcfg_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE loadcfg_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE loadcfg_scan_bytes (yyconst char *bytes,int len ); void *loadcfgalloc (yy_size_t ); void *loadcfgrealloc (void *,yy_size_t ); void loadcfgfree (void * ); #define yy_new_buffer loadcfg_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ loadcfgensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ loadcfg_create_buffer(loadcfgin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ loadcfgensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ loadcfg_create_buffer(loadcfgin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define loadcfgwrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *loadcfgin = (FILE *) 0, *loadcfgout = (FILE *) 0; typedef int yy_state_type; extern int loadcfglineno; int loadcfglineno = 1; extern char *loadcfgtext; #define yytext_ptr loadcfgtext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up loadcfgtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ loadcfgleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 12 #define YY_END_OF_BUFFER 13 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[42] = { 0, 0, 0, 0, 0, 13, 11, 10, 10, 1, 11, 9, 11, 11, 11, 11, 6, 8, 7, 10, 1, 1, 9, 0, 0, 0, 0, 8, 0, 5, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 3, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 8, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 13, 1, 1, 1, 14, 1, 15, 16, 17, 1, 1, 1, 18, 19, 1, 20, 1, 21, 22, 1, 1, 23, 24, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[26] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[46] = { 0, 0, 11, 47, 46, 58, 61, 22, 24, 54, 50, 49, 40, 32, 34, 28, 61, 0, 61, 26, 47, 61, 43, 24, 31, 26, 23, 0, 27, 61, 26, 23, 33, 61, 23, 21, 23, 14, 11, 61, 61, 61, 29, 31, 33, 0 } ; static yyconst flex_int16_t yy_def[46] = { 0, 42, 42, 43, 43, 41, 41, 41, 41, 44, 41, 41, 41, 41, 41, 41, 41, 45, 41, 41, 44, 41, 41, 41, 41, 41, 41, 45, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 0, 41, 41, 41, 41 } ; static yyconst flex_int16_t yy_nxt[87] = { 0, 27, 7, 8, 9, 10, 11, 12, 41, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 41, 13, 14, 15, 16, 19, 19, 19, 19, 19, 19, 6, 6, 17, 17, 20, 20, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 22, 21, 26, 25, 24, 23, 22, 22, 21, 41, 18, 18, 5, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 } ; static yyconst flex_int16_t yy_chk[87] = { 0, 45, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 7, 7, 8, 8, 19, 19, 42, 42, 43, 43, 44, 44, 38, 37, 36, 35, 34, 32, 31, 30, 28, 26, 25, 24, 23, 22, 20, 15, 14, 13, 12, 11, 10, 9, 5, 4, 3, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int loadcfg_flex_debug; int loadcfg_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *loadcfgtext; #line 1 "loadcfg.l" #line 2 "loadcfg.l" /* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include #include #include "dlg_types.h" #define YY_DECL int parse_cfgfile (std::string &mytext, int &mynum) #line 534 "lex.loadcfg.cc" #define INITIAL 0 #define text 1 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int loadcfglex_destroy (void ); int loadcfgget_debug (void ); void loadcfgset_debug (int debug_flag ); YY_EXTRA_TYPE loadcfgget_extra (void ); void loadcfgset_extra (YY_EXTRA_TYPE user_defined ); FILE *loadcfgget_in (void ); void loadcfgset_in (FILE * in_str ); FILE *loadcfgget_out (void ); void loadcfgset_out (FILE * out_str ); int loadcfgget_leng (void ); char *loadcfgget_text (void ); int loadcfgget_lineno (void ); void loadcfgset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int loadcfgwrap (void ); #else extern int loadcfgwrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( loadcfgtext, loadcfgleng, 1, loadcfgout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( loadcfgin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( loadcfgin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, loadcfgin))==0 && ferror(loadcfgin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(loadcfgin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int loadcfglex (void); #define YY_DECL int loadcfglex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after loadcfgtext and loadcfgleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 33 "loadcfg.l" #line 723 "lex.loadcfg.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! loadcfgin ) loadcfgin = stdin; if ( ! loadcfgout ) loadcfgout = stdout; if ( ! YY_CURRENT_BUFFER ) { loadcfgensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = loadcfg_create_buffer(loadcfgin,YY_BUF_SIZE ); } loadcfg_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of loadcfgtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 42 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 41 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 35 "loadcfg.l" ; /* Eat up comments */ YY_BREAK case 2: YY_RULE_SETUP #line 37 "loadcfg.l" return LOAD_FILE; YY_BREAK case 3: YY_RULE_SETUP #line 38 "loadcfg.l" return LOAD_PROJECT; YY_BREAK case 4: YY_RULE_SETUP #line 39 "loadcfg.l" return LOAD_BASE_DIR; YY_BREAK case 5: YY_RULE_SETUP #line 40 "loadcfg.l" return LOAD_END; YY_BREAK case 6: YY_RULE_SETUP #line 42 "loadcfg.l" mytext = ""; BEGIN(text); YY_BREAK case 7: YY_RULE_SETUP #line 43 "loadcfg.l" BEGIN(INITIAL); return LOAD_STR; YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 44 "loadcfg.l" mytext += loadcfgtext; YY_BREAK case 9: YY_RULE_SETUP #line 46 "loadcfg.l" mynum = atoi (loadcfgtext); return LOAD_NUM; YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 48 "loadcfg.l" ; /* Eat whitespace */ YY_BREAK case 11: YY_RULE_SETUP #line 49 "loadcfg.l" return LOAD_UNKNOWN; YY_BREAK case 12: YY_RULE_SETUP #line 50 "loadcfg.l" ECHO; YY_BREAK #line 865 "lex.loadcfg.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(text): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed loadcfgin at a new source and called * loadcfglex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = loadcfgin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( loadcfgwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * loadcfgtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of loadcfglex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ loadcfgrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; loadcfgrestart(loadcfgin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) loadcfgrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 42 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 42 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 41); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ loadcfgrestart(loadcfgin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( loadcfgwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve loadcfgtext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void loadcfgrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ loadcfgensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = loadcfg_create_buffer(loadcfgin,YY_BUF_SIZE ); } loadcfg_init_buffer(YY_CURRENT_BUFFER,input_file ); loadcfg_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void loadcfg_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * loadcfgpop_buffer_state(); * loadcfgpush_buffer_state(new_buffer); */ loadcfgensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; loadcfg_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (loadcfgwrap()) processing, but the only time this flag * is looked at is after loadcfgwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void loadcfg_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; loadcfgin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE loadcfg_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) loadcfgalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in loadcfg_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) loadcfgalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in loadcfg_create_buffer()" ); b->yy_is_our_buffer = 1; loadcfg_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with loadcfg_create_buffer() * */ void loadcfg_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) loadcfgfree((void *) b->yy_ch_buf ); loadcfgfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a loadcfgrestart() or at EOF. */ static void loadcfg_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; loadcfg_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then loadcfg_init_buffer was _probably_ * called from loadcfgrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void loadcfg_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) loadcfg_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void loadcfgpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; loadcfgensure_buffer_stack(); /* This block is copied from loadcfg_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from loadcfg_switch_to_buffer. */ loadcfg_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void loadcfgpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; loadcfg_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { loadcfg_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void loadcfgensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)loadcfgalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in loadcfgensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)loadcfgrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in loadcfgensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE loadcfg_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) loadcfgalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in loadcfg_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; loadcfg_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to loadcfglex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * loadcfg_scan_bytes() instead. */ YY_BUFFER_STATE loadcfg_scan_string (yyconst char * yystr ) { return loadcfg_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to loadcfglex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE loadcfg_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) loadcfgalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in loadcfg_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = loadcfg_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in loadcfg_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up loadcfgtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ loadcfgtext[loadcfgleng] = (yy_hold_char); \ (yy_c_buf_p) = loadcfgtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ loadcfgleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int loadcfgget_lineno (void) { return loadcfglineno; } /** Get the input stream. * */ FILE *loadcfgget_in (void) { return loadcfgin; } /** Get the output stream. * */ FILE *loadcfgget_out (void) { return loadcfgout; } /** Get the length of the current token. * */ int loadcfgget_leng (void) { return loadcfgleng; } /** Get the current token. * */ char *loadcfgget_text (void) { return loadcfgtext; } /** Set the current line number. * @param line_number * */ void loadcfgset_lineno (int line_number ) { loadcfglineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see loadcfg_switch_to_buffer */ void loadcfgset_in (FILE * in_str ) { loadcfgin = in_str ; } void loadcfgset_out (FILE * out_str ) { loadcfgout = out_str ; } int loadcfgget_debug (void) { return loadcfg_flex_debug; } void loadcfgset_debug (int bdebug ) { loadcfg_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from loadcfglex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT loadcfgin = stdin; loadcfgout = stdout; #else loadcfgin = (FILE *) 0; loadcfgout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * loadcfglex_init() */ return 0; } /* loadcfglex_destroy is for both reentrant and non-reentrant scanners. */ int loadcfglex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ loadcfg_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; loadcfgpop_buffer_state(); } /* Destroy the stack itself. */ loadcfgfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * loadcfglex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *loadcfgalloc (yy_size_t size ) { return (void *) malloc( size ); } void *loadcfgrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void loadcfgfree (void * ptr ) { free( (char *) ptr ); /* see loadcfgrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 50 "loadcfg.l" adonthell-0.3.8/src/tools/dlgedit/dlg_mover.cc0000664000175000017500000000744612756054366016300 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_mover.cc * * @author Kai Sterker * @brief A dummy node for drag'n dropping DlgArrows. */ #include "dlg_mover.h" // create a new mover DlgMover::DlgMover (DlgPoint &p) { // Let position be the center of the mover top_left = DlgPoint (p.x () - 15, p.y () - 15); bottom_right = DlgPoint (x () + 30, y () + 30); type_ = MOVER; moving = NONE; oldCircle = NULL; } // attach an arrow to the mover bool DlgMover::attach (DlgArrow *arrow) { // Is arrow dragged by its tip? if (contains (arrow->getTip ())) { // save old Circle, in case we have to abort dragging oldCircle = arrow->next (FIRST); // remember what we are moving moving = TIP; // connect mover and arrow arrow->removeNext (oldCircle); arrow->addNext (this); // finally attach the arrow prev_.push_back (arrow); return true; } // arrow dragged by its tail? if (contains (arrow->getTail ())) { // save old Circle, in case we have to abort dragging oldCircle = arrow->prev (FIRST); // remember what we are moving moving = TAIL; // connect mover and arrow arrow->removePrev (oldCircle); arrow->addPrev (this); // finally attach the arrow next_.push_back (arrow); return true; } return false; } // drop the arrow onto the given node, if possible void DlgMover::drop (DlgNode *node) { // get the arrow attached to this mover DlgNode *arrow = (moving == TIP ? prev_.front () : next_.front ()); DlgNode *circle; // test whether node is any good if (node == NULL || node->type () == LINK || node == arrow->next (FIRST) || node == arrow->prev (FIRST)) circle = oldCircle; else circle = node; // tail was moved if (moving == TAIL) { // do not link two player nodes if (circle->type () == PLAYER && arrow->next (FIRST)->type () == PLAYER) circle = oldCircle; // remove arrow from old circle oldCircle->removeNext (arrow); arrow->removePrev (this); // connect circle and arrow circle->addNext (arrow); arrow->addPrev (circle); // reorder precedessor of arrow arrow->next (FIRST)->removePrev (arrow); arrow->next (FIRST)->addPrev (arrow); } // tip was moved else { // do not link two player nodes if (circle->type () == PLAYER && arrow->prev (FIRST)->type () == PLAYER) circle = oldCircle; // remove arrow from old circle oldCircle->removePrev (arrow); arrow->removeNext (this); // connect circle and arrow circle->addPrev (arrow); arrow->addNext (circle); // reorder precedessor of arrow arrow->prev (FIRST)->removeNext (arrow); arrow->prev (FIRST)->addNext (arrow); } // redraw arrow ((DlgArrow *) arrow)->initShape (); return; } adonthell-0.3.8/src/tools/dlgedit/cfg_project.h0000664000175000017500000000462512756054143016436 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_project.h * * @author Kai Sterker * @brief Project specific configuration data */ #ifndef CFG_PROJECT_H #define CFG_PROJECT_H #include #include /** * Data that belongs to an individual project. Usually, a project * contains all dialogues that belong to a certain game. The project's * name will be the name of the game, e.g. 'wastesedge'. */ class CfgProject { public: /** * Constructor. Creates an empty project with the given name. * @param name The name, or id, of the project. */ CfgProject (std::string name); /** * Load project specific data from disk. * @return true if successful, false otherwise. */ bool load (); /** * Save project specific data to disk. * @param file file to save data to. */ void save (std::ofstream & file); /** * Get the project's name. * @return name (id) of the project */ std::string name () { return Name; } /** * Get the project's basedir * @return basedir of the project. */ std::string basedir () { return BaseDir; } /** * Assign a base directory to the project. This is the * root of the dialogue sources belonging to this project. * When working with subdialogues, they will be adressed * relative to the base directory. * @param d the new base directory for this project. */ void setBasedir (std::string d) { BaseDir = d; } private: std::string Name; // Project Id std::string BaseDir; // Path to dialogue source directory root. }; #endif // CFG_PROJECT_H adonthell-0.3.8/src/tools/dlgedit/loadcfg.l0000664000175000017500000000264012756055406015552 00000000000000%{ /* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include #include #include "dlg_types.h" #define YY_DECL int parse_cfgfile (std::string &mytext, int &mynum) %} digit [0-9] num -?{digit}+ %x text %option noyywrap nounput never-interactive prefix="loadcfg" %% "#".*[\n]? ; /* Eat up comments */ File return LOAD_FILE; Project return LOAD_PROJECT; BaseDir return LOAD_BASE_DIR; End return LOAD_END; \[ mytext = ""; BEGIN(text); \] BEGIN(INITIAL); return LOAD_STR; [^\]]+ mytext += yytext; {num} mynum = atoi (yytext); return LOAD_NUM; [ \t\n]+ ; /* Eat whitespace */ . return LOAD_UNKNOWN; adonthell-0.3.8/src/tools/dlgedit/main.cc0000644000175000017500000000732412756055341015231 00000000000000/* Copyright (C) 1999/2000/2001/2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file main.cc * * @author Kai Sterker * @brief The main function of dlgedit. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "game.h" #include "gettext.h" #include "cfg_io.h" #include "dlg_cmdline.h" #include "dlg_compiler.h" #include "gui_dlgedit.h" int main (int argc, char *argv[]) { // dlgedit configuration CfgIO config; // Init GTK+ gtk_init (&argc, &argv); // parse command line if (!DlgCmdline::parse (argc, argv)) return 1; // Init i18n setlocale (LC_ALL, ""); // init game directory game::init (DlgCmdline::datadir); // start in gui mode if (!DlgCmdline::compile) { // Create the User Interface GuiDlgedit dlgedit; // are there any sources given? if (DlgCmdline::sources >= argc) { // Nope -> create a new dialogue dlgedit.newDialogue (); } else { // Yep -> load all of them while (DlgCmdline::sources < argc) dlgedit.loadDialogue (argv[DlgCmdline::sources++]); } // Start the main loop gtk_main (); } // just compile what we're given and exit else { DlgModule *module; std::string dialogue; std::string directory = g_get_current_dir(); while (DlgCmdline::sources < argc) { dialogue = argv[DlgCmdline::sources++]; // make sure that file has an absolute path std::string file = ((dialogue[0] == '/' || dialogue[1] == ':') ? dialogue : directory + std::string ("/") + dialogue); gchar *fname = g_path_get_basename (file.c_str ()); // check whether the file is a valid dialogue if (!GuiDlgedit::checkDialogue (dialogue)) { std::cout << "Loading of '" << dialogue << "' failed\n"; g_free(fname); continue; } // get the name to use for the dialogue std::string filename (fname); // remove file extension unsigned long pos = filename.rfind (FILE_EXT); if (pos != filename.npos) filename.erase (pos); module = new DlgModule (g_path_get_dirname (file.c_str ()), filename, "-1", ""); // try to load from file if (!module->load ()) { std::cout << "Loading of '" << dialogue << "' failed\n"; } else { std::cout << "Compiling '" << dialogue << "' ...\n"; // try to compile the dialogue DlgCompiler compiler (module); // compile compiler.run (); } g_free(fname); delete module; } } // good bye return 0; } adonthell-0.3.8/src/tools/dlgedit/dlg_rect.h0000664000175000017500000001422312756054511015726 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_rect.h * * @author Kai Sterker * @brief A wrapper around GdkRectangle. */ #ifndef DLG_RECT_H #define DLG_RECT_H #include "dlg_point.h" /** * The representation of a rectangle, defined by its upper left, and * bottom right corners. * * This class provides an abstraction from the GdkRectangle type * defined in GTK+, to remain as independent from the actual GUI * toolkit as possible. * * Moreover, it extends the functionality of GdkRectangle by providing * various query and comparison operations. */ class DlgRect { public: /** * Default-constructor. */ DlgRect () { } /** * Cast a GdkRectangle to a %DlgRect. * @param rect The GdkRectangle to convert. */ DlgRect (GdkRectangle &rect); /** * Create a rectangle from two points. No matter where point a is * located relative to point b, the resulting rectangle will always * be valid (i.e. it's top left corner will be left, and above from * the bottom right corner). * @param a The first point. * @param b The second point. */ DlgRect (DlgPoint &a, DlgPoint &b) { init (a, b); } /** * Create a rectangle from a given origin and it's width and height. * @param p The origin (top, left corner) of the new rectangle * @param width the width * @param height the height */ DlgRect (DlgPoint &p, int width, int height); /** * @name Queries for Attributes */ //@{ /** * Retrieve the absolute position of the rectangle's top left corner. * @return a reference to the top left corner. */ const DlgPoint &topLeft () const { return top_left; } /** * Retrieve the the absolute position of the rectangle's bottom right corner. * @return a reference to bottom right corner. */ const DlgPoint &bottomRight () const { return bottom_right; } /** * Retrieve the center of the rectangle. * @return the absolute position of the rectangle's center. */ DlgPoint center () const { return DlgPoint (x () + width ()/2, y () + height ()/2); } /** * Retrieve the rectangle's x coordinate, i.e. the absolute x value * of it's top left corner. * @return the x value of the top left corner. */ int x () const { return top_left.x (); } /** * Retrieve the rectangle's y coordinate, i.e. the absolute y value * of it's top left corner. * @return the y value of the top left corner. */ int y () const { return top_left.y (); } /** * Retrieve the rectangle's width, i.e. the distance between it's * left and right side. * @return the width of the rectangle. */ int width () const { return bottom_right.x () - x (); } /** * Retrieve the rectangle's height, i.e. the distance between it's * top and bottom side. * @return the height of the rectangle. */ int height () const { return bottom_right.y () - y (); } //@} /** * @name Various geometrical Tests */ //@{ /** * Test whether a given point lies within the rectangle's boundaries. * @param point The point to test against. * @return true when the point lies inside the rectangle, * false otherwise. */ bool contains (const DlgPoint &point); /** * Test whether a given rectangle lies completely within this rectangle's * boundaries, or overlaps it in some fashion. * @param rect The rectangle to test against. * @return true when rect lies (partly) within the rectangle's * boundaries, false otherwise. */ bool contains (const DlgRect &rect); //@} /** * Make a copy of this rectangled, inflated by the specified amount. * @param x Value to inflate in x dimensions. * @param y Value to inflate the y dimensions. * @return A new, inflated rectangle with the same center as this one. */ DlgRect inflate (int x, int y); /** * Grow all four sides of this rectangle. * @param x Value to grow in x dimensions. * @param y Value to grow in y dimensions. * @return A new, inflated rectangle with the same center as this one. */ void grow (int x, int y); /** * Move the rectangle to a new position. * @param pos The new position of the rectangle */ void setPos (const DlgPoint &pos); /** * Move this rectangle by the specified amount. * @param p Point representing the offset this rectangle shall be moved */ void move (DlgPoint &p); /** * Change the size of the rectangle. * @param widht The new width. * @param height The new height. */ void resize (int width, int height); /** * Convert a DlgRect into a GdkRectangle. */ operator GdkRectangle(); /** * Compare the positions of two rectangles. If they have the same y * value, the x value determines the result, otherwise the y value. * @param rect The rectangle to compare with. * @return true if the given rectangle is smaller than this one, * false otherwise. */ bool operator< (DlgRect &rect); protected: DlgPoint top_left; DlgPoint bottom_right; void init (DlgPoint &a, DlgPoint &b); }; #endif // DLG_RECT_H adonthell-0.3.8/src/tools/dlgedit/dlg_mover.h0000664000175000017500000000415312756054376016133 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_mover.h * * @author Kai Sterker * @brief A dummy node for drag'n dropping DlgArrows. */ #ifndef DLG_MOVER_H #define DLG_MOVER_H #include "dlg_arrow.h" /** * Arrows have to be connected to two nodes, so to drag them from one * Circle to another, they have to be connected to an (invisble) mover. */ class DlgMover : public DlgNode { public: /** * Creates a new mover at the given position. * @param position The center of the new mover */ DlgMover (DlgPoint &position); /** * Attach an arrow to this mover. The method checks whether either * the tip or the tail of the arrow overlap the mover and so decides * how the arrow is dragged. * @param arrow a DlgArrow to be dragged. * @return true if the mover is close enough to the arrows end, * false otherwise. */ bool attach (DlgArrow *arrow); /** * Drop the mover onto the given node. Connects the arrow we are * moving to the node, if possible. * @param node A DlgNode or NULL if there is no node at the * cursor position. */ void drop (DlgNode *node); private: int moving; // is arrow dragged by it's tip or tail? DlgNode *oldCircle; // the node the arrow was attached to before enum { NONE, TIP, TAIL }; }; #endif // DLG_MOVER_H adonthell-0.3.8/src/tools/dlgedit/dlg_point.cc0000664000175000017500000000222012756054456016262 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_point.cc * * @author Kai Sterker * @brief A wrapper around GdkPoint. */ #include "dlg_point.h" // Cast DlgRect to GdkRectangle DlgPoint::operator GdkPoint () { GdkPoint point; point.x = x (); point.y = y (); return point; } // move the point by a certain offset DlgPoint DlgPoint::offset (DlgPoint &p) const { return DlgPoint (x_ + p.x (), y_ + p.y ()); } adonthell-0.3.8/src/tools/dlgedit/gui_dlgedit.h0000664000175000017500000001562212756054651016434 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_dlgedit.h * * @author Kai Sterker * @brief The Dialogue Editor's main window */ #ifndef GUI_DLGEDIT_H #define GUI_DLGEDIT_H #include "gui_recent_files.h" #include "gui_messages.h" #include "gui_graph.h" #include "gui_list.h" #include "gui_tree.h" /** * The application's main window. Contains the menu- and statusbar, as * well as pointers to the other widgets. The main window is created at * program startup, and closed on termination of the program. There can * be only one main window at a time, but several dialogues may be open * simultanously. */ class GuiDlgedit : public GuiRecentFileListener { public: /** * Constructor. Creates the main window with all the sub-widgets, * such as the dialogue view or the instant preview. */ GuiDlgedit (); /** * Destructor. */ virtual ~GuiDlgedit (); /** * Global pointer to the main window, to allow easy access from anywhere. */ static GuiDlgedit *window; /** * Widget access methods */ //@{ /** * Retrieve the dialogue view. * @return the widget containing the graphical representation of the * dialogue graph. */ GuiGraph *graph () { return graph_; } /** * Retrieve the instant preview widget. * @return the widget containing the text of the selected DlgNode and * that of it's parents and children. */ GuiList *list () { return list_; } /** * Retrieve the module structure view. * @return the widget displaying the dialogue and its sub-modules. */ GuiTree *tree () { return tree_; } /** * Retrieve the main window of the applictaion. * @return a GtkWidget. */ GtkWidget *getWindow () { return wnd; } //@} /** * Set the program state and display it in the status bar * @param mode The new program state. */ void setMode (mode_type mode); /** * Get the current program state * @return The program state. */ mode_type mode () { return mode_; } /** * Create a new dialogue. */ void newDialogue (); /** * Load a (top level) dialogue from a file * @param file Filename (and path) of the dialogue to load. */ void loadDialogue (const std::string &file); /** * Load a sub-dialogue from a file. Sub-dialogues are not * directly available for editing; instead they become part * of a (top level) dialogue. * @param file Filename (and path) of the dialogue to load. * @return the sub-dialogue, or \b NULL if loading failed. */ DlgModule* loadSubdialogue (const std::string &file); /** * Save a dialogue to file * @param file Filename (and path) of the dialogue to load. */ void saveDialogue (const std::string &file); /** * Reload dialogue from disk if possible. This discards all * changes since the last save. */ void revertDialogue (); /** * Close a dialogue */ void closeDialogue (); /** * Display a dialogue * @param module The dialogue to display. * @param center whether to center the dialgue in view or not */ void showDialogue (DlgModule *module, bool center = false); /** * Compile a dialogue */ void compileDialogue (); /** * Test whether the given filename points to a valid dialogue * @param file path of the dialogue * @return true if the dialogue is valid, false otherwise. */ static bool checkDialogue (const std::string &file); /** * Edit the custom code of the current module. */ void customCode (); /** * Edit the settings of the current module. */ void settings (); /** * preview translation for a dialogue * @param catalogue full path to a gnu gettext compliant binary catalogue * (.mo) file */ void previewTranslation (const std::string &catalogue); /** * stop translation preview */ void exitPreview (); /** * Indicate that the active dialogue has been changed by the user */ void setChanged (); /** * Indicate that the acive dialogue has been assigned to a new project. */ void updateProject (); /** * Get the directory where the last fileselection took place. * @return Path to the directory last opened. */ std::string directory () { return directory_+"/"; } /** * Get the full path and name of the dialogue currently in the view. * @return Filename of the current dialogue. */ std::string filename (); /** * Callback when user chooses to load a previously opened file. * @param full path to the filename. */ virtual void OnRecentFileActivated (const std::string & file); private: /** * (Re)build the 'windows' menu */ void initMenu (); /** * (Re)build the 'open recent' sub-menu. */ void initRecentFiles (); /** * Display the correct window title */ void initTitle (); /** * Add a dialogue to the GUI */ DlgModule *initDialogue (std::string); /** * Set the GUI back to it's initial state. */ void clear (); /// serial number of open dialogues int number; /// the program mode mode_type mode_; /// instant preview widget GuiList *list_; /// dialogue structure view GuiTree *tree_; /// dialogue view GuiGraph *graph_; /// statusbar for displaying help/error texts GuiMessages *message; /// actual main window GtkWidget *wnd; /// pointers to a few menu-items GtkWidget *menuItem[MAX_ITEM]; /// the 'Windows' dropdown menu GtkWidget *windowMenu; /// the menu bar GtkWidget *mainMenu; /// statusbar displaying the program state GtkWidget *status_mode; /// dialogues currently loaded std::vector dialogues_; /// directory used in last file-selection std::string directory_; /// Textual program states static const char *progState[NUM_MODES]; /// recent files GuiRecentFiles *RecentFiles; }; #endif // GUI_DLGEDIT_H adonthell-0.3.8/src/tools/dlgedit/dlg_compiler.h0000664000175000017500000001015412756054331016602 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_compiler.h * * @author Kai Sterker * @brief The dialogue compiler. */ #ifndef DLG_COMPILER_H #define DLG_COMPILER_H #include "dlg_module.h" #include "dlg_circle.h" /** * Python tokens */ enum token { EQ = 0, NEQ = 1, LT = 2, LEQ = 3, GT = 4, GEQ = 5, ASSIGN = 6, ACCESS = 7, COLON = 8, IF = 9, ELIF = 10, ELSE = 11, PASS = 12, RETURN = 13, BAND = 14, BOR = 15, NOT = 16, ADD = 17, SUB = 18, MUL = 19, DIV = 20, QUOT = 21, SQUOT = 22, LBRACE = 23, RBRACE = 24, LBRACKET= 25, RBRACKET= 26, COMMA = 27, COMMENT = 28, MOD = 29, AND = 30, OR = 31, XOR = 32, FIXED = 33, VARIABLE= 34, CONSTANT= 35, NONE = 36 }; #define NUM_OPS 33 #define NUM_FXD 5 /** * It transforms the dialogue into the Python script needed by * the Dialogue Engine. * * The Engine itself consists of two parts: * - the dialogue base class defined in the dialogue.py module. It * contains executable code shared by all dialogues. * - the C++ part of the Engine uses the methods the Python dialogue * class provides to step through the dialogue and retrieve the * respective text. * * The main reason for this architecture is to keep the individual * dialogue scripts as small as possible. Therefore, the scripts * created by the compiler contain mainly data and little or no code. */ class DlgCompiler { public: /** * Instantiate the compiler. * @param module Module to be compiled */ DlgCompiler (DlgModule *module); /** * Dtor. */ ~DlgCompiler (); /** * Compile the module passed to DlgCompiler */ void run (); private: void writeHeader (const std::string &theClass); void writeText (); void writeCode (); void writeLoop (); void writeConditions (); void writeStart (); void writeDialogue (); void writeFollower (DlgNode *node); void writeCustomCode (); void addStart (DlgNode *node); void addCode (const std::string &cde, int index); bool addCondition (DlgCircle *circle, int index); int checkFollowers (DlgCircle *node); bool checkConditions (DlgCircle* node); std::string escapeCode (std::string code); std::string splitCode (std::string code, int space = 0); std::string inflateCode (std::string code); token getKeyword (const std::string &statement); token getToken (const std::string &statement); std::ofstream file; DlgModule *dialogue; // The dialogue to be compiled DlgCircle start; // Start node of the dialogue std::vector code; // Temporary storage for all code std::vector conditions; // Temporary storage for all conditions std::vector loop; // nodes that are allowed to looped int errors; // number of errors in dialogue int *codeTable; // Mapping between nodes and code int *conditionTable; // Mapping between nodes and conditions int *operationTable; // Mapping between nodes and condition type static std::string operators[NUM_OPS]; static std::string fixed[NUM_FXD]; }; #endif // DLG_COMPILER_H adonthell-0.3.8/src/tools/dlgedit/util.h0000664000175000017500000000545512756055372015135 00000000000000/* Copyright (C) 2009/2010 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file common/util.h * * @author Kai Sterker * @brief Helper methods. */ #ifndef COMMON_UTIL_H #define COMMON_UTIL_H #include #ifdef WIN32 #define MK_UNIX_PATH(path) util::to_unix_path(path) #else #define MK_UNIX_PATH(path) path #endif /** * Some helper methods used across the different tools. */ class util { public: /** * Create a path that is relative to either the user supplied or builtin * data directory. If the given path points into neither of those, try to * remove anything before the specified target_dir (so that the returned * relative path starts with target_dir). * @param path the path to make relative. * @param target_dir starting directory for a relative path used as fallback. * @return a relative path on success, or a canonical absolute path on error. */ static std::string get_relative_path (const std::string & path, const std::string & target_dir); /** * Convert a relative path to an absolute path. * @param path the path to convert. * @return an absolute path pointing to the location of path. */ static std::string get_absolute_path (const std::string & path); /** * Convert windows directory names to unix directory names. All paths in * data files are supposed to be in unix-style notation. * @param path the pathname to convert. * @return path where '\\' is replaced with '/'. */ static std::string to_unix_path (const std::string & path); private: /** * Try to create a path relative to the given base path. * This is used so we can store objects relative to the data directory. * * @note Note that path will be modified by the method to be a relative * path on success or a canonical absolute path on failure. * * @param path full path to make relative. * @param base_path path to the data directory. * @return true if base path has been subtracted from the path. */ static bool remove_common_path (std::string & path, const std::string & base_path); }; #endif adonthell-0.3.8/src/tools/dlgedit/gui_messages.h0000664000175000017500000000320012756055066016615 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_messages.h * * @author Kai Sterker * @brief Defines the messages to display in the status bar. */ #ifndef GUI_MESSAGES_H #define GUI_MESSAGES_H #include #include /** * operator< for use with the map */ struct ltint { bool operator() (const int &a, const int &b) const { return a < b; } }; /** * Contains a map that holds (number, string) pairs, so the messages * can be easily accessed by their ID. */ class GuiMessages { public: GuiMessages (GtkWidget *sb); void display (int id); void display (int id, const char* text); void clear (); private: std::map messages; // List of message strings int current; // String currently displayed GtkWidget *statusbar; // Target for the messages }; #endif // GUI_MESSAGES_H adonthell-0.3.8/src/tools/dlgedit/dlg_compiler.cc0000664000175000017500000005462012756054266016755 00000000000000/* Copyright (C) 2002/2006 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_compiler.cc * * @author Kai Sterker * @brief The dialogue compiler. */ #include #include #include #include "dlg_cmdline.h" #include "dlg_compiler.h" #include "dlg_types.h" #include "dlg_arrow.h" #include "gui_error.h" // Operators that may appear in Python code std::string DlgCompiler::operators[NUM_OPS] = { "==", "!=", "<", "<=", ">", ">=", "=", ".", ":", "if", "elif", "else", "pass", "return", "and", "or", "not", "+", "-", "*", "/", "\"", "'", "(", ")", "[", "]", ",", "#", "%", "&", "|", "^"}; // keywords that need no expansion std::string DlgCompiler::fixed[NUM_FXD] = { "self", "quests", "the_npc", "the_player", "characters"}; DlgCompiler::DlgCompiler (DlgModule *module) { start.type () = PLAYER; dialogue = module; errors = 0; int length = module->getNodes ().size () + 1; // create our lookup tables codeTable = new int[length]; conditionTable = new int[length]; operationTable = new int[length]; // initialize them with something sensible memset (codeTable, 255, length * sizeof (int)); memset (conditionTable, 255, length * sizeof (int)); memset (operationTable, 0, length * sizeof (int)); } // dtor DlgCompiler::~DlgCompiler () { delete[] codeTable; delete[] conditionTable; delete[] operationTable; for (DlgNode *next = start.next (FIRST); next != NULL; next = start.next (FIRST)) delete (DlgArrow *) next; } // compile the dialogue into Python script void DlgCompiler::run () { if (DlgCmdline::compile == false) { // make sure the error console exists if (GuiError::console == NULL) GuiError::console = new GuiError (); else GuiError::console->clear (); } // try to open the file std::string fname = dialogue->fullName (); // remove the file extension unsigned long pos = fname.rfind (FILE_EXT); if (pos != fname.npos) fname.erase (pos); // try to open the file file.open ((fname + ".py").c_str ()); if (!file.is_open()) { if (DlgCmdline::compile) std::cout << "*** error creating " << fname << std::endl; return; } gchar *basename = g_path_get_basename(fname.c_str ()); // write the script header writeHeader (basename); // write the dialogue text writeText (); // write loop table writeLoop (); // write the conditions writeConditions (); // write the code writeCode (); // write the start of the dialoge writeStart (); // write the rest of the dialogue writeDialogue (); // write the custom code writeCustomCode (); // display errors if there were any if (DlgCmdline::compile == false && errors > 0) GuiError::console->display (); file.flush(); file.close(); g_free(basename); } // write the topmost part of the dialogue void DlgCompiler::writeHeader (const std::string &theClass) { // imports file << "import dialogue\n"; // custom imports if (dialogue->entry ()->imports () != "") file << dialogue->entry ()->imports () << "\n\n"; // stuff needed for i18n file << "# -- pygettext support\n" << "def _(message): return message\n\n" // the classname << "class " << theClass << " (dialogue.base):\n"; } // write array with the dialogue text and initialize some stuff void DlgCompiler::writeText () { std::vector nodes = dialogue->getNodes (); std::vector::iterator i; DlgCircleEntry *entry; DlgArrow *arrow; unsigned int j = 0; // the array with the dialogue text file << "\ttext = [None"; for (i = nodes.begin (); i != nodes.end (); i++) { // nothing to be done for Arrows if ((*i)->type () == LINK) continue; // get the entry of the current circle entry = ((DlgCircle *) *i)->entry (); // see whether this is a start-node if ((*i)->prev (FIRST) == NULL) arrow = new DlgArrow (&start, *i); // set index of this node for later use (*i)->setIndex (++j); // build condition vector if (entry->condition () != "") addCondition ((DlgCircle *) *i, j); // build code vector if (entry->code () != "") addCode (entry->code (), j); // build loop vector if (entry->loop () != false) loop.push_back (j); // write text of the node file << ",\\\n\t\t_(\"" << entry->text () << "\")"; } // close text array file << "]\n\n"; } // write loops void DlgCompiler::writeLoop () { // nothing to do if there are no loops if (loop.empty ()) return; file << "\tloop = ["; for (std::vector::iterator i = loop.begin (); i != loop.end (); i++) { if (i != loop.begin ()) file << ", "; file << (*i); } // close array file << "]\n\n"; } // write conditions of the dialogue void DlgCompiler::writeConditions () { // nothing to do if there are no conditions if (conditions.empty ()) return; file << "\tcond = [\\"; // write the individual conditions for (std::vector::iterator i = conditions.begin (); i != conditions.end (); i++) { if (i != conditions.begin ()) file << ",\\"; file << "\n\t\t\"" << escapeCode (splitCode (*i)) << "\""; } // close array file << "]\n\n"; } // write code of the dialogue void DlgCompiler::writeCode () { // nothing to do if there are no conditions if (code.empty ()) return; file << "\tcode = [\\"; // write the individual conditions for (std::vector::iterator i = code.begin (); i != code.end (); i++) { if (i != code.begin ()) file << ",\\"; file << "\n\t\t\"" << escapeCode (splitCode (*i)) << "\""; } // close array file << "]\n\n"; } // write additional Python code void DlgCompiler::writeCustomCode () { // constructor file << "\n\tdef __init__(self, p, n):" << "\n\t\tself.namespace = globals ()" << "\n\t\tself.the_player = p" << "\n\t\tself.the_npc = n\n"; // custom constructor code if (dialogue->entry ()->ctor () != "") file << "\n" << splitCode (dialogue->entry ()->ctor (), 2) << "\n"; // custom destructor code if (dialogue->entry ()->dtor () != "") file << "\n\tdef __del__(self):\n" << splitCode (dialogue->entry ()->dtor (), 2) << "\n"; // custom methods if (dialogue->entry ()->methods () != "") file << "\n" << splitCode (dialogue->entry ()->methods (), 1) << "\n"; } // replace '\n', '\t', '"' and the like with '\\n' '\\t' and '\"' std::string DlgCompiler::escapeCode (std::string code) { char c; for (unsigned int i = 0; i < code.length (); i++) { c = code[i]; if (c == '"') code.insert (i++, "\\"); else if (c == '\n') code.replace (i, 1, "\\n"); else if (c == '\t') code.replace (i, 1, " "); } return code; } // splits python code into individual lines std::string DlgCompiler::splitCode (std::string code, int space) { std::string new_code = ""; unsigned int i = 0, j; code += '\n'; while ((j = code.find ('\n', i)) < code.size ()) { new_code.append (space, '\t'); new_code += inflateCode (code.substr (i, j-i)); new_code += "\n"; i = ++j; } code.erase (code.end()-1); return new_code; } std::string DlgCompiler::inflateCode (std::string code) { unsigned long pos; unsigned int i, begin = 0, prefix; int suffix; std::string token, stripped, last_op = ""; bool is_local = true; #ifdef _DEBUG_ std::cout << ">>> " << code << std::endl; #endif // replace the_npc/the_player with self.the_npc/self.the_player pos = code.find ("the_npc", 0); while (pos != code.npos) { if (pos < 5 || strncmp (code.substr (pos-5, pos).c_str(), "self.", 5)) { code.insert (pos, "self."); pos += 5; } pos = code.find ("the_npc", pos+7); } pos = code.find ("the_player", 0); while (pos != code.npos) { if (pos < 5 || strncmp (code.substr (pos-5, pos).c_str(), "self.", 5)) { code.insert (pos, "self."); pos += 5; } pos = code.find ("the_player", pos+10); } // scan the string from left to right for (pos = 0; pos < code.length (); pos++) for (i = 0; i < NUM_OPS; i++) // search for the leftmost operator from the current position if (!strncmp (code.substr (pos).c_str (), operators[i].c_str (), operators[i].length ()) || (i == NUM_OPS-1 && pos == code.length()-1)) { // takes care of the rare situation when the last token // of the string is a variable in need of expanding if (pos == code.length()-1 && i == NUM_OPS-1) pos++; token = code.substr (begin, pos-begin); // strip leading and trailing whitespace for (prefix = 0; prefix < token.length() && token[prefix] == ' '; prefix++); for (suffix = token.length()-1; suffix >= 0 && token[suffix] == ' '; suffix--); stripped = token.substr (prefix, suffix-prefix+1); // have to be careful with textual operators and keywords if (i == BAND || i == BOR || i == NOT || i == RETURN || i == PASS || i == IF || i == ELIF || i == ELSE) { if (pos > 0 && isalpha (code[pos-1])) break; if (pos < code.length()-operators[i].length()-1 && isalpha (code[pos+operators[i].length()])) break; } #ifdef _DEBUG_ std::cout << "token = '" << stripped << "', operator = '" << operators[i] << "'\n" << std::flush; #endif // skip functions and arrays if (i == LBRACKET || i == LBRACE) { begin = pos + 1; break; } // see whether we've got a variable and act accordingly if (getToken (stripped) == VARIABLE) { // make sure we don't have a local variable if (!is_local) { // assignment if (i == ASSIGN) { code[pos] = ','; code.insert (begin+suffix+1, "\""); code.insert (begin+prefix, "set_val (\""); code.append (")"); pos += 11; } else { code.insert (begin+suffix+1, "\")"); code.insert (begin+prefix, "get_val (\""); pos += 12; } } // variable left of '.' if (i == ACCESS && last_op != ".") { // check whether we access the quest- or character array if (dialogue->entry ()->isQuest (stripped)) { code.insert (begin+prefix+stripped.length(), "\")"); code.insert (begin+prefix, "adonthell.gamedata_get_quest(\""); pos += 32; is_local = false; } if (dialogue->entry ()->isCharacter (stripped)) { code.insert (begin+prefix+stripped.length(), "\")"); code.insert (begin+prefix, "adonthell.gamedata_get_character(\""); pos += 36; is_local = false; } } else is_local = true; } // these are shortcuts for access to the character array, so // we handle them similar if (stripped == "the_npc" || stripped == "the_player") is_local = false; // a trailing comma operator ends an expression if (i == COMMA) is_local = true; // skip strings if (i == QUOT || i == SQUOT) pos = code.find (operators[i], pos+1) - 1; // skip comments if (i == COMMENT) pos = code.length (); last_op = operators[i]; pos += operators[i].length (); begin = pos; #ifdef _DEBUG_ std::cout << code << std::endl; for (unsigned int j = 0; j < begin; j++) std::cout << " "; std::cout << "^\n"; #endif break; } #ifdef _DEBUG_ std::cout << "<<< " << code << "\n\n"; #endif return code; } // write the start of the dialogue void DlgCompiler::writeStart () { // check the conditions of the circle's children checkConditions (&start); // begin dialogue array file << "\t# -- (speaker, code, ((text, operation, condition), ...))" << "\n\tdlg = [\\\n" << "\t\t(None, -1, ("; // write the "followers" (in this case the start nodes) for (DlgCircle *child = start.child (FIRST); child != NULL; child = start.child (NEXT)) writeFollower (child); } // write the actual dialogue data void DlgCompiler::writeDialogue () { std::vector nodes = dialogue->getNodes (); std::vector::iterator i; DlgCircle *circle, *child; DlgCircleEntry *entry; for (i = nodes.begin (); i != nodes.end (); i++) { // nothing to be done for Arrows if ((*i)->type () == LINK) continue; circle = (DlgCircle *) (*i); // check the conditions of the circle's children checkConditions (circle); // get the entry of the current circle entry = circle->entry (); file << ")),\\\n\t\t("; // write Speaker switch (circle->type ()) { case NPC: file << "\"" << entry->npc () << "\""; break; case NARRATOR: file << "\"Narrator\""; break; default: file << "None"; } // write code file << ", " << codeTable[circle->index ()] << ", ("; // check whether the followers are valid checkFollowers (circle); // write all followers for (child = circle->child (FIRST); child != NULL; child = circle->child (NEXT)) writeFollower (child); } // end of array file << "))]\n\n"; } // write a single follower void DlgCompiler::writeFollower (DlgNode *node) { file << "(" << node->index () << ", " << operationTable[node->index ()] << ", " << conditionTable[node->index ()] << "), "; } // add node to the dialogue's start nodes void DlgCompiler::addStart (DlgNode *node) { /* std::vector::iterator i = start.begin (); // search the proper place for insertion while (i != start.end ()) { if (*node < *(*i)) break; i++; } // insert start.insert (i, node); */ } // add a condition to the list of conditions bool DlgCompiler::addCondition (DlgCircle *circle, int idx) { std::string error, condition, cnd = circle->entry ()->condition (); bool retval = true; // see what kind of statement the condition is and get rid of the keyword switch (getKeyword (cnd)) { case IF: { condition = cnd.substr (3); break; } case ELIF: { condition = cnd.substr (5); operationTable[idx] = 1; break; } case ELSE: { operationTable[idx] = 1; return true; } default: { // a condition that doesn't start with any of the above is wrong error = "*** Error: Faulty condition\n \"" + cnd; error += "\" of node\n \"" + circle->entry ()->text (); error += "\"\n "; // add error to list if (DlgCmdline::compile) std::cout << error; else GuiError::console->add (error, circle); errors++; return false; } } // now get rid of the colon at the end of the condition if (condition[condition.size () - 1] == ':') condition.erase (condition.size () - 1); // if there is none, that's not too tragical, but report it anyway else { error = "*** Warning: Colon missing in condition\n \"" + cnd; error += "\" of node\n \"" + circle->entry ()->text (); error += "\"\n "; // add error to list if (DlgCmdline::compile) std::cout << error; else GuiError::console->add (error, circle); errors++; retval = false; } // now the condition is ready for addition to the condition vector for (std::vector::iterator i = conditions.begin (); i != conditions.end (); i++) if (strcmp ((*i).c_str (), condition.c_str ()) == 0) { conditionTable[idx] = distance (conditions.begin (), i); return retval; } // the condition isn't in the table so far, so add it conditionTable[idx] = conditions.size (); conditions.push_back (condition); return retval; } // add arbitrary code to the list of code void DlgCompiler::addCode (const std::string &cde, int idx) { // see if code like this already exists for (std::vector::iterator i = code.begin (); i != code.end (); i++) if (strcmp ((*i).c_str (), cde.c_str ()) == 0) { codeTable[idx] = distance (code.begin (), i); return; } // the code isn't in the table so far, so add it codeTable[idx] = code.size (); code.push_back (cde); } // check whether PLAYER or NPC/NARRATOR nodes follow the given node int DlgCompiler::checkFollowers (DlgCircle *circle) { DlgNode *child = circle->child (FIRST); if (child == NULL) return 0; node_type type = child->type (); std::string error; // make sure that the followers are consistent for (; child != NULL; child = circle->child (NEXT)) { if (type == child->type ()) continue; // that's an error if ((type == PLAYER && child->type () != PLAYER) || (type != PLAYER && child->type () == PLAYER)) { // compose error text error = "*** Error: Must not mix PLAYER and NPC nodes in"; error += " children of node\n \"" + circle->entry ()->text (); error += "\"\n "; // add error to the error console if (DlgCmdline::compile) std::cout << error; else GuiError::console->add (error, circle); errors++; break; } } return 1; } // check whether the children of given node have proper conditions bool DlgCompiler::checkConditions (DlgCircle *circle) { DlgCircle *child = circle->child (FIRST); if (child == NULL) return true; std::string error = ""; bool retval = true; // get keyword of first child token k2, k1 = getKeyword (child->entry ()->condition ()); for (; child != NULL; child = circle->child (NEXT), k1 = k2) { k2 = getKeyword (child->entry ()->condition ()); if (k2 == NONE) continue; // 'elif' may only follow 'if' or 'elif' if (k2 == ELIF && (k1 != IF && k1 != ELIF)) error = "*** Error: 'elif' without preceeding 'if' in node\n \""; // 'else' may only follow 'if' or 'elif' else if (k2 == ELSE && (k1 != IF && k1 != ELIF)) error = "*** Error: 'else' without preceeding 'if' in node\n \""; // display error if there is any if (error != "") { error += child->entry ()->text (); error += "\"\n "; if (DlgCmdline::compile) std::cout << error; else GuiError::console->add (error, child); errors++; error = ""; retval = false; } } return retval; } // get the keyword the statement begins with token DlgCompiler::getKeyword (const std::string &statement) { if (strncmp ("if ", statement.c_str (), 3) == 0) return IF; else if (strncmp ("elif ", statement.c_str (), 5) == 0) return ELIF; else if (strncmp ("else:", statement.c_str (), 5) == 0) return ELSE; return NONE; } // splits a string into tokens token DlgCompiler::getToken (const std::string &token) { static unsigned int i; // No valid token if (token == "") return NONE; // Operator for (i = 0; i < NUM_OPS; i++) if (token == operators[i]) return NONE; // Fixed: (i.e. something that never needs expanding) for (i = 0; i < NUM_FXD; i++) if (token == fixed[i]) return FIXED; // Constant: if (isdigit (token[0]) || (token[0] == '-' && isdigit (token[token.length()-1]))) return CONSTANT; // Variable: return VARIABLE; } adonthell-0.3.8/src/tools/dlgedit/cfg_data.cc0000664000175000017500000000772512756054053016043 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_data.cc * * @author Kai Sterker * @brief dlgedit configuration data */ #include #include #include #include #include #include "cfg_data.h" #include "dlg_cmdline.h" /** * Global access to the dlgedit configuration */ CfgData* CfgData::data = NULL; // ctor CfgData::CfgData () { // make this configuration globally available data = this; } // dtor CfgData::~CfgData () { data = NULL; // delete all projects for (std::vector::iterator i = Projects.begin (); i != Projects.end (); i++) delete *i; } // add entry to list of projects void CfgData::addProject (const std::string &project) { std::vector::iterator i; // check whether the project already exists for (i = Projects.begin (); i != Projects.end (); i++) if ((*i)->name () == project) break; // if exists -> overwrite if (i != Projects.end ()) (*i)->load (); // otherwise create a new one else { CfgProject *p = new CfgProject (project); // try to load it if (p->load ()) Projects.push_back (p); else delete p; } } // get basedir associated with a certain project std::string CfgData::getBasedir (const std::string & project) { std::vector::iterator i; // try to locate project for (i = Projects.begin (); i != Projects.end (); i++) if ((*i)->name () == project) return (*i)->basedir (); return ""; } // set basedir of a certain project void CfgData::setBasedir (const std::string & project, const std::string & basedir) { std::vector::iterator i; // try to locate project for (i = Projects.begin (); i != Projects.end (); i++) if ((*i)->name () == project) { (*i)->setBasedir (basedir); return; } // project does not exist, so create it CfgProject *p = new CfgProject (project); p->setBasedir (basedir); Projects.push_back (p); } // return list of projects available in given data directory std::vector CfgData::projectsFromDatadir () { struct dirent * d; struct stat statbuf; DIR *mydir = opendir (DlgCmdline::datadir.c_str()); std::string name, filename, path = DlgCmdline::datadir + "/"; std::vector projects; // default project projects.push_back (std::string ("none")); // no such directory if (!mydir) return projects; // get all directories inside while ((d = readdir (mydir)) != NULL) { name = d->d_name; filename = path + name; // ignore '.' and '..' directories if (name != "." && name != "..") { stat (filename.c_str (), &statbuf); // fill vector with valid entries if (S_ISDIR (statbuf.st_mode)) projects.push_back (name); } } // cleanup closedir (mydir); return projects; } // save configuration data void CfgData::save (std::ofstream &out) { // save list of projects for (std::vector::iterator i = Projects.begin (); i != Projects.end (); i++) (*i)->save (out); } adonthell-0.3.8/src/tools/dlgedit/dlg_circle_entry.h0000664000175000017500000000573212756054207017462 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_circle_entry.h * * @author Kai Sterker * @brief The contents of a DlgCircle. */ #ifndef DLG_CIRCLE_ENTRY_H #define DLG_CIRCLE_ENTRY_H #include /** * The %DlgCircleEntry keeps the actual contents of circle, it's * actual text, annotions of the author, the NPC it is assigned to * (if any), it's conditions and additional Python code. */ class DlgCircleEntry { public: DlgCircleEntry (); /** * Attribute access. */ //@{ /** * Get the text assigned to this circle. * @return the circle's text. */ std::string text (); /** * Get the comment assigned to this circle. * @return the circle's comments. */ std::string annotation () { return annotation_; } /** * Get the character this circle is assigned to. * @return the circle's character. */ std::string npc () { return npc_; } /** * Get the arbitrary code assigned to this circle. * @return the circle's code. */ std::string code () { return code_; } /** * Get the condition this circle is based upon. * @return the circle's condition. */ std::string condition () { return condition_; } /** * Get whether the circle may loop. * @return true if that's the case, false otherwise. */ bool loop () { return loop_; } void setText (std::string t); void setAnnotation (std::string a) { annotation_ = a; } void setNpc (std::string n) { npc_ = n; } void setCondition (std::string c); void setCode (std::string c) { code_ = c; } void setLoop (bool l) { loop_ = l; } //@} bool hasCode () { return code_ != "" || condition_ != ""; } private: bool loop_; // whether the text may loop std::string text_; // the node's actual text std::string annotation_; // comments of the author std::string npc_; // name of the NPC this node is assigned to std::string code_; // arbitrary (Python) code std::string condition_; // condition(s) for this node }; #endif // DLG_CIRCLE_ENTRY_H adonthell-0.3.8/src/tools/dlgedit/gui_edit.h0000664000175000017500000000343612756054674015752 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_edit.h * * @author Kai Sterker * @brief Wrapper around the GtkText widget. */ #include #include #include /** * Provides a simple C++ interface to GtkText. The widget is initialised * to use a font with fixed width, so it should only be used to edit code. */ class GuiEdit { public: /** * Create a new GtkText widget. * @param container Container to put the editor widget into. */ GuiEdit (GtkWidget *container); ~GuiEdit (); /** * Get a pointer to the GtkText widget. * @return a pointer to the editor widget. */ GtkWidget *widget () { return view; } /** * Set the text of the widget * @param text to display in the entry */ void setText (const std::string &text); /** * Retrieve the text of the widget * @return text contained in the widget. */ std::string getText (); private: GtkTextBuffer *entry; // The actual text buffer GtkWidget *view; // The widget to display the buffer }; adonthell-0.3.8/src/tools/dlgedit/cfg_io.cc0000664000175000017500000000555312756054107015536 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_io.cc * * @author Kai Sterker * @brief I/O Routines for dlgedit configuration file */ #include #include #include #include #include "cfg_io.h" #include "dlg_types.h" // The config file opened by the lexical scanner extern FILE* loadcfgin; extern int parse_cfgfile (std::string&, int&); // ctor; load config CfgIO::CfgIO () { #if defined(__APPLE__) // OSX Dlgeditrc = std::string (getenv ("HOME")) + "/Library/Application Support/Adonthell/dlgeditrc"; #elif defined (WIN32) // Windows char *appDataDir = getenv ("APPDATA"); if (appDataDir != NULL && strlen (appDataDir) > 0) Dlgeditrc = std::string (getenv("APPDATA")) + "/Adonthell/dlgeditrc"; else Dlgeditrc = "./dlgeditrc"; #else // Unix char *xdgDir = getenv ("XDG_CONFIG_HOME"); if (xdgDir != NULL && strlen (xdgDir) > 0) Dlgeditrc = std::string (xdgDir) + "/adonthell/dlgeditrc"; else Dlgeditrc = std::string (getenv ("HOME")) + "/.config/adonthell/dlgeditrc"; #endif // loadcfgin is declared in lex.loadcfg.cc loadcfgin = g_fopen (Dlgeditrc.c_str (), "rb"); // open succeeded -> read configuration if (loadcfgin) { load (); // cleanup fclose (loadcfgin); } } // dtor; save config CfgIO::~CfgIO () { save (); } // load config void CfgIO::load () { int token = 1, n; std::string s; // as long as reading something from file ... while (token) { // get next token switch (token = parse_cfgfile (s, n)) { case LOAD_PROJECT: { if (parse_cfgfile (s, n) == LOAD_STR) Data.addProject (s); break; } default: break; } } return; } // save config void CfgIO::save () { // open file for writing std::ofstream out (Dlgeditrc.c_str ()); // opening failed for some reasons if (!out) return; // write header out << "# Adonthell Dialogue Editor configuration file\n" << std::endl; // save data Data.save (out); } adonthell-0.3.8/src/tools/dlgedit/cfg_io.h0000664000175000017500000000360612756054123015373 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_io.h * * @author Kai Sterker * @brief I/O Routines for dlgedit configuration file */ #ifndef CFG_IO_H #define CFG_IO_H #include "cfg_data.h" /** * This class implements loading and saving of the dlgedit configuration * file. On Unix systems, the configuration is $HOME/.adonthell/dlgeditrc. * * The configuration contains a global section and project specific * sections. The global section stores infos like recently opened files, * while the project sections contains the base source directory of that * project. * * Only games that are located in DATA_DIR/games are valid projects. */ class CfgIO { public: /** * Constructor. Computes the path to the config file and loads it. */ CfgIO (); /** * Destructor. Saves all changes to the config file. */ ~CfgIO (); private: /** * Load configuration from ~/.adonthell/dlgeditrc. */ void load (); /** * Save configuration to ~/.adonthell/dlgeditrc. */ void save (); CfgData Data; // Global configuration data std::string Dlgeditrc; // Path to configuration file }; #endif // CFG_IO_H adonthell-0.3.8/src/tools/dlgedit/dlg_point.h0000664000175000017500000000571712756054467016144 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_point.h * * @author Kai Sterker * @brief A wrapper around GdkPoint. */ #ifndef DLG_POINT_H #define DLG_POINT_H #include /** * The representation of a point, defined by its x and y coordinate. * * This class provides some abstraction from the GdkPoint type * defined in GTK+, to remain as independent from the actual GUI * toolkit as possible. */ class DlgPoint { public: DlgPoint () : x_(0), y_(0) { } DlgPoint (int x, int y) : x_(x), y_(y) { } DlgPoint (GdkPoint &point) : x_(point.x), y_(point.y) { } int x () const { return x_; } int y () const { return y_; } /** * Creates a new point, which is moved by the values of the given point. * @param p the distance to offset this point * @return this point, offset by the point p */ DlgPoint offset (DlgPoint &p) const; /** * Creates a new point, which is moved by the given values. * @param x the offset in x direction * @param y the offset in y direction * @return this point, offset by the given values. */ DlgPoint offset (int x, int y) { return DlgPoint (x_ + x, y_ + y); } /** * Offset this point by the given values. * @param x the offset in x direction * @param y the offset in y direction */ void move (DlgPoint &p) { x_ += p.x (); y_ += p.y (); } /** * Offsets this point by the given values. * @param x the offset in x direction * @param y the offset in y direction */ void move (int x, int y) { x_ += x; y_ += y; } /** * Convert a DlgPoint into a GdkPoint. */ operator GdkPoint(); /** * Assign another point to this one */ DlgPoint &operator= (const DlgPoint &p) { x_ = p.x (); y_ = p.y (); return *this; } /** * Equal operator */ bool operator== (const DlgPoint &p) { return x_ == p.x() && y_ == p.y(); } /** * Less Than operator */ bool operator< (const DlgPoint &p) { if (x_ == p.x ()) return y_ < p.y (); else return x_ < p.x (); } private: int x_; int y_; }; #endif // DLG_POINT_H adonthell-0.3.8/src/tools/dlgedit/gui_dlgedit.cc0000664000175000017500000007724012756054641016575 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_dlgedit.cc * * @author Kai Sterker * @brief The Dialogue Editor's main window */ #ifdef HAVE_CONFIG_H #include #endif #ifdef MAC_INTEGRATION #include #endif #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include #endif #define MIME_TYPE "application/x-adonthell-dlg" #include #include #include #include #include #include #include #include "gettext.h" #include "cfg_data.h" #include "dlg_cmdline.h" #include "dlg_compiler.h" #include "gui_code.h" #include "gui_settings.h" #include "gui_resources.h" #include "gui_dlgedit.h" #include "gui_dlgedit_events.h" /** * Point parser to another file to load sub-dialogue. * Defined in loadlg.l */ extern void parser_switch_input (); /** * Return to previous input file after loading sub-dialogue - or * after failing to do so. * Defined in loadlg.l */ extern void parser_restore_input (); /** * Global pointer to the main window */ GuiDlgedit *GuiDlgedit::window = NULL; /** * Strings describing the various program states */ const char *GuiDlgedit::progState[NUM_MODES] = { " IDLE", " SELECTED", " HIGHLIGHTED", " DRAGGED", " PREVIEW" }; // Create the main window GuiDlgedit::GuiDlgedit () { GtkWidget *vbox; GtkWidget *hbox; GtkWidget *menu; GtkWidget *submenu; GtkWidget *menuitem; GtkWidget *hpaned, *vpaned; window = this; number = 0; // recent file management std::string cmdline = "-g" + DlgCmdline::datadir + " -p" + DlgCmdline::project; RecentFiles = new GuiRecentFiles ("dlgedit", cmdline); RecentFiles->setListener(this); // Statusbar for displaying help and error messages GtkWidget *status_help = gtk_statusbar_new (); // gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR(status_help), FALSE); message = new GuiMessages (status_help); // Main Window wnd = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size(GTK_WINDOW(wnd), 900, 700); g_signal_connect (G_OBJECT (wnd), "delete_event", G_CALLBACK (on_widget_destroy), NULL); // Menu Accelerators GtkAccelGroup *accel_group = gtk_accel_group_new (); // Main Windows Menu menu = gtk_menu_bar_new (); // Attach Menubar vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (wnd), vbox); gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (vbox), menu, FALSE, FALSE, 2); // File Menu submenu = gtk_menu_new (); // New menuitem =gtk_image_menu_item_new_from_stock ("gtk-new", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (1)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_new_activate), (gpointer) this); gtk_widget_show (menuitem); // Open menuitem = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (2)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_load_activate), (gpointer) this); gtk_widget_show (menuitem); // Open Previous > menuitem = gtk_menu_item_new_with_label ("Open Previous"); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (2)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), RecentFiles->recentFileMenu()); // Save menuitem = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (3)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_save_activate), (gpointer) this); menuItem[SAVE] = menuitem; // Save As menuitem = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (4)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_save_as_activate), (gpointer) this); menuItem[SAVE_AS] = menuitem; // Seperator menuitem = gtk_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); // Revert to Saved menuitem = gtk_image_menu_item_new_from_stock ("gtk-revert-to-saved", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (7)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_revert_activate), (gpointer) NULL); menuItem[REVERT] = menuitem; // Close menuitem = gtk_image_menu_item_new_from_stock ("gtk-close", accel_group); gtk_container_add (GTK_CONTAINER (submenu), menuitem); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (5)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_file_close_activate), (gpointer) NULL); menuItem[CLOSE] = menuitem; // Seperator #ifndef MAC_INTEGRATION menuitem = gtk_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); #endif // Quit GtkWidget *quit_item = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), quit_item); g_object_set_data (G_OBJECT (quit_item), "help-id", GINT_TO_POINTER (6)); g_signal_connect (G_OBJECT (quit_item), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (quit_item), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (quit_item), "activate", G_CALLBACK (on_widget_destroy), (gpointer) NULL); // Attach File Menu menuitem = gtk_menu_item_new_with_mnemonic ("_File"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu); gtk_container_add (GTK_CONTAINER (menu), menuitem); // Dialogue Menu submenu = gtk_menu_new (); // Settings menuitem = gtk_image_menu_item_new_with_mnemonic ("_Settings ..."); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU)); gtk_container_add (GTK_CONTAINER (submenu), menuitem); gtk_widget_add_accelerator (menuitem, "activate", accel_group, GDK_KEY_t, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (10)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_dialogue_player_activate), (gpointer) NULL); menuItem[SETTINGS] = menuitem; // Custom Functions menuitem = gtk_image_menu_item_new_with_mnemonic ("_Python Code ..."); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU)); gtk_container_add (GTK_CONTAINER (submenu), menuitem); gtk_widget_add_accelerator (menuitem, "activate", accel_group, GDK_KEY_p, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (11)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_dialogue_functions_activate), (gpointer) this); menuItem[FUNCTIONS] = menuitem; // Seperator menuitem = gtk_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); // Compile menuitem = gtk_image_menu_item_new_with_mnemonic ("_Compile"); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU)); gtk_container_add (GTK_CONTAINER (submenu), menuitem); gtk_widget_add_accelerator (menuitem, "activate", accel_group, GDK_KEY_c, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (12)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_dialogue_compile_activate), (gpointer) NULL); menuItem[COMPILE] = menuitem; // Preview i18n #ifdef ENABLE_NLS menuitem = gtk_menu_item_new_with_label ("Preview L10n"); gtk_container_add (GTK_CONTAINER (submenu), menuitem); gtk_widget_add_accelerator (menuitem, "activate", accel_group, GDK_KEY_v, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (13)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_dialogue_preview_activate), (gpointer) this); gtk_widget_show (menuitem); menuItem[PREVIEW] = menuitem; #endif // Run menuitem = gtk_image_menu_item_new_with_mnemonic ("_Execute ..."); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_MENU)); gtk_container_add (GTK_CONTAINER (submenu), menuitem); gtk_widget_add_accelerator (menuitem, "activate", accel_group, GDK_KEY_e, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (14)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_dialogue_run_activate), (gpointer) NULL); gtk_widget_show (menuitem); menuItem[RUN] = menuitem; // Attach Dialogue Menu menuitem = gtk_menu_item_new_with_mnemonic ("_Dialogue"); gtk_widget_show (menuitem); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); // Window Menu windowMenu = gtk_menu_new (); // Attach Window Menu menuitem = gtk_menu_item_new_with_mnemonic ("_Windows"); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), windowMenu); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); gtk_widget_show_all (menu); #ifdef MAC_INTEGRATION // Mac OSX-Style menu gtk_widget_hide (menu); mainMenu = menu; ige_mac_menu_set_menu_bar (GTK_MENU_SHELL (menu)); ige_mac_menu_set_quit_menu_item (GTK_MENU_ITEM (quit_item)); // IgeMacMenuGroup *group = ige_mac_menu_add_app_menu_group (); // ige_mac_menu_add_app_menu_item (group, GTK_MENU_ITEM (quit_item), NULL); #endif vpaned = gtk_vpaned_new (); gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 2); gtk_widget_show (vpaned); hpaned = gtk_hpaned_new (); gtk_paned_add1 (GTK_PANED (vpaned), hpaned); gtk_widget_show (hpaned); // Accelerators gtk_window_add_accel_group (GTK_WINDOW (wnd), accel_group); gtk_widget_realize (wnd); // Tree tree_ = new GuiTree (hpaned); // Drawing Area graph_ = new GuiGraph (hpaned); // List list_ = new GuiList (vpaned); // Status bars hbox = gtk_hbox_new (FALSE, 0); g_object_ref (hbox); g_object_set_data_full (G_OBJECT (wnd), "hbox", hbox, (GDestroyNotify) g_object_unref); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); gtk_widget_set_size_request (hbox, -1, 20); // help message g_object_ref (status_help); g_object_set_data_full (G_OBJECT (wnd), "status_help", status_help, (GDestroyNotify) g_object_unref); gtk_widget_show (status_help); gtk_box_pack_start (GTK_BOX (hbox), status_help, TRUE, TRUE, 0); gtk_widget_set_size_request (status_help, -1, 20); // program mode status_mode = gtk_statusbar_new (); g_object_ref (status_mode); g_object_set_data_full (G_OBJECT (wnd), "status_mode", status_mode, (GDestroyNotify) g_object_unref); gtk_widget_show (status_mode); gtk_box_pack_start (GTK_BOX (hbox), status_mode, FALSE, TRUE, 0); gtk_widget_set_size_request (status_mode, 150, -1); // Display MainWindow gtk_widget_show (wnd); // set the programm mode setMode (IDLE); // Display welcome message message->display (1000); // get the current working directory directory_ = g_get_current_dir (); // init the resources we will need GuiResources::init (graph_->drawingArea ()); clear (); } // dtor GuiDlgedit::~GuiDlgedit () { // cleanup if in preview mode if (mode_ == L10N_PREVIEW) { unlink ("/tmp/locale/xy/LC_MESSAGES/preview.mo"); rmdir ("/tmp/locale/xy/LC_MESSAGES"); rmdir ("/tmp/locale/xy"); rmdir ("/tmp/locale/"); } } // starts a new dialogue void GuiDlgedit::newDialogue () { // the new dialogue DlgModule *module = initDialogue ("untitled"); // Display the dialogue showDialogue (module); } // open recent file void GuiDlgedit::OnRecentFileActivated (const std::string & file) { loadDialogue (file); } // load a new dialogue void GuiDlgedit::loadDialogue (const std::string &f) { // make sure that file has an absolute path std::string file = ((f[0] == '/' || f[1] == ':') ? f : directory_ + std::string ("/") + f); gchar *fname = g_path_get_basename (file.c_str ()); // test if we have a valid dialogue if (!checkDialogue (file)) { message->display (-2, fname); g_free(fname); return; } // remember the current directory for later use directory_ = g_dirname (file.c_str ()); // get the name to use for the dialogue std::string filename (fname); // remove file extension unsigned long pos = filename.rfind (FILE_EXT); if (pos != filename.npos) filename.erase (pos); // the new dialogue DlgModule *module = initDialogue (filename); // try to load from file if (!module->load ()) { message->display (-3, filename.c_str ()); closeDialogue (); } // Display the dialogue else { // update list of previously opened files RecentFiles->registerFile(file, MIME_TYPE); message->display (200); showDialogue (module, true); } g_free(fname); } // load a sub-dialogue DlgModule* GuiDlgedit::loadSubdialogue (const std::string &file) { // test if we have a valid dialogue if (!checkDialogue (file)) return NULL; // remember the current directory for later use directory_ = g_dirname (file.c_str ()); // get the name to use for the dialogue gchar *fname = g_path_get_basename (file.c_str ()); std::string filename (fname); g_free (fname); // remove file extension unsigned long pos = filename.rfind (FILE_EXT); if (pos != filename.npos) filename.erase (pos); // the sub-dialogue DlgModule *module = new DlgModule (directory_, filename, "", ""); // parser needs to read from sub-dialogue source file parser_switch_input (); // try to load from file if (!module->load ()) { delete module; parser_restore_input (); return NULL; } // return the sub-dialogue return module; } // revert Dialogue to state on disk void GuiDlgedit::revertDialogue () { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // check whether dialogue (still) exists on disk if (!checkDialogue (module->fullName ())) { gtk_widget_set_sensitive (menuItem[REVERT], FALSE); message->display (-2, module->name ().c_str ()); return; } // cleanup module->clear (); // reload if (!module->load ()) { message->display (-3, module->name ().c_str ()); closeDialogue (); return; } // redisplay graph_->detachModule (); tree_->updateModule (module); graph_->attachModule (module); } // save a dialogue void GuiDlgedit::saveDialogue (const std::string &file) { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // remember the current directory for later use directory_ = g_dirname (file.c_str ()); // get the filename gchar *fname = g_path_get_basename (file.c_str ()); std::string filename (fname); g_free (fname); // remove file extension unsigned long pos = filename.rfind (FILE_EXT); if (pos != filename.npos) filename.erase (pos); // try to save file if (!module->save (directory_, filename)) message->display (-4, filename.c_str ()); else { message->display (201); // update list of previously opened files RecentFiles->registerFile(file, MIME_TYPE); // update 'Revert to Saved' menu item gtk_widget_set_sensitive (menuItem[REVERT], TRUE); // update the dialogue's name in case it has changed tree_->setName (module); initMenu (); } } // close the dialogue being displayed void GuiDlgedit::closeDialogue () { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // check whether dialogue has been saved // if (module->hasChanged ()) // remove the dialogue from the list of open dialogues dialogues_.erase (remove (dialogues_.begin (), dialogues_.end (), module), dialogues_.end ()); // detach module graph_->detachModule (); // if another dialogue is open, display that one if (dialogues_.size () > 0) showDialogue (dialogues_.front ()); // otherwise just clear the GUI else clear (); // rebuild the 'windows' menu initMenu (); // delete the dialogue delete module; } // display a certain dialogue void GuiDlgedit::showDialogue (DlgModule *module, bool center) { // remove the current module from the view graph_->detachModule (); // update the tree view // NOTE that this method does some magic: it will select and attach // the sub-dialogue of 'module' that has been viewed before. In that // case, 'module' must not be attached, as it is the toplevel dialogue. tree_->addModule (module); // attach the dialogue to the view // In case of a newly created or (re)loaded 'module', none of it's // sub-dialogues will have been in the view. Therefore, the call // above can't attach anything. Therefore we can attach 'module'. if (!graph_->getAttached ()) graph_->attachModule (module, center); // update the custom code entry if neccessary if (GuiCode::dialog != NULL) GuiCode::dialog->display (module->entry (), module->shortName ()); // update the settings if neccessary if (GuiSettings::dialog != NULL) GuiSettings::dialog->display (module->entry (), module->shortName ()); // update 'Revert to Saved' menu item if (!checkDialogue (module->fullName ())) gtk_widget_set_sensitive (menuItem[REVERT], FALSE); else gtk_widget_set_sensitive (menuItem[REVERT], TRUE); // update the window title initTitle (); } // compile a dialogue void GuiDlgedit::compileDialogue () { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // init the compiler DlgCompiler compiler (module); // compile compiler.run (); // enable the 'run' menuitem after successful compilation gtk_widget_set_sensitive (menuItem[RUN], TRUE); // report success message->display (212); } // edit the genral dialogu settings void GuiDlgedit::settings () { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // if the dialog isn't already open ... if (GuiSettings::dialog == NULL) GuiSettings::dialog = new GuiSettings (); // otherwise just show it std::string project = module->entry ()->project (); GuiSettings::dialog->display (module->entry (), module->shortName ()); } // edit custom code of current module void GuiDlgedit::customCode () { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // if the dialog isn't already open ... if (GuiCode::dialog == NULL) GuiCode::dialog = new GuiCode (); // otherwise just show it GuiCode::dialog->display (module->entry (), module->shortName ()); } // preview the translated dialogue void GuiDlgedit::previewTranslation (const std::string &catalogue) { DlgModule *module = graph_->dialogue (); if (module == NULL) return; // check if we have a proper catalogue if (strncmp (catalogue.substr (catalogue.length ()-3).c_str (), ".mo", 3)) { gchar *cname = g_path_get_basename (catalogue.c_str ()); message->display (-130, cname); g_free (cname); return; } // see if the file exists at all FILE *exists = g_fopen (catalogue.c_str (), "rb"); if (!exists) { gchar *cname = g_path_get_basename (catalogue.c_str ()); message->display (-2, cname); g_free (cname); return; } // if it does, check magic number of catalogue file else { unsigned int magic; // read magic number fread (&magic, 4, 1, exists); fclose (exists); if (magic != 0x950412de) { gchar *cname = g_path_get_basename (catalogue.c_str ()); message->display (-130, cname); g_free (cname); return; } } // create temporary locale directory #ifndef WIN32 if (mkdir ("/tmp/locale/", 0750) || mkdir ("/tmp/locale/xy", 0750) || mkdir ("/tmp/locale/xy/LC_MESSAGES", 0750)) #else if (mkdir ("tmp/locale/") || mkdir ("tmp/locale/xy") || mkdir ("tmp/locale/xy/LC_MESSAGES")) #endif { message->display (-131); return; } #ifndef WIN32 // create a symlink to the given catalogue symlink (catalogue.c_str (), "/tmp/locale/xy/LC_MESSAGES/preview.mo"); // set the language to use setenv ("LANGUAGE", "xy", 1); #else // create a symlink to the given catalogue // VISTA only: CreateSymbolicLink () // set the language to use SetEnvironmentVariable ("LANGUAGE", "xy"); #endif #ifdef ENABLE_NLS setlocale(LC_MESSAGES, "xy"); { // tell gettext that the language has changed extern int _nl_msg_cat_cntr; ++_nl_msg_cat_cntr; } #endif // open the catalogue bindtextdomain ("preview", "/tmp/locale"); textdomain ("preview"); // deselect selected node, if any DlgNode *node = module->deselectNode (); // update menuitem gtk_label_set_text (GTK_LABEL (gtk_bin_get_child (GTK_BIN(menuItem[PREVIEW]))), "Exit Preview mode"); // set program mode setMode (L10N_PREVIEW); message->display (130); // reselect node with proper translation if (node != NULL) module->selectNode (node); } // stop preview mode void GuiDlgedit::exitPreview () { DlgModule *module = graph_->dialogue (); // clear the program mode setMode (NUM_MODES); // restore the program mode if (module != NULL) { setMode (module->state ()); // deselect selected node, if any DlgNode *node = module->deselectNode (); // reselect node without translation if (node != NULL) module->selectNode (node); } // update menuitem gtk_label_set_text (GTK_LABEL (gtk_bin_get_child (GTK_BIN(menuItem[PREVIEW]))), "Preview Translation"); // cleanup unlink ("/tmp/locale/xy/LC_MESSAGES/preview.mo"); rmdir ("/tmp/locale/xy/LC_MESSAGES"); rmdir ("/tmp/locale/xy"); rmdir ("/tmp/locale/"); // clear the statusbar message->clear (); } void GuiDlgedit::setChanged () { // update tree tree_->setChanged (graph_->dialogue ()); // update title bar initTitle (); } void GuiDlgedit::updateProject () { // update tree tree_->updateProject (graph_->dialogue ()); } bool GuiDlgedit::checkDialogue (const std::string &file) { // first, open the file FILE *test = g_fopen (file.c_str (), "rb"); if (!test) return false; // check if it's a regular file struct stat statbuf; fstat (fileno (test), &statbuf); if (!S_ISREG (statbuf.st_mode)) { fclose (test); return false; } loadlgin = test; return true; } DlgModule *GuiDlgedit::initDialogue (std::string name) { // serial number std::string serial = g_strdup_printf ("-%i", ++number); // the new dialogue DlgModule *dlg = new DlgModule (directory_, name, serial, "New Dialogue"); // set project if dlgedit started with '-j' option dlg->entry()->setProject (DlgCmdline::project); // insert into the list of open dialogues dialogues_.push_back (dlg); // rebuild the 'Window' menu initMenu (); // activate all dialogue related menu-items gtk_widget_set_sensitive (menuItem[SAVE], TRUE); gtk_widget_set_sensitive (menuItem[SAVE_AS], TRUE); gtk_widget_set_sensitive (menuItem[CLOSE], TRUE); gtk_widget_set_sensitive (menuItem[SETTINGS], TRUE); gtk_widget_set_sensitive (menuItem[FUNCTIONS], TRUE); gtk_widget_set_sensitive (menuItem[COMPILE], TRUE); #ifdef ENABLE_NLS gtk_widget_set_sensitive (menuItem[PREVIEW], TRUE); #endif return dlg; } // sets the window title void GuiDlgedit::initTitle () { gchar *title = (char*) "Adonthell Dialogue Editor v" _VERSION_; DlgModule *module = graph_->dialogue (); if (module != NULL) { if (module->changed ()) title = g_strjoin (NULL, title, " - [", module->shortName ().c_str (), " (modified)]", NULL); else title = g_strjoin (NULL, title, " - [", module->shortName ().c_str (), "]", NULL); } gtk_window_set_title (GTK_WINDOW (wnd), title); } // init the 'windows' menu void GuiDlgedit::initMenu () { // first, remove everything from the menu gtk_container_foreach (GTK_CONTAINER (windowMenu), (GtkCallback)gtk_widget_destroy, NULL); // Now rebuild the menu if any dialogues remain if (dialogues_.size () == 0) return; int position = 0; std::vector::iterator i; // GtkAccelGroup *accel_group = gtk_accel_group_get_default (); GtkWidget *menuitem; for (i = dialogues_.begin (); i != dialogues_.end (); i++, position++) { menuitem = gtk_menu_item_new_with_label ((*i)->shortName ().c_str ()); gtk_container_add (GTK_CONTAINER (windowMenu), menuitem); g_signal_connect (G_OBJECT (menuitem), "activate", G_CALLBACK (on_window_activate), (gpointer) *i); g_object_set_data (G_OBJECT (menuitem), "help-id", GINT_TO_POINTER (20)); g_signal_connect (G_OBJECT (menuitem), "enter-notify-event", G_CALLBACK (on_display_help), message); g_signal_connect (G_OBJECT (menuitem), "leave-notify-event", G_CALLBACK (on_clear_help), message); gtk_widget_show (menuitem); // Menu Accelerators // if (position < 9) // gtk_widget_add_accelerator (menuitem, "activate", accel_group, // GDK_1 + position, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); } #ifdef MAC_INTEGRATION ige_mac_menu_sync(GTK_MENU_SHELL(mainMenu)); #endif } void GuiDlgedit::clear () { // update the window title initTitle (); // make the various menu-items insensitive gtk_widget_set_sensitive (menuItem[SAVE], FALSE); gtk_widget_set_sensitive (menuItem[SAVE_AS], FALSE); gtk_widget_set_sensitive (menuItem[REVERT], FALSE); gtk_widget_set_sensitive (menuItem[CLOSE], FALSE); gtk_widget_set_sensitive (menuItem[SETTINGS], FALSE); gtk_widget_set_sensitive (menuItem[FUNCTIONS], FALSE); gtk_widget_set_sensitive (menuItem[COMPILE], FALSE); #ifdef ENABLE_NLS gtk_widget_set_sensitive (menuItem[PREVIEW], FALSE); #endif gtk_widget_set_sensitive (menuItem[RUN], FALSE); // empty the graph and list widget graph_->clear (); list_->clear (); } void GuiDlgedit::setMode (mode_type mode) { const char *text; // get the string representing the current program state if (mode < IDLE || mode >= NUM_MODES) { text = " INVALID MODE"; mode_ = IDLE; } else { // ignore everything else as long as we are in preview mode if (mode_ == L10N_PREVIEW) return; text = progState[mode]; mode_ = mode; } // some context id the statusbar needs for some reason int id = gtk_statusbar_get_context_id (GTK_STATUSBAR (status_mode), "Mode"); // remove the previous message gtk_statusbar_pop (GTK_STATUSBAR (status_mode), id); // add the new status gtk_statusbar_push (GTK_STATUSBAR (status_mode), id, text); } // get the full path/name/extension of a dialogue std::string GuiDlgedit::filename () { DlgModule *module = graph_->dialogue (); return module->fullName (); } adonthell-0.3.8/src/tools/dlgedit/dlg_node_gfx.cc0000664000175000017500000000221712756054414016722 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_node_gfx.cc * * @author Kai Sterker * @brief Base class for a DlgNode's graphical representation. */ #include "dlg_node_gfx.h" // blit part of widget to the screen void DlgNodeGfx::update (GtkWidget *widget, DlgRect &area) { if (widget) { GdkRectangle rect = (GdkRectangle) area; gdk_window_invalidate_rect (gtk_widget_get_window(widget), &rect, FALSE); } } adonthell-0.3.8/src/tools/dlgedit/cfg_data.h0000664000175000017500000000552512756054075015705 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file cfg_data.h * * @author Kai Sterker * @brief dlgedit configuration data */ #ifndef CFG_DATA_H #define CFG_DATA_H #include #include #include "cfg_project.h" /** * This class keeps track of the actual configuration settings. * It also checks those settings for correctness as far as that * is possible. * * Settings will be added or changed in two ways: at program * startup through reading ~/.adonthell/dlgeditrc and at run-time * through changes made by the user. */ class CfgData { public: /** * Constructor. Initialize global CfgData::data pointer. */ CfgData (); /** * Destructor. Delete all Project entries. */ ~CfgData (); /** * Adds a project to the list of projects and loads all project * specific data. The number of projects isn't limited. * @param project name of the project to add. */ void addProject (const std::string & project); /** * Return the names of all projects in the current data directory. * This list also includes the default project 'none', so it is * non-empty even if the data directory contains no projects yet. */ std::vector projectsFromDatadir (); /** * Assign a (new) base directory to the given project. If no * such project exists yet, it will be created. * @param project name of the project to modify/create. * @param basedir directory to assign to this project. */ void setBasedir (const std::string & project, const std::string & basedir); /** * Return the base directory associated with a given project. * In case there is no such project, or no basedir assigned, * return "" (the empty string). */ std::string getBasedir (const std::string & project); /** * Save data to disk. * @param file file to save data to. */ void save (std::ofstream & file); /** * Global access to the dlgedit configuration */ static CfgData *data; private: std::vector Projects; // list of defined projects }; #endif // CFG_DATA_H adonthell-0.3.8/src/tools/dlgedit/dlg_cmdline.h0000664000175000017500000000431212756054254016406 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_cmdline.h * * @author Kai Sterker * @brief Methods to parse the dlgedit commandline. */ #ifndef DLG_CMDLINE_H #define DLG_CMDLINE_H #include /** * Apart from the above, DlgCmdline stores the various options * that can be specified on the command line */ class DlgCmdline { public: /** * The method doing all the work. To be called right after * dlgedit is launched. * @param argc argument count * @param argv argument vector * @return false indicates that the program shall quit */ static bool parse (int argc, char* argv[]); /** * The directory where dlgedit searches for projects. */ static std::string datadir; /** * The project. This is the directory that contains the character- * and quest data dlgedit needs to (properly) compile dialogues * making use of advanced Python scripting features. */ static std::string project; /** * This is set to true to indicate that only the dialogue * compiler should be run on the given sourcefiles, without launching * the GUI. After all files are compiled, dlgedit exits. */ static bool compile; /** * The index in the argument vector pointing to the first non-option. * With a bit of luck, this is one or more dialogue sources. */ static int sources; private: static void help (const std::string &program); }; #endif // DLG_CMDLINE_H adonthell-0.3.8/src/tools/dlgedit/gui_code.cc0000664000175000017500000001517712756054577016104 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include "gui_code.h" #include "gui_dlgedit.h" /** * @file gui_code.cc * * @author Kai Sterker * @brief The Custom Code dialog */ // OK button pressed void on_button_ok_clicked (GtkButton *button, gpointer user_data) { GuiCode::dialog->applyChanges (); delete GuiCode::dialog; } // callback for closing the window void on_close_window (GtkButton *button, gpointer user_data) { delete GuiCode::dialog; } // global pointer to the dialog GuiCode *GuiCode::dialog = NULL; // ctor GuiCode::GuiCode () { GtkWidget *vbox; GtkWidget *notebook; GtkWidget *label; GtkWidget *hbuttonbox; GtkWidget *button_ok; GtkWidget *button_cancel; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_object_set_data (G_OBJECT (window), "window", window); gtk_widget_set_size_request (window, 400, 320); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); vbox = gtk_vbox_new (FALSE, 2); g_object_ref (vbox); g_object_set_data_full (G_OBJECT (window), "vbox", vbox, (GDestroyNotify) g_object_unref); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (window), vbox); notebook = gtk_notebook_new (); g_object_ref (notebook); g_object_set_data_full (G_OBJECT (window), "notebook", notebook, (GDestroyNotify) g_object_unref); gtk_widget_show (notebook); gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0); // entry for import statements imports = new GuiEdit (notebook); gtk_widget_set_tooltip_text (imports->widget (), "Additional modules can be included here"); label = gtk_label_new ("Imports"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), label); // entry for constructor code ctor = new GuiEdit (notebook); gtk_widget_set_tooltip_text (ctor->widget (), "Code entered here will be added to the dialogue's __init__ method"); label = gtk_label_new ("Constructor"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), label); // entry for destructor code dtor = new GuiEdit (notebook); gtk_widget_set_tooltip_text (dtor->widget (), "This entry allows you to add additional code to the __del__ method of the dialogue"); label = gtk_label_new ("Destructor"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), label); // entry for custom methods methods = new GuiEdit (notebook); gtk_widget_set_tooltip_text (methods->widget (), "Custom methods to be inserted into the dialogue"); label = gtk_label_new ("Methods"); g_object_ref (label); g_object_set_data_full (G_OBJECT (window), "label", label, (GDestroyNotify) g_object_unref); gtk_widget_show (label); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3), label); // buttons hbuttonbox = gtk_hbutton_box_new (); g_object_ref (hbuttonbox); g_object_set_data_full (G_OBJECT (window), "hbuttonbox", hbuttonbox, (GDestroyNotify) g_object_unref); gtk_widget_show (hbuttonbox); gtk_box_pack_start (GTK_BOX (vbox), hbuttonbox, FALSE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (hbuttonbox), 10); // OK button button_ok = gtk_button_new_with_label ("OK"); g_object_ref (button_ok); g_object_set_data_full (G_OBJECT (window), "button_ok", button_ok, (GDestroyNotify) g_object_unref); gtk_widget_show (button_ok); gtk_container_add (GTK_CONTAINER (hbuttonbox), button_ok); gtk_widget_set_can_default (button_ok, TRUE); // Cancel button button_cancel = gtk_button_new_with_label ("Cancel"); g_object_ref (button_cancel); g_object_set_data_full (G_OBJECT (window), "button_cancel", button_cancel, (GDestroyNotify) g_object_unref); gtk_widget_show (button_cancel); gtk_container_add (GTK_CONTAINER (hbuttonbox), button_cancel); gtk_widget_set_can_default (button_cancel, TRUE); g_signal_connect (G_OBJECT (button_ok), "clicked", G_CALLBACK (on_button_ok_clicked), NULL); g_signal_connect (G_OBJECT (button_cancel), "clicked", G_CALLBACK (on_close_window), NULL); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (on_close_window), window); // set transient for dialogue editor main window gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (GuiDlgedit::window->getWindow ())); dialog = this; entry = NULL; } // dtor GuiCode::~GuiCode () { gtk_widget_destroy (window); dialog = NULL; } // display the dialog void GuiCode::display (DlgModuleEntry *e, const std::string &name) { if (entry != e) { entry = e; // display the contents of the module imports->setText (entry->imports ()); ctor->setText (entry->ctor ()); dtor->setText (entry->dtor ()); methods->setText (entry->methods ()); } // set the title gchar *title = g_strjoin (NULL, "Custom Python Code - [", name.c_str (), "]", NULL); gtk_window_set_title (GTK_WINDOW (window), title); // now show the window gtk_widget_show (window); } // store the user's entries void GuiCode::applyChanges () { entry->setImports (imports->getText ()); entry->setCtor (ctor->getText ()); entry->setDtor (dtor->getText ()); entry->setMethods (methods->getText ()); } adonthell-0.3.8/src/tools/dlgedit/dlg_node.h0000664000175000017500000001502013041136177015707 00000000000000/* Copyright (C) 2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_node.h * * @author Kai Sterker * @brief Base class for the dialogue objects. */ #ifndef DLG_NODE_H #define DLG_NODE_H #include #include #include #include #include "dlg_node_gfx.h" /* * Function to read the next token from dialogue source file * @param str used to return string values * @param i used to return numeric values * @return Type of token read as defined in dlg_types.h */ extern int parse_dlgfile (std::string &str, int &i); /** * File pointer for dialogue source files being parsed. */ extern FILE *loadlgin; /** * This is the base class for all dialogue objects. As this, it has three * major purposes: * * - provide means for a graphical representation of the node in the Graph * window. This functionality is inherited from the DlgNodeGfx class. * * - provide the glue between different Nodes, thus forming the actual graph. * * - provide a unique interface to the different flavours of Nodes in the * graph. */ class DlgNode : public DlgNodeGfx { public: DlgNode () { index_ = -1; } DlgNode (node_type t, DlgRect area); /** * @name Methods for graph traversal */ //@{ /** * Get a node from this node's list of direct followers. * @param pos Defines what to do with the iterator of that list. * @param offset Move the iterator by that offset. * @return The node found at the specified offset from the given * iterator position. * @see query_type */ DlgNode* next (query_type pos, int offset = 1); /** * Get a node from this node's list of direct predecessors. * @param pos Defines what to do with the iterator of that list. * @param offset Move the iterator by that offset. * @return The node found at the specified offset from the given * iterator position. * @see query_type */ DlgNode* prev (query_type pos, int offset = 1); //@} /** * @name Node insertion */ //@{ /** * Add a node to the list of predecessors. The nodes are sorted by their * position. The ones with the smallest y value come first; if nodes have * the same y value, then those with the smallest x value come first. * @param node the DlgNode to add. */ void addPrev (DlgNode *node); /** * Add a node to the list of followers. * @param node the DlgNode to add. */ void addNext (DlgNode *node); //@} /** * @name Node removal */ //@{ /** * Remove a node from the list of precedessors. * @param node the DlgNode to remove. */ void removePrev (DlgNode *node); /** * Remove a node from the list of followers. * @param node the DlgNode to remove. */ void removeNext (DlgNode *node); //@} /** * Draw this node to the given surface. During drawing, the mode is * temporarily changed to the given mode. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing * @param mode the new mode of the node */ void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget, mode_type mode); /** * Draw this node to the given surface. * @param surface the cairo_surface_t to draw to * @param offset the DlgPoint to use as offset * @param widget the GtkWidget to update after drawing */ virtual void draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget) { } /** * Save a node to file * @param out Stream to the file to save to */ virtual void save (std::ofstream &out) { } /** * Get the type of the node. * @return the type of the node. */ node_type &type () { return type_; } /** * Return the node's unique id. This is given when the node is * created and will never change from then on. It can be used * to correctly identify nodes of subdialogues and the like. * @return unique id of the node. */ int node_id () { return nid_; } /** * Returns id of the module this node belongs to. It allows us * to tell nodes of different modules apart. Together with the * node id, this gives each node a unique id. * @return module id. */ int module_id () { return mid_; } /** * Get the index of this node. Used by DlgCompile. * @return the node's index. */ int index () { return index_; } /** * Set the index of this node. Used by DlgCompile. * @param i the index to use for this node. */ void setIndex (int i) { index_ = i; } protected: node_type type_; // type of the node int index_; // used by DlgCompiler int nid_; // unique id of the node int mid_; // unique id of module node belongs to std::list prev_; // list of node's parents std::list next_; // list of node's children std::list::iterator p; // iterator over parents std::list::iterator n; // iterator over children DlgNode* getNode (std::list::iterator &it, std::list &lst, query_type &pos, int &offset); void drawPolygon (cairo_t *cr, const GdkColor *color, const bool & filled, const DlgPoint *points, const int &num_points); void drawCircle (cairo_t *cr, const GdkColor *color, const bool & filled, const int & x, const int & y, const int & radius); void drawRectangle (cairo_t *cr, const GdkColor *color, const bool & filled, const int & x, const int & y, const int & width, const int & height); }; #endif // DLG_NODE_H adonthell-0.3.8/src/tools/dlgedit/gui_edit.cc0000664000175000017500000000450212756054663016101 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_edit.cc * * @author Kai Sterker * @brief Wrapper around the gtkeditor widget. */ #include #include "gui_edit.h" // ctor GuiEdit::GuiEdit (GtkWidget *container) { // let the editor be scrollable GtkWidget *scrolled = gtk_scrolled_window_new (0, 0); gtk_container_add (GTK_CONTAINER (container), scrolled); gtk_container_set_border_width (GTK_CONTAINER (scrolled), 4); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_widget_show (scrolled); // create the editor entry = gtk_text_buffer_new (NULL); view = gtk_text_view_new_with_buffer (entry); gtk_container_add (GTK_CONTAINER (scrolled), view); gtk_widget_set_can_default(view, TRUE); gtk_text_view_set_editable (GTK_TEXT_VIEW(view), TRUE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(view), GTK_WRAP_WORD); gtk_widget_show (view); // use a fixed size font PangoFontDescription *font_desc = pango_font_description_from_string ("Fixed Monospace 12"); gtk_widget_modify_font (view, font_desc); pango_font_description_free (font_desc); } // dtor GuiEdit::~GuiEdit () { } // set the entry's text void GuiEdit::setText (const std::string &text) { gtk_text_buffer_set_text (entry, text.c_str (), -1); } // return the entry's text std::string GuiEdit::getText () { GtkTextIter start, end; gtk_text_buffer_get_bounds (entry, &start, &end); gchar *tmp = gtk_text_buffer_get_text (entry, &start, &end, TRUE); std::string text (tmp); g_free (tmp); return text; } adonthell-0.3.8/src/tools/dlgedit/gui_modal_dialog.h0000664000175000017500000000447412756055106017432 00000000000000/* Copyright (C) 2002/2004 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_modal_dialog.h * * @author Kai Sterker * @brief Base class for modal dialog windows */ #ifndef GUI_MODAL_DIALOG_H #define GUI_MODAL_DIALOG_H #include /** * Encapsulates the most basic functionality a modal/transient dialog window needs. */ class GuiModalDialog { public: /** * Initialize the dialog window. * @param p parent of the dialog. * @param m whether the dialog is model or just transient. */ GuiModalDialog (GtkWindow *p, const bool & m = true); /* * Destroy the dialog window. */ virtual ~GuiModalDialog (); /** * Displays the dialog window and sets it transient for the dlgedit main window. * @return the state of pressedOK. This should be set to true if the dialog * was closed via the OK button. By default it is false. */ virtual bool run (); /** * Indicate whether the OK button of the dialog has been pressed. * @param button Set this to true if the OK button has been pressed, * otherwise to false */ void okButtonPressed (bool button) { pressedOK = button; } /** * Get the dialog window. * @return the dialog window. */ GtkWidget *getWindow () { return window; } protected: /// whether the Cancel or OK button has been pushed bool pressedOK; /// whether the dialog is truly modal or merely transient bool modal; /// the dialog window GtkWidget *window; /// parent of the dialog. GtkWindow *parent; }; #endif // GUI_MODAL_DIALOG_H adonthell-0.3.8/src/tools/dlgedit/dlg_circle.cc0000664000175000017500000002136312756054220016370 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_circle.cc * * @author Kai Sterker * @brief The node containing the actual dialogue text. */ #include "dlg_circle.h" #include "gui_resources.h" // Constructor DlgCircle::DlgCircle (DlgPoint &p, node_type t, int nid, int mid, DlgCircleEntry *e) { type_ = t; nid_ = nid; mid_ = mid; entry_ = (e ? e : new DlgCircleEntry); // Align Circle to the (imaginary) grid top_left = DlgPoint (p.x () - (p.x () % CIRCLE_DIAMETER), p.y () - (p.y () % CIRCLE_DIAMETER)); bottom_right = DlgPoint (x () + CIRCLE_DIAMETER, y () + CIRCLE_DIAMETER); // make sure the point lies still within the circle p = center (); } // dtor DlgCircle::~DlgCircle () { if (entry_) delete entry_; } // get a certain parent-circle of this circle DlgCircle *DlgCircle::parent (query_type pos, int offset) { DlgNode *arrow = prev (pos, offset); if (arrow != NULL) return (DlgCircle *) arrow->prev (FIRST); else return NULL; } // get a certain child-circle of this circle DlgCircle *DlgCircle::child (query_type pos, int offset) { DlgNode *arrow = next (pos, offset); if (arrow != NULL) return (DlgCircle *) arrow->next (FIRST); else return NULL; } // check whether the given node is a child of this circle bool DlgCircle::hasChild (DlgNode *child) { std::list::iterator j; for (j = next_.begin (); j != next_.end (); j++) if (child == (*j)->next (FIRST)) return true; return false; } // draw the circle void DlgCircle::draw (cairo_surface_t *surface, DlgPoint &os, GtkWidget *widget) { cairo_t *cr = cairo_create (surface); // get the color and fill for drawing the circle const GdkColor *gc = GuiResources::getColor (mode_, type_); const GdkColor *fgc = GuiResources::getFill (mode_, type_); // offset circle DlgPoint position = center ().offset (os); DlgPoint tmp = topLeft ().offset (os); DlgRect area (tmp, width () + 1, height () + 1); // draw everything to the surface - First border drawCircle (cr, gc, TRUE, position.x (), position.y (), CIRCLE_RADIUS); // add a small circle inside that indicates the type (NPC, Player) drawCircle (cr, fgc, TRUE, position.x (), position.y (), CIRCLE_RADIUS-2); // Indicate whether node contains additional code if (hasCode () || entry_->loop ()) { GString *code = g_string_sized_new (2); if (hasCode ()) g_string_append_c (code, '!'); if (entry_->loop ()) g_string_append_c (code, 'o'); // get the font to use const PangoFontDescription *desc = pango_layout_get_font_description (GuiResources::font ()); // create pango cairo compatible layout PangoLayout *font = pango_cairo_create_layout(cr); pango_layout_set_font_description (font, desc); pango_layout_set_text (font, code->str, -1); // place text in circles center int w, h; pango_layout_get_pixel_size (font, &w, &h); int x = tmp.x () + (width () - w) / 2; int y = tmp.y () + (height () + 1 - h) / 2; // set font color and position gdk_cairo_set_source_color(cr, gc); pango_cairo_update_layout (cr, font); cairo_move_to(cr, x, y); // draw text pango_cairo_show_layout (cr, font); g_object_unref(font); g_string_free (code, TRUE); } // Update the drawing area update (widget, area); cairo_destroy(cr); } // load a circle from a file bool DlgCircle::load () { entry_ = new DlgCircleEntry; std::string str; int n; // as long as we haven't reached EOF or are finished with loading: while (1) { // look what we find in the file switch (parse_dlgfile (str, n)) { // EOF or finished case 0: case LOAD_END: return true; // Type of node case LOAD_TYPE: { if (parse_dlgfile (str, n) == LOAD_NUM) type_ = (node_type) n; break; } // Loop case LOAD_LOOP: { if (parse_dlgfile (str, n) == LOAD_NUM) entry_->setLoop (n); break; } // Module and Node id of Circle case LOAD_ID: { if (parse_dlgfile (str, n) == LOAD_NUM) nid_ = n; break; } // Coordinates of Circle case LOAD_POS: { int px, py; if (parse_dlgfile (str, n) == LOAD_NUM) px = n; if (parse_dlgfile (str, n) == LOAD_NUM) py = n; // Align Circle to the (imaginary) grid top_left = DlgPoint (px - (px % CIRCLE_DIAMETER), py - (py % CIRCLE_DIAMETER)); bottom_right = DlgPoint (x () + CIRCLE_DIAMETER, y () + CIRCLE_DIAMETER); break; } // The Circle's Text case LOAD_TEXT: { if (parse_dlgfile (str, n) == LOAD_STR) entry_->setText (str); break; } // The Circle's Annotations case LOAD_NOTE: { if (parse_dlgfile (str, n) == LOAD_STR) entry_->setAnnotation (str); break; } // The Circle's Character case LOAD_NPC: { if (parse_dlgfile (str, n) == LOAD_STR) entry_->setNpc (str); break; } // The Circle's Conditions case LOAD_COND: { if (parse_dlgfile (str, n) == LOAD_STR) entry_->setCondition (str); break; } // The Circle's Variables case LOAD_VARS: { if (parse_dlgfile (str, n) == LOAD_STR) entry_->setCode (str); break; } // Just ignore everything else default: break; } } return true; } // save all data neccessary to restore the circle void DlgCircle::save (std::ofstream &file) { // Keyword "Circle" and circle's number file << "\nCircle\n"; // circle's type file << " Type " << (int) type () << "\n"; // circle's id file << " Id " << nid_ << "\n"; // circle's position file << " Pos " << x () << " " << y () << "\n"; // circle's annotation if (entry_->annotation () != "") file << " Note \xa7" << entry_->annotation () << "\xa7\n"; // circle's text file << " Text \xa7" << entry_->text () << "\xa7\n"; // circle's character if (type_ == NPC && entry_->npc () != "Default") file << " NPC \xa7" << entry_->npc () << "\xa7\n"; // circle's condition(s) if (entry_->condition () != "") file << " Cond \xa7" << entry_->condition () << "\xa7\n"; // circle's code if (entry_->code () != "") file << " Vars \xa7" << entry_->code () << "\xa7\n"; // loop if (entry_->loop () != false) file << " Loop 1\n"; file << "End\n"; } // get the text of a circle std::string DlgCircle::text () { std::string text = ""; // is there any text at all? if (entry_ == NULL) return text; // is a certain NPC attached? if (type_ == NPC && entry_->npc () != "Default") { text += entry_->npc (); text += ": "; } // append actual text and return it return text += entry_->text (); } // get tooltip text of the circle std::string DlgCircle::tooltip () { std::string text = ""; // is there any text at all? if (entry_ == NULL) return text; // are there a one or more conditions? if (entry_->condition () != "") { text += entry_->condition (); text += "\n\n"; } // append text text += DlgCircle::text (); // is there further code? if (entry_->code () != "") { text += "\n\n"; text += entry_->code (); } return text; } adonthell-0.3.8/src/tools/dlgedit/kb_traverse.cc0000664000175000017500000001147012756055310016607 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file kb_traverse.cc * * @author Kai Sterker * @brief Graph traversal via keyboard */ #include #include #include "kb_traverse.h" // ctor KBTraverse::KBTraverse () { } // dtor KBTraverse::~KBTraverse () { clear (); } // move to prev element DlgNode* KBTraverse::left () { if (Siblings.empty ()) return NULL; // get prev node if (Current == Siblings.begin ()) Current = Siblings.end (); Current--; // select it return *Current; } // move to next element DlgNode* KBTraverse::right () { if (Siblings.empty ()) return NULL; // get next node if (++Current == Siblings.end ()) Current = Siblings.begin (); // select it return *Current; } // move to parent DlgNode* KBTraverse::up () { if (Siblings.empty ()) return NULL; // try to select parent if (selectParents ()) return *Current; else return NULL; } // move to child DlgNode* KBTraverse::down () { if (Siblings.empty ()) return NULL; // try to select child if (selectChildren ()) return *Current; else return NULL; } // select parents of a node bool KBTraverse::selectParents () { DlgNode *parent; DlgNode *current = *Current; // get first parent DlgNode *arrow = current->prev (FIRST); if (arrow != NULL) parent = arrow->prev (FIRST); else return false; // cleanup clear (); while (parent != NULL) { addSibling (parent); // get subsequent parents arrow = current->prev (NEXT); if (arrow != NULL) parent = arrow->prev (FIRST); else parent = NULL; } // select first parent Current = Siblings.begin (); return true; } // select children of a node bool KBTraverse::selectChildren () { DlgNode *child; DlgNode *current = *Current; // get first parent DlgNode *arrow = current->next (FIRST); if (arrow != NULL) child = arrow->next (FIRST); else return false; // cleanup clear (); while (child != NULL) { addSibling (child); // get subsequent children arrow = current->next (NEXT); if (arrow != NULL) child = arrow->next (FIRST); else child = NULL; } // select first parent Current = Siblings.begin (); return true; } // select a certain node bool KBTraverse::select (DlgNode *node) { if (node == NULL) return false; // root node if (node->prev (FIRST) == NULL) { clear (); Siblings.push_back (node); Current = Siblings.begin (); return true; } DlgNode *prev; // cleanup clear (); // make sure node ain't a link if (node->type () == LINK) { prev = node->prev (FIRST); node = node->next (FIRST); } else { prev = node->prev (FIRST)->prev (FIRST); } // select children of parent node (i.e. siblings of node) Siblings.push_back (prev); Current = Siblings.begin (); selectChildren (); // actually select node Current = find (Siblings.begin (), Siblings.end (), node); return true; } // select root node DlgNode* KBTraverse::selectRoot (std::vector *nodes) { std::vector::iterator i; // cleanup clear (); // find all the root nodes for (i = nodes->begin (); i != nodes->end (); i++) if ((*i)->type () != LINK) if ((*i)->prev (FIRST) == NULL) addSibling (*i); // actually select node Current = Siblings.begin (); return *Current; } // clear list of Siblings void KBTraverse::clear () { Siblings.clear (); Current = Siblings.end (); } // add node to list of siblings void KBTraverse::addSibling (DlgNode *node) { std::list::iterator i = Siblings.begin (); DlgRect *cmp1, *cmp2 = node->type () == LINK ? node->next (FIRST) : node; // search the proper place for insertion while (i != Siblings.end ()) { cmp1 = (*i)->type () == LINK ? (*i)->next (FIRST) : *i; if (*cmp2 < *cmp1) break; i++; } // insert Siblings.insert (i, node); } adonthell-0.3.8/src/tools/dlgedit/lex.loadlg.cc0000664000175000017500000015051012756057103016332 00000000000000#line 2 "lex.loadlg.cc" #line 4 "lex.loadlg.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer loadlg_create_buffer #define yy_delete_buffer loadlg_delete_buffer #define yy_flex_debug loadlg_flex_debug #define yy_init_buffer loadlg_init_buffer #define yy_flush_buffer loadlg_flush_buffer #define yy_load_buffer_state loadlg_load_buffer_state #define yy_switch_to_buffer loadlg_switch_to_buffer #define yyin loadlgin #define yyleng loadlgleng #define yylex loadlglex #define yylineno loadlglineno #define yyout loadlgout #define yyrestart loadlgrestart #define yytext loadlgtext #define yywrap loadlgwrap #define yyalloc loadlgalloc #define yyrealloc loadlgrealloc #define yyfree loadlgfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE loadlgrestart(loadlgin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int loadlgleng; extern FILE *loadlgin, *loadlgout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up loadlgtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up loadlgtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via loadlgrestart()), so that the user can continue scanning by * just pointing loadlgin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when loadlgtext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int loadlgleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow loadlgwrap()'s to do buffer switches * instead of setting up a fresh loadlgin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void loadlgrestart (FILE *input_file ); void loadlg_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE loadlg_create_buffer (FILE *file,int size ); void loadlg_delete_buffer (YY_BUFFER_STATE b ); void loadlg_flush_buffer (YY_BUFFER_STATE b ); void loadlgpush_buffer_state (YY_BUFFER_STATE new_buffer ); void loadlgpop_buffer_state (void ); static void loadlgensure_buffer_stack (void ); static void loadlg_load_buffer_state (void ); static void loadlg_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER loadlg_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE loadlg_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE loadlg_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE loadlg_scan_bytes (yyconst char *bytes,int len ); void *loadlgalloc (yy_size_t ); void *loadlgrealloc (void *,yy_size_t ); void loadlgfree (void * ); #define yy_new_buffer loadlg_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ loadlgensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ loadlg_create_buffer(loadlgin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ loadlgensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ loadlg_create_buffer(loadlgin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) #define loadlgwrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *loadlgin = (FILE *) 0, *loadlgout = (FILE *) 0; typedef int yy_state_type; extern int loadlglineno; int loadlglineno = 1; extern char *loadlgtext; #define yytext_ptr loadlgtext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up loadlgtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ loadlgleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 34 #define YY_END_OF_BUFFER 35 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[113] = { 0, 0, 0, 0, 0, 0, 0, 35, 33, 32, 32, 1, 33, 31, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 28, 30, 29, 27, 26, 34, 32, 1, 1, 31, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 27, 0, 0, 0, 0, 0, 4, 0, 0, 21, 0, 0, 0, 15, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 12, 23, 22, 14, 0, 8, 19, 0, 16, 7, 10, 6, 20, 17, 11, 5, 13, 3, 0, 0, 0, 2, 18, 25, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 7, 1, 8, 9, 10, 11, 12, 1, 13, 1, 1, 14, 15, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 22, 23, 24, 1, 1, 1, 25, 26, 27, 28, 29, 30, 31, 32, 1, 33, 34, 35, 36, 37, 38, 39, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[42] = { 0, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 } ; static yyconst flex_int16_t yy_base[118] = { 0, 0, 0, 103, 102, 40, 42, 142, 145, 44, 46, 138, 134, 133, 105, 25, 102, 106, 99, 110, 28, 28, 102, 40, 21, 111, 38, 110, 145, 0, 145, 0, 145, 145, 63, 127, 145, 123, 95, 94, 96, 94, 93, 100, 92, 91, 145, 98, 89, 87, 94, 108, 86, 75, 78, 78, 39, 89, 71, 77, 75, 0, 0, 76, 84, 82, 71, 70, 145, 80, 78, 145, 73, 67, 62, 145, 73, 61, 71, 145, 57, 67, 67, 42, 52, 41, 36, 45, 145, 145, 145, 145, 48, 145, 145, 41, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 44, 34, 31, 145, 145, 145, 145, 78, 81, 84, 87, 89 } ; static yyconst flex_int16_t yy_def[118] = { 0, 112, 1, 113, 113, 114, 114, 112, 112, 112, 112, 115, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 116, 112, 117, 112, 112, 112, 115, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 116, 117, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 0, 112, 112, 112, 112, 112 } ; static yyconst flex_int16_t yy_nxt[187] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 28, 32, 33, 32, 33, 34, 34, 34, 34, 39, 46, 55, 48, 56, 111, 40, 51, 47, 49, 41, 52, 58, 80, 53, 34, 34, 110, 109, 108, 81, 54, 107, 106, 105, 104, 103, 102, 59, 29, 29, 29, 31, 31, 31, 35, 35, 35, 61, 61, 62, 101, 62, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 37, 36, 60, 57, 50, 45, 44, 43, 42, 38, 37, 37, 36, 112, 30, 30, 7, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112 } ; static yyconst flex_int16_t yy_chk[187] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 6, 6, 9, 9, 10, 10, 15, 20, 24, 21, 24, 108, 15, 23, 20, 21, 15, 23, 26, 56, 23, 34, 34, 107, 106, 95, 56, 23, 92, 87, 86, 85, 84, 83, 26, 113, 113, 113, 114, 114, 114, 115, 115, 115, 116, 116, 117, 82, 117, 81, 80, 78, 77, 76, 74, 73, 72, 70, 69, 67, 66, 65, 64, 63, 60, 59, 58, 57, 55, 54, 53, 52, 51, 50, 49, 48, 47, 45, 44, 43, 42, 41, 40, 39, 38, 37, 35, 27, 25, 22, 19, 18, 17, 16, 14, 13, 12, 11, 7, 4, 3, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int loadlg_flex_debug; int loadlg_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *loadlgtext; #line 1 "loadlg.l" #line 2 "loadlg.l" /* Copyright (C) 2000/2002/2003 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ #include #include #include "dlg_types.h" #define YY_DECL int parse_dlgfile (std::string &mytext, int &mynum) // definitions for using 'includes' #define MAX_INCLUDE_DEPTH 10 YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; int include_stack_ptr = 0; // switch to another file for input void parser_switch_input () { include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER; loadlg_switch_to_buffer (loadlg_create_buffer (loadlgin, YY_BUF_SIZE)); } // return to previous file void parser_restore_input () { loadlg_delete_buffer (YY_CURRENT_BUFFER); loadlg_switch_to_buffer (include_stack[include_stack_ptr]); } #line 601 "lex.loadlg.cc" #define INITIAL 0 #define text 1 #define module 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int loadlglex_destroy (void ); int loadlgget_debug (void ); void loadlgset_debug (int debug_flag ); YY_EXTRA_TYPE loadlgget_extra (void ); void loadlgset_extra (YY_EXTRA_TYPE user_defined ); FILE *loadlgget_in (void ); void loadlgset_in (FILE * in_str ); FILE *loadlgget_out (void ); void loadlgset_out (FILE * out_str ); int loadlgget_leng (void ); char *loadlgget_text (void ); int loadlgget_lineno (void ); void loadlgset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int loadlgwrap (void ); #else extern int loadlgwrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( loadlgtext, loadlgleng, 1, loadlgout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( loadlgin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( loadlgin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, loadlgin))==0 && ferror(loadlgin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(loadlgin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int loadlglex (void); #define YY_DECL int loadlglex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after loadlgtext and loadlgleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 52 "loadlg.l" #line 791 "lex.loadlg.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! loadlgin ) loadlgin = stdin; if ( ! loadlgout ) loadlgout = stdout; if ( ! YY_CURRENT_BUFFER ) { loadlgensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = loadlg_create_buffer(loadlgin,YY_BUF_SIZE ); } loadlg_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of loadlgtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 113 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 112 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 54 "loadlg.l" ; /* Eat up comments */ YY_BREAK case 2: YY_RULE_SETUP #line 56 "loadlg.l" return LOAD_CIRCLE; YY_BREAK case 3: YY_RULE_SETUP #line 57 "loadlg.l" return LOAD_ARROW; YY_BREAK case 4: YY_RULE_SETUP #line 58 "loadlg.l" return LOAD_END; YY_BREAK case 5: YY_RULE_SETUP #line 59 "loadlg.l" return LOAD_TYPE; YY_BREAK case 6: YY_RULE_SETUP #line 60 "loadlg.l" return LOAD_PREV; YY_BREAK case 7: YY_RULE_SETUP #line 61 "loadlg.l" return LOAD_NEXT; YY_BREAK case 8: YY_RULE_SETUP #line 62 "loadlg.l" return LOAD_LINK; YY_BREAK case 9: YY_RULE_SETUP #line 63 "loadlg.l" return LOAD_POS; YY_BREAK case 10: YY_RULE_SETUP #line 64 "loadlg.l" return LOAD_NOTE; YY_BREAK case 11: YY_RULE_SETUP #line 65 "loadlg.l" return LOAD_TEXT; YY_BREAK case 12: YY_RULE_SETUP #line 66 "loadlg.l" return LOAD_COND; YY_BREAK case 13: YY_RULE_SETUP #line 67 "loadlg.l" return LOAD_VARS; YY_BREAK case 14: YY_RULE_SETUP #line 68 "loadlg.l" return LOAD_FUNC; YY_BREAK case 15: YY_RULE_SETUP #line 69 "loadlg.l" return LOAD_NPC; YY_BREAK case 16: YY_RULE_SETUP #line 70 "loadlg.l" return LOAD_NAME; YY_BREAK case 17: YY_RULE_SETUP #line 71 "loadlg.l" return LOAD_RACE; YY_BREAK case 18: YY_RULE_SETUP #line 72 "loadlg.l" return LOAD_GENDER; YY_BREAK case 19: YY_RULE_SETUP #line 73 "loadlg.l" return LOAD_LOOP; YY_BREAK case 20: YY_RULE_SETUP #line 74 "loadlg.l" return LOAD_PROJECT; YY_BREAK case 21: YY_RULE_SETUP #line 75 "loadlg.l" return LOAD_IMPORTS; YY_BREAK case 22: YY_RULE_SETUP #line 76 "loadlg.l" return LOAD_DTOR; YY_BREAK case 23: YY_RULE_SETUP #line 77 "loadlg.l" return LOAD_CTOR; YY_BREAK case 24: YY_RULE_SETUP #line 78 "loadlg.l" return LOAD_ID; YY_BREAK case 25: YY_RULE_SETUP #line 80 "loadlg.l" mytext = ""; BEGIN(module); return LOAD_MODULE; YY_BREAK case 26: YY_RULE_SETUP #line 82 "loadlg.l" /* Eat whitespace */ YY_BREAK case 27: YY_RULE_SETUP #line 83 "loadlg.l" { mytext += loadlgtext; BEGIN(INITIAL); if (include_stack_ptr >= MAX_INCLUDE_DEPTH) { fprintf (stderr, "Modules nested too deeply\n"); return LOAD_UNKNOWN; } return LOAD_STR; } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(text): case YY_STATE_EOF(module): #line 96 "loadlg.l" { if (--include_stack_ptr < 0) { include_stack_ptr = 0; yyterminate (); } else { parser_restore_input (); return 0; } } YY_BREAK case 28: YY_RULE_SETUP #line 109 "loadlg.l" mytext = ""; BEGIN(text); YY_BREAK case 29: YY_RULE_SETUP #line 110 "loadlg.l" BEGIN(INITIAL); return LOAD_STR; YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 111 "loadlg.l" mytext += loadlgtext; YY_BREAK case 31: YY_RULE_SETUP #line 113 "loadlg.l" mynum = atoi (loadlgtext); return LOAD_NUM; YY_BREAK case 32: /* rule 32 can match eol */ YY_RULE_SETUP #line 115 "loadlg.l" ; YY_BREAK case 33: YY_RULE_SETUP #line 116 "loadlg.l" return LOAD_UNKNOWN; YY_BREAK case 34: YY_RULE_SETUP #line 117 "loadlg.l" ECHO; YY_BREAK #line 1071 "lex.loadlg.cc" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed loadlgin at a new source and called * loadlglex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = loadlgin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( loadlgwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * loadlgtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of loadlglex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ loadlgrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; loadlgrestart(loadlgin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) loadlgrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 113 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 113 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 112); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ loadlgrestart(loadlgin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( loadlgwrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve loadlgtext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void loadlgrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ loadlgensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = loadlg_create_buffer(loadlgin,YY_BUF_SIZE ); } loadlg_init_buffer(YY_CURRENT_BUFFER,input_file ); loadlg_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void loadlg_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * loadlgpop_buffer_state(); * loadlgpush_buffer_state(new_buffer); */ loadlgensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; loadlg_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (loadlgwrap()) processing, but the only time this flag * is looked at is after loadlgwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void loadlg_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; loadlgin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE loadlg_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) loadlgalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in loadlg_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) loadlgalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in loadlg_create_buffer()" ); b->yy_is_our_buffer = 1; loadlg_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with loadlg_create_buffer() * */ void loadlg_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) loadlgfree((void *) b->yy_ch_buf ); loadlgfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a loadlgrestart() or at EOF. */ static void loadlg_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; loadlg_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then loadlg_init_buffer was _probably_ * called from loadlgrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void loadlg_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) loadlg_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void loadlgpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; loadlgensure_buffer_stack(); /* This block is copied from loadlg_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from loadlg_switch_to_buffer. */ loadlg_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void loadlgpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; loadlg_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { loadlg_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void loadlgensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)loadlgalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in loadlgensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)loadlgrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in loadlgensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE loadlg_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) loadlgalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in loadlg_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; loadlg_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to loadlglex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * loadlg_scan_bytes() instead. */ YY_BUFFER_STATE loadlg_scan_string (yyconst char * yystr ) { return loadlg_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to loadlglex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE loadlg_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) loadlgalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in loadlg_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = loadlg_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in loadlg_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up loadlgtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ loadlgtext[loadlgleng] = (yy_hold_char); \ (yy_c_buf_p) = loadlgtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ loadlgleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int loadlgget_lineno (void) { return loadlglineno; } /** Get the input stream. * */ FILE *loadlgget_in (void) { return loadlgin; } /** Get the output stream. * */ FILE *loadlgget_out (void) { return loadlgout; } /** Get the length of the current token. * */ int loadlgget_leng (void) { return loadlgleng; } /** Get the current token. * */ char *loadlgget_text (void) { return loadlgtext; } /** Set the current line number. * @param line_number * */ void loadlgset_lineno (int line_number ) { loadlglineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see loadlg_switch_to_buffer */ void loadlgset_in (FILE * in_str ) { loadlgin = in_str ; } void loadlgset_out (FILE * out_str ) { loadlgout = out_str ; } int loadlgget_debug (void) { return loadlg_flex_debug; } void loadlgset_debug (int bdebug ) { loadlg_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from loadlglex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT loadlgin = stdin; loadlgout = stdout; #else loadlgin = (FILE *) 0; loadlgout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * loadlglex_init() */ return 0; } /* loadlglex_destroy is for both reentrant and non-reentrant scanners. */ int loadlglex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ loadlg_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; loadlgpop_buffer_state(); } /* Destroy the stack itself. */ loadlgfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * loadlglex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *loadlgalloc (yy_size_t size ) { return (void *) malloc( size ); } void *loadlgrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void loadlgfree (void * ptr ) { free( (char *) ptr ); /* see loadlgrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 117 "loadlg.l" adonthell-0.3.8/src/tools/dlgedit/gui_error.h0000664000175000017500000000336712756054712016152 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file gui_error.h * * @author Kai Sterker * @brief The error console */ #ifndef GUI_ERROR_H #define GUI_ERROR_H #include #include "dlg_node.h" /** * Displays a list of compile errors. Selecting an error message from the * list automatically brings up the edit dialog of the faulty node. */ class GuiError { public: GuiError (); ~GuiError (); /** * Global pointer to the error console, to allow easy access from anywhere. */ static GuiError *console; /** * Add an error message to the list of errors. * @param error the text to display * @param node the node where the error occured */ void add (std::string error, DlgNode *node); /** * Show the error console and display all errors */ void display (); /** * Remove all entries from the error console */ void clear (); private: GtkWidget *window; // The dialog window GtkWidget *list; // The list widget }; #endif // GUI_ERROR_H adonthell-0.3.8/src/tools/dlgedit/dlg_node.cc0000664000175000017500000001207712756054436016067 00000000000000/* Copyright (C) 2002 Kai Sterker Part of the Adonthell Project Dlgedit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Dlgedit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dlgedit. If not, see . */ /** * @file dlg_node.cc * * @author Kai Sterker * @brief Base class for the dialogue objects. */ #include #include "dlg_node.h" // Coonstructor DlgNode::DlgNode (node_type t, DlgRect area) { type_ = t; index_ = -1; top_left = area.topLeft (); bottom_right = area.bottomRight (); } // Get the next node DlgNode* DlgNode::next (query_type pos, int offset) { if (next_.empty ()) return NULL; else return getNode (n, next_, pos, offset); } // Get the previous node DlgNode* DlgNode::prev (query_type pos, int offset) { if (prev_.empty ()) return NULL; else return getNode (p, prev_, pos, offset); } // Get a node from the specified list DlgNode* DlgNode::getNode (std::list::iterator &it, std::list &lst, query_type &pos, int &offset) { switch (pos) { case FIRST: // point to the next element it = lst.begin (); offset -= 1; break; case NEXT: // nothing needs be done break; case LAST: // point to the last element it = lst.end (); offset = -offset; break; case PREV: // reverse searching offset = -offset; break; case CURRENT: if (it != lst.end ()) return *it; else return *(lst.begin ()); break; default: return NULL; } // forward iteration if (offset >= 0) { for (int i = 0; i < offset && it != lst.end (); i++, it++); if (it != lst.end ()) return *it; } // backward iteration else { int i; for (i = offset; i < 0 && it != lst.begin (); i++, it--); if (i == 0) return *it; } return NULL; } // add node to list of followers void DlgNode::addNext (DlgNode *node) { std::list::iterator i = next_.begin (); DlgRect *cmp1, *cmp2 = node->type () == LINK ? node->next (FIRST) : node; // search the proper place for insertion while (i != next_.end ()) { cmp1 = (*i)->type () == LINK ? (*i)->next (FIRST) : *i; if (*cmp2 < *cmp1) break; i++; } // insert next_.insert (i, node); } // add node to list of precedessors void DlgNode::addPrev (DlgNode *node) { std::list::iterator i = prev_.begin (); DlgRect *cmp1, *cmp2 = node->type () == LINK ? node->prev (FIRST) : node; // search the proper place for insertion while (i != prev_.end ()) { cmp1 = (*i)->type () == LINK ? (*i)->prev (FIRST) : *i; if (*cmp2 < *cmp1) break; i++; } prev_.insert (i, node); } // remove a node from the list of followers void DlgNode::removeNext (DlgNode *node) { next_.remove (node); n = next_.begin (); } // remove a node from the list of precedessors void DlgNode::removePrev (DlgNode *node) { prev_.remove (node); p = prev_.begin (); } // draw the node (with a certain mode) void DlgNode::draw (cairo_surface_t *surface, DlgPoint &offset, GtkWidget *widget, mode_type m) { // change the mode temporarily mode_type oldMode = mode_; mode_ = m; // draw draw (surface, offset, widget); // restore old mode mode_ = oldMode; } void DlgNode::drawPolygon (cairo_t *cr, const GdkColor *color, const bool & filled, const DlgPoint *points, const int &num_points) { gdk_cairo_set_source_color (cr, color); cairo_set_line_width (cr, 0.6); cairo_move_to (cr, points[0].x(), points[0].y()); for (int i = 1; i < num_points; i++) { cairo_line_to (cr, points[i].x(), points[i].y()); } filled ? cairo_fill (cr) : cairo_stroke (cr); } void DlgNode::drawCircle (cairo_t *cr, const GdkColor *color, const bool & filled, const int & x, const int & y, const int & radius) { gdk_cairo_set_source_color (cr, color); cairo_set_line_width (cr, 0.6); cairo_arc (cr, x, y, radius, 0, 2 * M_PI); filled ? cairo_fill (cr) : cairo_stroke (cr); } void DlgNode::drawRectangle (cairo_t *cr, const GdkColor *color, const bool & filled, const int & x, const int & y, const int & width, const int & height) { gdk_cairo_set_source_color (cr, color); cairo_set_line_width (cr, 0.6); cairo_rectangle (cr, x, y, width, height); filled ? cairo_fill (cr) : cairo_stroke (cr); } adonthell-0.3.8/src/tools/Makefile.am0000664000175000017500000000011712742773625014420 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = dlgedit adonthell-0.3.8/src/tools/Makefile.in0000644000175000017500000004546713414164743014440 00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_LIBS = @CAIRO_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FT2_CFLAGS = @FT2_CFLAGS@ FT2_LIBS = @FT2_LIBS@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ IGE_MAC_CFLAGS = @IGE_MAC_CFLAGS@ IGE_MAC_LIBS = @IGE_MAC_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ OGG_CFLAGS = @OGG_CFLAGS@ OGG_DEFS = @OGG_DEFS@ OGG_LIBS = @OGG_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PY_CFLAGS = @PY_CFLAGS@ PY_LIBS = @PY_LIBS@ PY_PREFIX = @PY_PREFIX@ P_DOT = @P_DOT@ P_DOXYGEN = @P_DOXYGEN@ RANLIB = @RANLIB@ SDL2_CONFIG = @SDL2_CONFIG@ SDL2_FRAMEWORK = @SDL2_FRAMEWORK@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_DEFS = @SDL_DEFS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SWIG = @SWIG@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gamedatadir = @gamedatadir@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = dlgedit all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tools/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic distclean-tags distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: adonthell-0.3.8/src/event_list.h0000644000175000017500000001253112756050014013533 00000000000000/* Copyright (C) 2000/2001/2002/2003 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file event_list.h * @author Kai Sterker * * @brief Declares the event_list class. * */ #ifndef EVENT_LIST_H__ #define EVENT_LIST_H__ #include #include "event.h" using std::string; #ifndef SWIG /** * Pointer to a function returning a newly allocated %event */ typedef event* (*new_event)(); #endif // SWIG /** * Base class for objects that want to register events. It keeps track of * all the events an object has registered with the event_handler and can * automatically unregister them when the object is deallocated. * * It also provides the functionality to load and save the states of * events in its list. * * Objects making use of events should use the %event_list instead of * handling events themselves. */ class event_list { public: /** * Constructor - creates an empty, unpaused %event_list */ event_list (); /** * Destructor - unregisters and deletes all events owned by this list. */ virtual ~event_list (); /** * Unregisters and deletes all events owned by this list. */ void clear (); /** * @name List Operations */ //@{ /** * Adds an %event to this list. The %event will be * registered with the %event_handler and the list will then * take care of it's deletion. * * @param ev pointer to the %event to add. */ void add_event (event* ev); /** * Removes an %event from the list. This is usually called when an * %event is destroyed. * * @param ev pointer to the %event to remove. */ void remove_event (event* ev); /** * Try to retrieve the %event with given id from the list. * * @return a pointer to the %event, or \b NULL if it's not in the list. */ event *get_event (const string & id); //@} /** * @name Pausing / Resuming execution */ //@{ /** * Disable any events associated with this %event_list. This will * effectively stop all actions of the %object the %event_list * belongs to, e.g. a NPC. */ void pause (); /** * Re-enable the events associated with the %event_list, thus * 'awaking' the %object to life again. */ void resume (); /** * Check whether the %event list is temporarily disabled or not. * @return \b true if it is paused, \b false otherwise. */ bool is_paused () const { return Paused; } //@} #ifndef SWIG /** * Register an %event for loading. Before the %event_list can load * an %event from file, it needs a callback function that returns * a new instance of the %event of the given type. * * @param type the type of the %event to register * @param e a callback returning a new instance of an %event of the * given type. * * @sa get_state () */ static void register_event (u_int8 type, new_event e); #endif // SWIG /** * @name Loading / Saving */ //@{ /** * Save the %event_list to a file. * * @param out file where to save the %event_list. */ void put_state (ogzstream& out) const; /** * Loads the %event_list from a file and registers all loaded events. * @warning Before the %event_list can load an %event from file, it needs * a callback function that returns a new instance of that %event. * * @param in file to load the %event_list from. * * @return \e true if the %event_list was loaded successfully, \e false * otherwise. * @sa register_event () */ bool get_state (igzstream& in); //@} #ifndef SWIG protected: /** * List of events. */ mutable std::vector Events; private: /** * Whether this %event_list is paused or not. Events that are added * to a paused list will be paused as well. */ bool Paused; /** * Array with callbacks that return a newly allocated instance of an %event. * The event's type is the postion of the according callback in the array. */ static new_event instanciate_event[MAX_EVENTS]; #endif // SWIG }; #ifndef SWIG /** * Registers an %event with the %event_list, allowing it to load this %event * without knowing about it at compile time. */ #define REGISTER_EVENT(type,evt)\ event_list::register_event (type, (new_event) &new_ ## evt); /** * A function that returns a new instance of an %event. */ #define NEW_EVENT(evt)\ event* new_ ## evt () { return (event*) new evt; } #endif // SWIG #endif // EVENT_LIST_H__ adonthell-0.3.8/src/win_event.cc0000644000175000017500000000354212756052715013527 00000000000000/* (C) Copyright 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_event.h" #include "py_callback.h" void win_event::py_signal_connect (PyObject *pyfunc, int signal, PyObject *args) { // create the callback py_callback *callback = new py_callback (pyfunc, args); py_callbacks.push_back (callback); // connect the signal switch (signal) { case CLOSE: { set_callback_quit (makeFunctor (*callback, &py_callback::callback_func1)); break; } case DESTROY: { Functor0wRet func0ret; set_callback_destroy ( makeFunctor (&func0ret, *callback, &py_callback::callback_func0ret)); break; } default: { set_signal_connect (makeFunctor (*callback, &py_callback::callback_func0), signal); } } } bool win_event::update() { if(callback_destroy_ && !callback_destroy_()) return false; return true; } win_event::~win_event() { //notify that window is closing if (callback_quit_) (callback_quit_) (return_code_); //delete any python callbacks for (vector::iterator i = py_callbacks.begin (); i != py_callbacks.end (); i++) delete *i; } adonthell-0.3.8/src/win_event.h0000644000175000017500000000662013000720327013351 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_EVENT_H_ #define _WIN_EVENT_H_ #include #include "Python.h" #include class py_callback; #include "types.h" #include "callback.h" using namespace std; class win_event { public: win_event(){return_code_=0;} //Use this function to set a callback function void set_return_code (int rc) { return_code_ = rc; } #ifndef SWIG void set_signal_connect (const Functor0 &func, u_int8 signal) { callback_[signal] = func; } void set_callback_destroy (const Functor0wRet &func) { callback_destroy_ = func; } void set_callback_quit (const Functor1 &func) { callback_quit_ = func;} #endif bool update(); void py_signal_connect (PyObject *pyfunc, int signal, PyObject *args = NULL); const static u_int8 ACTIVATE =1 ; const static u_int8 UNACTIVATE = 2; const static u_int8 UPDATE = 3; const static u_int8 DRAW = 4; const static u_int8 DRAW_ON_VISIBLE = 5; const static u_int8 ACTIVATE_KEY = 6; const static u_int8 SELECT = 7; const static u_int8 UNSELECT = 8; const static u_int8 KEYBOARD = 9; const static u_int8 SCROLL_UP = 10; const static u_int8 SCROLL_DOWN = 11; const static u_int8 NEXT = 12; const static u_int8 PREVIOUS = 13; const static u_int8 CLOSE = 14; const static u_int8 DESTROY = 15; /*****************************************************/ /*****************************************************/ //DESTRUCTOR virtual ~win_event(); protected: // the python callbacks connected to the window vector py_callbacks; Functor0 callback_[20]; Functor0wRet callback_destroy_; Functor1 callback_quit_; int return_code_; //execute the callback function virtual void on_activate(){ if(callback_[ACTIVATE]) (callback_[ACTIVATE])();} virtual void on_unactivate(){ if(callback_[UNACTIVATE]) (callback_[UNACTIVATE])();} virtual void on_update() { if(callback_[UPDATE]) (callback_[UPDATE])();} virtual void on_draw_visible(){ if(callback_[DRAW_ON_VISIBLE]) (callback_[DRAW_ON_VISIBLE])();} virtual void on_draw(){ if(callback_[DRAW]) (callback_[DRAW])();} virtual void on_activate_key(){ if(callback_[ACTIVATE_KEY]) (callback_[ACTIVATE_KEY])();} virtual void on_select(){ if(callback_[SELECT]) (callback_[SELECT])();} virtual void on_unselect(){ if(callback_[UNSELECT]) (callback_[UNSELECT])();} virtual void on_up(){if(callback_[SCROLL_UP]) (callback_[SCROLL_UP])();} virtual void on_down(){if(callback_[SCROLL_DOWN]) (callback_[SCROLL_DOWN])();} virtual void on_next(){if(callback_[NEXT]) (callback_[NEXT])();} virtual void on_previous(){if(callback_[PREVIOUS]) (callback_[PREVIOUS])();} }; #endif adonthell-0.3.8/src/animation.cc0000644000175000017500000002143012756047050013500 00000000000000/* Copyright (C) 1999/2000/2001 The Adonthell Project Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file animation.cc * @author Alexandre Courbot * * @brief Defines the animationframe and animation classes. * * */ #include "animation.h" using namespace std; // animationframe class. // Public methods. animationframe::animationframe () { clear (); } animationframe::~animationframe () { } void animationframe::clear () { imagenbr = 0; is_masked_ = false; set_alpha (255); gapx = 0; gapy = 0; delay_ = 0; nextframe_ = 0; } s_int8 animationframe::get (igzstream& file) { imagenbr << file; is_masked_ << file; alpha_ << file; set_alpha (alpha_); gapx << file; gapy << file; delay_ << file; nextframe_ << file; return (0); } s_int8 animationframe::put (ogzstream& file) const { image_nbr () >> file; is_masked () >> file; alpha () >> file; offx () >> file; offy () >> file; delay () >> file; nextframe () >> file; return (0); } // animation class. // Public methods. animation::animation () : drawable () { clear (); } void animation::clear () { vector ::iterator i; for (i = t_frame.begin (); i != t_frame.end (); i++) delete (*i); t_frame.clear (); frame.clear (); currentframe_ = 0; speedcounter = 0; play_flag = STOP; xoffset_ = 0; yoffset_ = 0; set_length (0); set_height (0); } animation::~animation () { clear (); } bool animation::update () { if ((!play_flag) || (!nbr_of_frames ())) return true; if (frame[currentframe ()].delay () == 0) return true; if (nbr_of_frames () <= 1) return true; speedcounter++; if (speedcounter >= frame[currentframe ()].delay ()) next_frame (); return true; } void animation::next_frame () { currentframe_ = frame[currentframe ()].nextframe (); speedcounter = 0; } void animation::draw (s_int16 x, s_int16 y, const drawing_area * da_opt, surface *target) const { t_frame[frame[currentframe ()].image_nbr ()]-> set_mask (frame[currentframe ()].is_masked ()); t_frame[frame[currentframe ()].image_nbr ()]-> set_alpha (frame[currentframe ()].alpha ()); t_frame[frame[currentframe ()].image_nbr ()]->draw (x + xoffset () + frame[currentframe ()].offx (), y + yoffset () + frame[currentframe ()].offy (), da_opt, target); } s_int8 animation::get (igzstream& file) { u_int16 i; u_int16 nbr_images; u_int16 nbr_frames; u_int16 t_xoffset, t_yoffset; clear (); t_xoffset << file; t_yoffset << file; // TODO: Remove this! (length and height are calculated later) u_int16 dummy; dummy << file; dummy << file; // Read images nbr_images << file; for (i = 0; i < nbr_images; i++) { t_frame.push_back (new image); t_frame.back ()->get_raw (file); } // Read frames nbr_frames << file; animationframe aftemp; for (i = 0; i < nbr_frames; i++) { frame.push_back (aftemp); frame.back ().get (file); } currentframe_ = 0; set_offset (t_xoffset, t_yoffset); calculate_dimensions (); return (0); } s_int8 animation::load (string fname) { igzstream file (fname); u_int8 retvalue; if (!file.is_open ()) return (-1); retvalue = get (file); file.close (); return (retvalue); } s_int8 animation::put (ogzstream& file) const { u_int16 i; xoffset () >> file; yoffset () >> file; // TODO: Remove this! (length and height are calculated later) u_int16 dummy = 0; dummy >> file; dummy >> file; // Write images nbr_of_images () >> file; for (i = 0; i < nbr_of_images (); i++) { t_frame[i]->put_raw (file); } // Write frames nbr_of_frames () >> file; for (i = 0; i < nbr_of_frames (); i++) { frame[i].put (file); } return (0); } s_int8 animation::save (string fname) const { ogzstream file (fname); u_int8 retvalue; if (!file.is_open ()) return (-1); retvalue = put (file); file.close (); return (retvalue); } s_int8 animation::insert_image (const image * im, u_int16 pos) { vector ::iterator i; vector ::iterator j; if (pos > nbr_of_images ()) return -2; i = t_frame.begin (); while (pos--) i++; t_frame.insert (i, (image *) im); for (j = frame.begin (); j != frame.end (); j++) if (j->image_nbr () >= pos) j->set_image_nbr (j->image_nbr () + 1); return 0; } s_int8 animation::delete_image (u_int16 pos) { vector ::iterator i; vector ::iterator j; if (pos > nbr_of_images () - 1) return -2; i = t_frame.begin (); while (pos--) i++; delete (*i); t_frame.erase (i); for (j = frame.begin (); j != frame.end (); j++) if (j->image_nbr () >= pos) j->set_image_nbr (j->image_nbr () - 1); return 0; } s_int8 animation::insert_frame (const animationframe af, u_int16 pos) { vector ::iterator i; if (pos > nbr_of_frames ()) return -2; i = frame.begin (); while (pos--) i++; frame.insert (i, af); for (i = frame.begin (); i != frame.end (); i++) if (i->nextframe () >= pos) i->set_nextframe (i->nextframe () + 1); return 0; } s_int8 animation::delete_frame (u_int16 pos) { vector ::iterator i; if (pos > nbr_of_frames () - 1) return -2; for (i = frame.begin (); i != frame.end (); i++) if (i->nextframe () >= pos) i->set_nextframe (frame[i->nextframe ()].nextframe ()); i = frame.begin (); while (pos--) i++; frame.erase (i); if (!nbr_of_frames ()) currentframe_ = 0; return 0; } void animation::zoom (u_int16 sx, u_int16 sy, const animation * src) { static u_int16 i; clear (); for (i = 0; i < src->nbr_of_images (); i++) { image *im = new image; im->resize ((src->t_frame[i]->length () * sx) / src->length (), (src->t_frame[i]->height () * sy) / src->height ()); im->zoom ((*src->t_frame[i])); t_frame.push_back (im); } for (i = 0; i < src->nbr_of_frames (); i++) { frame.push_back (src->frame[i]); frame.back ().set_offset ((src->frame[i].offx () * sx) / src->length (), (src->frame[i].offy () * sy) / src->height ()); } } animation& animation::operator = (const animation & src) { clear (); (drawable&) (*this) = (drawable&) src; // Copy images vector ::iterator imit; for (imit = src.t_frame.begin (); imit != src.t_frame.end (); imit++) { image * im = new image; *im = *(*imit); t_frame.push_back (im); } // Copy frames vector ::iterator frit; for (frit = src.frame.begin (); frit != src.frame.end (); frit++) { frame.push_back (*frit); } // Copy properties currentframe_ = src.currentframe_; speedcounter = src.speedcounter; play_flag = src.play_flag; set_length (src.length ()); set_height (src.height ()); set_offset (src.xoffset (), src.yoffset ()); return *this; } // Private methods void animation::calculate_dimensions () { for (u_int16 i = 0; i < nbr_of_frames (); i++) { u_int16 tl, th; if ((tl = t_frame[frame[i].image_nbr ()]->length () + frame[i].offx ()) > length ()) set_length (tl + xoffset ()); if ((th = t_frame[frame[i].image_nbr ()]->height () + frame[i].offy ()) > height ()) set_height (th + yoffset ()); } } adonthell-0.3.8/src/drawing_area.cc0000644000175000017500000000406612756047544014162 00000000000000/* Copyright (C) 1999/2000/2001 The Adonthell Project Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file drawing_area.cc * @author Alexandre Courbot * * @brief Defines the drawing_area class. * * */ #include "drawing_area.h" drawing_area::drawing_area () { move (0, 0); resize (0, 0); draw_to = NULL; } drawing_area::drawing_area (s_int16 px, s_int16 py, u_int16 pw, u_int16 ph) { move (px, py); resize (pw, ph); draw_to = NULL; } drawing_area& drawing_area::operator = (SDL_Rect& r) { rect = r; draw_to = NULL; return (*this); } SDL_Rect drawing_area::setup_rects () const { if (draw_to) { SDL_Rect ret; SDL_Rect temp = draw_to->setup_rects (); ret.x = temp.x > x ()? temp.x : x (); ret.y = temp.y > y ()? temp.y : y (); // Precalculated for faster operation. s_int32 xpl = x () + length (); s_int32 txw = temp.x + temp.w; s_int32 txwmrx = txw - ret.x; s_int32 xplmrx = xpl - ret.x; s_int32 yph = y () + height (); s_int32 tyh = temp.y + temp.h; s_int32 tyhmry = tyh - ret.y; s_int32 yphmry = yph - ret.y; ret.w = txw < xpl ? txwmrx > 0 ? txwmrx : 0 : xplmrx > 0 ? xplmrx : 0; ret.h = tyh < yph ? tyhmry > 0 ? tyhmry : 0 : yphmry > 0 ? yphmry : 0; return ret; } else return rect; } adonthell-0.3.8/src/label.h0000644000175000017500000001121412756050665012447 00000000000000/* (C) Copyright 2000/2001/2004 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef LABEL_H_ #define LABEL_H_ #include #include #include "input.h" #include "win_font.h" using namespace std; class label: public image { public : /** Constructor by default, cursor is not moveable, cursor is not visible, and the form is set as NOTHING, the default size is (0, 0) */ label (); /** Destructor */ virtual ~label (); /** Set the font */ void set_font (win_font & font); /** Set the text */ void set_text (const string & text); /** Add text */ void add_text (const string & text); /** Set the form of the display NOTHING, AUTO_SIZE, AUTO_HEIGHT */ void set_form (const u_int8 form); /** Set visible cursor */ void set_cursor_visible (const bool b); /** Set if the cursor can be moved with arrow key */ void set_cursor_moveable (const bool b); /** Update the label */ bool update (); /** Update input label, you can move the cursor if the cursor is moveable */ bool input_update (); /** Get the text in string */ const string & text_string () const; /** Get the text in char */ const char * text_char () const; /** Resize the label */ void resize (u_int16 l, u_int16 h); #ifdef SWIG #define label_NOTHING 0; #define label_AUTO_HEIGHT 1; #define label_AUTO_SIZE 2; #define label_KEY_CURSOR_NEXT SDLK_RIGHT; #define label_KEY_CURSOR_PREVIOUS SDLK_LEFT; #endif #ifndef SWIG static const u_int8 NOTHING = 0; static const u_int8 AUTO_HEIGHT = 1; static const u_int8 AUTO_SIZE = 2; const static SDL_Keycode KEY_CURSOR_NEXT = SDLK_RIGHT; const static SDL_Keycode KEY_CURSOR_PREVIOUS = SDLK_LEFT; protected : void fit_text_width(); u_int16 ucd (u_int16 & idx) const { return ucd(my_text_, idx); } u_int16 ucd (const std::string & text, u_int16 & idx) const; struct Sline_text { u_int16 idx_beg; s_int16 idx_end; u_int16 pos_x; s_int16 offset_x; }; struct Scursor { u_int16 pos_x; u_int16 pos_y; u_int16 idx; u_int16 line; s_int16 offset_x; }; /** Init vector and cursor, don't erase my_text_ */ void init_vec_cursor (); /** Build label */ void build(const bool erase_all); /** */ void build_form_nothing (); /** */ void build_form_auto_height (); /** */ void build_form_auto_size(); /** */ void clean_surface (const bool erase_all); /** */ u_int8 find_word (u_int16 & index, u_int16 & wlength, u_int16 & wlengthpix, s_int16 & woffset, u_int16 & last_letter, const u_int16 rlength); /** */ void draw_string (const bool at_cursor); /** */ void update_cursor (); /** */ void cursor_next (); /** */ void cursor_previous (); /** */ void cursor_draw (); void cursor_undraw (); bool last_letter (u_int16 idx); // my_font win_font * my_font_; // my text string my_text_; // temporary for gathering utf-8 text string new_text_; // form display u_int8 my_form_; // visible cursor bool visible_cursor_; // moveable_cursor bool moveable_cursor_; u_int16 cursor_cur_blink_; static u_int16 cursor_blink_cycle; // my cursor Scursor my_cursor_; // my old cursor Scursor my_old_cursor_; // it is a vector which represent each line in the label vector my_vect_; u_int16 start_line_; #endif // it's the endif of swig }; #endif adonthell-0.3.8/src/win_scrollbar.cc0000644000175000017500000001544212756053106014366 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_theme.h" #include "win_scrollbar.h" win_scrollbar::win_scrollbar() { wsc_=NULL; init(); set_visible_scrollbar(true); set_trans_scrollbar(false); set_brightness_scrollbar(false); refresh(); } win_scrollbar::win_scrollbar(win_scroll * wsc) { wsc_=wsc; init(); set_visible_scrollbar(true); set_trans_scrollbar(false); set_brightness_scrollbar(false); refresh(); } win_scrollbar::win_scrollbar(win_scrollbar & ws) { wsc_=NULL; init(); set_visible_scrollbar(true); set_trans_scrollbar(false); set_brightness_scrollbar(false); *this=ws; refresh(); } win_scrollbar::win_scrollbar(char * rep) { wsc_=NULL; init(); set_visible_scrollbar(true); set_trans_scrollbar(false); set_brightness_scrollbar(false); load(rep); refresh(); } win_scrollbar::~win_scrollbar() { destroy(); } void win_scrollbar::set_scrollbar(win_scrollbar & ws) { *this=ws; refresh(); } void win_scrollbar::set_scrollbar(win_theme & wt) { *this=*(wt.scrollbar); refresh(); } void win_scrollbar::init() { back_bot_=NULL; back_mid_=NULL; back_top_=NULL; bar_top_=NULL; bar_bot_=NULL; bar_mid_=NULL; bar_flex_=NULL; bar_=NULL; back_=NULL; bar_brightness_=NULL; back_brightness_=NULL; bar_draw_=NULL; back_draw_=NULL; } win_scrollbar & win_scrollbar::operator=(win_scrollbar & wb) { destroy(); bar_top_=new image(); *bar_top_=*(wb.bar_top_); bar_mid_=new image(); *bar_mid_=*(wb.bar_mid_); bar_bot_=new image(); *bar_bot_=*(wb.bar_bot_); bar_flex_=new image(); *bar_flex_=*(wb.bar_flex_); back_top_=new image(); *back_top_=*(wb.back_top_); back_mid_=new image(); *back_mid_=*(wb.back_mid_); back_bot_=new image(); *back_bot_=*(wb.back_bot_); bar_=new image(); back_=new image(); bar_->set_mask(true); back_->set_mask(true); bar_brightness_ = new image(); back_brightness_ = new image(); bar_brightness_->set_mask(true); back_brightness_->set_mask(true); update_back(); update_bar(); return *this; } void win_scrollbar::load(char * theme) { destroy(); char path[255];char tmp[255]; strcpy(path,WIN_DIRECTORY); strcat(path,WIN_SCROLLBAR_DIRECTORY); strcat(path,theme); bar_=new image(); back_=new image(); bar_->set_mask(true); back_->set_mask(true); bar_brightness_ = new image(); back_brightness_ = new image(); bar_brightness_->set_mask(true); back_brightness_->set_mask(true); bar_top_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BAR_TOP); bar_top_->load_pnm(tmp); bar_mid_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BAR_MID); bar_mid_->load_pnm(tmp); bar_bot_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BAR_BOT); bar_bot_->load_pnm(tmp); bar_flex_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BAR_FLEX); bar_flex_->load_pnm(tmp); back_top_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BACK_TOP); back_top_->load_pnm(tmp); back_mid_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BACK_MID); back_mid_->load_pnm(tmp); back_bot_=new image(); strcpy(tmp,path); strcat(tmp,WIN_SCROLLBAR_BACK_BOT); back_bot_->load_pnm(tmp); } void win_scrollbar::update_back() { if(!wsc_ || !back_) return; back_->resize(back_mid_->length(),wsc_->height()); back_->tile(*back_mid_); //back_->putbox_img(back_top_,0,0); back_top_->draw(0,0,NULL,back_); //back_->putbox_img(back_bot_,0,wsc_->height()-back_bot_->height()); back_bot_->draw(0,wsc_->height()-back_bot_->height(),NULL,back_); back_brightness_->brightness(*back_, WIN_BRIGHTNESS_LEVEL); } void win_scrollbar::refresh() { if(brightness_) { bar_draw_=bar_brightness_; back_draw_=back_brightness_; } else { bar_draw_=bar_; back_draw_=back_; } } void win_scrollbar::destroy() { if(back_bot_) delete back_bot_; if(back_top_) delete back_top_; if(back_mid_) delete back_mid_; if(bar_bot_) delete bar_bot_; if(bar_mid_) delete bar_mid_; if(bar_top_) delete bar_top_; if(bar_flex_) delete bar_flex_; if(bar_) delete bar_; if(back_) delete back_; if(bar_brightness_) delete bar_brightness_; if(back_brightness_) delete back_brightness_; } void win_scrollbar::update_bar() { if(!wsc_ || !bar_) return; if (!(wsc_->height() + wsc_->amplitude())) return; u_int16 calcul = (wsc_->height() * wsc_->height()) / (wsc_->height() + wsc_->amplitude()); //if(calcul == bar_->height() || bar_->height() == (bar_top_->height() + bar_mid_->height() + bar_bot_->height())) return; if( calcul > bar_top_->height() + bar_mid_->height() + bar_bot_->height()) { bar_->resize(bar_top_->length(), calcul); //bar_->putbox_tile_img( bar_flex_ ); bar_->tile(*bar_flex_); //bar_->putbox_img(bar_top_,0,0); bar_top_->draw(0,0,NULL,bar_); //bar_->putbox_img(bar_bot_, 0, bar_->height() - bar_bot_->height()); bar_bot_->draw(0,bar_->height() - bar_bot_->height(),NULL,bar_); //bar_->putbox_img(bar_mid_,0,( bar_->height() - bar_mid_->height() ) >>1 ); bar_mid_->draw(0,(bar_->height() - bar_mid_->height() ) >> 1, NULL,bar_); } else { bar_->resize(bar_top_->length(), bar_top_->height() + bar_mid_->height() + bar_bot_->height()); //bar_->putbox_img(bar_top_,0,0); bar_top_->draw(0,0,NULL,bar_); //bar_->putbox_img(bar_bot_,0,bar_->height() - bar_bot_->height()); bar_bot_->draw(0,bar_->height() - bar_bot_->height(),NULL,bar_); //bar_->putbox_img(bar_mid_,0,bar_top_->height()); bar_mid_->draw(0,bar_top_->height(),NULL,bar_); } bar_brightness_->brightness(*bar_,WIN_BRIGHTNESS_LEVEL); } void win_scrollbar::draw(drawing_area * da) { if(!visible_ || !back_draw_ || !bar_draw_) return; back_draw_->draw(wsc_->real_x() + wsc_->length() - back_->length(), wsc_->real_y() , da ); bar_draw_->draw(1 + wsc_->real_x() + wsc_->length() - back_->length(), wsc_->real_y() + wsc_->cursor_y() , da); } adonthell-0.3.8/src/win_theme.h0000644000175000017500000000230512756053171013343 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _WIN_THEME_H_ #define _WIN_THEME_H_ #include "win_scroll.h" class win_theme { public: win_theme(); win_theme(char *); win_theme(win_theme &); win_theme & operator=(win_theme &); ~win_theme(); void destroy(); friend class win_border; friend class win_background; friend class win_scrollbar; private: win_border * normal; win_border * mini; win_background * background; win_scrollbar * scrollbar; }; #endif adonthell-0.3.8/src/win_base.cc0000644000175000017500000000541512756052631013316 00000000000000/* (C) Copyright 2000, 2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "win_base.h" #include "win_manager.h" #include "win_container.h" win_base::win_base(): win_border(this),win_background(this) { manager_ = NULL; wb_father_= NULL; pad_y_ = pad_x_ = 0; move(0,0); set_visible(false); set_focus(false); set_activate(false); set_brightness(false); set_trans(false); set_can_be_selected(true); set_align(ALIGN_NONE); } win_base::~win_base() { if (manager_) manager_->remove (this); manager_ = NULL; } void win_base::set_container(win_container * wc) { wb_father_=wc; update_position(); update_align(); } void win_base::update_position() { if(wb_father_) { drawing_area::move(wb_father_->real_x() + x() + pad_x(), wb_father_->real_y() + y() + pad_y() ); } else { drawing_area::move( x() + pad_x(), y() + pad_y() ); } } void win_base::move(s_int16 tx, s_int16 ty) { x_= tx; y_= ty; update_position(); } void win_base::resize(u_int16 tl, u_int16 th) { drawing_area::resize(tl, th); win_border::update(); win_background::update(); } bool win_base::update() { if(win_event::update()) { // if(focus_) ADDME: ajouter l'appel a update_input on_update(); return true; } return false; } bool win_base::input_update() { return (focus_ && activate_); } bool win_base::draw() { on_draw(); if(visible_) on_draw_visible(); return visible_; } void win_base::update_align() { switch(align_) { case ALIGN_LEFT: move((wb_father_) ? ((win_container*)wb_father_)->space_with_border() : 0 , y() ); break; case ALIGN_RIGHT: move(((wb_father_) ? wb_father_->length() : screen::length())-((wb_father_)?((win_container*)wb_father_)->space_with_border() : 0 ) - length() , y() ); break; case ALIGN_CENTER: if(((wb_father_)?wb_father_->length():screen::length())>length()) move((((wb_father_)?wb_father_->length():screen::length()) - length()) >>1,y()); break; } } void win_base::set_manager (win_manager *m) { manager_ = m; } adonthell-0.3.8/src/win_types.h0000644000175000017500000000443612756053246013417 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef TYPES_WIN_H_ #define TYPES_WIN_H_ #include #define WIN_NB_TABLE_CHAR 127 #define WIN_TEXT_MAX_LENGTH 5000 #define WIN_FONT_HEIGHT 8 #define WIN_FONT_LENGHT 8 #define WIN_SPACE_LENGHT 8 //directory #define WIN_DIRECTORY "gfx/window/" #define WIN_FONT_DIRECTORY "font/" #define WIN_BORDER_DIRECTORY "border/" #define WIN_BACKGROUND_DIRECTORY "background/" #define WIN_SCROLLBAR_DIRECTORY "scrollbar/" #define WIN_CURSOR_DIRECTORY "cursor/" //font filename #define WIN_FONT_FILE_IDX "font.idx" #define WIN_FONT_FILE_PIC "font.pnm" #define WIN_FONT_FILE "font.font" //border filename #define WIN_V_BORDER_TEMPLATE_FILE "v_border.pnm" #define WIN_H_BORDER_TEMPLATE_FILE "h_border.pnm" #define WIN_CORNER_TOP_LEFT_FILE "corner_top_left.pnm" #define WIN_CORNER_TOP_RIGHT_FILE "corner_top_right.pnm" #define WIN_CORNER_BOTTOM_LEFT_FILE "corner_bottom_left.pnm" #define WIN_CORNER_BOTTOM_RIGHT_FILE "corner_bottom_right.pnm" //background filename #define WIN_BACKGROUND_FILE "background.pnm" //scrollbar filename #define WIN_SCROLLBAR_BAR_TOP "scroll_bar_top.pnm" #define WIN_SCROLLBAR_BAR_MID "scroll_bar_mid.pnm" #define WIN_SCROLLBAR_BAR_BOT "scroll_bar_bot.pnm" #define WIN_SCROLLBAR_BAR_FLEX "scroll_bar_flex.pnm" #define WIN_SCROLLBAR_BACK_TOP "scroll_back_top.pnm" #define WIN_SCROLLBAR_BACK_MID "scroll_back_mid.pnm" #define WIN_SCROLLBAR_BACK_BOT "scroll_back_bot.pnm" //cursor filename #define WIN_CURSOR_FILE "cursor.pnm" //directory size #define WIN_BORDER_NORMAL_SIZE "normal/" #define WIN_BORDER_MINI_SIZE "mini/" #define WIN_BRIGHTNESS_LEVEL 180 #endif adonthell-0.3.8/src/drawable.cc0000644000175000017500000000216512756047522013312 00000000000000/* Copyright (C) 1999/2000/2001 Alexandre Courbot Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file drawable.cc * @author Alexandre Courbot * * @brief Defines the drawable class. */ #include "drawable.h" // Public methods. drawable::drawable () { set_length (0); set_height (0); } drawable::~drawable () { } bool drawable::update () { return true; } bool drawable::input_update () { return true; } adonthell-0.3.8/src/quest.cc0000644000175000017500000000277012756051736012676 00000000000000/* Copyright (C) 2000 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #include "quest.h" dictionary data::quests; quest::quest () { } quest::~quest () { } // Save a quest object void quest::save (ogzstream& out) { storage::iterator i; u_int32 j; // Save name name >> out; // Save all variables and flags j = size (); j >> out; for (i = begin (); i != end (); i++) { string s = (*i).first; s >> out; (*i).second >> out; } } // Load a quest object and add it to the quest-arrays void quest::load (igzstream& in) { u_int32 i, size; s_int32 value; string key; name << in; size << in; for (i = 0; i < size; i++) { key << in; value << in; set_val (key.c_str (), value); } } adonthell-0.3.8/src/win_scroll.h0000644000175000017500000000421112756053077013542 00000000000000/* (C) Copyright 2000 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_SCROLLED_H #define WIN_SCROLLED_H #include "win_container.h" #include "win_scrollbar.h" class win_scroll : public win_container, public win_scrollbar { public: //constructor x,y,length,height,and a theme win_scroll(); //return difference between the last object and the visual height, I think you don't understand, but i know you never use thisfunction just me u_int16 amplitude(){return max_amplitude_;} virtual void add(win_base *); virtual void remove(win_base *); virtual void remove_all(); void resize(u_int16 tl,u_int16 th); void destroy(); bool draw(); bool update(); bool input_update(); void set_space_between_border(u_int16 ); void set_space_between_object(u_int16 ); virtual void set_pos (const u_int8 pos); u_int16 cursor_y(){return cursor_y_;} void set_auto_scrollbar(bool b){auto_scrollbar_=b;} void set_auto_refresh(bool b){auto_refresh_=b;} void set_brightness(bool b) {win_container::set_brightness(b);set_brightness_scrollbar(b);} void set_trans(bool b) {win_container::set_trans(b); set_trans_scrollbar(b);} const static u_int8 PAD_DEFAULT = 5; protected: bool up(); bool down(); void find_amplitude(); void update_amplitude(); u_int16 max_amplitude_; u_int16 cur_amplitude_; u_int16 index_pad_; u_int16 cursor_y_; bool auto_scrollbar_; bool auto_refresh_; }; #endif adonthell-0.3.8/src/drawing_area.h0000644000175000017500000001205412756047555014022 00000000000000/* Copyright (C) 1999/2000/2001 The Adonthell Project Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file drawing_area.h * @author Alexandre Courbot * * @brief Declares the drawing_area class. * * */ #ifndef DRAWING_AREA_H_ #define DRAWING_AREA_H_ #include "types.h" /** * Implements "drawing zones" for drawing operations. * An object which is drawn into a drawing_area will only appear in * the rectangular zone it covers. * During some drawing operations, you may want to limit the blits to a limited * area of the %screen. For example, if you want to draw an image into a * window, and that image is larger than this window, you don't want the * entire image to appear, only the part that fits into the window. This is * exactly what drawing areas are for. A drawing area is a square that can be * any size and located anywhere on the %screen. If you assign a drawing area * to a drawable object (for example, an image), and then draw the image on * the %screen, the part of the image that doesn't fit the drawing area limits * isn't displayed. A drawing area can be assigned to any drawable, but also * to another drawing area, in which case the result of blitting operations * from objects that are assigned to the second drawing area will be limited * to the intersection of the two drawing areas. Recursively, you can use as many * drawing_areas as you wish for drawing operations. */ class drawing_area { public: /** Default constructor. * The drawing_area is then located at (0, 0) and is (0, 0) sized. */ drawing_area (); #ifndef SWIG /** Builds a drawing_area from the parameters. * @param px X position. * @param py Y position. * @param pw Length. * @param ph Height. * * @note Not available from Python. */ drawing_area (s_int16 px, s_int16 py, u_int16 pw, u_int16 ph); #endif /** Returns the horizontal position of the drawing_area. * @return horizontal position of the drawing_area. */ s_int16 x () const { return rect.x; } /** Returns the vertical position of the drawing_area. * @return vertical position of the drawing_area. */ s_int16 y () const { return rect.y; } /** Returns the length of the drawing_area. * @return length of the drawing_area. */ u_int16 length () const { return rect.w; } /** Returns the height of the drawing_area. * @return height of the drawing_area. */ u_int16 height () const { return rect.h; } /** Move the drawing_area. * @param nx new horizontal position. * @param ny new vertical position. */ void move (s_int16 nx, s_int16 ny) { rect.x = nx; rect.y = ny; } /** Resize the drawing_area. * @param nl new length. * @param nl new height. */ void resize (u_int16 nl, u_int16 nh) { rect.w = nl; rect.h = nh; } /** Assign a drawing_area to this drawing_area. * If a drawing area is assigned to another one, the zone covered * by the drawing_area is the intersection of the two. * @param da the drawing_area to assign. */ void assign_drawing_area (const drawing_area * da) { draw_to = (drawing_area *) da; } /** * Returns a pointer to the drawing_area assigned to this one. * * * @return pointer to the assigned drawing_area, NULL if none. */ drawing_area * assigned_drawing_area () const { return draw_to; } /** Detach (if needed) the drawing_area which was attached to this * one. */ void detach_drawing_area () { draw_to = NULL; } #ifndef SWIG /** * Convert an SDL_Rect into a drawing_area. * * @param r SDL_rect to convert. * * @return drawing_area which has the same dimensions and location as r. */ drawing_area& operator = (SDL_Rect& r); #endif /** * Gets the real parameters of this drawing_area. * * * @return SDL_Rect which is the intersection of this drawing area and * all the drawing areas assigned to it. */ SDL_Rect setup_rects () const; private: /// drawing_area location and size. SDL_Rect rect; /// Attached drawing_area. drawing_area *draw_to; }; #endif adonthell-0.3.8/src/nls.h0000644000175000017500000000411312756051524012157 00000000000000/* Copyright (C) 2002/2016 Kai Sterker Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ /** * @file nls.h * * @author Kai Sterker * @brief National Language Support */ #ifndef __NLS_H__ #define __NLS_H__ #include "prefs.h" #ifndef SWIG using std::string; #endif /** * Provides various services for i18n and l10n. */ class nls { public: /** * Initialize national language support. * @param myconfig The Engine's configuration */ static void init (config &myconfig); /** * Set or change the language to use. Setting the language will * never fail, but only if there is a binary message catalogue * in /po/LC_MESSAGES/ named .mo * the desired language will be actually used. * @param language The country code of the desired language. */ static void set_language (const string &language); /** * Translate the given string if it's found in the message * catalogue. This is just a wrapper around the GNU gettext * function for older versions of Python. * @param text The text to translate * @return either the translated text, or the given text if * no translation was found. */ static const string translate (const string &text); private: #ifndef SWIG /** current content of the LANGUAGE environment variable */ static std::string current_lang; #endif }; #endif // __NLS_H__ adonthell-0.3.8/src/callback.h0000644000175000017500000001745412756047316013137 00000000000000/* (C) Copyright 2000 Joel Vennin Special Thanks to Rich Hickey Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef _CALL_BACK_H_ #define _CALL_BACK_H_ #include #include class FunctorBase { protected: typedef void (FunctorBase::*PMemFunc)(); typedef void (*PFunc)(); enum {MEM_FUNC_SIZE = sizeof(PMemFunc)}; union{ PFunc func; char memFunc[MEM_FUNC_SIZE]; }; void *callee; FunctorBase():func(0),callee(0){} FunctorBase(const void *c,PFunc f, const void *mf,size_t sz):callee((void *)c) { if(c) { memcpy(memFunc,mf,sz); if(sz class MemberTranslator0:public Functor0{ public: MemberTranslator0(Callee &c, MemFunc &m):Functor0(thunk,&c,0,&m,sizeof(MemFunc)){} static void thunk(const FunctorBase &ftor) { Callee *callee = (Callee *)ftor.getCallee(); MemFunc &memFunc = (*(MemFunc*)(void *)(ftor.getMemFunc())); (callee->*memFunc)(); } }; template class FunctionTranslator0:public Functor0{ public: FunctionTranslator0(Func f):Functor0(thunk,0,(PFunc)f,0,0){} static void thunk(const FunctorBase &ftor) { (Func(ftor.getFunc()))(); } }; template inline MemberTranslator0 makeFunctor(Callee &c,TRT (CallType::* f)()) { typedef TRT (CallType::*MemFunc)(); return MemberTranslator0(c,f); } template inline MemberTranslator0 makeFunctor(const Callee &c, TRT (CallType::* f)()const) { typedef TRT (CallType::*MemFunc)()const; return MemberTranslator0(c,f); } template inline FunctionTranslator0 makeFunctor(TRT (*f)()) { return FunctionTranslator0(f); } //NO ARG WITH RETURN template class Functor0wRet:public FunctorBase{ public: Functor0wRet(){} RT operator()()const { return thunk(*this); } protected: typedef RT (*Thunk)(const FunctorBase &); Functor0wRet(Thunk t,const void *c,PFunc f,const void *mf,size_t sz): FunctorBase(c,f,mf,sz),thunk(t){} private: Thunk thunk; }; template class MemberTranslator0wRet:public Functor0wRet{ public: MemberTranslator0wRet(Callee &c,MemFunc &m): Functor0wRet(thunk,&c,0,&m,sizeof(MemFunc)){} static RT thunk(const FunctorBase &ftor) { Callee *callee = (Callee *)ftor.getCallee(); MemFunc &memFunc = (*(MemFunc*)(void *)(ftor.getMemFunc())); return ((callee->*memFunc)()); } }; template class FunctionTranslator0wRet:public Functor0wRet{ public: FunctionTranslator0wRet(Func f):Functor0wRet(thunk,0,(typename FunctionTranslator0wRet::PFunc)f,0,0){} static RT thunk(const FunctorBase &ftor) { return (Func(ftor.getFunc()))(); } }; template inline MemberTranslator0wRet makeFunctor(Functor0wRet*,Callee &c,TRT (CallType::* f)()) { typedef TRT (CallType::*MemFunc)(); return MemberTranslator0wRet(c,f); } template inline MemberTranslator0wRet makeFunctor(Functor0wRet*,const Callee &c, TRT (CallType::* f)()const) { typedef TRT (CallType::*MemFunc)()const; return MemberTranslator0wRet(c,f); } template inline FunctionTranslator0wRet makeFunctor(Functor0wRet*,TRT (*f)()) { return FunctionTranslator0wRet(f); } // 1 Argument, no return value template class Functor1 : public FunctorBase { public: Functor1() {} void operator () (P1 p1) const { thunk (*this, p1); } protected: typedef void (*Thunk) (const FunctorBase &, P1); Functor1 (Thunk t, const void *c, PFunc f, const void *mf, size_t sz) : FunctorBase (c, f, mf, sz), thunk (t) { } private: Thunk thunk; }; template class MemberTranslator1 : public Functor1 { public: MemberTranslator1 (Callee & c, MemFunc & m) : Functor1 (thunk, &c, 0, &m, sizeof (MemFunc)) { } static void thunk (const FunctorBase & ftor, P1 p1) { Callee *callee = (Callee *) ftor.getCallee (); MemFunc & memFunc (*(MemFunc *) (void *)(ftor.getMemFunc ())); (callee->*memFunc) (p1); } }; template class FunctionTranslator1 : public Functor1 { public: FunctionTranslator1 (Func f) : Functor1 (thunk, 0, f, 0, 0) { } static void thunk (const FunctorBase & ftor, P1 p1) { (Func (ftor.func)) (p1); } }; template inline MemberTranslator1 makeFunctor (Callee & c, TRT (CallType::* f) (P1)) { typedef TRT (CallType::*MemFunc) (P1); return MemberTranslator1 (c, f); } template inline MemberTranslator1 makeFunctor (const Callee & c, TRT (CallType::*const &f) (TP1) const) { typedef TRT (CallType::*MemFunc) (TP1) const; return MemberTranslator1 (c, f); } template inline FunctionTranslator1 makeFunctor (TRT (*f) (TP1)) { return FunctionTranslator1 (f); } template class MemberOf1stArgTranslator1 : public Functor1 { public: MemberOf1stArgTranslator1 (MemFunc & m) : Functor1 < P1 > (thunk, (void *)1, 0, &m, sizeof (MemFunc)) { } static void thunk (const FunctorBase & ftor, P1 p1) { MemFunc & memFunc (*(MemFunc *) (void *)(ftor.memFunc)); (p1.*memFunc) (); } }; template inline MemberOf1stArgTranslator1 makeFunctor (TRT (CallType::* &f) ()) { typedef TRT (CallType::*MemFunc) (); return MemberOf1stArgTranslator1 (f); } template inline MemberOf1stArgTranslator1 < P1, TRT (CallType::*)() const> makeFunctor (TRT (CallType::*const &f) () const) { typedef TRT (CallType::*MemFunc) () const; return MemberOf1stArgTranslator1 (f); } #endif adonthell-0.3.8/src/win_label.h0000644000175000017500000000155412756053014013321 00000000000000/* (C) Copyright 2000/2001 Joel Vennin Part of the Adonthell Project Adonthell is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Adonthell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Adonthell. If not, see . */ #ifndef WIN_LABEL_H_ #define WIN_LABEL_H_ #include "win_object.h" #include "label.h" typedef win_object